mirror of
https://github.com/pcottle/learnGitBranching.git
synced 2025-06-27 00:18:56 +02:00
Imported all zh_CN dialogs and added locale changing support Issue #42
This commit is contained in:
parent
2617357460
commit
cc5466b038
22 changed files with 1693 additions and 222 deletions
|
@ -38,7 +38,7 @@ var getStartDialog = exports.getStartDialog = function(level) {
|
|||
if (!level || !level.startDialog) {
|
||||
throw new Error('start dialog doesnt exist in that blob');
|
||||
}
|
||||
if (!level.startDialog.en) {
|
||||
if (!level.startDialog[util.getDefaultLocale()]) {
|
||||
console.warn('WARNING!! This dialog does not have intl support: ', level);
|
||||
}
|
||||
var locale = util.getLocale();
|
||||
|
@ -47,15 +47,16 @@ var getStartDialog = exports.getStartDialog = function(level) {
|
|||
}
|
||||
|
||||
// we need to return english but add their locale error
|
||||
var startCopy = _.clone(level.startDialog.en || level.startDialog);
|
||||
var startCopy = _.clone(level.startDialog[util.getDefaultLocale()] || level.startDialog);
|
||||
console.log('start copy is', startCopy, 'and defaukt', level);
|
||||
var errorAlert = {
|
||||
type: 'ModalAlert',
|
||||
options: {
|
||||
markdown: str('error-untranslated')
|
||||
}
|
||||
};
|
||||
|
||||
startCopy.childViews.unshift(errorAlert);
|
||||
|
||||
return startCopy;
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue