Copy en_US translation string to the target: if it's another en_XX language (e.g...
authorJames McDonald <james@jamesmcdonald.id.au>
Fri, 1 Aug 2014 04:26:15 +0000 (14:26 +1000)
committerJames McDonald <james@jamesmcdonald.id.au>
Fri, 1 Aug 2014 04:26:28 +0000 (14:26 +1000)
scripts/lib/build_dictionary.js

index cb86ad4..7a6ec62 100644 (file)
@@ -201,7 +201,14 @@ if (typeof XT === 'undefined') {
               source: stringObj.value,
               target: preExistingTranslation
             });
-          } else {
+         } else if ( destinationLang.indexOf('en') === 0 ) {
+            // if locale is en_AU en_GB copy the en_US source: strings to target:
+            stringCallback(null, {
+                key: stringObj.key,
+                source: stringObj.value,
+                target: stringObj.value
+              });
+         } else {
             // ask google (or not)
             autoTranslate(stringObj.value, apiKey, destinationLang, function (err, target) {
               stringCallback(null, {
@@ -210,7 +217,7 @@ if (typeof XT === 'undefined') {
                 target: target
               });
             });
-          }
+         };
         };
         async.map(stringsArray, processString, function (err, strings) {
           extensionCallback(null, {