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

feat: replace i18nPlural pipe usage with translate compiler #719

Merged
merged 1 commit into from
Jun 14, 2021

Conversation

dhhyi
Copy link
Collaborator

@dhhyi dhhyi commented Jun 4, 2021

PR Type

[x] Feature
[x] Refactoring (no functional changes, no API changes)

What Is the Current Behavior?

ngx-translate does not support pluralization out of the box and a serious hack using i18nPlural pipe from Angular has to be used.

What Is the New Behavior?

Added a custom translate compiler, that handles pluralization.

Does this PR Introduce a Breaking Change?

[ ] Yes
[x] No

Other Information

Using the ngx-translate-messageformat-compiler did not work and would also pull additional dependencies.

@dhhyi dhhyi marked this pull request as ready for review June 4, 2021 14:36
@dhhyi dhhyi requested a review from shauke June 4, 2021 14:36
@dhhyi dhhyi added the enhancement Enhancement to an existing feature label Jun 4, 2021
@dhhyi dhhyi force-pushed the feature/translations-plural branch 4 times, most recently from a741ef0 to f6fa86e Compare June 5, 2021 08:23
@MaxKless MaxKless self-requested a review June 7, 2021 12:59
@MaxKless MaxKless self-assigned this Jun 7, 2021
@shauke shauke removed their request for review June 7, 2021 13:44
@dhhyi dhhyi force-pushed the feature/translations-plural branch from f6fa86e to 6698aa7 Compare June 7, 2021 19:17
@dhhyi dhhyi requested a review from MaxKless June 8, 2021 07:20
@dhhyi dhhyi force-pushed the feature/translations-plural branch from 6698aa7 to ad472b7 Compare June 10, 2021 13:28
@shauke shauke added this to the 0.32 milestone Jun 14, 2021
Copy link
Collaborator

@MaxKless MaxKless left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, very well tested 👍

@MaxKless MaxKless merged commit 0df6e8d into develop Jun 14, 2021
@MaxKless MaxKless deleted the feature/translations-plural branch June 14, 2021 09:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Enhancement to an existing feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants