Merge pull request #15850 from civicrm/5.20
[civicrm-core.git] / tests / qunit / crm-translate / test.js
CommitLineData
f97524d9
TO
1module('Translation');
2
3test('ts()', function() {
3f3bba82 4 equal(ts('Lexicographical enigma'), "Lexicographical enigma", "If a string has no translation, pass it through");
f97524d9 5 equal(ts('One, two, three'), "Un, deux, trois", "We expect translations to work");
3f3bba82 6 equal(ts('I know'), "Je sais", "We expect translations to work");
f97524d9
TO
7});
8
ed7225e6
CW
9test('CRM.ts()', function() {
10 (function (ts) {
3f3bba82
TO
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");
ed7225e6 14 }(CRM.ts('org.example.foo')));
f97524d9 15});