direc85 / harbour-gpsinfo

GNU General Public License v2.0
5 stars 10 forks source link

lupdate issues #2

Closed martonmiklos closed 4 years ago

martonmiklos commented 4 years ago

https://github.com/direc85/harbour-gpsinfo/blob/bf0738eb117ff78de8b9fd96fa5d7bc09facf47d/harbour-gpsinfo.pro#L43

Hey,

Are you sure that the wildcarding is correct to add translation files?

I have ran lupdate with the pro file as I used to and it produces a 'translations/harbour-gpsinfo_*.ts' file instead of updating the translations (same happens when I hit Tools -> external -> Linguist -> Update translation in the SFOS IDE):

mm@lapos:~/Projektek/jolla/sailfish-gpsinfo$ ls translations/*
translations/harbour-gpsinfo_de.ts  translations/harbour-gpsinfo_fr.ts  translations/harbour-gpsinfo_pl.ts  translations/harbour-gpsinfo.ts
translations/harbour-gpsinfo_es.ts  translations/harbour-gpsinfo_hu.ts  translations/harbour-gpsinfo_ru.ts  translations/harbour-gpsinfo-zh_CN.ts
translations/harbour-gpsinfo_fi.ts  translations/harbour-gpsinfo_nl.ts  translations/harbour-gpsinfo_sv.ts
mm@lapos:~/Projektek/jolla/sailfish-gpsinfo$ lupdate harbour-gpsinfo.pro 
Info: creating stash file /home/mm/Projektek/jolla/sailfish-gpsinfo/.qmake.stash
Updating 'translations/harbour-gpsinfo_*.ts'...
    Found 0 source text(s) (0 new and 0 already existing)
mm@lapos:~/Projektek/jolla/sailfish-gpsinfo$ ls translations/*
 translations/harbour-gpsinfo_de.ts   translations/harbour-gpsinfo_fr.ts   translations/harbour-gpsinfo_pl.ts  **'translations/harbour-gpsinfo_*.ts'**
 translations/harbour-gpsinfo_es.ts   translations/harbour-gpsinfo_hu.ts   translations/harbour-gpsinfo_ru.ts   translations/harbour-gpsinfo.ts
 translations/harbour-gpsinfo_fi.ts   translations/harbour-gpsinfo_nl.ts   translations/harbour-gpsinfo_sv.ts   translations/harbour-gpsinfo-zh_CN.ts

I have tried to specify the translation file with the -ts option and it removed all entries from the ts file:

mm@lapos:~/Projektek/jolla/sailfish-gpsinfo$ lupdate harbour-gpsinfo.pro -ts translations/harbour-gpsinfo_hu.ts -no-obsolete
Info: creating stash file /home/mm/Projektek/jolla/sailfish-gpsinfo/.qmake.stash
lupdate warning: TS files from command line will override TRANSLATIONS in /home/mm/Projektek/jolla/sailfish-gpsinfo/harbour-gpsinfo.pro.
Updating 'translations/harbour-gpsinfo_hu.ts'...
    Found 0 source text(s) (0 new and 0 already existing)
    Removed 76 obsolete entries
direc85 commented 4 years ago

You're right, there were issues with that. All I really checked was that there were .qm files included withing the project, I don't know why it worked for me, but not for you...

Can you still reproduce the issue?

martonmiklos commented 4 years ago

The lupdate is not producing the qm binaries (the lrelease does that), but updating the ts files with new translations.

By listing the translations in the pro file it updates the ts files without problem. Thanks for the quick response and fix!