mate-desktop / libmateweather

Library to access weather information from online services
https://mate-desktop.org
GNU Lesser General Public License v2.1
21 stars 24 forks source link

regen po files for po-locations #67

Closed rbuj closed 4 years ago

rbuj commented 5 years ago
for FILE in *.po; do ./regen.sh $FILE; done
for FILE in *.po; do msgattrib --clear-fuzzy --empty --no-obsolete $FILE -o $FILE; done
./regen.sh
ls | sed -n 's/\.po$//p' > LINGUAS
mv locations.pot libmateweather.pot
for i in `cat LINGUAS`; do intltool-update --dist $i; done
for i in `cat LINGUAS`; do \
posieve set-header -sfield:"Language:$i" \
                   -srmtitle -stitle:"Libraries to allow MATE Desktop to display weather information" \
                   -sfield:"Project-Id-Version:MATE Desktop Environment" \
                   -srmcomment -srmcopyright -scopyright:"Copyright (C) "`date +"%Y"`" The MATE Team" \
                   -srmlicense -slicense:"This file is distributed under the same license as the libmateweather package." -sreorder $i.po; \
done

test

for FILE in *.po; do LANG=C msgfmt --check $FILE; done
posieve stats -s byfile ./
raveit65 commented 5 years ago

@mate-desktop/core-team @rbuj Not sure if all translations are correct after running the tool. An example from changes in de.po

 #. A city in Kazakhstan.
-#. The local name in Russian is "Kyzylorda".
+#. The local name in Russian is "Petropavlovsk".
 #.
-msgid "Qyzylorda"
-msgstr "Qysylorda"
+#, fuzzy
+msgid "Petropavl"
+msgstr "Petropawlovsk"
+
+#. A city in Kazakhstan
+msgid "Semey"
+msgstr ""

When i search for msgid "Petropavl" preferences of clock-applet gives me Petropavl, Kasachstan with eastern Kasachtan (GMT+6) as timezone. But when i am searching for msgstr "Petropawlovsk" preferences of clock-applet gives me Petropawlovsk, Russland with Kamtschatka (GMT+12) as timezone.

Not sure if this is an error with translations (maybe an translation from former Russian regions) or an issue with running the tool?

@monsta Please review and what do you think?

I mean we can't check all locations of the world after running this tool, we have to trust it (or not).

With ./regen.sh script we can generate a location.pot. Should i add this resource to transifex? Looks like translations needs to be refreshed.

monsta commented 5 years ago

This is weird... where does that script get translations for the new strings? That new Petropavl location simply got a copy of translation from Petropavlovsk-Kamchatsky, which is incorrect (got that in Russian translation as well).

rbuj commented 5 years ago

Clear fuzzy translations, remove obsolete messages.

$ for FILE in *.po; do msgattrib --clear-fuzzy --empty --no-obsolete $FILE -o $FILE; done
raveit65 commented 5 years ago

@rbuj There is a long list of strings which will be removed between line 424800 and 413352 of diff. Are you sure that this is correct? Please read again the result of your commands.

I am sorry, but if have no idea how i can approve this.

rbuj commented 5 years ago

All po files pass the test msgfmt --check. All files have the same number of messages.

LANG=C posieve stats -s byfile ./ | grep total | head -n -1 | tr -s ' ' | cut -d' ' -f 2 | uniq 
4391
monsta commented 5 years ago

Now this is even bigger than before. If this includes both cleanup and adding new msgids, it could be probably split into at least two commits.

monsta commented 5 years ago

What is posieve tool? I can't find it in Debian and Ubuntu repos...

rbuj commented 5 years ago

posieve is a command provided by pology (KDE tool) which helps to work with translations.