You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey all! Thanks for your work in bringing this very useful tool to Vue 3.
I'm trying to use the JSON compiler tool to assist in building translations for my app, but I'm noticing that the paths for the individual locales are hard-coded in a few places.
I can override the folder name by just setting the locale name as es_ES.UTF-8/LC_MESSAGES (although that feels a little hacky), but the extractor hard-codes in the app.po path afterwards. That isn't the namespace I use for my translations, and renaming it would involve a lot of downstream difficulty.
Would it be possible to have the locales config optionally be a callback function returning the path for each locale's translation? Similar to the existing map call that's done on the library side, but checking if the config value is a function and then calling that instead to yield the locales to work with and their respective paths.
The text was updated successfully, but these errors were encountered:
BusterNeece
changed the title
$locale/app.po hard-coded into locale extract script$locale/app.po hard-coded into locale compile script
Jul 22, 2023
That isn't the namespace I use for my translations
the namespace and .po-file names don't have to match, do they? also check out flat: true in the output settings, maybe that fits your needs better.
we will consider adding something like this for the next major version that will have quite a few breaking changes, but i'm afraid we cannot justify investing much time in this project at the moment.
feel free to open a PR and implement it yourself if this is very important to you.
Hey all! Thanks for your work in bringing this very useful tool to Vue 3.
I'm trying to use the JSON compiler tool to assist in building translations for my app, but I'm noticing that the paths for the individual locales are hard-coded in a few places.
In my case, my folder structure looks like:
I can override the folder name by just setting the locale name as
es_ES.UTF-8/LC_MESSAGES
(although that feels a little hacky), but the extractor hard-codes in theapp.po
path afterwards. That isn't the namespace I use for my translations, and renaming it would involve a lot of downstream difficulty.Would it be possible to have the
locales
config optionally be a callback function returning the path for each locale's translation? Similar to the existingmap
call that's done on the library side, but checking if the config value is a function and then calling that instead to yield the locales to work with and their respective paths.The text was updated successfully, but these errors were encountered: