Fixes #89
This commit is contained in:
parent
9d9121c04e
commit
a7e141828d
5 changed files with 19 additions and 1 deletions
|
@ -1,4 +1,5 @@
|
|||
import Ember from 'ember';
|
||||
import localesMeta from 'croodle/locales/meta';
|
||||
|
||||
export default Ember.Component.extend({
|
||||
tagName: 'select',
|
||||
|
@ -14,7 +15,7 @@ export default Ember.Component.extend({
|
|||
return {
|
||||
id: locale,
|
||||
selected: locale === currentLocale,
|
||||
text: locale
|
||||
text: localesMeta[locale]
|
||||
};
|
||||
});
|
||||
}),
|
||||
|
|
1
app/locales/en-GB/translations.js
Normal file
1
app/locales/en-GB/translations.js
Normal file
|
@ -0,0 +1 @@
|
|||
export default {};
|
6
app/locales/meta.js
Normal file
6
app/locales/meta.js
Normal file
|
@ -0,0 +1,6 @@
|
|||
export default {
|
||||
'de': 'deutsch',
|
||||
'en': 'english',
|
||||
'en-GB': 'english (GB)',
|
||||
'es': 'español'
|
||||
};
|
|
@ -35,6 +35,7 @@ module.exports = function() {
|
|||
|
||||
app.import('bower_components/bootstrap-datepicker/js/bootstrap-datepicker.js');
|
||||
app.import('bower_components/bootstrap-datepicker/js/locales/bootstrap-datepicker.de.js');
|
||||
app.import('bower_components/bootstrap-datepicker/js/locales/bootstrap-datepicker.en-GB.js');
|
||||
app.import('bower_components/bootstrap-datepicker/js/locales/bootstrap-datepicker.es.js');
|
||||
|
||||
app.import({
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
import { moduleFor, test } from 'ember-qunit';
|
||||
import config from 'croodle/config/environment';
|
||||
import LocaleHelper from 'ember-i18n/utils/locale';
|
||||
import localesMeta from 'croodle/locales/meta';
|
||||
|
||||
moduleFor('service:i18n', 'Integration | translations', {
|
||||
integration: true
|
||||
|
@ -64,3 +65,11 @@ test('all locales have same translation strings as default locale', function(ass
|
|||
});
|
||||
});
|
||||
});
|
||||
|
||||
test('all locales have an entry in locales/meta', function(assert) {
|
||||
const i18n = this.subject();
|
||||
assert.deepEqual(
|
||||
i18n.get('locales'),
|
||||
Object.keys(localesMeta)
|
||||
);
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue