Merge remote-tracking branch 'upstream/4.5' into 4.5-master-2015-03-04-18-48-05
[civicrm-core.git] / tests / qunit / crm-translate / test.js
1 module('Translation');
2
3 test('ts()', function() {
4 equal(ts('Lexicographical enigma'), "Lexicographical enigma", "If a string has no translation, pass it through");
5 equal(ts('One, two, three'), "Un, deux, trois", "We expect translations to work");
6 equal(ts('I know'), "Je sais", "We expect translations to work");
7 });
8
9 test('CRM.ts()', function() {
10 (function (ts) {
11 equal(ts('Lexicographical enigma'), "Lexicographical enigma", "If a string has no translation, pass it through");
12 equal(ts('One, two, three'), "Un, deux, trois", "Fallback to translations from default domain");
13 equal(ts('I know'), "Je connais", "We expect translations to work");
14 }(CRM.ts('org.example.foo')));
15 });