[1] [PRE[ $ msgfmt --version msgfmt (GNU gettext) 0.11.5 ]PRE] * 引用文字列 ** 字句化 [2] [PRE(code)[ msgid"aa"msgstr"bb" ]PRE] [PRE[ msgid "aa" msgstr "bb" ]PRE] ;; [8] Input: [PRE(code)[ msgid"aa"msgstr"x"y" ]PRE] Result: [PRE(code)[ :1: keyword "y" unknown :1:20: syntax error /usr/local/bin/msgfmt: found 2 fatal errors ]PRE] ;; ** 隣接する引用文字列 [4] Input: [PRE(code)[ msgid"aa"msgstr "a" "b" "c" ]PRE] Result: [PRE(code)[ msgid "aa" msgstr "abc" ]PRE] ;; [5] Input: [PRE(code)[ msgid"aa"msgstr"x""y" ]PRE] Result: [PRE(code)[ msgid "aa" msgstr "xy" ]PRE] ;; ** 逃避 [6] Input: [PRE(code)[ msgid"aa"msgstr"x\"y" ]PRE] Result: [PRE(code)[ msgid "aa" msgstr "x\"y" ]PRE] ;; [7] Input: [PRE(code)[ msgid"aa"msgstr"x\\y" ]PRE] Result: [PRE(code)[ msgid "aa" msgstr "x\\y" ]PRE] ;; * エントリー [9] Input: [PRE(code)[ msgid"aa"msgstr ]PRE] Result: [PRE(code)[ :1:16: syntax error /usr/local/bin/msgfmt: found 1 fatal error ]PRE] ;; [10] Input: [PRE(code)[ msgstr"bb" msgid"aa" ]PRE] Result: [PRE(code)[ :1:7: syntax error :2: missing `msgstr' section /usr/local/bin/msgfmt: found 2 fatal errors ]PRE] ;; [11] Input: [PRE(code)[ msgid"aa" msgid"bb" msgstr"xx" ]PRE] Result: [PRE(code)[ :1: missing `msgstr' section /usr/local/bin/msgfmt: found 1 fatal error ]PRE] ;; [12] Input: [PRE(code)[ msgid"aa" msgstr"xx" msgstr"yy" ]PRE] Result: [PRE(code)[ :3:7: syntax error /usr/local/bin/msgfmt: found 1 fatal error ]PRE] ;; * 注釈 [3] Input: [PRE(code)[ msgid"aa"msgstr"bb" #trailing #comment ]PRE] Result: [PRE(code)[ msgid "aa" msgstr "bb" ]PRE] ;; [20] Input: [PRE(code)[ #? nonstandard comment msgid "x" msgstr "y" ]PRE] Result: [PRE(code)[ msgid "x" msgstr "y" ]PRE] ;; [31] Input: [PRE(code)[ #; "aa" msgid "z" msgstr "a" ]PRE] Result: [PRE(code)[ msgid "z" msgstr "a" ]PRE] ;; ** #: [32] Input: [PRE(code)[ #: a:b msgid "z" msgstr "a" ]PRE] Result: [PRE(code)[ msgid "z" msgstr "a" ]PRE] ;; [33] Input: [PRE(code)[ #: a:1 b:2 msgid "z" msgstr "a" ]PRE] Result: [PRE(code)[ msgid "z" msgstr "a" ]PRE] ;; ** #, [34] Input: [PRE(code)[ #, flag msgid "z" msgstr "a" ]PRE] Result: [PRE(code)[ msgid "z" msgstr "a" ]PRE] ;; [35] Input: [PRE(code)[ #, fuzzy msgid "z" msgstr "a" ]PRE] Result: [PRE(code)[ /usr/local/bin/msgunfmt: file "-" is truncated ]PRE] ;; [36] Input: [PRE(code)[ #, fuzzy msgid "z" msgstr "a" ]PRE] Result: [PRE(code)[ msgid "z" msgstr "a" ]PRE] ;; ** #| [21] Input: [PRE(code)[ #| msgid "x" #| msgstr "y" msgid "z" msgstr "a" ]PRE] Result: [PRE(code)[ :2: keyword "msgstr" unknown :2:10: syntax error /usr/local/bin/msgfmt: found 2 fatal errors ]PRE] ;; [29] Input: [PRE(code)[ #| aa msgid "z" msgstr "a" ]PRE] Result: [PRE(code)[ :1: keyword "aa" unknown :1:6: syntax error /usr/local/bin/msgfmt: found 2 fatal errors ]PRE] ;; [30] Input: [PRE(code)[ #| "aa" msgid "z" msgstr "a" ]PRE] Result: [PRE(code)[ :1:8: syntax error /usr/local/bin/msgfmt: found 1 fatal error ]PRE] ;; ** #~ [22] Input: [PRE(code)[ #~ msgid "y" #~ msgstr "y" msgid "z" msgstr "a" ]PRE] Result: [PRE(code)[ msgid "z" msgstr "a" ]PRE] ;; [23] Input: [PRE(code)[ #~ msgstr "y" msgid "z" msgstr "a" ]PRE] Result: [PRE(code)[ :1:10: syntax error /usr/local/bin/msgfmt: found 1 fatal error ]PRE] ;; [24] Input: [PRE(code)[ #~ msgid "y" #~ msgstr "y" #~ msgstr "y" msgid "z" msgstr "a" ]PRE] Result: [PRE(code)[ :3:10: syntax error /usr/local/bin/msgfmt: found 1 fatal error ]PRE] ;; [25] Input: [PRE(code)[ #~ msgid "y" #~ msgstr "y" "x" msgid "z" msgstr "a" ]PRE] Result: [PRE(code)[ :3: inconsistent use of #~ /usr/local/bin/msgfmt: found 1 fatal error ]PRE] ;; [26] Input: [PRE(code)[ #~ msgid "y" #~ msgstr "y" # "x" msgid "z" msgstr "a" ]PRE] Result: [PRE(code)[ msgid "z" msgstr "a" ]PRE] ;; [27] Input: [PRE(code)[ #~ msgid "y" #~ msgstr "y" #~ "x" msgid "z" msgstr "a" ]PRE] Result: [PRE(code)[ msgid "z" msgstr "a" ]PRE] ;; [28] Input: [PRE(code)[ #~ "x" msgid "z" msgstr "a" ]PRE] Result: [PRE(code)[ :1:7: syntax error /usr/local/bin/msgfmt: found 1 fatal error ]PRE] ;; * 頭部 [13] Input: [PRE(code)[ msgid"" msgstr"" ]PRE] Result: [PRE(code)[ /usr/local/bin/msgunfmt: file "-" is not in GNU .mo format ]PRE] ;; [14] Input: [PRE(code)[ msgid"" msgstr"a" ]PRE] Result: [PRE(code)[ /usr/local/bin/msgunfmt: file "-" is not in GNU .mo format ]PRE] ;; [15] Input: [PRE(code)[ msgid"" msgstr"" msgid "x" msgstr "y" ]PRE] Result: [PRE(code)[ /usr/local/bin/msgunfmt: file "-" is not in GNU .mo format ]PRE] ;; [16] Input: [PRE(code)[ msgid"" msgstr"Content-Type: text/html; charset=utf-8" msgid "x" msgstr "y" ]PRE] Result: [PRE(code)[ msgid "" msgstr "Content-Type: text/html; charset=utf-8" msgid "x" msgstr "y" ]PRE] ;; [17] Input: [PRE(code)[ msgid"" msgstr"MIME-Version: 1.0" msgid "x" msgstr "y" ]PRE] Result: [PRE(code)[ /usr/local/bin/msgunfmt: file "-" is not in GNU .mo format ]PRE] ;; [18] Input: [PRE(code)[ msgid"" msgstr"" msgid "x" msgstr "y" ]PRE] Result: [PRE(code)[ : warning: Charset missing in header. Message conversion to user's charset will not work. /usr/local/bin/msgfmt: (null): warning: PO file header missing or invalid warning: charset conversion will not work /usr/local/bin/msgfmt: found 1 fatal error ]PRE] ;; [19] Input: [PRE(code)[ msgid"" msgstr"charset=utf-8" msgid "x" msgstr "y" ]PRE] Result: [PRE(code)[ /usr/local/bin/msgunfmt: file "-" is not in GNU .mo format ]PRE] ;;