Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

i18n: Bump Tannin dependency to 1.1.0 #16337

Merged
merged 1 commit into from
Jun 28, 2019
Merged

i18n: Bump Tannin dependency to 1.1.0 #16337

merged 1 commit into from
Jun 28, 2019

Conversation

aduth
Copy link
Member

@aduth aduth commented Jun 27, 2019

This pull request seeks to bump the Tannin dependency from 1.0.1 to 1.1.0 .

View CHANGELOGS:

Notably, this includes a couple performance improvements:

  • Accept plural_forms option as a function (aduth/tannin@9825ad4). This is particularly useful for the "default" (untranslated) locale, to avoid parsing and computing plural forms using the default 'plural=(n!=1)' plural expression.
  • Optimize postfix evaluation arguments popping, avoiding Array#splice (aduth/tannin@50cde55).

The performance impact is not expected to be dramatic (it largely affects plurals usage specifically, as singular strings are already optimized to bypass plural expression evaluation). That said, running npm run test-performance yields some improvement (~6ms reduction average time to type, from 103.4ms to 97.58ms).

Testing Instructions:

There should be no impact on localized strings. Test in both the default (English) locale and a translated (non-English) locale.

@aduth aduth added [Type] Performance Related to performance efforts [Package] i18n /packages/i18n labels Jun 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Package] i18n /packages/i18n [Type] Performance Related to performance efforts
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants