From sflaniga at redhat.com Wed Jun 1 00:46:47 2011 From: sflaniga at redhat.com (Sean Flanigan) Date: Wed, 01 Jun 2011 10:46:47 +1000 Subject: [zanata-users] Questions around setting up zanata using the python clients In-Reply-To: <4DDFA448.3040509@redhat.com> References: <635923645.748.1306501763463.JavaMail.root@zmail07.collab.prod.int.phx2.redhat.com> <4DDFA448.3040509@redhat.com> Message-ID: <4DE58BF7.4070805@redhat.com> On 05/27/2011 11:16 PM, Bryan Kearney wrote: > On 05/27/2011 09:09 AM, Grant Gainey wrote: >> >> >> Interesting - I thought gettext wanted a layout like >> >> foo.pot >> es >> \ foo.po >> fr >> \ foo.po >> de >> \ foo.po >> >> I guess I "assumed" that layout was dictated by gettext - not so? >> >> G > > IANOAGTM > > (I am not a get text master) but we have java and a python project which > has them flat. I have ruby project which uses the directory structure. > > -- bk Gettext's own tool xgettext generates the flat structure (all pot and po files in one directory). The directory structure (with one directory per locale) is what Zanata calls the publican layout. The Maven client can't push the flat structure at present (no demand for it so far), but the Python client can: $ zanata po push The directory structure can be pushed with either client: $ zanata publican push $ mvn zanata:publican-push -- Sean Flanigan Senior Software Engineer Engineering - Internationalisation Red Hat -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 554 bytes Desc: OpenPGP digital signature URL: From sflaniga at redhat.com Wed Jun 1 01:00:46 2011 From: sflaniga at redhat.com (Sean Flanigan) Date: Wed, 01 Jun 2011 11:00:46 +1000 Subject: [zanata-users] Questions around setting up zanata using the python clients In-Reply-To: <4DDFA279.9020403@redhat.com> References: <4DDFA279.9020403@redhat.com> Message-ID: <4DE58F3E.5070805@redhat.com> On 05/27/2011 11:09 PM, Bryan Kearney wrote: > This will have a couple of things.. sorry about combining the issues: > > 1) Can you please update the unoffical rpms with an F14? Thanks! Sorry, can you reword that please? Oh, do you mean these? http://jamesni.fedorapeople.org/zanata-python-client/ James? > 2) I tried doing a make install from the code. Opened bug > https://bugzilla.redhat.com/show_bug.cgi?id=708363 > > 3) I have set up a new project. The project file is attached. My > directory structure is flat.. it has the following in one directory: > > as.po > de.po > fr.po > hi.po > ja.po > kn.po > ml.po > or.po > pt.po > ta.po > zanata.xml > zh_TW.po > bn.po > es.po > gu.po > it.po > keys.pot > ko.po > mr.po > pa.po > ru.po > te.po > zh_CN.po > > > I would like to push my po files and my pot up to the server. I am running > > zanata po push --srcdir . > > and getting the following. Any ideas? > > Loading zanata project config from: > /home/bkearney/code/candlepin/proxy/po/zanata.xml > Loading zanata/flies user config from: /home/bkearney/.config/zanata.ini > zanata/flies server: https://translate.engineering.redhat.com > zanata python client version: 1.2.3-24-g931b, zanata/flies server API > version: 1.3 > Project: candlepin > Version: 0.3 > Username: bkearney > Source language: en-US > Copy previous translations:True > PO directory (originals):. > Importing source documents only > Traceback (most recent call last): > File "/usr/bin/zanata", line 5, in > pkg_resources.run_script('zanata-python-client==1.2.3-24-g931b', > 'zanata') > File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 467, > in run_script > self.require(requires)[0].run_script(script_name, ns) > File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 1200, > in run_script > execfile(script_filename, namespace, namespace) > File > "/usr/lib/python2.7/site-packages/zanata_python_client-1.2.3_24_g931b-py2.7.egg/EGG-INFO/scripts/zanata", > line 24, in > zanata.run() > File > "/usr/lib/python2.7/site-packages/zanata_python_client-1.2.3_24_g931b-py2.7.egg/zanataclient/zanata.py", > line 953, in run > program_name=os.path.split(sys.argv[0])[1], > File > "/usr/lib/python2.7/site-packages/zanata_python_client-1.2.3_24_g931b-py2.7.egg/zanataclient/command.py", > line 310, in handle_program > command(command_options, args) > File > "/usr/lib/python2.7/site-packages/zanata_python_client-1.2.3_24_g931b-py2.7.egg/zanataclient/zanata.py", > line 737, in po_push > push(command_options, args, "software") > File > "/usr/lib/python2.7/site-packages/zanata_python_client-1.2.3_24_g931b-py2.7.egg/zanataclient/zanata.py", > line 905, in push > filelist = publicanutil.get_file_list(tmlfolder, ".pot") > File > "/usr/lib/python2.7/site-packages/zanata_python_client-1.2.3_24_g931b-py2.7.egg/zanataclient/publicanutil.py", > line 148, in get_file_list > final_file_list+=self.get_file_list(full_path, type) > File > "/usr/lib/python2.7/site-packages/zanata_python_client-1.2.3_24_g931b-py2.7.egg/zanataclient/publicanutil.py", > line 145, in get_file_list > if full_path.endswith(file_type): > TypeError: expected a character buffer object > > -- bk Could you look at this TypeError please, James? -- Sean Flanigan Senior Software Engineer Engineering - Internationalisation Red Hat -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 554 bytes Desc: OpenPGP digital signature URL: From bkearney at redhat.com Wed Jun 1 01:52:53 2011 From: bkearney at redhat.com (Bryan Kearney) Date: Tue, 31 May 2011 21:52:53 -0400 Subject: [zanata-users] Questions around setting up zanata using the python clients In-Reply-To: <4DE58F3E.5070805@redhat.com> References: <4DDFA279.9020403@redhat.com> <4DE58F3E.5070805@redhat.com> Message-ID: <4DE59B75.2050501@redhat.com> On 05/31/2011 09:00 PM, Sean Flanigan wrote: > On 05/27/2011 11:09 PM, Bryan Kearney wrote: >> This will have a couple of things.. sorry about combining the issues: >> >> 1) Can you please update the unoffical rpms with an F14? Thanks! > > Sorry, can you reword that please? > > Oh, do you mean these? > > http://jamesni.fedorapeople.org/zanata-python-client/ yes, those please.. until the review is done :) > > James? > > >> 2) I tried doing a make install from the code. Opened bug >> https://bugzilla.redhat.com/show_bug.cgi?id=708363 >> >> 3) I have set up a new project. The project file is attached. My >> directory structure is flat.. it has the following in one directory: >> >> as.po >> de.po >> fr.po >> hi.po >> ja.po >> kn.po >> ml.po >> or.po >> pt.po >> ta.po >> zanata.xml >> zh_TW.po >> bn.po >> es.po >> gu.po >> it.po >> keys.pot >> ko.po >> mr.po >> pa.po >> ru.po >> te.po >> zh_CN.po >> >> >> I would like to push my po files and my pot up to the server. I am running >> >> zanata po push --srcdir . >> >> and getting the following. Any ideas? >> >> Loading zanata project config from: >> /home/bkearney/code/candlepin/proxy/po/zanata.xml >> Loading zanata/flies user config from: /home/bkearney/.config/zanata.ini >> zanata/flies server: https://translate.engineering.redhat.com >> zanata python client version: 1.2.3-24-g931b, zanata/flies server API >> version: 1.3 >> Project: candlepin >> Version: 0.3 >> Username: bkearney >> Source language: en-US >> Copy previous translations:True >> PO directory (originals):. >> Importing source documents only >> Traceback (most recent call last): >> File "/usr/bin/zanata", line 5, in >> pkg_resources.run_script('zanata-python-client==1.2.3-24-g931b', >> 'zanata') >> File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 467, >> in run_script >> self.require(requires)[0].run_script(script_name, ns) >> File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 1200, >> in run_script >> execfile(script_filename, namespace, namespace) >> File >> "/usr/lib/python2.7/site-packages/zanata_python_client-1.2.3_24_g931b-py2.7.egg/EGG-INFO/scripts/zanata", >> line 24, in >> zanata.run() >> File >> "/usr/lib/python2.7/site-packages/zanata_python_client-1.2.3_24_g931b-py2.7.egg/zanataclient/zanata.py", >> line 953, in run >> program_name=os.path.split(sys.argv[0])[1], >> File >> "/usr/lib/python2.7/site-packages/zanata_python_client-1.2.3_24_g931b-py2.7.egg/zanataclient/command.py", >> line 310, in handle_program >> command(command_options, args) >> File >> "/usr/lib/python2.7/site-packages/zanata_python_client-1.2.3_24_g931b-py2.7.egg/zanataclient/zanata.py", >> line 737, in po_push >> push(command_options, args, "software") >> File >> "/usr/lib/python2.7/site-packages/zanata_python_client-1.2.3_24_g931b-py2.7.egg/zanataclient/zanata.py", >> line 905, in push >> filelist = publicanutil.get_file_list(tmlfolder, ".pot") >> File >> "/usr/lib/python2.7/site-packages/zanata_python_client-1.2.3_24_g931b-py2.7.egg/zanataclient/publicanutil.py", >> line 148, in get_file_list >> final_file_list+=self.get_file_list(full_path, type) >> File >> "/usr/lib/python2.7/site-packages/zanata_python_client-1.2.3_24_g931b-py2.7.egg/zanataclient/publicanutil.py", >> line 145, in get_file_list >> if full_path.endswith(file_type): >> TypeError: expected a character buffer object >> >> -- bk > > > Could you look at this TypeError please, James? > Thanks! -- bk From bkearney at redhat.com Wed Jun 1 01:53:31 2011 From: bkearney at redhat.com (Bryan Kearney) Date: Tue, 31 May 2011 21:53:31 -0400 Subject: [zanata-users] Questions around setting up zanata using the python clients In-Reply-To: <4DE58BF7.4070805@redhat.com> References: <635923645.748.1306501763463.JavaMail.root@zmail07.collab.prod.int.phx2.redhat.com> <4DDFA448.3040509@redhat.com> <4DE58BF7.4070805@redhat.com> Message-ID: <4DE59B9B.5070409@redhat.com> On 05/31/2011 08:46 PM, Sean Flanigan wrote: > On 05/27/2011 11:16 PM, Bryan Kearney wrote: >> On 05/27/2011 09:09 AM, Grant Gainey wrote: >>> >>> >>> Interesting - I thought gettext wanted a layout like >>> >>> foo.pot >>> es >>> \ foo.po >>> fr >>> \ foo.po >>> de >>> \ foo.po >>> >>> I guess I "assumed" that layout was dictated by gettext - not so? >>> >>> G >> >> IANOAGTM >> >> (I am not a get text master) but we have java and a python project which >> has them flat. I have ruby project which uses the directory structure. >> >> -- bk > > Gettext's own tool xgettext generates the flat structure (all pot and po > files in one directory). The directory structure (with one directory > per locale) is what Zanata calls the publican layout. > > The Maven client can't push the flat structure at present (no demand for > it so far), but the Python client can: > > $ zanata po push ok.. I am using that and getting an error with the push. Will wait for the resolution on that. Thanks! -- bk From jni at redhat.com Wed Jun 1 02:25:40 2011 From: jni at redhat.com (James Ni) Date: Tue, 31 May 2011 22:25:40 -0400 (EDT) Subject: [zanata-users] Questions around setting up zanata using the python clients In-Reply-To: <4DE58F3E.5070805@redhat.com> Message-ID: <1744918829.46549.1306895140650.JavaMail.root@zmail07.collab.prod.int.phx2.redhat.com> ----- Original Message ----- > On 05/27/2011 11:09 PM, Bryan Kearney wrote: > > This will have a couple of things.. sorry about combining the > > issues: > > > > 1) Can you please update the unoffical rpms with an F14? Thanks! > > Sorry, can you reword that please? > > Oh, do you mean these? > > http://jamesni.fedorapeople.org/zanata-python-client/ > > James? Yeah, I will update it. these packages are old and not include the make file. > > 2) I tried doing a make install from the code. Opened bug > > https://bugzilla.redhat.com/show_bug.cgi?id=708363 I have commit a change for Make file and comment on this bug. Could you help to verify that? > > 3) I have set up a new project. The project file is attached. My > > directory structure is flat.. it has the following in one directory: > > > > as.po > > de.po > > fr.po > > hi.po > > ja.po > > kn.po > > ml.po > > or.po > > pt.po > > ta.po > > zanata.xml > > zh_TW.po > > bn.po > > es.po > > gu.po > > it.po > > keys.pot > > ko.po > > mr.po > > pa.po > > ru.po > > te.po > > zh_CN.po > > > > > > I would like to push my po files and my pot up to the server. I am > > running > > > > zanata po push --srcdir . > > > > and getting the following. Any ideas? I should sorry for this, i want to clean the code and rename a variable, but forget to make sure that all places have changed. I make a commit abb70c2 for this issue, please check out the latest version to test it. > > > > Loading zanata project config from: > > /home/bkearney/code/candlepin/proxy/po/zanata.xml > > Loading zanata/flies user config from: > > /home/bkearney/.config/zanata.ini > > zanata/flies server: https://translate.engineering.redhat.com > > zanata python client version: 1.2.3-24-g931b, zanata/flies server > > API > > version: 1.3 > > Project: candlepin > > Version: 0.3 > > Username: bkearney > > Source language: en-US > > Copy previous translations:True > > PO directory (originals):. > > Importing source documents only > > Traceback (most recent call last): > > File "/usr/bin/zanata", line 5, in > > pkg_resources.run_script('zanata-python-client==1.2.3-24-g931b', > > 'zanata') > > File "/usr/lib/python2.7/site-packages/pkg_resources.py", line > > 467, > > in run_script > > self.require(requires)[0].run_script(script_name, ns) > > File "/usr/lib/python2.7/site-packages/pkg_resources.py", line > > 1200, > > in run_script > > execfile(script_filename, namespace, namespace) > > File > > "/usr/lib/python2.7/site-packages/zanata_python_client-1.2.3_24_g931b-py2.7.egg/EGG-INFO/scripts/zanata", > > line 24, in > > zanata.run() > > File > > "/usr/lib/python2.7/site-packages/zanata_python_client-1.2.3_24_g931b-py2.7.egg/zanataclient/zanata.py", > > line 953, in run > > program_name=os.path.split(sys.argv[0])[1], > > File > > "/usr/lib/python2.7/site-packages/zanata_python_client-1.2.3_24_g931b-py2.7.egg/zanataclient/command.py", > > line 310, in handle_program > > command(command_options, args) > > File > > "/usr/lib/python2.7/site-packages/zanata_python_client-1.2.3_24_g931b-py2.7.egg/zanataclient/zanata.py", > > line 737, in po_push > > push(command_options, args, "software") > > File > > "/usr/lib/python2.7/site-packages/zanata_python_client-1.2.3_24_g931b-py2.7.egg/zanataclient/zanata.py", > > line 905, in push > > filelist = publicanutil.get_file_list(tmlfolder, ".pot") > > File > > "/usr/lib/python2.7/site-packages/zanata_python_client-1.2.3_24_g931b-py2.7.egg/zanataclient/publicanutil.py", > > line 148, in get_file_list > > final_file_list+=self.get_file_list(full_path, type) > > File > > "/usr/lib/python2.7/site-packages/zanata_python_client-1.2.3_24_g931b-py2.7.egg/zanataclient/publicanutil.py", > > line 145, in get_file_list > > if full_path.endswith(file_type): > > TypeError: expected a character buffer object > > > > -- bk > > > Could you look at this TypeError please, James? > > -- > Sean Flanigan > > Senior Software Engineer > Engineering - Internationalisation > Red Hat From bkearney at redhat.com Wed Jun 1 12:37:09 2011 From: bkearney at redhat.com (Bryan Kearney) Date: Wed, 01 Jun 2011 08:37:09 -0400 Subject: [zanata-users] Questions around setting up zanata using the python clients In-Reply-To: <1744918829.46549.1306895140650.JavaMail.root@zmail07.collab.prod.int.phx2.redhat.com> References: <1744918829.46549.1306895140650.JavaMail.root@zmail07.collab.prod.int.phx2.redhat.com> Message-ID: <4DE63275.4060503@redhat.com> On 05/31/2011 10:25 PM, James Ni wrote: > ----- Original Message ----- >> On 05/27/2011 11:09 PM, Bryan Kearney wrote: >>> This will have a couple of things.. sorry about combining the >>> issues: >>> >>> 1) Can you please update the unoffical rpms with an F14? Thanks! >> >> Sorry, can you reword that please? >> >> Oh, do you mean these? >> >> http://jamesni.fedorapeople.org/zanata-python-client/ >> >> James? > > Yeah, I will update it. these packages are old and not include the make file. Thanks! > >>> 2) I tried doing a make install from the code. Opened bug >>> https://bugzilla.redhat.com/show_bug.cgi?id=708363 > > I have commit a change for Make file and comment on this bug. Could you help to verify that? I cleaned out the zanata directory in the /usr/lib/python2.7/sitpackages and did another make install. It worked.. so I think this is ok. A nice ot have would be a make clean. > >>> 3) I have set up a new project. The project file is attached. My >>> directory structure is flat.. it has the following in one directory: >>> >>> as.po >>> de.po >>> fr.po >>> hi.po >>> ja.po >>> kn.po >>> ml.po >>> or.po >>> pt.po >>> ta.po >>> zanata.xml >>> zh_TW.po >>> bn.po >>> es.po >>> gu.po >>> it.po >>> keys.pot >>> ko.po >>> mr.po >>> pa.po >>> ru.po >>> te.po >>> zh_CN.po >>> >>> >>> I would like to push my po files and my pot up to the server. I am >>> running >>> >>> zanata po push --srcdir . >>> >>> and getting the following. Any ideas? > > I should sorry for this, i want to clean the code and rename a variable, but forget to make sure that all places have changed. > I make a commit abb70c2 for this issue, please check out the latest version to test it. > So.. I tested the latest, and it uploaded my keys.pot file. However... it did not upload any of the po files. Given the directory structure above, how do I do that? BTW>. what is the difference between --srcdir and --dir? -- bk From sflaniga at redhat.com Thu Jun 2 01:07:59 2011 From: sflaniga at redhat.com (Sean Flanigan) Date: Thu, 02 Jun 2011 11:07:59 +1000 Subject: [zanata-users] Questions around setting up zanata using the python clients In-Reply-To: <4DE63275.4060503@redhat.com> References: <1744918829.46549.1306895140650.JavaMail.root@zmail07.collab.prod.int.phx2.redhat.com> <4DE63275.4060503@redhat.com> Message-ID: <4DE6E26F.5070004@redhat.com> On 06/01/2011 10:37 PM, Bryan Kearney wrote: > On 05/31/2011 10:25 PM, James Ni wrote: >> ----- Original Message ----- >>> On 05/27/2011 11:09 PM, Bryan Kearney wrote: >>>> This will have a couple of things.. sorry about combining the >>>> issues: >>>> >>>> 1) Can you please update the unoffical rpms with an F14? Thanks! >>> >>> Sorry, can you reword that please? >>> >>> Oh, do you mean these? >>> >>> http://jamesni.fedorapeople.org/zanata-python-client/ >>> >>> James? >> >> Yeah, I will update it. these packages are old and not include the make file. > > Thanks! > >> >>>> 2) I tried doing a make install from the code. Opened bug >>>> https://bugzilla.redhat.com/show_bug.cgi?id=708363 >> >> I have commit a change for Make file and comment on this bug. Could you help to verify that? > > I cleaned out the zanata directory in the /usr/lib/python2.7/sitpackages > and did another make install. It worked.. so I think this is ok. A nice > ot have would be a make clean. Yeah, I suggest we have "make uninstall" (removes /usr/lib/python2.*/site-packages/zanata*) and "make clean" (removes temp files from the build directory, or runs setup.py clean) >>>> 3) I have set up a new project. The project file is attached. My >>>> directory structure is flat.. it has the following in one directory: >>>> >>>> as.po >>>> de.po >>>> fr.po >>>> hi.po >>>> ja.po >>>> kn.po >>>> ml.po >>>> or.po >>>> pt.po >>>> ta.po >>>> zanata.xml >>>> zh_TW.po >>>> bn.po >>>> es.po >>>> gu.po >>>> it.po >>>> keys.pot >>>> ko.po >>>> mr.po >>>> pa.po >>>> ru.po >>>> te.po >>>> zh_CN.po >>>> >>>> >>>> I would like to push my po files and my pot up to the server. I am >>>> running >>>> >>>> zanata po push --srcdir . >>>> >>>> and getting the following. Any ideas? >> >> I should sorry for this, i want to clean the code and rename a variable, but forget to make sure that all places have changed. >> I make a commit abb70c2 for this issue, please check out the latest version to test it. >> > > So.. I tested the latest, and it uploaded my keys.pot file. However... > it did not upload any of the po files. Given the directory structure > above, how do I do that? Use --import-po It's best not to import PO files over and over, so it's not the default. > BTW>. what is the difference between --srcdir and --dir? IIRC, --dir sets both --srcdir and --transdir James, I noticed that the new "po" commands don't recognise -h, and --dir is not listed in the help output for po push. -- Sean Flanigan Senior Software Engineer Engineering - Internationalisation Red Hat -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 554 bytes Desc: OpenPGP digital signature URL: From bkearney at redhat.com Thu Jun 2 14:54:49 2011 From: bkearney at redhat.com (Bryan Kearney) Date: Thu, 02 Jun 2011 10:54:49 -0400 Subject: [zanata-users] Questions around setting up zanata using the python clients In-Reply-To: <4DE6E26F.5070004@redhat.com> References: <1744918829.46549.1306895140650.JavaMail.root@zmail07.collab.prod.int.phx2.redhat.com> <4DE63275.4060503@redhat.com> <4DE6E26F.5070004@redhat.com> Message-ID: <4DE7A439.8030904@redhat.com> On 06/01/2011 09:07 PM, Sean Flanigan wrote: > On 06/01/2011 10:37 PM, Bryan Kearney wrote: >> On 05/31/2011 10:25 PM, James Ni wrote: >>> ----- Original Message ----- >>>> On 05/27/2011 11:09 PM, Bryan Kearney wrote: >>>>> This will have a couple of things.. sorry about combining the >>>>> issues: >>>>> >>>>> 1) Can you please update the unoffical rpms with an F14? Thanks! >>>> >>>> Sorry, can you reword that please? >>>> >>>> Oh, do you mean these? >>>> >>>> http://jamesni.fedorapeople.org/zanata-python-client/ >>>> >>>> James? >>> >>> Yeah, I will update it. these packages are old and not include the make file. >> >> Thanks! >> >>> >>>>> 2) I tried doing a make install from the code. Opened bug >>>>> https://bugzilla.redhat.com/show_bug.cgi?id=708363 >>> >>> I have commit a change for Make file and comment on this bug. Could you help to verify that? >> >> I cleaned out the zanata directory in the /usr/lib/python2.7/sitpackages >> and did another make install. It worked.. so I think this is ok. A nice >> ot have would be a make clean. > > Yeah, I suggest we have "make uninstall" (removes > /usr/lib/python2.*/site-packages/zanata*) and "make clean" (removes temp > files from the build directory, or runs setup.py clean) > >>>>> 3) I have set up a new project. The project file is attached. My >>>>> directory structure is flat.. it has the following in one directory: >>>>> >>>>> as.po >>>>> de.po >>>>> fr.po >>>>> hi.po >>>>> ja.po >>>>> kn.po >>>>> ml.po >>>>> or.po >>>>> pt.po >>>>> ta.po >>>>> zanata.xml >>>>> zh_TW.po >>>>> bn.po >>>>> es.po >>>>> gu.po >>>>> it.po >>>>> keys.pot >>>>> ko.po >>>>> mr.po >>>>> pa.po >>>>> ru.po >>>>> te.po >>>>> zh_CN.po >>>>> >>>>> >>>>> I would like to push my po files and my pot up to the server. I am >>>>> running >>>>> >>>>> zanata po push --srcdir . >>>>> >>>>> and getting the following. Any ideas? >>> >>> I should sorry for this, i want to clean the code and rename a variable, but forget to make sure that all places have changed. >>> I make a commit abb70c2 for this issue, please check out the latest version to test it. >>> >> >> So.. I tested the latest, and it uploaded my keys.pot file. However... >> it did not upload any of the po files. Given the directory structure >> above, how do I do that? > > Use --import-po > > It's best not to import PO files over and over, so it's not the default. > >> BTW>. what is the difference between --srcdir and --dir? > > IIRC, --dir sets both --srcdir and --transdir > > James, I noticed that the new "po" commands don't recognise -h, and > --dir is not listed in the help output for po push. > > ok.. for whatever reason I could not do this... zanata po push --src . --import-po but I could do this... zanata po push --srcdir . --import-po and it worked. I think there is some clean python client to make it a bit more user friendly. One last thing.. it appears since my directory is flat.. i seem to need to do the followig to get the po files out into my current directory: zanata po pull --dir .. is that correct? -- bk From bkearney at redhat.com Thu Jun 2 14:58:37 2011 From: bkearney at redhat.com (Bryan Kearney) Date: Thu, 02 Jun 2011 10:58:37 -0400 Subject: [zanata-users] push/pull should not add whitespace Message-ID: <4DE7A51D.5000506@redhat.com> I pushed up po files, and then pulle dhtem back down. The attached file is the diff. It appears to be mostly whitespac issues. I see two bugs here: 1) The push/pull should be lossless. 2) There should be no extraneous white spaces introduced by the tool. -- bk -------------- next part -------------- A non-text attachment was scrubbed... Name: diff.patch Type: text/x-patch Size: 299145 bytes Desc: not available URL: From bkearney at redhat.com Thu Jun 2 15:24:49 2011 From: bkearney at redhat.com (Bryan Kearney) Date: Thu, 02 Jun 2011 11:24:49 -0400 Subject: [zanata-users] Wierd error using a second version Message-ID: <4DE7AB41.7000500@redhat.com> I added a new version to my project (0.4). I changed the value in my zanata.xml directory. when I try to upload, I get the following. Any ideas? -- bk [bkearney at bkearney po]$ zanata po push --srcdir . --import-po Loading zanata project config from: /home/bkearney/code/candlepin/proxy/po/zanata.xml Loading zanata/flies user config from: /home/bkearney/.config/zanata.ini zanata/flies server: https://translate.engineering.redhat.com zanata python client version: 1.2.3-29-g5c66, zanata/flies server API version: 1.3 Project: candlepin Version: 0.4 Username: bkearney Source language: en-US Copy previous translations:True PO directory (originals):. Importing translation Reading locale folders from /home/bkearney/code/candlepin/proxy/po This will overwrite/delete any existing documents on the server. Are you sure (y/n)?y Pushing the content of ./keys.pot to server: Successfully updated template keys on the server Pushing ru translation for keys to server: error: Unexpected target: 8fae3ebb2c1d08ded523938133b96fcc Pushing fr translation for keys to server: error: Unexpected target: 8fae3ebb2c1d08ded523938133b96fcc Pushing or translation for keys to server: error: Unexpected target: 8fae3ebb2c1d08ded523938133b96fcc Pushing pa translation for keys to server: error: Unexpected target: 8fae3ebb2c1d08ded523938133b96fcc Pushing pt translation for keys to server: error: Unexpected target: 8fae3ebb2c1d08ded523938133b96fcc Pushing zh_CN translation for keys to server: error: Unexpected target: 8fae3ebb2c1d08ded523938133b96fcc Pushing ml translation for keys to server: error: Unexpected target: 8fae3ebb2c1d08ded523938133b96fcc Pushing bn translation for keys to server: error: Unexpected target: 8fae3ebb2c1d08ded523938133b96fcc Pushing de translation for keys to server: error: Unexpected target: 8fae3ebb2c1d08ded523938133b96fcc Pushing ko translation for keys to server: error: Unexpected target: 8fae3ebb2c1d08ded523938133b96fcc Pushing gu translation for keys to server: error: Unexpected target: 8fae3ebb2c1d08ded523938133b96fcc Pushing kn translation for keys to server: error: Unexpected target: 8fae3ebb2c1d08ded523938133b96fcc Pushing as translation for keys to server: error: Unexpected target: 8fae3ebb2c1d08ded523938133b96fcc Pushing hi translation for keys to server: error: Unexpected target: 8fae3ebb2c1d08ded523938133b96fcc Pushing mr translation for keys to server: error: Unexpected target: 8fae3ebb2c1d08ded523938133b96fcc Pushing it translation for keys to server: error: Unexpected target: 8fae3ebb2c1d08ded523938133b96fcc Pushing zh_TW translation for keys to server: error: Unexpected target: 8fae3ebb2c1d08ded523938133b96fcc Pushing te translation for keys to server: error: Unexpected target: 8fae3ebb2c1d08ded523938133b96fcc Pushing ja translation for keys to server: error: Unexpected target: 8fae3ebb2c1d08ded523938133b96fcc Pushing es translation for keys to server: error: Unexpected target: 8fae3ebb2c1d08ded523938133b96fcc Pushing ta translation for keys to server: error: Unexpected target: 8fae3ebb2c1d08ded523938133b96fcc (reverse-i-search)`za': zanata po push --srcdir . --import-po From sflaniga at redhat.com Fri Jun 3 01:23:47 2011 From: sflaniga at redhat.com (Sean Flanigan) Date: Fri, 03 Jun 2011 11:23:47 +1000 Subject: [zanata-users] Questions around setting up zanata using the python clients In-Reply-To: <4DE7A439.8030904@redhat.com> References: <1744918829.46549.1306895140650.JavaMail.root@zmail07.collab.prod.int.phx2.redhat.com> <4DE63275.4060503@redhat.com> <4DE6E26F.5070004@redhat.com> <4DE7A439.8030904@redhat.com> Message-ID: <4DE837A3.90200@redhat.com> On 06/03/2011 12:54 AM, Bryan Kearney wrote: > ok.. for whatever reason I could not do this... > > zanata po push --src . --import-po I don't think --src is one of the options. Try this to see the options: zanata help po push > but I could do this... > > zanata po push --srcdir . --import-po > > and it worked. Note that --srcdir only changes the directory for source files, ie POT files. You need --transdir or --dir if you want to change the directory for PO files. (I think it would have looked in ./po for the PO files.) > I think there is some clean python client to make it a bit more user > friendly. We should have better documentation (ie a manual) for the clients soon...ish. But any suggestions for the console help would be appreciated. I guess it would be a start to make sure all the default values were listed in the help. James? > One last thing.. it appears since my directory is flat.. i seem to need > to do the followig to get the po files out into my current directory: > > > zanata po pull --dir .. > > is that correct? The default is to look in ./po, so yes, you do have to override it in your case (or you could run "zanata po pull" from the parent directory if the target directory is named "po"). If your directory is not named "po", then I'm not sure why that worked for you. --dir specifies the base directory for POT and PO files, so POT/PO files may be written to this directory, or to pre-determined subdirectories of it. (I think PO files go to {--dir}/po.) You *should* be able to use: "zanata po pull --dstdir .", but there's a bug in the option handling. James, please look at my comments on https://github.com/zanata/zanata-python-client/commit/f9f2be623d7d7b48379237f4ba7ac0cca8bf59e9#commitcomment-412404 -- Sean Flanigan Senior Software Engineer Engineering - Internationalisation Red Hat -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 554 bytes Desc: OpenPGP digital signature URL: From sflaniga at redhat.com Fri Jun 3 03:38:28 2011 From: sflaniga at redhat.com (Sean Flanigan) Date: Thu, 2 Jun 2011 23:38:28 -0400 (EDT) Subject: [zanata-users] Wierd error using a second version In-Reply-To: <4DE7AB41.7000500@redhat.com> Message-ID: <543030930.456875.1307072308442.JavaMail.root@zmail01.collab.prod.int.phx2.redhat.com> Running msgmerge against your .po files should do the trick, because it will remove any obsolete messages. See my other email, which I hope to finish soon. ----- Original Message ----- > I added a new version to my project (0.4). I changed the value in my > zanata.xml directory. when I try to upload, I get the following. Any > ideas? > > -- bk > > > [bkearney at bkearney po]$ zanata po push --srcdir . --import-po > Loading zanata project config from: > /home/bkearney/code/candlepin/proxy/po/zanata.xml > Loading zanata/flies user config from: > /home/bkearney/.config/zanata.ini > zanata/flies server: https://translate.engineering.redhat.com > zanata python client version: 1.2.3-29-g5c66, zanata/flies server API > version: 1.3 > Project: candlepin > Version: 0.4 > Username: bkearney > Source language: en-US > Copy previous translations:True > PO directory (originals):. > Importing translation > Reading locale folders from /home/bkearney/code/candlepin/proxy/po > This will overwrite/delete any existing documents on the server. > Are you sure (y/n)?y > > Pushing the content of ./keys.pot to server: > Successfully updated template keys on the server > Pushing ru translation for keys to server: > error: Unexpected target: 8fae3ebb2c1d08ded523938133b96fcc > Pushing fr translation for keys to server: > error: Unexpected target: 8fae3ebb2c1d08ded523938133b96fcc > Pushing or translation for keys to server: > error: Unexpected target: 8fae3ebb2c1d08ded523938133b96fcc > Pushing pa translation for keys to server: > error: Unexpected target: 8fae3ebb2c1d08ded523938133b96fcc > Pushing pt translation for keys to server: > error: Unexpected target: 8fae3ebb2c1d08ded523938133b96fcc > Pushing zh_CN translation for keys to server: > error: Unexpected target: 8fae3ebb2c1d08ded523938133b96fcc > Pushing ml translation for keys to server: > error: Unexpected target: 8fae3ebb2c1d08ded523938133b96fcc > Pushing bn translation for keys to server: > error: Unexpected target: 8fae3ebb2c1d08ded523938133b96fcc > Pushing de translation for keys to server: > error: Unexpected target: 8fae3ebb2c1d08ded523938133b96fcc > Pushing ko translation for keys to server: > error: Unexpected target: 8fae3ebb2c1d08ded523938133b96fcc > Pushing gu translation for keys to server: > error: Unexpected target: 8fae3ebb2c1d08ded523938133b96fcc > Pushing kn translation for keys to server: > error: Unexpected target: 8fae3ebb2c1d08ded523938133b96fcc > Pushing as translation for keys to server: > error: Unexpected target: 8fae3ebb2c1d08ded523938133b96fcc > Pushing hi translation for keys to server: > error: Unexpected target: 8fae3ebb2c1d08ded523938133b96fcc > Pushing mr translation for keys to server: > error: Unexpected target: 8fae3ebb2c1d08ded523938133b96fcc > Pushing it translation for keys to server: > error: Unexpected target: 8fae3ebb2c1d08ded523938133b96fcc > Pushing zh_TW translation for keys to server: > error: Unexpected target: 8fae3ebb2c1d08ded523938133b96fcc > Pushing te translation for keys to server: > error: Unexpected target: 8fae3ebb2c1d08ded523938133b96fcc > Pushing ja translation for keys to server: > error: Unexpected target: 8fae3ebb2c1d08ded523938133b96fcc > Pushing es translation for keys to server: > error: Unexpected target: 8fae3ebb2c1d08ded523938133b96fcc > Pushing ta translation for keys to server: > error: Unexpected target: 8fae3ebb2c1d08ded523938133b96fcc > (reverse-i-search)`za': zanata po push --srcdir . --import-po > > _______________________________________________ > zanata-users mailing list > zanata-users at redhat.com > https://www.redhat.com/mailman/listinfo/zanata-users -- Sean Flanigan Senior Software Engineer Engineering - Internationalisation Red Hat From sflaniga at redhat.com Fri Jun 3 04:05:38 2011 From: sflaniga at redhat.com (Sean Flanigan) Date: Fri, 3 Jun 2011 00:05:38 -0400 (EDT) Subject: [zanata-users] Wierd error using a second version In-Reply-To: <543030930.456875.1307072308442.JavaMail.root@zmail01.collab.prod.int.phx2.redhat.com> Message-ID: <716085900.457186.1307073938943.JavaMail.root@zmail01.collab.prod.int.phx2.redhat.com> ----- Original Message ----- > Running msgmerge against your .po files should do the trick, because > it will remove any obsolete messages. See my other email, which I hope > to finish soon. I suppose the server should just skip over obsolete messages, and send back a warning if there were any. Then msgmerge would be optional. -- Sean Flanigan Senior Software Engineer Engineering - Internationalisation Red Hat From sflaniga at redhat.com Fri Jun 3 04:24:42 2011 From: sflaniga at redhat.com (Sean Flanigan) Date: Fri, 03 Jun 2011 14:24:42 +1000 Subject: [zanata-users] push/pull should not add whitespace In-Reply-To: <4DE7A51D.5000506@redhat.com> References: <4DE7A51D.5000506@redhat.com> Message-ID: <4DE8620A.9090604@redhat.com> On 06/03/2011 12:58 AM, Bryan Kearney wrote: > I pushed up po files, and then pulle dhtem back down. The attached file > is the diff. It appears to be mostly whitespac issues. I see two bugs here: > > 1) The push/pull should be lossless. > 2) There should be no extraneous white spaces introduced by the tool. Hi Bryan, Zanata doesn't guarantee that translation files (eg PO) will come back bit-for-bit identical, just the content: strings, their translations, and metadata. Zanata isn't storing PO files as PO files, it's storing the content. It tries to keep the output files pretty similar when re-generating them, but it's virtually impossible to get them identical in all cases. For instance, the line-wrapping rules used by gettext aren't documented anywhere, so Zanata can't guarantee to follow them. (If you *really* want to minimise diffs, you could try a commit-hook which passes your PO files through msgcat before check-in.) There are also a few cases where Zanata introduces empty comment lines, which we really shouldn't... https://bugzilla.redhat.com/show_bug.cgi?id=710321 https://bugzilla.redhat.com/show_bug.cgi?id=710322 Your diff also shows some source references disappearing, eg -#:?src/main/java/org/fedoraproject/candlepin/resource/EntitlementResource.java:115 -#:?src/main/java/org/fedoraproject/candlepin/resource/ConsumerResource.java:651 #:?src/main/java/org/fedoraproject/candlepin/resource/SubscriptionResource.java:98 That would be more concerning, but I think I've worked out what's happened. I can't work directly with your diff, but I think I found your PO files in git: http://git.fedorahosted.org/git/?p=candlepin.git;a=tree;f=proxy/po;h=ae6153354fe4fa02402670ceba44e104547ddf11;hb=HEAD I think most of the changes you're hitting are caused by the fact that your PO files are out of date compared to the POT file. If you run this: for f in *.po; do msgmerge --update $f keys.pot; done you'll find that many of the source references change or disappear, the key-value pairs are re-arranged, and some messages actually get commented out by msgmerge, like this: #~ msgid "Owner with UUID '{0}' could not be found" #~ msgstr "UUID '{0}' ??? ??????? ???? ???" These are messages which no longer exist in the POT file, ie they are obsolete. So the other big thing that can lead to differences is inconsistencies between POT and PO. As with msgmerge, the POT file is considered authoritative for most things, so the order of key-value pairs in the header (msgid "") will be carried across when generating PO files. The same goes for the source references, and even the list of messages and their order. Regards Sean. -- Sean Flanigan Senior Software Engineer Engineering - Internationalisation Red Hat -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 554 bytes Desc: OpenPGP digital signature URL: From bkearney at redhat.com Fri Jun 3 12:23:33 2011 From: bkearney at redhat.com (Bryan Kearney) Date: Fri, 03 Jun 2011 08:23:33 -0400 Subject: [zanata-users] push/pull should not add whitespace In-Reply-To: <4DE8620A.9090604@redhat.com> References: <4DE7A51D.5000506@redhat.com> <4DE8620A.9090604@redhat.com> Message-ID: <4DE8D245.3040503@redhat.com> On 06/03/2011 12:24 AM, Sean Flanigan wrote: > On 06/03/2011 12:58 AM, Bryan Kearney wrote: >> I pushed up po files, and then pulle dhtem back down. The attached file >> is the diff. It appears to be mostly whitespac issues. I see two bugs here: >> >> 1) The push/pull should be lossless. >> 2) There should be no extraneous white spaces introduced by the tool. > > Hi Bryan, > > Zanata doesn't guarantee that translation files (eg PO) will come back > bit-for-bit identical, just the content: strings, their translations, > and metadata. > > Zanata isn't storing PO files as PO files, it's storing the content. It > tries to keep the output files pretty similar when re-generating them, > but it's virtually impossible to get them identical in all cases. > > For instance, the line-wrapping rules used by gettext aren't documented > anywhere, so Zanata can't guarantee to follow them. (If you *really* > want to minimise diffs, you could try a commit-hook which passes your PO > files through msgcat before check-in.) > > There are also a few cases where Zanata introduces empty comment lines, > which we really shouldn't... > > https://bugzilla.redhat.com/show_bug.cgi?id=710321 > https://bugzilla.redhat.com/show_bug.cgi?id=710322 > I can understand the not 100%.. but pure white space additions which I saw were pretty bad. Hard to track down that nothing really changed. Your bugs have it, so I am good. > > Your diff also shows some source references disappearing, eg > > -#:?src/main/java/org/fedoraproject/candlepin/resource/EntitlementResource.java:115 > -#:?src/main/java/org/fedoraproject/candlepin/resource/ConsumerResource.java:651 > #:?src/main/java/org/fedoraproject/candlepin/resource/SubscriptionResource.java:98 > > > That would be more concerning, but I think I've worked out what's happened. > > I can't work directly with your diff, but I think I found your PO files > in git: > http://git.fedorahosted.org/git/?p=candlepin.git;a=tree;f=proxy/po;h=ae6153354fe4fa02402670ceba44e104547ddf11;hb=HEAD > > I think most of the changes you're hitting are caused by the fact that > your PO files are out of date compared to the POT file. If you run this: > for f in *.po; do msgmerge --update $f keys.pot; done > you'll find that many of the source references change or disappear, the > key-value pairs are re-arranged, and some messages actually get > commented out by msgmerge, like this: > > #~ msgid "Owner with UUID '{0}' could not be found" > #~ msgstr "UUID '{0}' ??? ??????? ???? ???" > > These are messages which no longer exist in the POT file, ie they are > obsolete. > > So the other big thing that can lead to differences is inconsistencies > between POT and PO. As with msgmerge, the POT file is considered > authoritative for most things, so the order of key-value pairs in the > header (msgid "") will be carried across when generating PO files. The > same goes for the source references, and even the list of messages and > their order. > I will give this a whirl and re-push them. -- bk From bkearney at redhat.com Fri Jun 3 15:41:19 2011 From: bkearney at redhat.com (Bryan Kearney) Date: Fri, 03 Jun 2011 11:41:19 -0400 Subject: [zanata-users] Wierd error using a second version In-Reply-To: <716085900.457186.1307073938943.JavaMail.root@zmail01.collab.prod.int.phx2.redhat.com> References: <716085900.457186.1307073938943.JavaMail.root@zmail01.collab.prod.int.phx2.redhat.com> Message-ID: <4DE9009F.8020907@redhat.com> On 06/03/2011 12:05 AM, Sean Flanigan wrote: > ----- Original Message ----- >> Running msgmerge against your .po files should do the trick, because >> it will remove any obsolete messages. See my other email, which I hope >> to finish soon. > > I suppose the server should just skip over obsolete messages, and send back a warning if there were any. Then msgmerge would be optional. > > > ok.. fixed it on my side. However, skipping obsolete or at least a message which says "Detected obslete messages, please merge your keys" woul dbe great. -- bk From sflaniga at redhat.com Tue Jun 7 00:28:59 2011 From: sflaniga at redhat.com (Sean Flanigan) Date: Tue, 07 Jun 2011 10:28:59 +1000 Subject: [zanata-users] Wierd error using a second version In-Reply-To: <4DE9009F.8020907@redhat.com> References: <716085900.457186.1307073938943.JavaMail.root@zmail01.collab.prod.int.phx2.redhat.com> <4DE9009F.8020907@redhat.com> Message-ID: <4DED70CB.8040705@redhat.com> On 06/04/2011 01:41 AM, Bryan Kearney wrote: > On 06/03/2011 12:05 AM, Sean Flanigan wrote: >> ----- Original Message ----- >>> Running msgmerge against your .po files should do the trick, because >>> it will remove any obsolete messages. See my other email, which I hope >>> to finish soon. >> >> I suppose the server should just skip over obsolete messages, and send back a warning if there were any. Then msgmerge would be optional. >> >> >> > ok.. fixed it on my side. However, skipping obsolete or at least a > message which says "Detected obslete messages, please merge your keys" > woul dbe great. > > -- bk > https://bugzilla.redhat.com/show_bug.cgi?id=711249 -- Sean Flanigan Senior Software Engineer Engineering - Internationalisation Red Hat -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 554 bytes Desc: OpenPGP digital signature URL: From sflaniga at redhat.com Tue Jun 7 00:56:37 2011 From: sflaniga at redhat.com (Sean Flanigan) Date: Tue, 07 Jun 2011 10:56:37 +1000 Subject: [zanata-users] push/pull should not add whitespace In-Reply-To: <4DE8D245.3040503@redhat.com> References: <4DE7A51D.5000506@redhat.com> <4DE8620A.9090604@redhat.com> <4DE8D245.3040503@redhat.com> Message-ID: <4DED7745.9040609@redhat.com> On 06/03/2011 10:23 PM, Bryan Kearney wrote: > I can understand the not 100%.. but pure white space additions which I > saw were pretty bad. Hard to track down that nothing really changed. > Your bugs have it, so I am good. Hi Bryan, If you're still seeing these white space additions by Zanata after running msgmerge, can I get you to explain them a bit more? I'm not sure if the bugs I put in really captured what you're referring to. Thanks Sean. -- Sean Flanigan Senior Software Engineer Engineering - Internationalisation Red Hat -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 554 bytes Desc: OpenPGP digital signature URL: From bkearney at redhat.com Wed Jun 22 13:50:46 2011 From: bkearney at redhat.com (Bryan Kearney) Date: Wed, 22 Jun 2011 09:50:46 -0400 Subject: [zanata-users] Couple of qustions on Zanata Usage Message-ID: <4E01F336.6000506@redhat.com> I have a couple of workflow questions 1) I uploaded my po files to zanata. I subsequently recieved a community patch to fix the translations. Do I re-push the files up? I have no idea if the translator has done anything, so I do not want to blow away their work. 2) I have versions of the project. Lets call them 1.0 and 2.0. If I add a new English String "Jar Jar Binks is Awesome" to both, and the translator changes it in 1.0 will it be reflected in 2.0? This is related to above since I recieved a patch to one version, it would be nice if zanata could handle pushing the changes to all versions. -- bk From sflaniga at redhat.com Thu Jun 23 02:05:39 2011 From: sflaniga at redhat.com (Sean Flanigan) Date: Thu, 23 Jun 2011 12:05:39 +1000 Subject: [zanata-users] Couple of qustions on Zanata Usage In-Reply-To: <4E01F336.6000506@redhat.com> References: <4E01F336.6000506@redhat.com> Message-ID: <4E029F73.7060805@redhat.com> Hi Bryan On 06/22/2011 11:50 PM, Bryan Kearney wrote: > I have a couple of workflow questions > > 1) I uploaded my po files to zanata. I subsequently received a community > patch to fix the translations. Do I re-push the files up? I have no idea > if the translator has done anything, so I do not want to blow away their > work. You probably won't be surprised to hear me say that it is far better if translators do their work in Zanata. This cuts down on duplication of effort, and saves you having to run publican-push, among other things. But yes, as of Zanata 1.3, you can just push the PO files, and the server will merge in any new strings. If the server has a newer translation, it will take precedence over what's in the PO file. See below. > 2) I have versions of the project. Lets call them 1.0 and 2.0. If I add > a new English String "Jar Jar Binks is Awesome" to both, and the > translator changes it in 1.0 will it be reflected in 2.0? This is > related to above since I received a patch to one version, it would be > nice if zanata could handle pushing the changes to all versions. If the translator goes into 2.0 via Zanata's web UI, those strings should show up in the translation memory as 100% matches, where they can be copied manually. When it is released, Zanata 1.4 will copy translations from 1.0 to 2.0, but (a) only if the filename matches and (b) only when the new 'en' document is first uploaded. In other words, if 1.0 has translations when you create and push 2.0, we will re-use as many translations as we safely can. But we don't do it with on-the-fly 1.0 translations, nor with 1.0 pushes, if 2.0 has already been created. I know that's not quite what you were after. Feel free to submit an enhancement request in bugzilla. As a workaround in your specific case, you could push the 1.0 PO files together with the 2.0 POT files, into the 2.0 Zanata project. Something like this should work: - cd project-1.0 - git apply community-translation.patch - mvn zanata:publican-push -Dzanata.importPo # merge new translations - mvn zanata:publican-pull # optional: fetch merged translation/PO files - cd ../project-2.0 - cp ../project-1.0/*.po . - mvn zanata:publican-push -Dzanata.importPo # merge new translations - mvn zanata:publican-pull # optional: fetch merged translation/PO files Sean -- Sean Flanigan Senior Software Engineer Engineering - Internationalisation Red Hat -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 554 bytes Desc: OpenPGP digital signature URL: From bkearney at redhat.com Thu Jun 23 11:53:42 2011 From: bkearney at redhat.com (Bryan Kearney) Date: Thu, 23 Jun 2011 07:53:42 -0400 Subject: [zanata-users] Couple of qustions on Zanata Usage In-Reply-To: <4E029F73.7060805@redhat.com> References: <4E01F336.6000506@redhat.com> <4E029F73.7060805@redhat.com> Message-ID: <4E032946.9040508@redhat.com> On 06/22/2011 10:05 PM, Sean Flanigan wrote: > Hi Bryan > > On 06/22/2011 11:50 PM, Bryan Kearney wrote: >> I have a couple of workflow questions >> >> 1) I uploaded my po files to zanata. I subsequently received a community >> patch to fix the translations. Do I re-push the files up? I have no idea >> if the translator has done anything, so I do not want to blow away their >> work. > > You probably won't be surprised to hear me say that it is far better if > translators do their work in Zanata. This cuts down on duplication of > effort, and saves you having to run publican-push, among other things. > > But yes, as of Zanata 1.3, you can just push the PO files, and the > server will merge in any new strings. If the server has a newer > translation, it will take precedence over what's in the PO file. See below. I assumed so.. but this was a community patch. So.. with an internal zanata server and an external community I see some odd workflows. > >> 2) I have versions of the project. Lets call them 1.0 and 2.0. If I add >> a new English String "Jar Jar Binks is Awesome" to both, and the >> translator changes it in 1.0 will it be reflected in 2.0? This is >> related to above since I received a patch to one version, it would be >> nice if zanata could handle pushing the changes to all versions. > > If the translator goes into 2.0 via Zanata's web UI, those strings > should show up in the translation memory as 100% matches, where they can > be copied manually. > > When it is released, Zanata 1.4 will copy translations from 1.0 to 2.0, > but (a) only if the filename matches and (b) only when the new 'en' > document is first uploaded. > > In other words, if 1.0 has translations when you create and push 2.0, we > will re-use as many translations as we safely can. But we don't do it > with on-the-fly 1.0 translations, nor with 1.0 pushes, if 2.0 has > already been created. What if I re-push 2.0? > > I know that's not quite what you were after. Feel free to submit an > enhancement request in bugzilla. so, to summarize, you push "Up"the version tree, but not down? > > As a workaround in your specific case, you could push the 1.0 PO files > together with the 2.0 POT files, into the 2.0 Zanata project. Something > like this should work: > > - cd project-1.0 > - git apply community-translation.patch > - mvn zanata:publican-push -Dzanata.importPo # merge new translations > - mvn zanata:publican-pull # optional: fetch merged translation/PO files > - cd ../project-2.0 > - cp ../project-1.0/*.po . > - mvn zanata:publican-push -Dzanata.importPo # merge new translations > - mvn zanata:publican-pull # optional: fetch merged translation/PO files > > Thanks! -- bk From sflaniga at redhat.com Fri Jun 24 00:11:44 2011 From: sflaniga at redhat.com (Sean Flanigan) Date: Fri, 24 Jun 2011 10:11:44 +1000 Subject: [zanata-users] Couple of qustions on Zanata Usage In-Reply-To: <4E032946.9040508@redhat.com> References: <4E01F336.6000506@redhat.com> <4E029F73.7060805@redhat.com> <4E032946.9040508@redhat.com> Message-ID: <4E03D640.8020301@redhat.com> On 06/23/2011 09:53 PM, Bryan Kearney wrote: > On 06/22/2011 10:05 PM, Sean Flanigan wrote: >> Hi Bryan >> >> On 06/22/2011 11:50 PM, Bryan Kearney wrote: >>> I have a couple of workflow questions >>> >>> 1) I uploaded my po files to zanata. I subsequently received a community >>> patch to fix the translations. Do I re-push the files up? I have no idea >>> if the translator has done anything, so I do not want to blow away their >>> work. >> >> You probably won't be surprised to hear me say that it is far better if >> translators do their work in Zanata. This cuts down on duplication of >> effort, and saves you having to run publican-push, among other things. >> >> But yes, as of Zanata 1.3, you can just push the PO files, and the >> server will merge in any new strings. If the server has a newer >> translation, it will take precedence over what's in the PO file. See below. > > I assumed so.. but this was a community patch. So.. with an internal > zanata server and an external community I see some odd workflows. Ah! This project could benefit from a public-facing Zanata instance then. Until then, PO patches it is. >>> 2) I have versions of the project. Lets call them 1.0 and 2.0. If I add >>> a new English String "Jar Jar Binks is Awesome" to both, and the >>> translator changes it in 1.0 will it be reflected in 2.0? This is >>> related to above since I received a patch to one version, it would be >>> nice if zanata could handle pushing the changes to all versions. >> >> If the translator goes into 2.0 via Zanata's web UI, those strings >> should show up in the translation memory as 100% matches, where they can >> be copied manually. >> >> When it is released, Zanata 1.4 will copy translations from 1.0 to 2.0, >> but (a) only if the filename matches and (b) only when the new 'en' >> document is first uploaded. >> >> In other words, if 1.0 has translations when you create and push 2.0, we >> will re-use as many translations as we safely can. But we don't do it >> with on-the-fly 1.0 translations, nor with 1.0 pushes, if 2.0 has >> already been created. > > What if I re-push 2.0? No, sorry, in Zanata 1.4 translation copying (copyTrans for short) only happens when the duplicate documents are first created, in other words when you first push into the 2.0 version. We thought that would cover the most important use case for copyTrans, but it seems as if we got it wrong. >> I know that's not quite what you were after. Feel free to submit an >> enhancement request in bugzilla. > > so, to summarize, you push "Up"the version tree, but not down? We don't parse the version numbers of course, but in essence, yes. >> As a workaround in your specific case, you could push the 1.0 PO files >> together with the 2.0 POT files, into the 2.0 Zanata project. Something >> like this should work: >> >> - cd project-1.0 >> - git apply community-translation.patch >> - mvn zanata:publican-push -Dzanata.importPo # merge new translations >> - mvn zanata:publican-pull # optional: fetch merged translation/PO files >> - cd ../project-2.0 >> - cp ../project-1.0/*.po . >> - mvn zanata:publican-push -Dzanata.importPo # merge new translations >> - mvn zanata:publican-pull # optional: fetch merged translation/PO files >> >> > > Thanks! > > -- bk > -- Sean Flanigan Senior Software Engineer Engineering - Internationalisation Red Hat -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 554 bytes Desc: OpenPGP digital signature URL: