[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[debian-users:42598] Re: [gettext] ja.po の msgid に non-ASCII 文字は使える?



At Sat, 22 Jan 2005 01:14:43 +0900,
hma@xxxxxxxxxxxxx wrote:

> UTF-8 で書かれた日本語メッセージカタログ、ja.po ファイルの中で、
> msgid の中に 人名を表記するため(フランス語など)
> non-ASCII が入っているソフトがあります。

(略)
 
> msgid が ASCII のみで書かれている文字列に対応する msgstr は表示されますが、
> msgid に non-ASCII が含まれている文字列に対応する msgstr は表示されません。
> msgid のままになります。
> 
> もっと小さな 
> printf("Hello World");
> レベルのプログラムでも、結果は同じでした。
> これは、仕様なのでしょうか。
> 
> 2003 年に久保田さんが書かれた Introduction to i18n 
> http://www.jp.debian.org/doc/manuals/intro-i18n/ch-library.en.html#s-gettext
> には、
> 
>   Don't use non-ASCII characters for 'msgid'. 
> 
> と書かれています。
> これは、今も変わらないのでしょうか?

info gettext の Charset conversion に

How to specify the output character set `gettext' uses
------------------------------------------------------

  Note that the MSGID argument to `gettext' is not subject to
  character set conversion.  Also, when `gettext' does not find a
  translation for MSGID, it returns MSGID unchanged - independently of
  the current output character set.  It is therefore recommended that all
  MSGIDs be US-ASCII strings.

と書いてありますね。
ソースの encoding と、poファイルの encodingが同じじゃないと
msgid が equals にならないんではないかと。

人名については同じく info gettext の

Marking Proper Names for Translation
====================================

Should names of persons, cities, locations etc. be marked for
translation or not?  People who only know languages that can be written
with Latin letters (English, Spanish, French, German, etc.) are tempted
to say "no", because names usually do not change when transported
between these languages.  However, in general when translating from one
script to another, names are translated too, usually phonetically or by
transliteration.  For example, Russian or Greek names are converted to
the Latin alphabet when being translated to English, and English or
French names are converted to the Katakana script when being translated
to Japanese.  This is necessary because the speakers of the target
language in general cannot read the script the name is originally
written in.

とか書いてあります。
-- 
鵜飼文敏