Zolko wrote: ↑Tue Jun 01, 2021 6:33 pm
...that's a lot of extra code: do we need to add them for each file and command ? Is it really worth the complexity ? The code becomes much less readable.
Sorry, I completely missed the post here...
should be imported in all files containing strings which need translation.
This brings in the two translation-related functions and also makes the Asm4-translation-path known to Qt.
Imho the problem with translation is not so much that it introduces complex code (it's just wrapping strings in a function call after all), but rather that it feels like adding a lot of ballast all over the place.
There might be ways to make things look cleaner and hence enhance readability (maybe by creating a new variable for all translated string or the like) but in the end all strings need to be wrapped one way or the other.
Personally, I find QT_TRANSLATE_NOOP
to be especially "hard on the eyes", but didn't find a good way around it, as pylupdate
doesn't seem to support multiple aliases for translate
in a single run...