{"thread":{"id":"41741","subject":"Update *.po with git.pot?","startedAt":"2016-03-18T20:19:57Z","lastAt":"2016-03-20T07:29:44Z","messageCount":3,"participants":["Ralf Thielow","Peter Krefting","Jiang Xin"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"281172","messageId":"CAN0XMO+8PQNXPRgROd9oVqHzTsgLo_k1yP-MLpqK5N44+1ShDQ@mail.gmail.com","threadId":"41741","inReplyTo":null,"subject":"Update *.po with git.pot?","fromName":"Ralf Thielow","fromEmail":"ralf.thielow@gmail.com","sentAt":"2016-03-18T20:19:57Z","receivedAt":"2016-03-18T20:19:57Z","isPatch":false,"sender":{"key":"ralf.thielow@gmail.com","avatar":"https://avatars.githubusercontent.com/u/1275832?v=4"},"body":"When a translation round starts for a Git release, the\ngit.pot file will be updated and translators msgmerge\ntheir .po-files accordingly before translating. This results\nin a huge change to the .po-file as line numbers and\nstuff gets updated.\n\nSince translations are made in one commit, this commit\nis messed up with the msgmerge update so when you\nlook at the commit later, you'll have a hard time to find\nout what the actual changes in translations were.\n\nWe could improve this by making git.pot-updates update\nthe *.po files as well, so further updates from translators\nwill only contain actual translations. I think this is what the\ngitk project does. It will make the history of *.po-files much\nmore readable.\n\nRalf\n"},{"id":"281211","messageId":"alpine.DEB.2.11.1603190750550.16189@perkele.intern.softwolves.pp.se","threadId":"41741","inReplyTo":"CAN0XMO+8PQNXPRgROd9oVqHzTsgLo_k1yP-MLpqK5N44+1ShDQ@mail.gmail.com","subject":"Re: Update *.po with git.pot?","fromName":"Peter Krefting","fromEmail":"peter@softwolves.pp.se","sentAt":"2016-03-19T06:53:12Z","receivedAt":"2016-03-19T06:53:12Z","isPatch":false,"sender":{"key":"peter@softwolves.pp.se","avatar":"https://avatars.githubusercontent.com/u/990764?v=4"},"body":"Ralf Thielow:\n\n> Since translations are made in one commit, this commit is messed up \n> with the msgmerge update so when you look at the commit later, \n> you'll have a hard time to find out what the actual changes in \n> translations were.\n\nYou can always use something like podiff \n<http://man.gnu.org.ua/manpage/?1+podiff> to find the actual changes \nin each update.\n\n> It will make the history of *.po-files much more readable.\n\nUnfortunately, it also makes merging changes more difficult. I sometimes \nqueue up bugfixes between translation runs, and having the po file be \nreformatted in commits I do not control means I would have to manually \nre-add those as there is no good merge driver than can handle that \nreformatting.\n\n-- \n\\\\// Peter - http://www.softwolves.pp.se/\n"},{"id":"281262","messageId":"CANYiYbFYrMiPWrAA0Fj4Gor4q_vTnCZqufm92dYCGpEJeNTTUA@mail.gmail.com","threadId":"41741","inReplyTo":"alpine.DEB.2.11.1603190750550.16189@perkele.intern.softwolves.pp.se","subject":"Re: Update *.po with git.pot?","fromName":"Jiang Xin","fromEmail":"worldhello.net@gmail.com","sentAt":"2016-03-20T07:29:44Z","receivedAt":"2016-03-20T07:29:44Z","isPatch":false,"sender":{"key":"worldhello.net@gmail.com","avatar":"https://avatars.githubusercontent.com/u/183860?v=4"},"body":"2016-03-19 14:53 GMT+08:00 Peter Krefting <peter@softwolves.pp.se>:\n> Ralf Thielow:\n>\n>> Since translations are made in one commit, this commit is messed up with\n>> the msgmerge update so when you look at the commit later, you'll have a hard\n>> time to find out what the actual changes in translations were.\n>\n>\n> You can always use something like podiff\n> <http://man.gnu.org.ua/manpage/?1+podiff> to find the actual changes in each\n> update.\n\nIn my worktree, I have defined some attributes and a diff driver, which can\nmake a clear diff on po/pot files.\n\nFirst, add these two lines in .git/info/attributes:\n\n        *.po diff=gettext-uniq\n        *.pot diff=gettext-uniq\n\nThen, define diff driver named \"gettext-uniq\":\n\n        git config --global diff.gettext-uniq.textconv  \"msguniq -i\n--no-location --strict -s\"\n        git config --global diff.gettext-uniq.cachetextconv   true\n\nAnd the settings above will make clean output for `git diff`, `git\nshow` commands.\n\n>> It will make the history of *.po-files much more readable.\n>\n> Unfortunately, it also makes merging changes more difficult. I sometimes\n> queue up bugfixes between translation runs, and having the po file be\n> reformatted in commits I do not control means I would have to manually\n> re-add those as there is no good merge driver than can handle that\n> reformatting.\n>\n\nIf we update \"po\" files with \"pot” file in one commit, l10n guys\ncan not merge directly, but have to use msgmerge instead of\nusing \"po-helper.sh update XX.po\".\n\nAnd some translations could not been updated, e.g. \"is.po\"\nis used for testing, and \"it.po\" and \"pt_PT.po\" have stopped\nmaintenance for years.\n\n-- \nJiang Xin\n"}]}