git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Update *.po with git.pot?

From
Jiang Xin <worldhello.net@gmail.com>
Date
Mar 20, 2016, 07:29 UTC
Message-ID
<CANYiYbFYrMiPWrAA0Fj4Gor4q_vTnCZqufm92dYCGpEJeNTTUA@mail.gmail.com>
In-Reply-To
<alpine.DEB.2.11.1603190750550.16189@perkele.intern.softwolves.pp.se>
2016-03-19 14:53 GMT+08:00 Peter Krefting <peter@softwolves.pp.se>:
Show 10 quoted lines
> Ralf Thielow:
>
>> Since translations are made in one commit, this commit is messed up with
>> the msgmerge update so when you look at the commit later, you'll have a hard
>> time to find out what the actual changes in translations were.
>
>
> You can always use something like podiff
> <http://man.gnu.org.ua/manpage/?1+podiff> to find the actual changes in each
> update.

In my worktree, I have defined some attributes and a diff driver, which can make a clear diff on po/pot files.

First, add these two lines in .git/info/attributes:
        *.po diff=gettext-uniq
        *.pot diff=gettext-uniq
Then, define diff driver named "gettext-uniq":
        git config --global diff.gettext-uniq.textconv  "msguniq -i
--no-location --strict -s"
        git config --global diff.gettext-uniq.cachetextconv   true

And the settings above will make clean output for `git diff`, `git show` commands.

Show 8 quoted lines
>> It will make the history of *.po-files much more readable.
>
> Unfortunately, it also makes merging changes more difficult. I sometimes
> queue up bugfixes between translation runs, and having the po file be
> reformatted in commits I do not control means I would have to manually
> re-add those as there is no good merge driver than can handle that
> reformatting.
>

If we update "po" files with "pot” file in one commit, l10n guys can not merge directly, but have to use msgmerge instead of using "po-helper.sh update XX.po".

And some translations could not been updated, e.g. "is.po" is used for testing, and "it.po" and "pt_PT.po" have stopped maintenance for years.

-- 
Jiang Xin
Previous: Peter Krefting
Message 3 of 3 in “Update *.po with git.pot?”
  1. Ralf ThielowMar 18, 2016
  2. Peter KreftingMar 19, 2016
  3. Jiang XinMar 20, 2016

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.