Re: [virt-tools-list] [virt-viewer PATCH 00/14] po: improve translation handling
On Tue, Mar 05, 2019 at 11:24:49AM +0100, Christophe Fergeau wrote: > A few comments on the first patch, for the rest of the series, > > Reviewed-by: Christophe Fergeau > > Did you get feedback from people involved with translations regarding > these changes? No, but in general case it will have no impact on them. We did this in libvirt a while back & have seen no complaints either. We outsourced translation to Zanata, and the people doing translations in Zanata see zero changes in content presented to them, as zanata unpacks .po files into its own DB & reconciles with the .pot. So all the metadata we discard from the .po files was never used by Zanata in the first place, as it gets it all from the pot. In the unlikely event anyone was using the .po files in git, the metadata they were relying on was always outdated & thus misleading and/or useless. They would have to re-generate the .po file to get accurate source locations. With the new system we discarded all the inaccurate metadata, and people can fully up2date metadata by running 'make update-po'. IOW, this is better for any one using .po files directly, as the info they see is now actually accurate. Regards, Daniel -- |: https://berrange.com -o-https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o-https://fstop138.berrange.com :| |: https://entangle-photo.org-o-https://www.instagram.com/dberrange :| ___ virt-tools-list mailing list virt-tools-list@redhat.com https://www.redhat.com/mailman/listinfo/virt-tools-list
Re: [virt-tools-list] [virt-viewer PATCH 00/14] po: improve translation handling
A few comments on the first patch, for the rest of the series, Reviewed-by: Christophe Fergeau Did you get feedback from people involved with translations regarding these changes? Christophe On Wed, Feb 20, 2019 at 05:50:51PM +, Daniel P. Berrangé wrote: > This applies the same improvements previously done in libvirt: > > https://www.redhat.com/archives/libvir-list/2018-April/msg01004.html > > https://www.berrange.com/posts/2018/11/29/improved-translation-po-file-handling-by-ditching-gettext-autotools-integration/ > > The key problems with our current approach are: > > - The pot & po files stored in GIT contain huge set of >annotations about source file names & line numbers. >These are out of date as soon as a change is commited >to git following a translation refresh. This makes >diffs impossible to meaningfully review, as they are >98% noise, 2% signal. > > - The po file messages are sorted by source location, >so when we move code between files, or rename files, >the po file message order changes for no good reason. >This makes diffs even more impossible to review. > > - The po files contain entries for all messages even >if most have no translation, bloating size of po/ >data stored in git > > - Whenever 'make dist' is run, it alters all the pot >and po files, so developers need to then reset their >content to match git HEAD manually. This is caused >by having auto-generated content (source file locations) >mixed in with the static content (the actual translated >strings) > > After this series, we only minimized po files in git, with > the redundated & outdated source locations info stripped. > This stripped info is re-added automatically during build > to create the real .po files, that we distribute, and/or > upload to translators in Zanata. > > As a result the po directory is smaller in size, and > when refreshing from Zanata, we have git commits that > clearly show *only* the altered translations, nothing > else. The importance of this cannot be overstated - by > having these clear diffs when doing this change in libvirt, > I discovered a serious bug in the Zanata client that has > been screwing up translations in every project that uses > Zanata by adding bogus "fuzzy" annotations. > > The particularly attractive statistic: > > 193 files changed, 11904 insertions(+), 80334 deletions(-) > > Daniel P. Berrangé (14): > po: provide custom make rules for po file management > po: remove language list from zanata configuration > po: add rules for integration with zanata > po: minimize & canonicalize translations stored in git > po: minimize af am anp ar as ast bal be bg > po: minimize bn_IN bn bo br brx bs ca cs cy da > po: minimize de_CH de el en_GB eo es et eu fa fi > po: minimize fr gl gu he hi hr hu ia > po: minimize id ilo is it ja ka kk km kn ko > po: minimize kw_GB kw@kkcor kw kw@uccor ky lt lv mai mk ml > po: minimize mn mr ms nb nds ne nl nn nso > po: minimize or pa pl pt_BR pt ro ru si sk sl > po: minimize sq sr@latin sr sv ta te tg th tr tw > po: minimize uk ur vi wba yo zh_CN zh_HK zh_TW zu > > Makefile.am |7 - > autogen.sh|1 - > build-aux/minimize-po.pl | 37 + > configure.ac |6 +- > data/Makefile.am | 12 +- > data/remote-viewer.appdata.xml.in | 12 +- > data/remote-viewer.desktop.in |4 +- > ...iewer-mime.xml.in => virt-viewer-mime.xml} |0 > m4/virt-nls.m4| 45 + > mingw-virt-viewer.spec.in |2 +- > po/Makefile.am| 115 ++ > po/POTFILES | 26 + > po/POTFILES.in| 27 - > po/README.md | 76 ++ > po/af.mini.po | 19 + > po/af.po | 864 - > po/am.mini.po | 19 + > po/am.po | 864 - > po/anp.mini.po| 19 + > po/anp.po | 864 - > po/ar.mini.po | 20 + > po/ar.po | 869 - > po/as.mini.po | 327 + > po/as.po | 884 - > po/ast.mini.po| 19 + > po/ast.po | 864 - > po/bal.mini.po| 19 + > po/bal.po | 863 - > po/be.mini.po | 20 + > po/be.po
Re: [virt-tools-list] [virt-viewer PATCH 00/14] po: improve translation handling
ping... On Wed, Feb 20, 2019 at 05:50:51PM +, Daniel P. Berrangé wrote: > This applies the same improvements previously done in libvirt: > > https://www.redhat.com/archives/libvir-list/2018-April/msg01004.html > > https://www.berrange.com/posts/2018/11/29/improved-translation-po-file-handling-by-ditching-gettext-autotools-integration/ > > The key problems with our current approach are: > > - The pot & po files stored in GIT contain huge set of >annotations about source file names & line numbers. >These are out of date as soon as a change is commited >to git following a translation refresh. This makes >diffs impossible to meaningfully review, as they are >98% noise, 2% signal. > > - The po file messages are sorted by source location, >so when we move code between files, or rename files, >the po file message order changes for no good reason. >This makes diffs even more impossible to review. > > - The po files contain entries for all messages even >if most have no translation, bloating size of po/ >data stored in git > > - Whenever 'make dist' is run, it alters all the pot >and po files, so developers need to then reset their >content to match git HEAD manually. This is caused >by having auto-generated content (source file locations) >mixed in with the static content (the actual translated >strings) > > After this series, we only minimized po files in git, with > the redundated & outdated source locations info stripped. > This stripped info is re-added automatically during build > to create the real .po files, that we distribute, and/or > upload to translators in Zanata. > > As a result the po directory is smaller in size, and > when refreshing from Zanata, we have git commits that > clearly show *only* the altered translations, nothing > else. The importance of this cannot be overstated - by > having these clear diffs when doing this change in libvirt, > I discovered a serious bug in the Zanata client that has > been screwing up translations in every project that uses > Zanata by adding bogus "fuzzy" annotations. > > The particularly attractive statistic: > > 193 files changed, 11904 insertions(+), 80334 deletions(-) > > Daniel P. Berrangé (14): > po: provide custom make rules for po file management > po: remove language list from zanata configuration > po: add rules for integration with zanata > po: minimize & canonicalize translations stored in git > po: minimize af am anp ar as ast bal be bg > po: minimize bn_IN bn bo br brx bs ca cs cy da > po: minimize de_CH de el en_GB eo es et eu fa fi > po: minimize fr gl gu he hi hr hu ia > po: minimize id ilo is it ja ka kk km kn ko > po: minimize kw_GB kw@kkcor kw kw@uccor ky lt lv mai mk ml > po: minimize mn mr ms nb nds ne nl nn nso > po: minimize or pa pl pt_BR pt ro ru si sk sl > po: minimize sq sr@latin sr sv ta te tg th tr tw > po: minimize uk ur vi wba yo zh_CN zh_HK zh_TW zu > > Makefile.am |7 - > autogen.sh|1 - > build-aux/minimize-po.pl | 37 + > configure.ac |6 +- > data/Makefile.am | 12 +- > data/remote-viewer.appdata.xml.in | 12 +- > data/remote-viewer.desktop.in |4 +- > ...iewer-mime.xml.in => virt-viewer-mime.xml} |0 > m4/virt-nls.m4| 45 + > mingw-virt-viewer.spec.in |2 +- > po/Makefile.am| 115 ++ > po/POTFILES | 26 + > po/POTFILES.in| 27 - > po/README.md | 76 ++ > po/af.mini.po | 19 + > po/af.po | 864 - > po/am.mini.po | 19 + > po/am.po | 864 - > po/anp.mini.po| 19 + > po/anp.po | 864 - > po/ar.mini.po | 20 + > po/ar.po | 869 - > po/as.mini.po | 327 + > po/as.po | 884 - > po/ast.mini.po| 19 + > po/ast.po | 864 - > po/bal.mini.po| 19 + > po/bal.po | 863 - > po/be.mini.po | 20 + > po/be.po | 866 - > po/bg.mini.po | 307 + > po/bg.po | 881 - > po/bn.mini.po
[virt-tools-list] [virt-viewer PATCH 00/14] po: improve translation handling
This applies the same improvements previously done in libvirt: https://www.redhat.com/archives/libvir-list/2018-April/msg01004.html https://www.berrange.com/posts/2018/11/29/improved-translation-po-file-handling-by-ditching-gettext-autotools-integration/ The key problems with our current approach are: - The pot & po files stored in GIT contain huge set of annotations about source file names & line numbers. These are out of date as soon as a change is commited to git following a translation refresh. This makes diffs impossible to meaningfully review, as they are 98% noise, 2% signal. - The po file messages are sorted by source location, so when we move code between files, or rename files, the po file message order changes for no good reason. This makes diffs even more impossible to review. - The po files contain entries for all messages even if most have no translation, bloating size of po/ data stored in git - Whenever 'make dist' is run, it alters all the pot and po files, so developers need to then reset their content to match git HEAD manually. This is caused by having auto-generated content (source file locations) mixed in with the static content (the actual translated strings) After this series, we only minimized po files in git, with the redundated & outdated source locations info stripped. This stripped info is re-added automatically during build to create the real .po files, that we distribute, and/or upload to translators in Zanata. As a result the po directory is smaller in size, and when refreshing from Zanata, we have git commits that clearly show *only* the altered translations, nothing else. The importance of this cannot be overstated - by having these clear diffs when doing this change in libvirt, I discovered a serious bug in the Zanata client that has been screwing up translations in every project that uses Zanata by adding bogus "fuzzy" annotations. The particularly attractive statistic: 193 files changed, 11904 insertions(+), 80334 deletions(-) Daniel P. Berrangé (14): po: provide custom make rules for po file management po: remove language list from zanata configuration po: add rules for integration with zanata po: minimize & canonicalize translations stored in git po: minimize af am anp ar as ast bal be bg po: minimize bn_IN bn bo br brx bs ca cs cy da po: minimize de_CH de el en_GB eo es et eu fa fi po: minimize fr gl gu he hi hr hu ia po: minimize id ilo is it ja ka kk km kn ko po: minimize kw_GB kw@kkcor kw kw@uccor ky lt lv mai mk ml po: minimize mn mr ms nb nds ne nl nn nso po: minimize or pa pl pt_BR pt ro ru si sk sl po: minimize sq sr@latin sr sv ta te tg th tr tw po: minimize uk ur vi wba yo zh_CN zh_HK zh_TW zu Makefile.am |7 - autogen.sh|1 - build-aux/minimize-po.pl | 37 + configure.ac |6 +- data/Makefile.am | 12 +- data/remote-viewer.appdata.xml.in | 12 +- data/remote-viewer.desktop.in |4 +- ...iewer-mime.xml.in => virt-viewer-mime.xml} |0 m4/virt-nls.m4| 45 + mingw-virt-viewer.spec.in |2 +- po/Makefile.am| 115 ++ po/POTFILES | 26 + po/POTFILES.in| 27 - po/README.md | 76 ++ po/af.mini.po | 19 + po/af.po | 864 - po/am.mini.po | 19 + po/am.po | 864 - po/anp.mini.po| 19 + po/anp.po | 864 - po/ar.mini.po | 20 + po/ar.po | 869 - po/as.mini.po | 327 + po/as.po | 884 - po/ast.mini.po| 19 + po/ast.po | 864 - po/bal.mini.po| 19 + po/bal.po | 863 - po/be.mini.po | 20 + po/be.po | 866 - po/bg.mini.po | 307 + po/bg.po | 881 - po/bn.mini.po | 256 po/bn.po | 885 - po/bn_IN.mini.po | 329 + po/bn_IN.po | 886 - po/bo.mini.po