[Localization] Adding Translations For New language To Qt6
Kizito Birabwa
kbirabwa at yahoo.co.uk
Sun Jan 12 23:10:27 CET 2025
Hello again,
Following the advice to use the lupdate and the German translation, I have created and edited a qtbase_lg.ts file for qt6.
However, when I try to crate a commit by running ninja stage-ts as described on the Qt Localization Wiki page the following happens:
[muwawa at muwawa qttranslations ((v6.7.3))]$ ninja stage-ts
[1/1] cd /home/muwawa/nls/Ebikyusibwa/Qt/build/qt6/qttranslations && /...usibwa/Qt/build/qt6/qttranslations/translations/git-stage-script.cmake
FAILED: translations/CMakeFiles/stage-ts /home/muwawa/nls/Ebikyusibwa/Qt/build/qt6/qttranslations/translations/CMakeFiles/stage-ts
cd /home/muwawa/nls/Ebikyusibwa/Qt/build/qt6/qttranslations && /usr/bin/cmake -DLCONVERT_BIN="/usr/lib64/qt6/bin/lconvert" -P /home/muwawa/nls/Ebikyusibwa/Qt/build/qt6/qttranslations/translations/git-stage-script.cmake
CMake Error: Not a file: /home/muwawa/nls/Ebikyusibwa/Qt/build/qt6/qttranslations/translations/git-stage-script.cmake
CMake Error: Error processing file: /home/muwawa/nls/Ebikyusibwa/Qt/build/qt6/qttranslations/translations/git-stage-script.cmake
ninja: build stopped: subcommand failed.
[muwawa at muwawa qttranslations ((v6.7.3))]$
I have checked the file that it complains about:
[muwawa at muwawa qttranslations ((v6.7.3))]$ cd translations
[muwawa at muwawa translations ((v6.7.3))]$ pwd
/home/muwawa/nls/Ebikyusibwa/Qt/qt6/qttranslations/translations
[muwawa at muwawa translations ((v6.7.3))]$ ls -al | grep git-stage-script.cmake
-rw-r--r-- 1 muwawa muwawa 1289 Des 21 20:41 git-stage-script.cmake
[muwawa at muwawa translations ((v6.7.3))]$
>From it's content git-stage-script.cmake looked as though it ought to be executable, however the same failure happens even when I make it so:
[muwawa at muwawa qttranslations ((v6.7.3))]$ ninja stage-ts
[1/1] cd /home/muwawa/nls/Ebikyusibwa/Qt/build/qt6/qttranslations &&...ibwa/Qt/build/qt6/qttranslations/translations/git-stage-script.cmake
FAILED: translations/CMakeFiles/stage-ts /home/muwawa/nls/Ebikyusibwa/Qt/build/qt6/qttranslations/translations/CMakeFiles/stage-ts
cd /home/muwawa/nls/Ebikyusibwa/Qt/build/qt6/qttranslations && /usr/bin/cmake -DLCONVERT_BIN="/usr/lib64/qt6/bin/lconvert" -P /home/muwawa/nls/Ebikyusibwa/Qt/build/qt6/qttranslations/translations/git-stage-script.cmake
CMake Error: Not a file: /home/muwawa/nls/Ebikyusibwa/Qt/build/qt6/qttranslations/translations/git-stage-script.cmake
CMake Error: Error processing file: /home/muwawa/nls/Ebikyusibwa/Qt/build/qt6/qttranslations/translations/git-stage-script.cmake
ninja: build stopped: subcommand failed.
[muwawa at muwawa qttranslations ((v6.7.3))]$ ls -al translations/git-stage-script.cmake
-rwxr-xr-x 1 muwawa muwawa 1289 Des 21 20:41 translations/git-stage-script.cmake*
[muwawa at muwawa qttranslations ((v6.7.3))]$
Could you advise me on how to successfully complete this stage please?
Regards,
Kizito
On Sunday, 22 December 2024 at 16:15:28 GMT, Oswald Buddenhagen via Localization <localization at qt-project.org> wrote:
On Sun, Dec 22, 2024 at 02:50:20PM +0000, Kizito Birabwa via Localization wrote:
>If I put 'ts-untranslated' as in the instructions for Qt5, ninja again
>does not recognise the target:
>
>ninja: error: unknown target 'ts-untranslated'
>
that seems like a bug. please file a report against qt, component build
system.
>For Qt5 I ended up having to get templates from the link to
>https://l10n-files.qt.io/l10n-files/, that was about seven months ago.
>This time the link just presents me with a blank page.
>
yeah, it's broken. the issues that prevented me from fixing it were
fixed meanwhile, so i should give it another try ...
for the time being, you can use the german translation as a template, as
it's being kept up to date (the one for 6.9 is pending on gerrit, but
you seem to want to target 6.7 anyway). use `lupdate foo_qt6_de.ts -xts
foo_qt5_lg.ts -ts foo_qt6_lg.ts` to transplant your qt5 translations
into it (at least i think this command should work ...).
_______________________________________________
Localization mailing list
Localization at qt-project.org
https://lists.qt-project.org/listinfo/localization
More information about the Localization
mailing list