cloudstack-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gavin Lee <gavin....@gmail.com>
Subject Re: [DOCS][TRANSLATIONS] Upate
Date Thu, 25 Apr 2013 08:05:37 GMT
Done for zh_CN translation on transifex for master branch.

For 2.2.xmessages for zh_CN, and also for ja, the encoding is incorrect and
resource files are not maintained by community.


On Wed, Apr 24, 2013 at 10:06 PM, Milamber <milamber@apache.org> wrote:

>
>
> Le 24/04/2013 10:44, Milamber a ecrit :
>
>
>>
>> Le 23/04/2013 13:50, Gavin Lee a ecrit :
>>
>>> Following Milamber's guide , below process I used for
>>> 4.1.xmessage.properties on zh_CN:
>>> 1. git pull for the latest messages_zh_CN.properties
>>> 2. native2ascii -reverse messages_zh_CN.properties
>>> /tmp/zh_CN.properties.native -encoding utf8
>>>
>> -encoding utf8 <=== not necessary (on my machine)
>
>
>
>  3. copy to the CloudStack_UI transifex project:
>>> cp/tmp/zh_CN.properties.native /
>>> txprj/acsui/translations/**CloudStack_UI.**41xmessageproperties
>>> 4. tx push -l zh_CN -r CloudStack_UI.**41xmessageproperties -t
>>> 5. Do translation on transifex, there are some untranslated items when
>>> syncing with en.properties
>>> 6. tx pull -a
>>>
>>>
>>> Then convert to ascii with unicode, the i18nedit tools throws exception,
>>> I
>>> tried native2ascii command as below and UI display correctly:
>>> native2ascii -encoding UTF-8 zh_CN.properties messages_zh_CN.properties
>>>
>>> Are the whole processes above correct or not?
>>>
>>
>> Yes the process is correct, but currently on master branch the
>> messages_zh_CN.properties is not converting into a ASCII with unicode
>> unlike the 4.1 branch.
>> I will fix this for all messages_xx.properties on master branch today
>> (tonight) (FRench is already convert)
>>
>
> I just have made the fix for chinese (zh_CN) resource file on master
> branch. Now it's a ascii with unicode file and the process can execute
> manually with transifex.
> I made too a upload on transifex (with converting into native charset) for
> fix all sentences which have been corrupts with a previous upload (perhaps
> your upload I think)
>
>
> Currently, missing 33 translations for master (4.2) resource file zn_CN on
> transifex.
>
> Milamber
>
>
>
>> === (on master branch) ===
>>
>> cloudstack-dev/client/WEB-INF/**classes/resources$ file *
>> messages_fr_FR.properties: ASCII text, with very long lines
>> messages_ja.properties:    UTF-8 Unicode text, with very long lines
>> messages_ko_KR.properties: UTF-8 Unicode text, with very long lines
>> messages.properties:       ASCII text, with very long lines
>> messages_pt_BR.properties: ISO-8859 text, with very long lines
>> messages_ru_RU.properties: UTF-8 Unicode text, with very long lines, with
>> CRLF line terminators
>> messages_zh_CN.properties: UTF-8 Unicode text, with very long lines, with
>> CRLF, LF line terminators
>>
>> === (on 4.1 branch) ===
>> cloudstack-dev/client/WEB-INF/**classes/resources$ file *
>> messages_ca.properties:    ASCII text, with very long lines
>> messages_de_DE.properties: ASCII text
>> messages_es.properties:    ASCII text, with very long lines
>> messages_fr_FR.properties: ASCII text, with very long lines
>> messages_it_IT.properties: ASCII text, with very long lines
>> messages_ja.properties:    ASCII text, with very long lines
>> messages_ko_KR.properties: ASCII text, with very long lines
>> messages_nb_NO.properties: ASCII text
>> messages.properties:       ASCII text, with very long lines
>> messages_pt_BR.properties: ASCII text, with very long lines
>> messages_ru_RU.properties: ASCII text, with very long lines
>> messages_zh_CN.properties: ASCII text, with very long lines
>>
>> Milamber
>>
>>
>>
>>>
>>>
>>>
>>> On Tue, Apr 23, 2013 at 12:01 AM, Sebastien Goasguen<runseb@gmail.com>**
>>> wrote:
>>>
>>>  Milamber, I made you a manager of the transifex project so you can help
>>>> fixing those issues.
>>>>
>>>> -sebastien
>>>>
>>>> On Apr 22, 2013, at 11:10 AM, Milamber<milamber@apache.org>  wrote:
>>>>
>>>>
>>>>> Le 17/04/2013 07:26, Sebastien Goasguen a ecrit :
>>>>>
>>>>>> On Apr 16, 2013, at 11:10 AM, Milamber<milamber@apache.org>
  wrote:
>>>>>>
>>>>>>  Le 16/04/2013 13:41, Gavin Lee a ecrit :
>>>>>>>
>>>>>>>> Yes, Traditional Chinese moving very quickly.
>>>>>>>> Hopefully, the other languages can have more contributors.
>>>>>>>>
>>>>>>>> For the UI part, I saw the characters are not recognizable
(browser
>>>>>>>> encoding setting: auto detect&    Unicode UTF-8):
>>>>>>>> ja: http://snag.gy/AVsbU.jpg
>>>>>>>> zh_CN: http://snag.gy/MxbBS.jpg
>>>>>>>>
>>>>>>> This screenshots shows some characters with a incorrect encoding
(try
>>>>>>>
>>>>>> to display a char as a ISO-8859-1 (or japanese charset) but the
>>>> encoding is
>>>> a UTF-8, I think)
>>>>
>>>>> With Sebgoa, we have correct all UI ressource file to have only one
>>>>>>>
>>>>>> encoding charset in this files (ASCII with unicode). The transifex
>>>> data
>>>> isn't up-to-date.
>>>>
>>>>> Sebgoa, I think we must upload the last version of this (all)
>>>>>>>
>>>>>> resources files (except FR already done) from branch 4.1 to transifex.
>>>>
>>>>> The last version of resources files is ASCII with unicode for *all
>>>>>>>
>>>>>> chars* in each file, and now transifex keep the unicode char (check
>>>> with FR
>>>> download for use)
>>>>
>>>>> Mistake: transifex don't support uploaded unicode chars.
>>>>>
>>>>>  The way the original workflow was:
>>>>>> -Upload new versions of the resources file in english
>>>>>> -Translators create a new language in transifex.
>>>>>> -Download new language resources file
>>>>>> -Fix encoding
>>>>>>
>>>>> For the fix encoding step, we can use this (unix and JDK) commands for
>>>>>
>>>> each language:
>>>>
>>>>> CODELANG=it_IT
>>>>>
>>>>>  FILE_TRANSIFEX=for_use_**CloudStack_UI_**41xmessageproperties_${**CODELANG}.properties
>>>>
>>>>
>>>>> FILE_RES=messages_${CODELANG}.**properties
>>>>>
>>>>> # Convert to ascii with unicode (native2ascii is a JDK tool)
>>>>> native2ascii ${FILE_TRANSIFEX} /tmp/${FILE_RES}.ascii-with-**unicode
>>>>>
>>>>> # sort key, add a double-backslash before the quote char ( ' ==> 
\\' )
>>>>> grep -v "^#" /tmp/${FILE_RES}.ascii-with-**unicode | sort -f | uniq |
>>>>> sed
>>>>>
>>>> "s/'/\\\\\\\\\'/g">
>>>> /tmp/${FILE_RES}.ascii-with-**unicode_doublebackslashquote
>>>>
>>>>> # Define Apache Licence Header (one long line)
>>>>> AL2_STRING="# Licensed to the Apache Software Foundation (ASF) under
>>>>>
>>>> one\n# or more contributor license agreements.  See the NOTICE file\n#
>>>> distributed with this work for additional information\n# regarding
>>>> copyright ownership.  The ASF licenses this file\n# to you under the
>>>> Apache
>>>> License, Version 2.0 (the\n# \"License\"); you may not use this file
>>>> except
>>>> in compliance\n# with the License.  You may obtain a copy of the License
>>>> at\n#\n#   http://www.apache.org/**licenses/LICENSE-2.0\n#\n#<http://www.apache.org/licenses/LICENSE-2.0%5Cn#%5Cn%23>Unless
>>>> required by applicable law or agreed to in writing,\n# software
>>>> distributed
>>>> under the License is distributed on an\n# \"AS IS\" BASIS, WITHOUT
>>>> WARRANTIES OR CONDITIONS OF ANY\n# KIND, either express or implied.  See
>>>> the License for the\n# specific language governing permissions and
>>>> limitations\n# under the License."
>>>>
>>>>> # Re-introduce the AL2 header
>>>>> echo -e "$AL2_STRING" | cat -
>>>>>
>>>> /tmp/${FILE_RES}.ascii-with-**unicode_doublebackslashquote>
>>>> ./FOR_REPO_${FILE_RES}
>>>>
>>>>>
>>>>>  So I never uploaded the language specific resource file to transifex.
>>>>>>
>>>>> Won't we have a problem that they won't stay in sync with the en-US
>>>> resource file, if it gets changed ?
>>>>
>>>>> On upload, Transifex seems only get the matching key with source
>>>>>
>>>> language.
>>>>
>>>>> In any case I uploaded the ja-JP resource file and the result on
>>>>>>
>>>>> transifex is less than optimal, check the unreviewed strings, there is
>>>> a
>>>> mix of encoding.
>>>>
>>>>> We needs to revert the native to ascii convert.
>>>>> We can use this steps for each language before uploading on transifex
:
>>>>>
>>>>> CODELANG=ja
>>>>> FILE_RES=messages_${CODELANG}.**properties
>>>>>
>>>>> # Revert convert
>>>>> native2ascii -reverse ${FILE_RES} /tmp/${FILE_RES}.native1
>>>>>
>>>>> # Remove double backslashes before quote
>>>>> sed "s/\\\\\\\'/'/g" /tmp/${FILE_RES}.native1>  ${FILE_RES}.native
>>>>>
>>>>>
>>>>> I've tested this commandes for download/upload with French language,
>>>>> and
>>>>>
>>>> just for download with ko_KR, it_IT, ca, ja, pt_BR.
>>>>
>>>>>
>>>>> I can make one shell script to automate this, and put in a tools dir
in
>>>>>
>>>> CS git repo.
>>>>
>>>>> Milamber
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>>  Milamber
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>  The other languages are ok.
>>>>>>>>
>>>>>>>>
>>>>>>>> On Tue, Apr 16, 2013 at 8:25 PM, Sebastien Goasguen<
>>>>>>>> runseb@gmail.com
>>>>>>>>
>>>>>>> wrote:
>>>>>
>>>>>> Hi,
>>>>>>>>>
>>>>>>>>> There has been some terrific progress on the translations.
>>>>>>>>>
>>>>>>>>> The easiest way to share it is to check the Transifex
dashboard,
>>>>>>>>>
>>>>>>>> below are
>>>>
>>>>> some screenshots:
>>>>>>>>>
>>>>>>>>> The runbook:
>>>>>>>>> http://awesomescreenshot.com/**0bd163zldd<http://awesomescreenshot.com/0bd163zldd>
>>>>>>>>>
>>>>>>>>> The UI:
>>>>>>>>> http://awesomescreenshot.com/**089163zva2<http://awesomescreenshot.com/089163zva2>
>>>>>>>>>
>>>>>>>>> The entire docs set:
>>>>>>>>> http://awesomescreenshot.com/**01c163zq63<http://awesomescreenshot.com/01c163zq63>
>>>>>>>>>
>>>>>>>>> Since 4.1 is not out yet, there is time to finish those
last 3% on
>>>>>>>>>
>>>>>>>> the UI
>>>>
>>>>> translations.
>>>>>>>>>
>>>>>>>>> Keep getting the word out, forward to friends and let's
all make
>>>>>>>>> CloudStack a truly worldwide project.
>>>>>>>>>
>>>>>>>>> Cheers,
>>>>>>>>>
>>>>>>>>> -Sebastien
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>
>>>
>>
>>
>


-- 
Gavin

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message