-
Notifications
You must be signed in to change notification settings - Fork 84
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
gettext.extract --merge does not preserve default msgstr's #55
Comments
The question is: do we want to automatically copy it for all idioms? Or just for english? And which one is a better default even for other languages, showing no text or showing the text in english? It feels copying msgstr for the merge is indeed the best way to go. |
I was thinking only for English, otherwise you'll have stray english fragments to track down when you make changes |
@chrismccord right. assuming you don't track those down, the website/app will show no text, which I think is worse even for non-english languages? |
The idea would be to turn a @josevalim / @chrismccord Do you think people would use |
I like what @whatyouhide is proposing. It prevents the case of showing no text where no translation is yet provided, making it easy for a programmer to internationalize up front and defer localization. It also yields a translation file that a translator can more easily and intuitively complete (i.e., they don’t have to delete text or hunt for where they left off). It also facilitates piecemeal translation: it’s clear where translations are missing in the |
Also, the tools for working with |
@endersstocker the parsing may not be clearly defined, but I wouldn't do things like What I was proposing was doing this at a higher level, in the |
@whatyouhide I’m with you. I meant parsing in a broader sense. I’m saying keep the |
@whatyouhide just so I understand, do tools like poedit use things like At first, replacing |
@josevalim I'm not sure but when you take a The translations that it reports as "not translated yet" are just translations with empty |
@whatyouhide so we should do it on our gettext side, you are right. If we have an empty string, we should show msgid. |
@josevalim yep. Should we warn somewhere for this kind of things? Something akin to |
If we are going to warn, then we need a way to copy the msgid to msgstr, at least for english based locales. Otherwise, I would go with no warning. |
Ok, #56 got merged so now the behaviour for translations with empty |
😻 |
I may be missing something, but when running
mix gettext.extract --merge
for the first time, I find all the message strings are blank. This results in all templates returning blank strings until I go fill in the translations. It seems like a better approach would be to have the msgid copied over to the msgstr. Thoughts?Example of generated .po
Example of what I'd like to be generated:
The text was updated successfully, but these errors were encountered: