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
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?




On Tue, Apr 23, 2013 at 12:01 AM, Sebastien Goasguen <run...@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 <milam...@apache.org> wrote:
>
> >
> >
> > Le 17/04/2013 07:26, Sebastien Goasguen a ecrit :
> >> On Apr 16, 2013, at 11:10 AM, Milamber<milam...@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# 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<run...@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
> >>>>>
> >>>>> The UI:
> >>>>> http://awesomescreenshot.com/089163zva2
> >>>>>
> >>>>> The entire docs set:
> >>>>> 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

Reply via email to