Fixed locale detection, added tests.
This commit is contained in:
parent
b3aabfe379
commit
1c4f09d419
1 changed files with 12 additions and 0 deletions
|
@ -280,6 +280,18 @@ test( "i18n", function() {
|
||||||
|
|
||||||
timestamp = App.i18n.translateTimestamp('2012-11-06T21:07:24Z', offset);
|
timestamp = App.i18n.translateTimestamp('2012-11-06T21:07:24Z', offset);
|
||||||
equal( timestamp, '11/06/2012 21:07', 'en - timestamp translated correctly' );
|
equal( timestamp, '11/06/2012 21:07', 'en - timestamp translated correctly' );
|
||||||
|
|
||||||
|
// locale alias test
|
||||||
|
// de
|
||||||
|
App.i18n.set('de');
|
||||||
|
var translated = App.i18n.translateContent('yes');
|
||||||
|
equal( translated, 'ja', 'de - yes / ja translated correctly' );
|
||||||
|
|
||||||
|
// locale detection test
|
||||||
|
// de-ch
|
||||||
|
App.i18n.set('de-ch');
|
||||||
|
var translated = App.i18n.translateContent('yes');
|
||||||
|
equal( translated, 'ja', 'de - yes / ja translated correctly' );
|
||||||
});
|
});
|
||||||
|
|
||||||
// events
|
// events
|
||||||
|
|
Loading…
Reference in a new issue