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

Feature(Locale): Pipes are not optimized #632

Open
1 task done
ben12 opened this issue Feb 28, 2023 · 0 comments
Open
1 task done

Feature(Locale): Pipes are not optimized #632

ben12 opened this issue Feb 28, 2023 · 0 comments
Labels
enhancement New feature or request PRs welcome

Comments

@ben12
Copy link
Contributor

ben12 commented Feb 28, 2023

Is there an existing issue for this?

  • I have searched the existing issues

Which Transloco package(s) will this feature affect?

Locale

Is your feature request related to a problem? Please describe

translocoCurrency, translocoDate, translocoDecimal and translocoPercent pipes are not optimized. They use an impure pipe, so each call will reformat the same value without optimization.

Describe the solution you'd like

Like transloco pipe, the value must be formatted only if the value or params changes (équivalent to key + params in transloco pipe).

Describe alternatives you've considered

Create my own pipe using the `transloco` pipe model.

Additional context

https://github.com/ngneat/transloco/blob/master/libs/transloco/src/lib/transloco.pipe.ts

VS

https://github.com/ngneat/transloco/blob/master/libs/transloco-locale/src/lib/pipes/transloco-currency.pipe.ts
https://github.com/ngneat/transloco/blob/master/libs/transloco-locale/src/lib/pipes/transloco-date.pipe.ts
https://github.com/ngneat/transloco/blob/master/libs/transloco-locale/src/lib/pipes/transloco-decimal.pipe.ts
https://github.com/ngneat/transloco/blob/master/libs/transloco-locale/src/lib/pipes/transloco-percent.pipe.ts

I would like to make a pull request for this feature

Yes

@shaharkazaz shaharkazaz added enhancement New feature or request PRs welcome labels Feb 28, 2023
ben12 added a commit to ben12/transloco that referenced this issue Oct 26, 2023
ben12 added a commit to ben12/transloco that referenced this issue Oct 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request PRs welcome
Projects
None yet
Development

No branches or pull requests

2 participants