Merge branch 'soon' into staging
This commit is contained in:
@@ -71,10 +71,25 @@ define(req, function(Util, AppConfig, Default, Language) {
|
||||
});
|
||||
}
|
||||
|
||||
Util.extend(messages, Default);
|
||||
var extend = function (a, b) {
|
||||
for (var k in b) {
|
||||
if (Util.isObject(b[k])) {
|
||||
a[k] = Util.isObject(a[k]) ? a[k] : {};
|
||||
extend(a[k], b[k]);
|
||||
continue;
|
||||
}
|
||||
if (Array.isArray(b[k])) {
|
||||
a[k] = b[k].slice();
|
||||
continue;
|
||||
}
|
||||
a[k] = b[k] || a[k];
|
||||
}
|
||||
};
|
||||
|
||||
extend(messages, Default);
|
||||
if (Language && language !== defaultLanguage) {
|
||||
// Add the translated keys to the returned object
|
||||
Util.extend(messages, Language);
|
||||
extend(messages, Language);
|
||||
}
|
||||
|
||||
messages._languages = map;
|
||||
|
||||
@@ -17,7 +17,7 @@ Translations can now be made using [Weblate](https://weblate.cryptpad.fr). We ma
|
||||
|
||||
## Translate an existing language
|
||||
|
||||
* All translations can be done using the Weblate UI. For better help about how to use the tool, please check the [Weblate documentation](https://docs.weblate.org/en/latest/user/index.html).
|
||||
* All translations can be done using the Weblate UI. For better help about how to use the tool, please check the [Weblate documentation](https://docs.weblate.org/en/latest/).
|
||||
* Our Weblate instance is configured to always require approval for changes.
|
||||
|
||||
### Update an existing translation
|
||||
|
||||
Reference in New Issue
Block a user