mirror of
https://github.com/discourse/discourse.git
synced 2024-11-23 02:50:00 +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."
|
||||
|
||||
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"
|
||||
|
||||
rate_limit_create_topic: "After creating a topic, users must wait (n) seconds before creating another topic."
|
||||
|
|
|
@ -594,6 +594,9 @@ developer:
|
|||
client: true
|
||||
default: 5
|
||||
active_user_rate_limit_secs: 60
|
||||
verbose_localization:
|
||||
default: false
|
||||
client: true
|
||||
|
||||
embedding:
|
||||
embeddable_host: ''
|
||||
|
|
Loading…
Reference in New Issue
Block a user