Bug 1201718 - zanata-cli should allow newline in PO header when pushing
Summary: zanata-cli should allow newline in PO header when pushing
Keywords:
Status: CLOSED DUPLICATE of bug 1029734
Alias: None
Product: Zanata
Classification: Retired
Component: Component-zanata-client
Version: client-3.4
Hardware: Unspecified
OS: Linux
unspecified
high
Target Milestone: ---
: ---
Assignee: Patrick Huang
QA Contact: Zanata-QA Mailling List
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-03-13 10:35 UTC by Yuri Chornoivan
Modified: 2015-03-19 06:40 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-03-19 00:44:55 UTC


Attachments (Terms of Use)
Libguestfs translation that cannot be uploaded (394.23 KB, text/plain)
2015-03-17 05:17 UTC, Yuri Chornoivan
no flags Details


Links
System ID Priority Status Summary Last Updated
Red Hat Bugzilla 1029734 None None None Never
Red Hat Bugzilla 1197902 None None None Never
Red Hat Bugzilla 1202596 None None None Never

Internal Links: 1029734 1197902 1202596

Description Yuri Chornoivan 2015-03-13 10:35:53 UTC
User-Agent:       Opera/9.80 (X11; Linux x86_64; Mageia) Presto/2.12.388 Version/12.16
Build Identifier: 

When translating _big_ fedora project files (libvirt, sssd) it is almost impossible to upload translated files back to Zanata.

Reproducible: Always

Steps to Reproduce:
1. Download libvirt PO file from Zanata.
2. Open it in the PO editor (e.g. Lokalize).
3. Translate something and save the file.
4. Try to upload the results back to Zanata.
Actual Results:  
Immediate error message:

An unexpected error has occurred. Please report this problem with details of what you were attempting.

Expected Results:  
An uploded version is merged to the current catalog.

Thanks for fixing this.

Comment 1 Carlos Munoz 2015-03-17 00:35:16 UTC
Yuri, would it be possible for you to provide a link to one of the files in question? It could the the file size, but just want to try and replicate the problem.

Comment 2 Ding-Yi Chen 2015-03-17 02:17:04 UTC
Yuri,

Would you mind that telling us the command you were using, and attach the po file you were pushing? Thanks.

Comment 3 Yuri Chornoivan 2015-03-17 05:17:44 UTC
Created attachment 1002611 [details]
Libguestfs translation that cannot be uploaded

Hi,

I just use the web interface.

1. Open https://fedora.zanata.org/webtrans/translate?project=libguestfs&iteration=master&localeId=uk&locale=en-US  (just as example).

2. Press upload button (the rightest one) for "po/".

3. Press "Choose..." then select the attached file.

4. Press "Upload".

The command line client upload takes the ages to upload (~3 hours for libvirt file (~8359 messages)) so I ceased to use it, sorry.

Comment 4 Carlos Munoz 2015-03-17 05:52:51 UTC
Hi Yuri, for offline translated files we recommend using the command line clients. Unfortunately, the GUI has some trouble handling larger files.

We have created another bug (1202596) to improve the GUI uploads.

Comment 5 Carlos Munoz 2015-03-17 06:03:22 UTC
Yuri, if you are ok with it, I will close this bug and track the improvements of GUI uploads in https://bugzilla.redhat.com/show_bug.cgi?id=1202596.

Comment 6 Ding-Yi Chen 2015-03-17 06:26:06 UTC
Yuri,

I guess you pushed both source and all the locales.

I went through with zh-TW and translated the first 2 strings, then
use zanata-client-3.4.1-1.fc22.noarch to push


The command I ran is:
time zanata-cli -B -e push --push-type trans --locales zh-TW

[INFO] Pushing target doc [name=libvirt size=1090 client-locale=zh-TW] to server [locale=zh-TW]
Done in 22 secs
zanata-cli -B -e push --push-type trans --locales zh-TW  8.05s user 0.19s system 30% cpu 26.658 total

I think this is as fast as you experienced in WebUI upload.

Comment 7 Yuri Chornoivan 2015-03-17 15:53:57 UTC
(In reply to Ding-Yi Chen from comment #6)
> Yuri,
> 
> I guess you pushed both source and all the locales.
> 
> I went through with zh-TW and translated the first 2 strings, then
> use zanata-client-3.4.1-1.fc22.noarch to push
> 
> 
> The command I ran is:
> time zanata-cli -B -e push --push-type trans --locales zh-TW
> 
> [INFO] Pushing target doc [name=libvirt size=1090 client-locale=zh-TW] to
> server [locale=zh-TW]
> Done in 22 secs
> zanata-cli -B -e push --push-type trans --locales zh-TW  8.05s user 0.19s
> system 30% cpu 26.658 total
> 
> I think this is as fast as you experienced in WebUI upload.

I just tried this once again (the last time I tried this, I had tried the same command).

time zanata-cli push -B -e --push-type trans -s ../po -t ../po -l uk

Done in 9 mins:19 secs

It is in several times slower then Transifex, but much better now.

It is sad that Zanata lacks basic functionality while implementing uncomfortable visual editor making almost impossible to edit big messages.

You can close this bug report but this does not change the fact that it is impossible to upload translations for average user.

Comment 8 Carlos Munoz 2015-03-17 23:24:27 UTC
Yuri, 

I don't want to close the bug report to ignore the (very valid) issue you are reporting here. I am closing it to better track it in the referenced bug.

We are also looking into improving the performance of the server when pushing overall. For that, you can look at https://bugzilla.redhat.com/show_bug.cgi?id=1197902

When you say "lacks basic functionality", I will assume you refer to the uploading of certain large translated files. If not, please correct me with any additional info.

Furthermore, when you say "uncomfortable visual editor making almost impossible to edit big messages", please let us know more details on that specific issue so we can fix it. Also, if you have any ideas on how to improve it, those are also welcome.

Comment 9 Michelle Kim 2015-03-18 02:10:16 UTC
Yuri,

Please find the see also bug https://bugzilla.redhat.com/show_bug.cgi?id=1197902 that we are working on to improve the upload time. Please let us know any feedback you might have.

Comment 10 Yuri Chornoivan 2015-03-18 05:17:18 UTC
(In reply to Carlos Munoz from comment #8)
> When you say "lacks basic functionality", I will assume you refer to the
> uploading of certain large translated files. If not, please correct me with
> any additional info.

Yes, that's absolutely right. Online editors are always very slow than offline tools, often loose their "cloud" translation memory databases. That is unfixable, imho.

So it would be nice if Zanata can do the best in what everyone is expecting from translation tool: deliver the translation from a translator to developer, 24 hours per day, fast and efficient.

Thanks for your efforts to improve Zanata.

> Furthermore, when you say "uncomfortable visual editor making almost
> impossible to edit big messages", please let us know more details on that
> specific issue so we can fix it. Also, if you have any ideas on how to
> improve it, those are also welcome.

That was just an old Opera trouble, never happens in Chromium. Sorry for misguiding.

Comment 11 Ding-Yi Chen 2015-03-18 06:35:53 UTC
(In reply to Yuri Chornoivan from comment #7)
> time zanata-cli push -B -e --push-type trans -s ../po -t ../po -l uk
> 
> Done in 9 mins:19 secs
> 
> It is in several times slower then Transifex, but much better now.

I wish to get the real benchmark, so I run both programs with project libguest and locale uk:

Zanata client:
time zanata-cli -B -e push --url=https://fedora-stg.zanata.org:443/ --disable-ssl-cert --push-type trans --locales uk

zanata-cli -B -e push --url=https://fedora-stg.zanata.org:443/  --push-type   9.32s user 0.27s system 11% cpu 1:25.08 total


Transifex client:
time tx push -t -l uk

tx push -t -l uk  0.09s user 0.03s system 0% cpu 1:13.44 total

Comment 12 Ding-Yi Chen 2015-03-18 06:40:05 UTC
Actually I did find a bug in our client that stop you from pushing your file:

You uk.po contains:

"Language-Team: Ukrainian <kde-i18n-uk@kde.org>\n"
"language/uk/)\n"

While zanata-cli only accepts

"Language-Team: Ukrainian <kde-i18n-uk@kde.org> language/uk/)\n"

So while we are fixing the bug, please either change the string as I suggest,
or I can push the file for you if you don't mind.

Comment 13 Ding-Yi Chen 2015-03-18 06:53:08 UTC
I take the liberty of changing the title to "zanata-cli should allow newline in PO header when pushing" as it is the reason that stop you from pushing.

The performance issues, as Michelle suggest, should be addressed in
Bug 1202596  and Bug 1197902

Comment 14 Yuri Chornoivan 2015-03-18 16:18:39 UTC
(In reply to Ding-Yi Chen from comment #12)
> Actually I did find a bug in our client that stop you from pushing your file:
> 
> You uk.po contains:
> 
> "Language-Team: Ukrainian <kde-i18n-uk@kde.org>\n"
> "language/uk/)\n"

This is a leftover of Transifex Team page address. Example:

"Language-Team: Ukrainian (http://www.transifex.com/projects/p/fedora-web/language/uk/)\n"

For some reason, Zanata broke it when importing. This Line should be removed.

> 
> While zanata-cli only accepts
> 
> "Language-Team: Ukrainian <kde-i18n-uk@kde.org> language/uk/)\n"
> 
> So while we are fixing the bug, please either change the string as I suggest,
> or I can push the file for you if you don't mind.

Comment 15 Patrick Huang 2015-03-18 22:51:08 UTC
See bug 1029734

Comment 16 Ding-Yi Chen 2015-03-19 00:44:55 UTC
Patrick is working on Bug 1029734, which fix this bug. I hereby close it as duplicate.

Yuri, thanks for valuable feedback, we can improve our produce accordingly.

*** This bug has been marked as a duplicate of bug 1029734 ***


Note You need to log in before you can comment on or make changes to this bug.