mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-08-05 20:12:19 +00:00
translations: temporarily using locales_new so we can work with existing
PRs (@paglias). I want to merge to develop sooner-than-later to avoid near-future conflicts. Pushing to beta
This commit is contained in:
parent
1150de9d9d
commit
6512e17454
2 changed files with 3 additions and 3 deletions
|
|
@ -2,6 +2,6 @@
|
|||
"languageName": "English",
|
||||
"removeAds": "Remove Ads",
|
||||
"clientSideStrings": {
|
||||
"removeAds": "Remove Ads Client Side"
|
||||
"removeAds": "Remove Ads"
|
||||
}
|
||||
}
|
||||
|
|
@ -85,7 +85,7 @@ var translations = {};
|
|||
|
||||
var setUpTranslations = function(locale){
|
||||
var t = translations[locale] = {};
|
||||
t.server = require(path.join(__dirname, "/../locales/", locale, 'app.json'));
|
||||
t.server = require(path.join(__dirname, "/../locales_new/", locale, 'app.json'));
|
||||
t.client = t.server.clientSideStrings;
|
||||
delete t.server.clientSideStrings;
|
||||
_.merge(t.server, t.client);
|
||||
|
|
@ -94,7 +94,7 @@ var setUpTranslations = function(locale){
|
|||
// First fetch english so we can merge with missing strings in other languages
|
||||
setUpTranslations('en');
|
||||
|
||||
fs.readdirSync(path.join(__dirname, "/../locales")).forEach(function(file) {
|
||||
fs.readdirSync(path.join(__dirname, "/../locales_new")).forEach(function(file) {
|
||||
if(file === 'en') return;
|
||||
setUpTranslations(file);
|
||||
// Merge missing strings from english
|
||||
|
|
|
|||
Loading…
Reference in a new issue