I observed that if a string is already translated in the German translation of OctoPrint the plugins own translation is ignored for that string. How can I change that behavior?
Interesting problem - I'm not aware of a way to do this natively (I think Gina my be the only one that knows if anyone).
Could you make a minor edit to the string to separate it? Like some punctuation or similar. What string is it? Do you need to override it because it is wrong or you have a different meaning for it?
Yes it is. The reason is a different meaning. Honestly I don't know how the language packs work and if there is some kind of namespace they can be applied to. I thought that I could create a namespace myself, e.g. by prefixing all strings with
myplugin:: and then auto generate an English translation which removes this prefix, but the English translation is not loaded. I guess that's because it is the default language, which usually doesn't need a translation.
It seems babel supports different translations based on context it just needs to be implemented. Or the simple solution: Load
en translations. I guess it's sufficient to remove this line: