Commit Graph

8 Commits (9256c8332ac75f5e3545c928a464434af25c3a4b)

Author SHA1 Message Date
Peter Jaszkowiak 59ed13b581 Rewrite translator for efficiency and clarity ()
* Rewrite translator for efficiency and clarity

* Fixed failing tests

* Gorram tabs

* Move cache to Translator class, simplify creation

* Documentation and linting

* Use new translator API where it makes sense

* Revert 499fbe21fdd5b7f2735a27e76a300f69039cfbd3 (except translator.d.ts)

* promise polyfill for node<4

* Set `load` on the prototype

* Comment on Translator#translate

* Delete translator.d.ts

* Support translations added by plugins
Julian Lam ef6e72c246 added test for plugin-included translations, /cc @pitaj
barisusakli 3567f2ad55 closes
barisusakli f5a910fea0 remove incorrect test
barisusakli d4ce9c4f80 add failing test for
Julian Lam baaad13286 reverted latest change to translator match regex
- Fixes issue with parentheses in translations (closes )
- No longer marking translation keys invalid if they contain HTML,
  as that was probably not performant. Instead, parameters will
  simply be escaped via the StringJS library.
Julian Lam 99315e1c73 updated translator so that language key parameters cannot contain
html in them (or more specifically, < and >)
Julian Lam 2d48faf5df Fixed
Also related to regression first caused by the fix to  from
fcb381f922

Also, added tests for translator. omg.