Refactor l10n code. Remove use of react-intl. (#2975)
Strings from .dtd files are now accessible from Zotero.getMessage as the eventual move to Fluent would remove their distinction.
This commit is contained in:
parent
bcfdaaabab
commit
cfbfcf20bf
19 changed files with 150 additions and 181 deletions
|
@ -18,9 +18,16 @@ describe("Zotero.Intl", function() {
|
|||
it("shouldn't ignore whitespace", function () {
|
||||
assert.equal(Zotero.localeCompare("Chang", "Chan H"), 1);
|
||||
});
|
||||
|
||||
|
||||
it("shouldn't ignore leading punctuation", function () {
|
||||
assert.equal(Zotero.localeCompare("_Abcd", "Abcd"), -1);
|
||||
});
|
||||
});
|
||||
|
||||
it("there should not be duplicate string keys in .dtd and .properties files", function () {
|
||||
let dtdStrings = Object.keys(Zotero.Intl.strings);
|
||||
for (let key of dtdStrings) {
|
||||
assert.throws(() => Zotero.Intl._bundle.GetStringFromName(key));
|
||||
}
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue