-
Notifications
You must be signed in to change notification settings - Fork 469
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
fix: support localePath with path input and customized routes #1088
Conversation
It doesn't look too good at the first sight to be honest. At minimum you need to run the tests when developing. |
You will need to update tests. since, now translated links are returned |
Sorry but you need to make sure that your change and the tests are aligned. I'm sure you will find cases where your change is incorrect if you analyze the failing tests. Also, |
Now check please, tests passed successfully. |
They did not pass yet. I'll check more thoroughly when I have more time but please continue with it. (Also you have a lot of style issues that will be reported once the tests pass. You can see those locally by running |
Also, I'd like a new test added that showcases a case that was previously failing but doesn't anymore with the fix. |
@rchl Your browser test is wrong. The error is related to this line: |
The test asserts that loading a The test is not wrong, there is a bug in your changes. |
Now tests passed successfully. |
I've also asked for a new test that tests the behavior that was fixed. If you don't have time or don't know how to do it then this will have to wait until I have time. |
Example:
Current locale is: fr.
Calling
localePath('/about-us')
--> returns /fr/a-propos;or calling
localePath('/en/about-us')
--> returns /fr/a-propos;tested when strategy is 'prefix_except_default'