The Open Source kanban (built with Meteor). Keep variable/table/field names camelCase. For translations, only add Pull Request changes to wekan/i18n/en.i18n.json , other translations are done at https://transifex.com/wekan/wekan only.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
wekan/server/lib/tests/languageNames.tests.js

31 lines
1.1 KiB

/* eslint-env mocha */
// Regression test for issue #3265:
// "Incorrect namestring for Latvian language in the menu".
//
// The supported-language list lives in imports/i18n/languages.js as a default
// export. Each entry's `load` is a lazy `() => import(...)`, so importing the
// module does NOT trigger any JSON load — the entry objects (code/tag/name) are
// available directly. We assert the Latvian entry has code "lv" and the correct
// native name "Latviešu valoda".
import { expect } from 'chai';
import languages from '/imports/i18n/languages';
// Pure helper: the correct native name for Latvian (issue #3265).
export function latvianName() {
return 'Latviešu valoda';
}
describe('language names (#3265)', function() {
it('pure helper returns the correct Latvian native name', function() {
expect(latvianName()).to.equal('Latviešu valoda');
});
it('has a Latvian entry with code "lv"', function() {
expect(languages).to.have.property('lv');
expect(languages.lv.code).to.equal('lv');
});
it('shows the correct native name for Latvian', function() {
expect(languages.lv.name).to.equal(latvianName());
});
});