Closed michalpulpan closed 1 year ago
Hi @michalpulpan! Any news on this?
Hi @michalpulpan! Any news on this?
Hi, I'm sorry, I completely forgot about this 🤦 . I'll do it ASAP!
Oh, and I don't understand why the yarn.lock has changed. Maybe we don't have the same node version or something.
I din't notice it. Do you think I should restore it to the version in a main branch? 🤔
@cvolant Pushed proposed fixes. 😊 Please let me know how to deal with the yarn.lock. Otherwise I'm ready!
Hi @michalpulpan, thank you for the update, and sorry for the delay, I was off for some days.
To solve the yarn.lock, you can try: git checkout master -- yarn.lock
.
Then I will merge it and release a new version.
Hi @michalpulpan, thank you for the update, and sorry for the delay, I was off for some days.
To solve the yarn.lock, you can try:
git checkout master -- yarn.lock
.Then I will merge it and release a new version.
Hi, no problem 😊. Thank you for the trick, hopefully it worked out and yarn.lock
is merged from master
This PR tries to implement logic supporting
fallbackLng
object in the i18n config (more described in the #58). The requirement was basically to implement:So that we don't have to store redundant data in our
_routes.json
and be fully compactible with i18n-next fallbackLng.It implements a function
getPathFromPaths
(sorry for this naminggetPath
is already usedplugin/getRouteBranchReRoutes.ts
👀 ). It was necessary to extendtypes.ts
a bit with (fallbackLng
object inTNtrData
) and to create customNTRI18NConfig
extending originalI18NConfig
.With this we should be now able to resolve the logic described above.
❗ But, this doesn't (yet) implement logic of nonExplicitSupportedLngs and it could still raise warning of Max custom routes reached. I'm currently not 100% sure how to implement it so we could do different PR for it?.
All previous test cases pass and since we have to use different
defaultNtrData
in test cases (due tofallbackLng
dict ) I addedsetEnvDataFallbackLng
function with which we have to run beforefallbackLng
is tested (or it's presence). Hope it's clear and okay like this. It's a lot of redundant test but I did not workout how to make basically test it more intelligently without ruining previous tests (and addingfallbackLng
everywhere).Thank you for your feedback @cvolant !