Language chooser control show full names of languages

Closes-Bug:#1443922

Change-Id: Id0c4f0a8cd42cd583f98ad7347264821071f875f
This commit is contained in:
Kate Pimenova 2015-06-10 15:43:45 +03:00
parent 2ff95c0c5f
commit fe959450ad
4 changed files with 9 additions and 2 deletions

View File

@ -30,6 +30,9 @@ define([
getLocaleName: function(locale) { getLocaleName: function(locale) {
return i18n('language', {lng: locale}); return i18n('language', {lng: locale});
}, },
getLanguageName: function(locale) {
return i18n('language_name', {lng: locale});
},
getAvailableLocales: function() { getAvailableLocales: function() {
return _.keys(translations).sort(); return _.keys(translations).sort();
}, },

View File

@ -665,7 +665,7 @@ button, .btn:not(.btn-link) {.font-semibold;}
} }
&.language-popover { &.language-popover {
.popover-layout(@index: 3, @width: 90px); .popover-layout(@index: 3, @width: 110px);
a { a {
cursor: pointer; cursor: pointer;
} }

View File

@ -2,6 +2,7 @@
"en-US": { "en-US": {
"translation": { "translation": {
"language": "EN", "language": "EN",
"language_name": "English",
"common": { "common": {
"title": "Fuel Dashboard", "title": "Fuel Dashboard",
"select_all": "Select All", "select_all": "Select All",
@ -784,6 +785,7 @@
"zh-CN": { "zh-CN": {
"translation": { "translation": {
"language": "CN", "language": "CN",
"language_name": "中国语文",
"common": { "common": {
"title": "Fuel Dashboard", "title": "Fuel Dashboard",
"select_all": "选择全部", "select_all": "选择全部",
@ -1307,6 +1309,7 @@
"ja-JP": { "ja-JP": {
"translation": { "translation": {
"language": "JA", "language": "JA",
"language_name": "日本語",
"common": { "common": {
"title": "Fuel ダッシュボード", "title": "Fuel ダッシュボード",
"select_all": "全部選択", "select_all": "全部選択",
@ -1766,6 +1769,7 @@
"ko-KR": { "ko-KR": {
"translation": { "translation": {
"language": "KO", "language": "KO",
"language_name": "한국말",
"common": { "common": {
"title": "Fuel 대시보드", "title": "Fuel 대시보드",
"select_all": "모두선택", "select_all": "모두선택",

View File

@ -198,7 +198,7 @@ function($, _, i18n, Backbone, React, utils, models, controls, componentMixins,
return ( return (
<li key={locale} className={utils.classNames({active: locale == currentLocale})}> <li key={locale} className={utils.classNames({active: locale == currentLocale})}>
<a onClick={_.partial(this.changeLocale, locale)}> <a onClick={_.partial(this.changeLocale, locale)}>
{i18n.getLocaleName(locale)} {i18n.getLanguageName(locale)}
</a> </a>
</li> </li>
); );