How are the Qt translation tools deriving these strings?
-
We use the lupdate tool directly in our translation workflow. Very often, it will mark strings as "unfinished" when they do have valid translations.
I was just checking these strings now, and noting that 90% of them are that we simply renamed or moved the source file in question. Ok, fair, Qt isn't 100% sure it's the same text.
But there's also this case (for instance, in the German ts file):
<message> - <location filename="../src/SettingsDialog/SettingsPageInputLabels.cpp" line="480"/> - <source>Done</source> + <location filename="../src/SettingsDialog/SettingsPageInputLabels.cpp" line="492"/> + <source>Save</source> <comment>Settings dialog accept button</comment> - <translation>Fertig</translation> + <translation type="unfinished">Speichern</translation> </message>In this case we changed the source text from "Done" to "Save". But how on earth does Qt know that it should translate "Save" as "Speichern"? Where did it get "Speichern" from?
-
We use the lupdate tool directly in our translation workflow. Very often, it will mark strings as "unfinished" when they do have valid translations.
I was just checking these strings now, and noting that 90% of them are that we simply renamed or moved the source file in question. Ok, fair, Qt isn't 100% sure it's the same text.
But there's also this case (for instance, in the German ts file):
<message> - <location filename="../src/SettingsDialog/SettingsPageInputLabels.cpp" line="480"/> - <source>Done</source> + <location filename="../src/SettingsDialog/SettingsPageInputLabels.cpp" line="492"/> + <source>Save</source> <comment>Settings dialog accept button</comment> - <translation>Fertig</translation> + <translation type="unfinished">Speichern</translation> </message>In this case we changed the source text from "Done" to "Save". But how on earth does Qt know that it should translate "Save" as "Speichern"? Where did it get "Speichern" from?
@Yuri-Habadakas said in How are the Qt translation tools deriving these strings?:
But how on earth does Qt know that it should translate "Save" as "Speichern"? Where did it get "Speichern" from?
From other places where you used 'Save'
-
Hi,
Do you mean that your translation files contains Speichern or just that it is shown when running your application ?
-
@Yuri-Habadakas said in How are the Qt translation tools deriving these strings?:
But how on earth does Qt know that it should translate "Save" as "Speichern"? Where did it get "Speichern" from?
From other places where you used 'Save'
@Christian-Ehrlicher right... I suppose that's why it marked it as
unfinishedin the .ts files, for the translators to confirm...Is it really as simple as it finding any random instance of the string being used before? I'm not surprised that it's guessed that (eg) the translation formerly in "src/Sidebar/CloudSyncLoginDialog.cpp" is the same as the one in the "new" "src/SettingsDialog/CloudLoginDialog.cpp" (when the file was simply renamed). But I am surprised that it's pulled a string for a totally new dialog which did not previously exist.
@SGaist said in How are the Qt translation tools deriving these strings?:
Hi,
Do you mean that your translation files contains Speichern or just that it is shown when running your application ?
The translation files. I have no reason to assume that's not shown in the application, but I haven't checked.
-
@Christian-Ehrlicher right... I suppose that's why it marked it as
unfinishedin the .ts files, for the translators to confirm...Is it really as simple as it finding any random instance of the string being used before? I'm not surprised that it's guessed that (eg) the translation formerly in "src/Sidebar/CloudSyncLoginDialog.cpp" is the same as the one in the "new" "src/SettingsDialog/CloudLoginDialog.cpp" (when the file was simply renamed). But I am surprised that it's pulled a string for a totally new dialog which did not previously exist.
@SGaist said in How are the Qt translation tools deriving these strings?:
Hi,
Do you mean that your translation files contains Speichern or just that it is shown when running your application ?
The translation files. I have no reason to assume that's not shown in the application, but I haven't checked.
@Yuri-Habadakas said in How are the Qt translation tools deriving these strings?:
But I am surprised that it's pulled a string for a totally new dialog which did not previously exist.
Why - it's a simple string compare and helpful for the translators.
-
@Yuri-Habadakas said in How are the Qt translation tools deriving these strings?:
But I am surprised that it's pulled a string for a totally new dialog which did not previously exist.
Why - it's a simple string compare and helpful for the translators.
@Christian-Ehrlicher said in How are the Qt translation tools deriving these strings?:
@Yuri-Habadakas said in How are the Qt translation tools deriving these strings?:
But I am surprised that it's pulled a string for a totally new dialog which did not previously exist.
Why - it's a simple string compare and helpful for the translators.
Well, I guess because it has no idea whether it's still valid in the context of the new location (and neither do I). But then again, I suppose that's why it marks it with
unfinished, and that flag gets used by the Qt-native translation tools?(We use a different translation tool, and some scripts that convert the .ts files, and I only recently discovered this behaviour, and that the
unfinishedbusiness wasn't being passed on by the conversion script!...) -
Y Yuri Habadakas has marked this topic as solved