mirror of https://github.com/rancher/ui.git
Bugs (#798)
* Only go to languages docs supports * Fix loading chinese for Safari
This commit is contained in:
parent
81ad9d96cd
commit
325a394fcb
|
|
@ -179,7 +179,7 @@ export default Ember.Service.extend(Ember.Evented, {
|
|||
docsBase: function() {
|
||||
let version = this.get(`asMap.${C.SETTING.HELP_VERSION}.value`);
|
||||
let lang = (this.get('intl._locale')[0]||'').replace(/-.*$/,'');
|
||||
if ( !lang || lang === 'none' ) {
|
||||
if ( !lang || lang === 'none' || C.LANGUAGE.DOCS.indexOf(lang) === -1 ) {
|
||||
lang = 'en';
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -67,7 +67,7 @@ export default Ember.Service.extend({
|
|||
}).then((resp) => {
|
||||
let promise;
|
||||
if ( this.get('app.needIntlPolyfill') ) {
|
||||
promise = loadScript(`${this.get('app.baseAssets')}assets/intl/locales/${language}.js?${application.version}`);
|
||||
promise = loadScript(`${this.get('app.baseAssets')}assets/intl/locales/${language.toLowerCase()}.js?${application.version}`);
|
||||
} else {
|
||||
promise = Ember.RSVP.resolve();
|
||||
}
|
||||
|
|
@ -80,6 +80,9 @@ export default Ember.Service.extend({
|
|||
});
|
||||
}).catch((err) => {
|
||||
this.get('growl').fromError('Error loading language: ' + language, err);
|
||||
if ( language !== C.LANGUAGE.DEFAULT ) {
|
||||
return this.sideLoadLanguage(C.LANGUAGE.DEFAULT);
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
|
|
|
|||
|
|
@ -136,6 +136,7 @@ var C = {
|
|||
LANGUAGE: {
|
||||
DEFAULT: 'en-us',
|
||||
FORMAT_RELATIVE_TIMEOUT: 1000,
|
||||
DOCS: ['en'],
|
||||
},
|
||||
|
||||
THEME: {
|
||||
|
|
|
|||
|
|
@ -11,4 +11,4 @@ files:
|
|||
'ja-JP': 'ja-jp'
|
||||
'pt-BR': 'pt-br'
|
||||
'ru-RU': 'ru-ru'
|
||||
'zh-CN': 'zh-Hans-CN'
|
||||
'zh-CN': 'zh-hans'
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "ui",
|
||||
"version": "1.2.3",
|
||||
"version": "1.2.4",
|
||||
"private": true,
|
||||
"directories": {
|
||||
"doc": "doc",
|
||||
|
|
|
|||
|
|
@ -2821,7 +2821,7 @@ waitKubernetes:
|
|||
addHost: '1台のホストを追加しています'
|
||||
activateHost: 'ホストがアクティブになるのを待っています'
|
||||
createStack: 'Kubernetes のシステムスタックを作成中'
|
||||
startServices: 'サービスを起動中 ({sub} of {count})'
|
||||
startServices: 'サービスを起動中'
|
||||
waitApi: 'Kubernetes API を待っています'
|
||||
createNamespace: '名前空間を作成中'
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue