fulls1z3 / ngx-i18n-router

Route internationalization utility for Angular
MIT License
35 stars 2 forks source link

fix(core): fix improper route translations on pipe #31

Closed fulls1z3 closed 7 years ago

fulls1z3 commented 7 years ago

** PR Checklist Please check if your PR fulfills the following requirements:

** PR Type What kind of change does this PR introduce?

[x] Bugfix
[ ] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[ ] Build related changes
[ ] CI related changes
[ ] Documentation content changes
[ ] Other... Please describe:

** What is the current behavior? As @Pipweak said:

The problem is using this kind of config structure into config.json file:

  "routes": {
    "en": {
      "ROOT.VISIT": "visit"
   },
    "fr": {
      "ROOT.VISIT": "visiter",
   }

path is an array(3) like this : 0:"fr" 1:"ROOT" 2:"VISIT"

The translation will never be found because our key "ROOT.VISIT" is splited.

Issue Number: #10

The translation is found.

** Does this PR introduce a breaking change?

[ ] Yes
[x] No

** Other information