Re: Transifex
Patrick Gerken <do3ccqrv-gM/[email protected]> Mon, 20 May 2013 18:31:58 +0200
| Newsgroups | gmane.comp.web.zope.plone.internationalization |
|---|---|
| Message-ID | <CAFefbnFciS4a-nD_YPn1zMY==tBf8YysEOONq4XomOgZsYaXSg@mail.gmail.com> |
--===============8541627712735484859== Content-Type: multipart/alternative; boundary=001a11c2bdee562fd004dd28e0d6 --001a11c2bdee562fd004dd28e0d6 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hi, I found a usable workflow that allows managing translations with both transifex and via git/github. It means that one person is responsible for transifex/github synchronisation. The following is my setup: I work on a personal fork of plone.app.locales. I add the collective repo as a different remote, I name it original. I use the transifex client, the configuration has been adapted that the files it generates are in the right directory, but with a tx prefix. I use my custom i18ndude script with the trmerge command. The following warnings are important: tx pull and push will silently override changes. This dictates a specific ordering. One cannot get changes from github and push them into transifex and then get the updates from transifex into github. The workflow: # 1. Get newest translations from transifex tx pull # 2. Merge translations with i18ndude for file in `ls plone/app/locales/locales/de/LC_MESSAGES | grep -v tx_` do i18ndude trmerge plone/app/locales/locales/de/LC_MESSAGES/$file plone/app/locales/locales/de/LC_MESSAGES/tx_$file > /tmp/lala cp /tmp/lala plone/app/locales/locales/de/LC_MESSAGES/$file done # 3. Manually check all changes ....... # 4. Fetch changes from the original git fetch --all # 5. Merge with original remote git merge original/master # 6. Push changes upstream (To my private repo) git push # 7. Do a pull request in github, check again, Merge there # 8. Copy the git translation files to the transifex translation files, and push them into transifex for file in `ls plone/app/locales/locales/de/LC_MESSAGES | grep -v tx_` do cp plone/app/locales/locales/de/LC_MESSAGES/$file plone/app/locales/locales/de/LC_MESSAGES/tx_$file done tx push --translations --language=3Dde Done. This looks like a bit of work, but parts of it can be automated. I think think this is already quite solid, but requires somebody dedicated to maintain these steps for his language(s). What do you think? On Mon, May 20, 2013 at 10:37 AM, Patrick Gerken <do3ccqrv-gM/[email protected]>w= rote: > H > =E2=80=8Bi, > > based on the admix command of i18ndude, I created a trmerge command for > i18ndude. Trmerge accepts two po files. > It takes the first po file as the base and updates all translations from > the second po file. Translations existing only in the seconde po file are > added too. Comments of any sort are kept. > > Shortcomings so far: > Fuzzy translations stay fuzzy. > Its the job of the committer to ensure that transifex contains the latest > version from github. Else one could accidentally override newer > translations with older translations from transifex. > The file gets rebuild, formattings in it get lost. Long strings that have > been broken into multiple lines become one string again, and the > information gets or5dered in specific ways. If comments and code comments > were ordered differently, i18ndude reorders them.; But the ordering is no= t > random so doing the import twice will not result in many changes. > > I added the i18ndude as the source to experimental/i18n.cfg and added an > i18ndude part to install i18ndude. > I did not add i18ndude to autocheckout. If you want to try my changes, co > and activate i18ndude locally. > > > i'd love to get comments on this. I am going to use the toolchain to > update german translations. > > Best regards, > > Patrick > > > On Sun, May 19, 2013 at 4:47 PM, <do3cc-Hgn/qBBDvdzwVR/[email protected]> wrote: > >> Based on the admix command of i18ndude, I created a trmerge command for >> i18ndude >> trmerge accepts two po files. >> It takes the first po file as the base, and updates all translations fro= m >> the second po file. Translations existing only in the second po file are >> added too. Comments of any sort are kept. >> >> Shortcomings I identified so far: >> Fuzzy translations stay fuzzy. >> Its the job of the committer to ensure that transifex contains the lates= t >> version from github. Else one could accidently override newer >> translations with >> older translations from transifex. >> The file gets rebuild, formattings in get lost. Long strings that have >> been broken into multiple lines become one string again, and the >> information >> gets ordered in specific ways. If comments and code comments were ordere= d >> differently, i18ndude reorders them. But the ordering is not random so >> doing the import twice will not result in many changes. >> >> I added i18ndude as the source to experimental/i18n.cfg and added an >> i18ndude part to install i18ndude. >> I did NOT add i18ndude to autocheckout. If you want to try my changes, c= o >> and activate i18ndude locally. >> >> I'd love to get comments on this. I am going to use the toolchain to >> update >> german translations. >> >> Best regards, >> >> Patrick >> >> Quoting Patrick Gerken (2013-05-18 10:50:49) >> > Yes, context info still gets lost in the po files. The importer only >> handles >> > msgid msgstr and fuzzy. >> > >> > Am 18.05.2013 08:42 schrieb "Jean-Michel FRANCOIS" <[email protected]>: >> > >> > >> > Hi, >> > >> > the last time we try it we found many issues with the plone proces= s >> other >> > than just name of files but cab t remember it. >> > >> > may be msgid with real id instead of english like label_title_id >> and the >> > fact that generated file remove the comments that we use to provid= e >> > context. >> > >> > Vincent Fretin do you remeber other issues ? >> > >> > it lakes quite a long time may be 2years so if you can spend times >> on this >> > to assure we can use it for plone core and or addons it would ve >> very nice. >> > >> > Le 17 mai 2013 18:15, "Patrick Gerken" <do3ccqrv-gM/[email protected]> a >> =C3=A9crit : >> > >> > Hi, >> > >> > I am playing with transifex for translating plone to german, >> and I am >> > quite impressed. >> > Last time I looked at it, it had automatic svn integration and >> some >> > usable UI, but apparently things have changed. >> > >> > Nowadays I can import pot and po files and after that, I can >> configure >> > transifex to automatically download newer versions from any >> url, for >> > example the raw links from github. >> > >> > Additionally, it provides a command line client that is alread= y >> > integrated in ubuntu repositories. With this command line >> client, I can >> > download updated translations from transifex to my local >> machine. I can >> > also upload new files, but I didn't try that. >> > >> > With these features, we can decide to use transifex on a per >> language >> > basis, without the need to implement anything special on githu= b. >> > >> > The Translation UI is also nice, it has keyboard shortcuts and >> it tries >> > to offer suggestions for translations. I linked a screenshot I >> made >> > while translating that gives a good example. This helps a lot >> to make >> > consistent translations.=E2=80=8B >> > [icon_10_ge] Screenshot from 2013-05-17 18:05:39.png >> > =E2=80=8B >> > >> > Throw dirt at me if this is old news, but I was quite surprise= d >> by the >> > functionality. >> > >> > For completeness sake, I had to modify the plone.pot file >> locally >> > because of a msg id with empty lines, and the po files >> downloaded with >> > the command line client had not the right names and the >> directory >> > structure did not match the one of plone.app.locales, but if >> that is >> > not configurable I'd just script the renaming of updated po >> files. >> > >> > Best regards, >> > >> > Patrick >> > >> > >> ------------------------------------------------------------------------= ------ >> > AlienVault Unified Security Management (USM) platform delivers >> complete >> > security visibility with the essential security capabilities. >> Easily >> > and >> > efficiently configure, manage, and operate all of your securit= y >> > controls >> > from a single console and one unified framework. Download a >> free trial. >> > http://p.sf.net/sfu/alienvault_d2d >> > _______________________________________________ >> > Plone-i18n mailing list >> > [email protected] >> > https://lists.sourceforge.net/lists/listinfo/plone-i18n >> > > --001a11c2bdee562fd004dd28e0d6 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr"><div class=3D"gmail_default" style=3D"font-family:courier = new,monospace">Hi,<br><br>I found a usable workflow that allows managing tr= anslations with both transifex and via git/github.<br><br></div><div class= =3D"gmail_default" style=3D"font-family:courier new,monospace"> It means that one person is responsible for transifex/github synchronisatio= n.<br><br></div><div class=3D"gmail_default" style=3D"font-family:courier n= ew,monospace">The following is my setup:<br><br></div><div class=3D"gmail_d= efault" style=3D"font-family:courier new,monospace"> I work on a personal fork of plone.app.locales.<br></div><div class=3D"gmai= l_default" style=3D"font-family:courier new,monospace">I add the collective= repo as a different remote, I name it original.<br></div><div class=3D"gma= il_default" style=3D"font-family:courier new,monospace"> I use the transifex client, the configuration has been adapted that the fil= es it generates are in the right directory, but with a tx prefix.<br></div>= <div class=3D"gmail_default" style=3D"font-family:courier new,monospace">I = use my custom i18ndude script with the trmerge command.<br> <br></div><div class=3D"gmail_default" style=3D"font-family:courier new,mon= ospace">The following warnings are important:<br></div><div class=3D"gmail_= default" style=3D"font-family:courier new,monospace">tx pull and push will = silently override changes.<br> </div><div class=3D"gmail_default" style=3D"font-family:courier new,monospa= ce">This dictates a specific ordering. One cannot get changes from github a= nd push them into transifex and then get the updates from transifex into gi= thub.<br> <br></div><div class=3D"gmail_default" style=3D"font-family:courier new,mon= ospace">The workflow:<br></div><div class=3D"gmail_default" style=3D"font-f= amily:courier new,monospace"># 1. Get newest translations from transifex<br= ></div> <div class=3D"gmail_default" style=3D"font-family:courier new,monospace">tx= pull<br></div><div class=3D"gmail_default" style=3D"font-family:courier ne= w,monospace"><br># 2. Merge translations with i18ndude<br></div><div class= =3D"gmail_default" style=3D"font-family:courier new,monospace"> for file in `ls plone/app/locales/locales/de/LC_MESSAGES | grep -v tx_`<br>= do<br>=C2=A0 i18ndude trmerge plone/app/locales/locales/de/LC_MESSAGES/$fil= e plone/app/locales/locales/de/LC_MESSAGES/tx_$file > /tmp/lala<br>=C2= =A0 cp /tmp/lala plone/app/locales/locales/de/LC_MESSAGES/$file<br> done<br><br></div><div class=3D"gmail_default" style=3D"font-family:courier= new,monospace"># 3. Manually check all changes<br>.......<br><br></div><di= v class=3D"gmail_default" style=3D"font-family:courier new,monospace"># 4. = Fetch changes from the original<br> </div><div class=3D"gmail_default" style=3D"font-family:courier new,monospa= ce">git fetch --all<br><br></div><div class=3D"gmail_default" style=3D"font= -family:courier new,monospace"># 5. Merge with original remote<br></div><di= v class=3D"gmail_default" style=3D"font-family:courier new,monospace"> git merge original/master<br><br></div><div class=3D"gmail_default" style= =3D"font-family:courier new,monospace"># 6. Push changes upstream (To my pr= ivate repo)<br>git push<br></div><div class=3D"gmail_default" style=3D"font= -family:courier new,monospace"> <br></div><div class=3D"gmail_default" style=3D"font-family:courier new,mon= ospace"># 7. Do a pull request in github, check again, Merge there<br><br><= /div><div class=3D"gmail_default" style=3D"font-family:courier new,monospac= e"> # 8. Copy the git translation files to the transifex translation files, and= push them into transifex<br> </div><div class=3D"gmail_default" style=3D"font-family:courier new,monospa= ce">for file in `ls plone/app/locales/locales/de/LC_MESSAGES | grep -v tx_`= <br>do=C2=A0=C2=A0 <br>=C2=A0 cp plone/app/locales/locales/de/LC_MESSAGES/$= file plone/app/locales/locales/de/LC_MESSAGES/tx_$file<br> done<br></div><div class=3D"gmail_default" style=3D"font-family:courier new= ,monospace">tx push --translations --language=3Dde<br><br></div><div class= =3D"gmail_default" style=3D"font-family:courier new,monospace">Done.<br><br= ></div> <div class=3D"gmail_default" style=3D"font-family:courier new,monospace">Th= is looks like a bit of work, but parts of it can be automated.<br><br></div= ><div class=3D"gmail_default" style=3D"font-family:courier new,monospace">I= think think this is already quite solid, but requires somebody dedicated t= o maintain these steps for his language(s).<br> </div><div class=3D"gmail_default" style=3D"font-family:courier new,monospa= ce"><br>What do you think?<br></div><div class=3D"gmail_default" style=3D"f= ont-family:courier new,monospace"><br></div><div class=3D"gmail_default" st= yle=3D"font-family:courier new,monospace"> <br></div></div><div class=3D"gmail_extra"><br><br><div class=3D"gmail_quot= e">On Mon, May 20, 2013 at 10:37 AM, Patrick Gerken <span dir=3D"ltr"><<= a href=3D"mailto:do3ccqrv-gM/[email protected]" target=3D"_blank">do3ccqrv@google= mail.com</a>></span> wrote:<br> <blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p= x #ccc solid;padding-left:1ex"><div dir=3D"ltr">H<div class=3D"gmail_defaul= t" style=3D"font-family:courier new,monospace;display:inline">=E2=80=8Bi,<b= r><br></div><div class=3D"gmail_default" style=3D"font-family:courier new,m= onospace;display:inline"> based on the admix command of i18ndude, I created a trmerge command for i18= ndude. Trmerge accepts two po files.<br> It takes the first po file as the base and updates all translations from th= e second po file. Translations existing only in the seconde po file are add= ed too. Comments of any sort are kept.<br><br></div><div class=3D"gmail_def= ault" style=3D"font-family:courier new,monospace;display:inline"> Shortcomings so far:<br></div><div class=3D"gmail_default" style=3D"font-fa= mily:courier new,monospace;display:inline">Fuzzy translations stay fuzzy.<b= r></div><div class=3D"gmail_default" style=3D"font-family:courier new,monos= pace;display:inline"> Its the job of the committer to ensure that transifex contains the latest v= ersion from github. Else one could accidentally override newer translations= with older translations from transifex.<br></div><div class=3D"gmail_defau= lt" style=3D"font-family:courier new,monospace;display:inline"> The file gets rebuild, formattings in it get lost. Long strings that have b= een broken into multiple lines become one string again, and the information= gets or5dered in specific ways. If comments and code comments were ordered= differently, i18ndude reorders them.; But the ordering is not random so do= ing the import twice will not result in many changes.<br> <br>I added the i18ndude as the source to experimental/i18n.cfg and added a= n i18ndude part to install i18ndude.<br></div><div class=3D"gmail_default" = style=3D"font-family:courier new,monospace;display:inline">I did not add i1= 8ndude to autocheckout. If you want to try my changes, co and activate i18n= dude locally.<div class=3D"im"> <br> <br>i'd love to get comments on this. I am going to use the toolchain t= o update german translations.<br><br></div></div><div class=3D"gmail_defaul= t" style=3D"font-family:courier new,monospace;display:inline">Best regards,= <br> <br> </div><div class=3D"gmail_default" style=3D"font-family:courier new,monospa= ce;display:inline">=C2=A0 =C2=A0 =C2=A0=C2=A0 Patrick <br></div></div><div = class=3D"HOEnZb"><div class=3D"h5"><div class=3D"gmail_extra"><br><br><div = class=3D"gmail_quote">On Sun, May 19, 2013 at 4:47 PM, <span dir=3D"ltr">&= lt;<a href=3D"mailto:do3cc-Hgn/qBBDvdzwVR/[email protected]" target=3D"_blank">do3cc@patri= ck-gerken.de</a>></span> wrote:<br> <blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p= x #ccc solid;padding-left:1ex">Based on the admix command of i18ndude, I cr= eated a trmerge command for i18ndude<br> trmerge accepts two po files.<br> It takes the first po file as the base, and updates all translations from<b= r> the second po file. Translations existing only in the second po file are<br= > added too. Comments of any sort are kept.<br> <br> Shortcomings I identified so far:<br> Fuzzy translations stay fuzzy.<br> Its the job of the committer to ensure that transifex contains the latest<b= r> version from github. Else one could accidently override newer translations = with<br> older translations from transifex.<br> The file gets rebuild, formattings in get lost. Long strings that have<br> been broken into multiple lines become one string again, and the informatio= n<br> gets ordered in specific ways. If comments and code comments were ordered<b= r> differently, i18ndude reorders them. But the ordering is not random so<br> doing the import twice will not result in many changes.<br> <br> I added i18ndude as the source to experimental/i18n.cfg and added an i18ndu= de part to install i18ndude.<br> I did NOT add i18ndude to autocheckout. If you want to try my changes, co a= nd activate i18ndude locally.<br> <br> I'd love to get comments on this. I am going to use the toolchain to up= date<br> german translations.<br> <br> Best regards,<br> <br> =C2=A0 =C2=A0 =C2=A0 Patrick<br> <br> Quoting Patrick Gerken (2013-05-18 10:50:49)<br> <div><div>> Yes, context info still gets lost in the po files. The impor= ter only handles<br> > msgid msgstr and fuzzy.<br> ><br> > Am 18.05.2013 08:42 schrieb "Jean-Michel FRANCOIS" <<a hr= ef=3D"mailto:[email protected]" target=3D"_blank">[email protected]</a>>:<= br> ><br> ><br> > =C2=A0 =C2=A0 Hi,<br> ><br> > =C2=A0 =C2=A0 the last time we try it we found many issues with the pl= one process other<br> > =C2=A0 =C2=A0 than just name of files but cab t remember it.<br> ><br> > =C2=A0 =C2=A0 may be msgid with real id instead of english like label_= title_id and the<br> > =C2=A0 =C2=A0 fact that generated file remove the comments that we use= to provide<br> > =C2=A0 =C2=A0 context.<br> ><br> > =C2=A0 =C2=A0 Vincent Fretin do you remeber other issues ?<br> ><br> > =C2=A0 =C2=A0 it lakes quite a long time may be 2years so if you can s= pend times on this<br> > =C2=A0 =C2=A0 to assure we can use it for plone core and or addons it = would ve very nice.<br> ><br> > =C2=A0 =C2=A0 Le 17 mai 2013 18:15, "Patrick Gerken" <<a = href=3D"mailto:do3ccqrv-gM/[email protected]" target=3D"_blank">do3ccqrv@googlema= il.com</a>> a =C3=A9crit=C2=A0:<br> ><br> > =C2=A0 =C2=A0 =C2=A0 =C2=A0 Hi,<br> ><br> > =C2=A0 =C2=A0 =C2=A0 =C2=A0 I am playing with transifex for translatin= g plone to german, and I am<br> > =C2=A0 =C2=A0 =C2=A0 =C2=A0 quite impressed.<br> > =C2=A0 =C2=A0 =C2=A0 =C2=A0 Last time I looked at it, it had automatic= svn integration and some<br> > =C2=A0 =C2=A0 =C2=A0 =C2=A0 usable UI, but apparently things have chan= ged.<br> ><br> > =C2=A0 =C2=A0 =C2=A0 =C2=A0 Nowadays I can import pot and po files and= after that, I can configure<br> > =C2=A0 =C2=A0 =C2=A0 =C2=A0 transifex to automatically download newer = versions from any url, for<br> > =C2=A0 =C2=A0 =C2=A0 =C2=A0 example the raw links from github.<br> ><br> > =C2=A0 =C2=A0 =C2=A0 =C2=A0 Additionally, it provides a command line c= lient that is already<br> > =C2=A0 =C2=A0 =C2=A0 =C2=A0 integrated in ubuntu repositories. With th= is command line client, I can<br> > =C2=A0 =C2=A0 =C2=A0 =C2=A0 download updated translations from transif= ex to my local machine. I can<br> > =C2=A0 =C2=A0 =C2=A0 =C2=A0 also upload new files, but I didn't tr= y that.<br> ><br> > =C2=A0 =C2=A0 =C2=A0 =C2=A0 With these features, we can decide to use = transifex on a per language<br> > =C2=A0 =C2=A0 =C2=A0 =C2=A0 basis, without the need to implement anyth= ing special on github.<br> ><br> > =C2=A0 =C2=A0 =C2=A0 =C2=A0 The Translation UI is also nice, it has ke= yboard shortcuts and it tries<br> > =C2=A0 =C2=A0 =C2=A0 =C2=A0 to offer suggestions for translations. I l= inked a screenshot I made<br> > =C2=A0 =C2=A0 =C2=A0 =C2=A0 while translating that gives a good exampl= e. This helps a lot to make<br> > =C2=A0 =C2=A0 =C2=A0 =C2=A0 consistent translations.=E2=80=8B<br> </div></div>> =C2=A0 =C2=A0 =C2=A0 =C2=A0 [icon_10_ge]=C2=A0Screenshot f= rom 2013-05-17 18:05:39.png<br> > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =E2=80=8B<br> ><br> > =C2=A0 =C2=A0 =C2=A0 =C2=A0 Throw dirt at me if this is old news, but = I was quite surprised by the<br> > =C2=A0 =C2=A0 =C2=A0 =C2=A0 functionality.<br> ><br> > =C2=A0 =C2=A0 =C2=A0 =C2=A0 For completeness sake, I had to modify the= plone.pot file locally<br> > =C2=A0 =C2=A0 =C2=A0 =C2=A0 because of a msg id with empty lines, and = the po files downloaded with<br> > =C2=A0 =C2=A0 =C2=A0 =C2=A0 the command line client had not the right = names and the directory<br> > =C2=A0 =C2=A0 =C2=A0 =C2=A0 structure did not match the one of plone.a= pp.locales, but if that is<br> > =C2=A0 =C2=A0 =C2=A0 =C2=A0 not configurable I'd just script the r= enaming of updated po files.<br> ><br> > =C2=A0 =C2=A0 =C2=A0 =C2=A0 Best regards,<br> ><br> > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 Patrick<br> ><br> > =C2=A0 =C2=A0 =C2=A0 =C2=A0 ------------------------------------------= ------------------------------------<br> > =C2=A0 =C2=A0 =C2=A0 =C2=A0 AlienVault Unified Security Management (US= M) platform delivers complete<br> > =C2=A0 =C2=A0 =C2=A0 =C2=A0 security visibility with the essential sec= urity capabilities. Easily<br> > =C2=A0 =C2=A0 =C2=A0 =C2=A0 and<br> > =C2=A0 =C2=A0 =C2=A0 =C2=A0 efficiently configure, manage, and operate= all of your security<br> > =C2=A0 =C2=A0 =C2=A0 =C2=A0 controls<br> > =C2=A0 =C2=A0 =C2=A0 =C2=A0 from a single console and one unified fram= ework. Download a free trial.<br> > =C2=A0 =C2=A0 =C2=A0 =C2=A0 <a href=3D"http://p.sf.net/sfu/alienvault_= d2d" target=3D"_blank">http://p.sf.net/sfu/alienvault_d2d</a><br> > =C2=A0 =C2=A0 =C2=A0 =C2=A0 __________________________________________= _____<br> > =C2=A0 =C2=A0 =C2=A0 =C2=A0 Plone-i18n mailing list<br> > =C2=A0 =C2=A0 =C2=A0 =C2=A0 <a href=3D"mailto:[email protected]= orge.net" target=3D"_blank">[email protected]</a><br> > =C2=A0 =C2=A0 =C2=A0 =C2=A0 <a href=3D"https://lists.sourceforge.net/l= ists/listinfo/plone-i18n" target=3D"_blank">https://lists.sourceforge.net/l= ists/listinfo/plone-i18n</a><br> </blockquote></div><br></div> </div></div></blockquote></div><br></div> --001a11c2bdee562fd004dd28e0d6-- --===============8541627712735484859== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ------------------------------------------------------------------------------ AlienVault Unified Security Management (USM) platform delivers complete security visibility with the essential security capabilities. Easily and efficiently configure, manage, and operate all of your security controls from a single console and one unified framework. Download a free trial. http://p.sf.net/sfu/alienvault_d2d --===============8541627712735484859== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Plone-i18n mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/plone-i18n --===============8541627712735484859==--