Skip to content

Commit 7e187aa

Browse files
authored
Fall back to English for untranslated constants (#1083)
1 parent fe5dfd8 commit 7e187aa

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

tasks/localizationtasks.js

+7-1
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,13 @@ gulp.task('ext:localization:xliff-to-json', function () {
9393
// convert xliff into json document
9494
let dict = convertXmlToDictionary(String(file.contents));
9595
Object.keys(dict).map(function(key, index) {
96-
dict[key] = dict[key]['target']
96+
let target = dict[key]['target'];
97+
if (target) {
98+
dict[key] = target;
99+
} else {
100+
// Fall back to English
101+
dict[key] = dict[key]['source'];
102+
}
97103
});
98104
file.contents = new Buffer(convertDictionaryToJson(dict));
99105

0 commit comments

Comments
 (0)