geditの「日付/時刻の挿入」のうち、RFC 2822形式が誤って翻訳されてしまっている
Bug #603172 reported by
Koichi Akabe
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Ubuntu Japanese Kaizen Project |
Triaged
|
Low
|
Unassigned |
Bug Description
確認手順:
1). geditを起動する
2). 「編集」>「日付/
3). 「指定したフォーマットを使う」
Expected Result:
「Fri Jul 09 12:43:38 JST 2010」という形で、
Actual Result:
「金 7月 09 12:42:17 JST 2010」という形で、
description: | updated |
summary: |
- geditの「日付/時刻の挿入」の日時フォーマットがRFC 2822に準拠していない。(日本語環境のみ) + geditの「日付/時刻の挿入」のうち、RFC 2822形式が誤って翻訳されてしまっている |
description: | updated |
Changed in ubuntu-jp-improvement: | |
importance: | Undecided → Low |
status: | New → Triaged |
To post a comment you must log in.
gedit-2. 30.3/plugins/ time/gedit- time-plugin. cのget_time( )において、ロケールによる挙動 を一切無視した実装が行われてい る。
以下でフォーマットを宣言して、 そのままget_ time()でstrftime する作りになっているのが問題。
static const gchar *formats[] =
{
"%c",
"%x",
"%X",
"%x %X",
"%Y-%m-%d %H:%M:%S",
"%a %b %d %H:%M:%S %Z %Y",
"%a %b %d %H:%M:%S %Y",
"%a %d %b %Y %H:%M:%S %Z",
"%a %d %b %Y %H:%M:%S",
"%d/%m/%Y",
"%d/%m/%y",
#ifndef G_OS_WIN32
"%D", /* This one is not supported on win32 */
#endif
"%A %d %B %Y",
"%A %B %d %Y",
"%Y-%m-%d",
"%d %B %Y",
"%B %d, %Y",
"%A %b %d",
"%H:%M:%S",
"%H:%M",
"%I:%M:%S %p",
"%I:%M %p",
"%H.%M.%S",
"%H.%M",
"%I.%M.%S %p",
"%I.%M %p",
"%d/%m/%Y %H:%M:%S",
"%d/%m/%y %H:%M:%S",
#if __GLIBC__ >= 2
"%a, %d %b %Y %H:%M:%S %z",
#endif
NULL
};
選択肢 a) 単純な対応: て、本来のロケールに戻すset localeを直後に入れる。
setlocale(LC_ALL, ""); をstrftimeの直前にいれ
選択肢 b) まじめだが面倒な対応 報も含めたものにするか、 もしくはstrftimeに頼ら ない構造にする。
フォーマット文字列をロケール情