2009/5/8 Giampaolo Fadel <[email protected]>:
>
>
> 2009/5/7 Yuki KODAMA <[email protected]>
>>
>> 2009/5/8 Steve Borho <[email protected]>:
>> > 2009/5/7 Yuki KODAMA <[email protected]>:
>> >> On Thu, May 7, 2009 at 9:58 PM, Giampaolo Fadel <[email protected]>
>> >> wrote:
>> >>> Endflow Net ha scritto:
>> >>>>
>> >>>> Hi all,
>> >>>>
>> >>>> Now I've finished translation for Japanese in LaunchPad.
>> >>>> So I want to test it with TortoiseHG crew build.
>> >>>> However, I have no experience in "python + gettext" environment.
>> >>>> Could anyone tell me how to test it?
>> >>>> Or is there any manual described it?
>> >>>> Thanks in advance.
>> >>>>
>> >>>>
>> >>>
>> >>> Hi Yuki,
>> >>> here the guide to test translation
>> >>> http://bitbucket.org/tortoisehg/crew/wiki/Translation
>> >>>
>> >>> use the nightly build of TortoiseHG that can be found here
>> >>> http://code.google.com/p/tortoisehg-nightly/downloads/list
>> >>>
>> >>> Regards,
>> >>> paolo
>> >>>
>> >>>
>> >>
>> >> Thanks for replying, paolo.
>> >> I've tried that guide and started the test.
>> >> Of course I configured an environment variable, "LANG=ja".
>> >>
>> >> But when I execute "hgtk commit" command,  I got fatal error;
>> >> hgproc.exe crashed and open dialog for starting Visual Studio 2008
>> >> debugger.
>> >> http://www.flickr.com/photos/netkuy/3510892540/
>> >>
>> >> "hgtk about" command displayed the dialog, but the description contain
>> >> unreadable characters.
>> >> http://www.flickr.com/photos/netkuy/3510892524/
>> >>
>> >> more:
>> >> http://www.flickr.com/photos/netkuy/3510082135/
>> >> http://www.flickr.com/photos/netkuy/3510082119/
>> >>
>> >> On the other hand, in case of configured "LANG=it", italian
>> >> translation works without crash. But French(fr) and Chinese(zh_CN)
>> >> crashed.
>> >>
>> >> I suspected something related "Font" since English & Italian only use
>> >> alphabet, Japanese & French & Chinese contain non-alphabet characters.
>> >> So I've change font setting in gtkrc (in "C:\Program
>> >> Files\TortoiseHg\etc\gtk-2.0\gtkrc"):
>> >>
>> >> gtk-font-name = "MS ゴシック 14"
>> >>
>> >> or
>> >>
>> >> gtk-font-name = "Meiryo 14"
>> >>
>> >> I've confirmed changing type face and size of font in About dialog,
>> >> but it didn't fixed up unreadable character issues.
>> >> Does anyone have idea?
>> >
>> > I have no ideas, unfortunately.  You can see if other GTK Win32 apps
>> > have had similar problems, but I suspect you or someone else will need
>> > to try this out with a TortoiseHg (and GTK) source setup in order to
>> > debug the problem.
>> >
>> > BTW: does hg work correctly on the command line with this LANG?  Do
>> > 'hg help' and 'hgtk help' work appropriately?
>> >
>> > --
>> > Steve Borho
>> >
>>
>> Yes, I think so.
>> I just downloaded GTK Win32 apps, GIMP and Pidgin.
>> There are some troubleshooting page about these apps in Japanese site.
>> Most solutions point "Font setting" ... :(
>> But I'll continue to investigate this issue.
>>
>> And about command-line "hg help" & "hgtk help".
>> "hg help" works perfectly.
>> "hgtk help" works with no crash, but the translation is partially.
>> It's very curiously. Some string translated into Japanese.
>> But I translated all strings. I'm confusing this.
>> (now I'm using latest nightly crew build on Google Code)
>>
>> Hm ... does this issue cause by encoding?
>> PO file was encoded in UTF-8.
>>
>> Well, if I try to install from source, can I enable my language by
>> placing MO file to "{PYTHON}\Lib\site-packages\mercurial"?
>> Please let me know if you have other tips about translation debugging.
>>
>> regards,
>> Yuki
>
> Hi,
> I have the same problem in my italian translation. Some italian strings
> contains characters out of the standard alphabet (èàù), which character code
> is greater than 0x7F. When a string has at least one of these characters I
> have problems.
> If the string is displayed in a simple message box, the result is the
> unreadable characters like your images.
> If the string is displayed in a dialog (commit, configure, etc.) or in a
> tooltip an empty string is displayed.
>
> paolo
>

Oh, I didn't know about italian contain special characters, sorry.

Well, a bit ago, I found doubtful code in Mercurial source (crew).
TortoiseHg uses Mercurial's I18N system by this statement:

    from mercurial.i18n import _

And "_" function (alias of "gettext") is defined in "mercurial/i18n.py"

mercurial/i18n.py: Line 41

    u = t.ugettext(message)
    return u.encode(encoding.encoding, "replace")

These statement is in "gettext" function.
This means "gettext" function not only gets translated string from MO file,
but also converts message string to system default encoding (in my
system, Shift_JIS).

Mercurial command line works good, because Windows command prompt only
support system default encoding, not support UTF-8.
So Mercurial must convert encoding to system default encoding.
But as you know, it doesn't need in TortoiseHg.

Yuki

------------------------------------------------------------------------------
The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
production scanning environment may not be a perfect world - but thanks to
Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700
Series Scanner you'll get full speed at 300 dpi even with all image 
processing features enabled. http://p.sf.net/sfu/kodak-com
_______________________________________________
Tortoisehg-develop mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tortoisehg-develop

Reply via email to