weblate icon indicating copy to clipboard operation
weblate copied to clipboard

Support msgmerge many POT files to update PO files

Open truong-hua opened this issue 4 years ago • 4 comments

In gitflow or some other development flow, we usually have many separated environment and each environment will generate different .pot files. Current Weblate design requires us to do merging all .pot files of all environment to a single all.pot file externally. Besides, I don't think that having separated Weblate component per environment is a good way because it make translators operation more complicated.

Describe the solution you'd like

Support wildcard pattern for add-on Update PO files to match POT (msgmerge) and the add-on will do concatenating all .pot files by msgcat first (document suggest to use xgettext but I tried and it frequently crashes), and then doing msgmerge

Describe alternatives you've considered

Doing concatenating all pot files somewhere outside before pushing to Weblate.

Benefits

The configuration of Weblate for multi environment project will be easier and prevent mistaken from confliction of single pot file in different environments.

truong-hua avatar Jun 20 '21 14:06 truong-hua

Maybe less relevant now that components/projects can be nested? #9731 (And, I think, addressing #11198 in one way or another could still improve this.)

keunes avatar Oct 06 '24 07:10 keunes

I'm not convinced this is something to be done in Weblate. When merging two POT files, you usually end up with merging comments like:

#. #-#-#-#-#  django.pot (Weblate 5.10.2)  #-#-#-#-#
#. Translators: Permission name
#: ../../admin/access.rst:490 weblate/auth/data.py:23
msgid "Download changes"
msgstr ""

There might be situations where this does not happen (strings are unique), but exposing this as a general add-on does not seem to be a good idea.

nijel avatar Mar 21 '25 12:03 nijel

Hi @nijel, thank for your information but the idea is about supporting multiple environment development in which the pot file generated may be different per environment.

Merging is a suggested solution.

truong-hua avatar Mar 21 '25 14:03 truong-hua

How are you merging POT files currently?

nijel avatar Mar 21 '25 15:03 nijel