Closed tricoder42 closed 6 years ago
Um, maybe I am missing something here, but wasn't you actually planning to do a POT approach? To have a template with extracted default messages. As far as I know, any decent PO editor/platform should allow to use such template and display default messages from it while translating a different catalog.
I've basically done a same thing by adding en-dev
locale which is a sourceLocale
so it contains default messages. Even the old POEdit allows using such file along with translation PO file.
I suppose your solution would not hurt either but feels unnecessary.
Ah, cool! I didn't know that!
I'll check it out. We'll add previously untranslated message
when we add fuzzy matching.
Is your feature request related to a problem? Please describe. While working with PO files I've found that
catalog for source locale has filled translations with default message. I'm not arguing if it's good or bad, but it's definitely different than how
lingui
orminimal
format works. These formats have empty translations in source locale catalog and default message is used duringcompile
.It's hard to translate other locales if I use custom IDs:
I completely miss the default message here.
Describe the solution you'd like I think we could use
#|
comment, which means previous untranslated string:Describe alternatives you've considered The only alternative is lookup
msgid
in source calog catalog, which has default translations or use external editing tool.Additional context If we figure out how to pass default message to catalogs, then we could remove the default translations and leave them empty (point 1).
In the future I would also like to add fuzzy matching of changed message IDs. Right now if you change message ID, new entry appears in catalog and the old one becomes obsolete. You have to copy any existing translations manually.
It would be great to detect these changes by comparing
origin
and create "fuzzy" entries:Fuzzy entry must be reviewed by translator (will raise error in
lingui compile --check
), but otherwise it works as regular message. This concept is borrowed from Django web framework.Question is: Do we need the previous msgid here? If so, we can't use
#| msgid
for default message, because it would be used here. For example, if we changemsg.hello
tomsg.hi
, the entry would look like this (the default messageHello world
is missing):@FredyC Since you improved the PO file integration, what's your opinion on this?