multiSnow / mcomix3

End of Fork
Other
97 stars 39 forks source link

Update_translations doesn't work as expected #149

Closed ACR36940 closed 3 years ago

ACR36940 commented 3 years ago

While translating mcomix3/mcomix3/mcomix/mcomix/messages/es/LC_MESSAGES/mcomix.po i detected a discrepancy between the strings on it and the strings on some .py files. Checking the build of the xgettext files, the master template mcomix.pot doesn't get updated by update_translations.sh Checking that file , the line:

VERSION=$(grep VERSION $ROOTDIR/constants.py | sed -e "s/VERSION = //" -e "s/'//g")

grabs more than intended

1.3.0.dev0 REQUIRED_PYTHON_(3, 8, 0) REQUIRED_PIL_6.2.1

with spaces and that broke the call to xgettext leaving mcomix.pot untouched. Replacing the grep regular expression for other less greedy

VERSION=$(grep "^VERSION" $ROOTDIR/constants.py | sed -e "s/VERSION = //" -e "s/'//g")

resolves the issue. Now mcomix.pot gets updated with the new strings I'm leaving attached the three files (mcomix.pot is not really necesary, gets recreated by update_translations.sh mcomix.po_spanish.gz mcomix.pot.gz update_translations.sh.gz