Bug 732576
Summary: | Show proper warning message when pushing unsupported locales, instead of "Unexpected error" | ||
---|---|---|---|
Product: | [Retired] Zanata | Reporter: | Ding-Yi Chen <dchen> |
Component: | Component-PythonClient | Assignee: | James Ni <jni> |
Status: | CLOSED CURRENTRELEASE | QA Contact: | Ding-Yi Chen <dchen> |
Severity: | medium | Docs Contact: | |
Priority: | unspecified | ||
Version: | 1.4-RC | CC: | sflaniga, zanata-bugs |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2012-01-04 02:58:32 UTC | Type: | --- |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Ding-Yi Chen
2011-08-23 01:13:56 UTC
Sorry, the trailing 'b' was missing in the step 3, so the revised step 3 is: 3. xgettext --language=C --keyword=_ --keyword=N_ --keyword=C_:1c,2 --keyword=NC_:1c,2 -s --package-name=ibus-chewing --package-version=master -o ibus-chewing.pot ../src/*.c ../src/*.gob Hmm, now it seems pushing successfully. :-/ I will put needinfo to myself until either it reappears or it disappears for one month. Aha, this "bug" is actually not about msgctxt, but caused by unsupported locale. That is, this bug occurs when zanata.xml contains following: <locale map-from="zh_TW">zh-Hant</locale> <locale map-from="zh_CN">zh-Hans</locale> but server instead supports "zh-Hant-TW" and "zh-Hans-CN". So this bug is actually for pushing unsupported locales. Description of problem: Pushing translation in unsupported locale caused following error: Unexpected Status, failed to push translation to zanata server. User can have better clue if a warning message looks like "Locale XXX is not supported by Zanata server, skip pushing." Version-Release number of selected component (if applicable): 1.3.0 How reproducible: Always Steps to Reproduce: 1. git clone git://github.com/definite/ibus-chewing.git 2. cd ibus-chewing/po 3. Generate ibus-chewing.pot by: xgettext --language=C --keyword=_ --keyword=N_ --keyword=C_:1c,2 --keyword=NC_:1c,2 -s --package-name=ibus-chewing --package-version=master -o ibus-chewing.pot ../src/*.c ../src/*.go 4. Edit following as zanata.xml, make sure the locales are invalid, such like: <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <config xmlns="http://zanata.org/namespace/config/"> <url>http://flies-devel.englab.bne.redhat.com/zanata-test/</url> <project>IBusChewing</project> <project-version>master</project-version> <locales> <locale map-from="zh_CN">zh-HS</locale> <locale map-from="zh_TW">zh-HT</locale> </locales> </config> 5. zanata push --project-type=gettext Actual results: Error messages: "Unexpected Status, failed to push translation to zanata server." Expected results: Warning messages: "Locale XXX is not supported by Zanata server, skip pushing." Hi, I have modified error message in commit 067b184 several days ago, sorry i didn't announce that, please use the latest code on git-hub to verify it. Actually, the error message returned from server is "Locale XXX is not enabled on this server. Please contact admin.", so i display this message to user directly, and even you gave a wrong locale name that never exist, like --lang=blabla, the sever still return a error message for "Locale blabla is not enabled on this server. Please contact admin." Also, warning message for msgctxt still there: "warning: encountered msgctxt; not currently supported" still there, i use fedora 14 to test. Since we do currently support msgctxt yet, so the warning message "warning: encountered msgctxt; not currently supported" is acceptable. VERIFIED with commit 2c477843248a4a7ba03840c341824b856c433e0a That commit doesn't seem to exist: https://github.com/zanata/zanata-python-client/commit/2c477843248a4a7ba03840c341824b856c433e0a Did this fix make it into 1.3.1? Hi Sean, Sorry, the commit for this issue should be 067b184, you can find it at: https://github.com/zanata/zanata-python-client/commit/067b184f88fcf7592380d9cf8b56017c48bda31f This issue have not included in 1.3.1, i will included it in upcoming 1.3.2, i will close it when i 1.3.2 is released. Thanks |