All of lore.kernel.org
 help / color / mirror / Atom feed
* Update *.po with git.pot?
@ 2016-03-18 20:19 Ralf Thielow
  2016-03-19  6:53 ` Peter Krefting
  0 siblings, 1 reply; 3+ messages in thread
From: Ralf Thielow @ 2016-03-18 20:19 UTC (permalink / raw)
  To: Xin Jiang, Junio C Hamano
  Cc: Trần Ngọc Quân, Peter Krefting, DJm00n,
	Marco Sousa, cwryu, Marco Paolone,
	Ævar Arnfjörð Bjarmason, Jean-Noël Avila,
	Alex Henrie, Alexander Shopov, git

When a translation round starts for a Git release, the
git.pot file will be updated and translators msgmerge
their .po-files accordingly before translating. This results
in a huge change to the .po-file as line numbers and
stuff gets updated.

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.

We could improve this by making git.pot-updates update
the *.po files as well, so further updates from translators
will only contain actual translations. I think this is what the
gitk project does. It will make the history of *.po-files much
more readable.

Ralf

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Update *.po with git.pot?
  2016-03-18 20:19 Update *.po with git.pot? Ralf Thielow
@ 2016-03-19  6:53 ` Peter Krefting
  2016-03-20  7:29   ` Jiang Xin
  0 siblings, 1 reply; 3+ messages in thread
From: Peter Krefting @ 2016-03-19  6:53 UTC (permalink / raw)
  To: Ralf Thielow
  Cc: Xin Jiang, Junio C Hamano, Trần Ngọc Quân,
	DJm00n, Marco Sousa, cwryu, Marco Paolone,
	Ævar Arnfjörð Bjarmason, Jean-Noël Avila,
	Alex Henrie, Alexander Shopov, git

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.

> 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.

-- 
\\// Peter - http://www.softwolves.pp.se/

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Update *.po with git.pot?
  2016-03-19  6:53 ` Peter Krefting
@ 2016-03-20  7:29   ` Jiang Xin
  0 siblings, 0 replies; 3+ messages in thread
From: Jiang Xin @ 2016-03-20  7:29 UTC (permalink / raw)
  To: Peter Krefting
  Cc: Ralf Thielow, Junio C Hamano, Tr¥n Ng÷c Quân,
	Dimitriy Ryazantcev, Marco Sousa, Changwoo Ryu, Marco Paolone,
	Ævar Arnfjörð Bjarmason, Jean-Noël Avila,
	Alex Henrie, Alexander Shopov, git

2016-03-19 14:53 GMT+08:00 Peter Krefting <peter@softwolves.pp.se>:
> 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.

>> 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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-03-20  7:29 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-03-18 20:19 Update *.po with git.pot? Ralf Thielow
2016-03-19  6:53 ` Peter Krefting
2016-03-20  7:29   ` Jiang Xin

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.