I18n tooling and Kotlin sources #220
-
|
I can't find much information on the Internet, but it seems that Qt I18n associates translations with classes. The problem is that The solution I can come up with is not pretty: Wrap Are there a better way to achieve this, or I'm better off using a Java/Kotlin I18n framework? I like using |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
|
I am aware of this problem. I am happy that lupdate at least reads Java files. I believe the only way automizing this is by outsourcing UI test into a Java class and use this for analyzing with lupdate. However, lupdate also understands |
Beta Was this translation helpful? Give feedback.
-
|
I found out, it is very easy to trick lupdate: project.pro project.h Main.kt my/test/KObject.kt call: lupdate seems to only look for class declarations and then collects all found tr's. You only need to replace the C++ namespace separator |
Beta Was this translation helpful? Give feedback.

I am aware of this problem. I am happy that lupdate at least reads Java files. I believe the only way automizing this is by outsourcing UI test into a Java class and use this for analyzing with lupdate. However, lupdate also understands
QApplication.translate("context", "UI text"). You could use this instead.Nevertheless, what is the output of lupdate when you read kotlin? Does it run into error or does it at least extract the tr's but with wrong class ids?