mirror of
https://github.com/discourse/discourse.git
synced 2025-04-02 04:36:01 +08:00
FEATURE: verbose localization option
This commit is contained in:
parent
66f9f5773d
commit
16c34c206d
@ -0,0 +1,25 @@
|
|||||||
|
export default {
|
||||||
|
name: 'verbose-localization',
|
||||||
|
initialize: function() {
|
||||||
|
|
||||||
|
if(Discourse.SiteSettings.verbose_localization){
|
||||||
|
var counter = 0;
|
||||||
|
var keys = {};
|
||||||
|
var t = I18n.t;
|
||||||
|
|
||||||
|
|
||||||
|
I18n.t = I18n.translate = function(scope, value){
|
||||||
|
var current = keys[scope];
|
||||||
|
if(!current) {
|
||||||
|
current = keys[scope] = ++counter;
|
||||||
|
var message = "Translation #" + current + ": " + scope;
|
||||||
|
if (!_.isEmpty(value)) {
|
||||||
|
message += ", parameters: " + JSON.stringify(value);
|
||||||
|
}
|
||||||
|
window.console.log(message);
|
||||||
|
}
|
||||||
|
return t.apply(I18n, [scope, value]) + " (t" + current + ")";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
@ -799,6 +799,7 @@ en:
|
|||||||
s3_backup_bucket: "The remote bucket to hold backups. WARNING: Make sure it is a private bucket."
|
s3_backup_bucket: "The remote bucket to hold backups. WARNING: Make sure it is a private bucket."
|
||||||
|
|
||||||
active_user_rate_limit_secs: "How frequently we update the 'last_seen_at' field, in seconds"
|
active_user_rate_limit_secs: "How frequently we update the 'last_seen_at' field, in seconds"
|
||||||
|
verbose_localization: "Show extended localization tips in the UI"
|
||||||
previous_visit_timeout_hours: "How long a visit lasts before we consider it the 'previous' visit, in hours"
|
previous_visit_timeout_hours: "How long a visit lasts before we consider it the 'previous' visit, in hours"
|
||||||
|
|
||||||
rate_limit_create_topic: "After creating a topic, users must wait (n) seconds before creating another topic."
|
rate_limit_create_topic: "After creating a topic, users must wait (n) seconds before creating another topic."
|
||||||
|
@ -594,6 +594,9 @@ developer:
|
|||||||
client: true
|
client: true
|
||||||
default: 5
|
default: 5
|
||||||
active_user_rate_limit_secs: 60
|
active_user_rate_limit_secs: 60
|
||||||
|
verbose_localization:
|
||||||
|
default: false
|
||||||
|
client: true
|
||||||
|
|
||||||
embedding:
|
embedding:
|
||||||
embeddable_host: ''
|
embeddable_host: ''
|
||||||
|
Loading…
x
Reference in New Issue
Block a user