mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-27 12:53:13 +03:00
0d9268ad86
refs https://github.com/TryGhost/Ghost/issues/15502 - this is an early implementation of an i18n provider by exporting an instance of `i18next` - there's a lot more to be done here but baby steps :)
30 lines
592 B
JavaScript
30 lines
592 B
JavaScript
const assert = require('assert');
|
|
|
|
const i18n = require('../');
|
|
|
|
describe('Can translate', function () {
|
|
describe('Dutch', function () {
|
|
let t;
|
|
|
|
before(function () {
|
|
t = i18n('nl').t;
|
|
});
|
|
|
|
it('can translate Dutch', function () {
|
|
assert.equal(t('Hello'), 'Hallo');
|
|
});
|
|
});
|
|
|
|
describe('English', function () {
|
|
let t;
|
|
|
|
before(function () {
|
|
t = i18n('en').t;
|
|
});
|
|
|
|
it('can translate English', function () {
|
|
assert.equal(t('Hello'), 'Hello');
|
|
});
|
|
});
|
|
});
|