gettext 1.5.0 → 1.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/ChangeLog +113 -0
- data/NEWS +17 -1
- data/README +56 -46
- data/Rakefile +6 -2
- data/data/locale/cs/LC_MESSAGES/rails.mo +0 -0
- data/data/locale/cs/LC_MESSAGES/rgettext.mo +0 -0
- data/data/locale/de/LC_MESSAGES/rails.mo +0 -0
- data/data/locale/de/LC_MESSAGES/rgettext.mo +0 -0
- data/data/locale/el/LC_MESSAGES/rails.mo +0 -0
- data/data/locale/el/LC_MESSAGES/rgettext.mo +0 -0
- data/data/locale/es/LC_MESSAGES/rails.mo +0 -0
- data/data/locale/es/LC_MESSAGES/rgettext.mo +0 -0
- data/data/locale/fr/LC_MESSAGES/rails.mo +0 -0
- data/data/locale/fr/LC_MESSAGES/rgettext.mo +0 -0
- data/data/locale/it/LC_MESSAGES/rails.mo +0 -0
- data/data/locale/it/LC_MESSAGES/rgettext.mo +0 -0
- data/data/locale/ja/LC_MESSAGES/rails.mo +0 -0
- data/data/locale/ja/LC_MESSAGES/rgettext.mo +0 -0
- data/data/locale/ko/LC_MESSAGES/rails.mo +0 -0
- data/data/locale/ko/LC_MESSAGES/rgettext.mo +0 -0
- data/data/locale/nl/LC_MESSAGES/rails.mo +0 -0
- data/data/locale/nl/LC_MESSAGES/rgettext.mo +0 -0
- data/data/locale/pt_BR/LC_MESSAGES/rails.mo +0 -0
- data/data/locale/pt_BR/LC_MESSAGES/rgettext.mo +0 -0
- data/data/locale/ru/LC_MESSAGES/rails.mo +0 -0
- data/data/locale/ru/LC_MESSAGES/rgettext.mo +0 -0
- data/data/locale/sv/LC_MESSAGES/rgettext.mo +0 -0
- data/data/locale/zh/LC_MESSAGES/rails.mo +0 -0
- data/data/locale/zh/LC_MESSAGES/rgettext.mo +0 -0
- data/ext/gettext/locale_system.c +3 -3
- data/lib/gettext.rb +149 -98
- data/lib/gettext/container.rb +3 -23
- data/lib/gettext/erb.rb +2 -2
- data/lib/gettext/locale_posix.rb +37 -5
- data/lib/gettext/locale_win32.rb +2 -1
- data/lib/gettext/mo.rb +6 -4
- data/lib/gettext/parser/activerecord.rb +7 -3
- data/lib/gettext/poparser.rb +2 -2
- data/lib/gettext/rails.rb +131 -112
- data/lib/gettext/rgettext.rb +3 -1
- data/lib/gettext/rmsgfmt.rb +3 -1
- data/lib/gettext/rmsgmerge.rb +3 -1
- data/lib/gettext/textdomain.rb +14 -8
- data/lib/gettext/textdomainmanager.rb +103 -0
- data/lib/gettext/version.rb +1 -1
- data/po/cs/rails.po +16 -16
- data/po/cs/rgettext.po +7 -3
- data/po/de/rails.po +16 -16
- data/po/de/rgettext.po +7 -3
- data/po/el/rails.po +16 -16
- data/po/el/rgettext.po +7 -3
- data/po/es/rails.po +16 -16
- data/po/es/rgettext.po +7 -3
- data/po/fr/rails.po +16 -16
- data/po/fr/rgettext.po +7 -3
- data/po/it/rails.po +79 -0
- data/po/it/rgettext.po +42 -32
- data/po/ja/rails.po +20 -18
- data/po/ja/rgettext.po +7 -3
- data/po/ko/rails.po +16 -16
- data/po/ko/rgettext.po +7 -3
- data/po/nl/rails.po +16 -16
- data/po/nl/rgettext.po +7 -3
- data/po/pt_BR/rails.po +16 -16
- data/po/pt_BR/rgettext.po +7 -3
- data/po/rails.pot +16 -16
- data/po/rgettext.pot +7 -3
- data/po/ru/rails.po +18 -18
- data/po/ru/rgettext.po +13 -9
- data/po/sv/rgettext.po +7 -3
- data/po/zh/rails.po +78 -0
- data/po/zh/rgettext.po +104 -0
- data/pre-setup.rb +1 -4
- data/samples/cgi/helloerb.rhtml +1 -0
- data/samples/cgi/locale/zh/LC_MESSAGES/helloerb1.mo +0 -0
- data/samples/cgi/locale/zh/LC_MESSAGES/helloerb2.mo +0 -0
- data/samples/cgi/locale/zh/LC_MESSAGES/hellolib.mo +0 -0
- data/samples/cgi/locale/zh/LC_MESSAGES/main.mo +0 -0
- data/samples/cgi/po/zh/helloerb1.po +60 -0
- data/samples/cgi/po/zh/helloerb2.po +52 -0
- data/samples/cgi/po/zh/hellolib.po +24 -0
- data/samples/cgi/po/zh/main.po +80 -0
- data/samples/hello.rb +28 -5
- data/samples/hello2.rb +13 -6
- data/samples/hello_noop.rb +20 -8
- data/samples/hello_plural.rb +16 -6
- data/samples/hello_textdomain.rb +13 -4
- data/samples/hellogtk.rb +5 -4
- data/samples/hellogtk2.rb +5 -6
- data/samples/locale/cs/LC_MESSAGES/hello2.mo +0 -0
- data/samples/locale/cs/LC_MESSAGES/hello_plural.mo +0 -0
- data/samples/locale/de/LC_MESSAGES/hello2.mo +0 -0
- data/samples/locale/de/LC_MESSAGES/hello_plural.mo +0 -0
- data/samples/locale/el/LC_MESSAGES/hello2.mo +0 -0
- data/samples/locale/el/LC_MESSAGES/hello_plural.mo +0 -0
- data/samples/locale/es/LC_MESSAGES/hello2.mo +0 -0
- data/samples/locale/es/LC_MESSAGES/hello_plural.mo +0 -0
- data/samples/locale/fr/LC_MESSAGES/hello2.mo +0 -0
- data/samples/locale/fr/LC_MESSAGES/hello_plural.mo +0 -0
- data/samples/locale/it/LC_MESSAGES/hello2.mo +0 -0
- data/samples/locale/it/LC_MESSAGES/hello_plural.mo +0 -0
- data/samples/locale/ja/LC_MESSAGES/hello2.mo +0 -0
- data/samples/locale/ja/LC_MESSAGES/hello_plural.mo +0 -0
- data/samples/locale/ko/LC_MESSAGES/hello2.mo +0 -0
- data/samples/locale/ko/LC_MESSAGES/hello_plural.mo +0 -0
- data/samples/locale/nl/LC_MESSAGES/hello2.mo +0 -0
- data/samples/locale/nl/LC_MESSAGES/hello_plural.mo +0 -0
- data/samples/locale/pt_BR/LC_MESSAGES/hello2.mo +0 -0
- data/samples/locale/pt_BR/LC_MESSAGES/hello_plural.mo +0 -0
- data/samples/locale/ru/LC_MESSAGES/hello2.mo +0 -0
- data/samples/locale/ru/LC_MESSAGES/hello_plural.mo +0 -0
- data/samples/locale/sv/LC_MESSAGES/hello2.mo +0 -0
- data/samples/locale/sv/LC_MESSAGES/hello_plural.mo +0 -0
- data/samples/locale/zh/LC_MESSAGES/hello.mo +0 -0
- data/samples/locale/zh/LC_MESSAGES/hello2.mo +0 -0
- data/samples/locale/zh/LC_MESSAGES/hello_noop.mo +0 -0
- data/samples/locale/zh/LC_MESSAGES/hello_plural.mo +0 -0
- data/samples/locale/zh/LC_MESSAGES/helloglade2.mo +0 -0
- data/samples/locale/zh/LC_MESSAGES/hellogtk.mo +0 -0
- data/samples/locale/zh/LC_MESSAGES/hellotk.mo +0 -0
- data/samples/po/cs/hello2.po +4 -4
- data/samples/po/cs/hello_plural.po +5 -5
- data/samples/po/de/hello2.po +4 -4
- data/samples/po/de/hello_plural.po +9 -6
- data/samples/po/el/hello2.po +4 -4
- data/samples/po/el/hello_plural.po +3 -3
- data/samples/po/es/hello2.po +4 -4
- data/samples/po/es/hello_plural.po +6 -6
- data/samples/po/fr/hello2.po +4 -4
- data/samples/po/fr/hello_plural.po +3 -3
- data/samples/po/hello2.pot +2 -2
- data/samples/po/hello_plural.pot +1 -1
- data/samples/po/it/hello2.po +4 -4
- data/samples/po/it/hello_plural.po +4 -5
- data/samples/po/ja/hello2.po +4 -4
- data/samples/po/ja/hello_plural.po +4 -5
- data/samples/po/ko/hello2.po +4 -4
- data/samples/po/ko/hello_plural.po +10 -7
- data/samples/po/nl/hello2.po +4 -4
- data/samples/po/nl/hello_plural.po +6 -7
- data/samples/po/pt_BR/hello2.po +4 -4
- data/samples/po/pt_BR/hello_plural.po +6 -6
- data/samples/po/ru/hello2.po +4 -4
- data/samples/po/ru/hello_plural.po +10 -7
- data/samples/po/sv/hello2.po +4 -4
- data/samples/po/sv/hello_plural.po +4 -4
- data/samples/po/zh/hello.po +23 -0
- data/samples/po/zh/hello2.po +31 -0
- data/samples/po/zh/hello_noop.po +27 -0
- data/samples/po/zh/hello_plural.po +25 -0
- data/samples/po/zh/helloglade2.po +31 -0
- data/samples/po/zh/hellogtk.po +23 -0
- data/samples/po/zh/hellotk.po +23 -0
- data/samples/rails/README +2 -2
- data/samples/rails/lib/tasks/gettext.rake +0 -3
- data/samples/rails/locale/cs/LC_MESSAGES/blog.mo +0 -0
- data/samples/rails/locale/de/LC_MESSAGES/blog.mo +0 -0
- data/samples/rails/locale/el/LC_MESSAGES/blog.mo +0 -0
- data/samples/rails/locale/en/LC_MESSAGES/blog.mo +0 -0
- data/samples/rails/locale/es/LC_MESSAGES/blog.mo +0 -0
- data/samples/rails/locale/fr/LC_MESSAGES/blog.mo +0 -0
- data/samples/rails/locale/it/LC_MESSAGES/blog.mo +0 -0
- data/samples/rails/locale/ja/LC_MESSAGES/blog.mo +0 -0
- data/samples/rails/locale/ko/LC_MESSAGES/blog.mo +0 -0
- data/samples/rails/locale/nl/LC_MESSAGES/blog.mo +0 -0
- data/samples/rails/locale/pt_BR/LC_MESSAGES/blog.mo +0 -0
- data/samples/rails/locale/ru/LC_MESSAGES/blog.mo +0 -0
- data/samples/rails/locale/zh/LC_MESSAGES/blog.mo +0 -0
- data/samples/rails/po/blog.pot +1 -1
- data/samples/rails/po/cs/blog.po +1 -1
- data/samples/rails/po/de/blog.po +1 -1
- data/samples/rails/po/el/blog.po +1 -1
- data/samples/rails/po/en/blog.po +3 -3
- data/samples/rails/po/es/blog.po +1 -1
- data/samples/rails/po/fr/blog.po +1 -1
- data/samples/rails/po/it/blog.po +109 -0
- data/samples/rails/po/ja/blog.po +1 -14
- data/samples/rails/po/ko/blog.po +2 -2
- data/samples/rails/po/nl/blog.po +1 -1
- data/samples/rails/po/pt_BR/blog.po +1 -1
- data/samples/rails/po/ru/blog.po +1 -2
- data/samples/rails/po/zh/blog.po +109 -0
- data/samples/rails/vendor/plugins/gettext/README +17 -0
- data/samples/rails/vendor/plugins/gettext/Rakefile +17 -0
- data/samples/rails/vendor/plugins/gettext/lib/gettext_plugin.rb +16 -35
- data/samples/rails/{locale → vendor/plugins/gettext/locale}/cs/LC_MESSAGES/gettext_plugin.mo +0 -0
- data/samples/rails/{locale → vendor/plugins/gettext/locale}/de/LC_MESSAGES/gettext_plugin.mo +0 -0
- data/samples/rails/{locale → vendor/plugins/gettext/locale}/el/LC_MESSAGES/gettext_plugin.mo +0 -0
- data/samples/rails/{locale → vendor/plugins/gettext/locale}/es/LC_MESSAGES/gettext_plugin.mo +0 -0
- data/samples/rails/{locale → vendor/plugins/gettext/locale}/fr/LC_MESSAGES/gettext_plugin.mo +0 -0
- data/samples/rails/vendor/plugins/gettext/locale/it/LC_MESSAGES/gettext_plugin.mo +0 -0
- data/samples/rails/{locale → vendor/plugins/gettext/locale}/ja/LC_MESSAGES/gettext_plugin.mo +0 -0
- data/samples/rails/{locale → vendor/plugins/gettext/locale}/ko/LC_MESSAGES/gettext_plugin.mo +0 -0
- data/samples/rails/{locale → vendor/plugins/gettext/locale}/nl/LC_MESSAGES/gettext_plugin.mo +0 -0
- data/samples/rails/{locale → vendor/plugins/gettext/locale}/pt_BR/LC_MESSAGES/gettext_plugin.mo +0 -0
- data/samples/rails/{locale → vendor/plugins/gettext/locale}/ru/LC_MESSAGES/gettext_plugin.mo +0 -0
- data/samples/rails/vendor/plugins/gettext/locale/zh/LC_MESSAGES/gettext_plugin.mo +0 -0
- data/samples/rails/{po → vendor/plugins/gettext/po}/cs/gettext_plugin.po +4 -4
- data/samples/rails/{po → vendor/plugins/gettext/po}/de/gettext_plugin.po +4 -4
- data/samples/rails/{po → vendor/plugins/gettext/po}/el/gettext_plugin.po +4 -4
- data/samples/rails/{po → vendor/plugins/gettext/po}/es/gettext_plugin.po +4 -4
- data/samples/rails/{po → vendor/plugins/gettext/po}/fr/gettext_plugin.po +4 -4
- data/samples/rails/{po → vendor/plugins/gettext/po}/gettext_plugin.pot +4 -4
- data/samples/rails/vendor/plugins/gettext/po/it/gettext_plugin.po +27 -0
- data/samples/rails/{po → vendor/plugins/gettext/po}/ja/gettext_plugin.po +4 -4
- data/samples/rails/{po → vendor/plugins/gettext/po}/ko/gettext_plugin.po +4 -4
- data/samples/rails/{po → vendor/plugins/gettext/po}/nl/gettext_plugin.po +4 -4
- data/samples/rails/{po → vendor/plugins/gettext/po}/pt_BR/gettext_plugin.po +4 -4
- data/samples/rails/{po → vendor/plugins/gettext/po}/ru/gettext_plugin.po +4 -5
- data/samples/rails/vendor/plugins/gettext/po/zh/gettext_plugin.po +27 -0
- data/test/gettext_test.rb +18 -14
- data/test/gettext_test_multi_textdomain.rb +49 -0
- data/test/locale/fr/LC_MESSAGES/test6.mo +0 -0
- data/test/locale/ja/LC_MESSAGES/test6.mo +0 -0
- data/test/po/fr/test6.po +23 -0
- data/test/po/ja/test6.po +23 -0
- data/test/test.sh +3 -1
- data/test/testlib1.rb +0 -5
- data/test/testlib5.rb +70 -0
- data/test/testlib6.rb +19 -0
- metadata +128 -26
- data/COPYING.ja +0 -51
- data/po/it/messages.mo +0 -0
- data/samples/cgi/po/it/messages.mo +0 -0
data/po/zh/rgettext.po
ADDED
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
# translation of rgettext.po to Simplified Chinese
|
|
2
|
+
#
|
|
3
|
+
# a po-file for Ruby-GetText-Package
|
|
4
|
+
#
|
|
5
|
+
# Copyright (C) 2006 Masao Mutoh
|
|
6
|
+
# This file is distributed under the same license as the Ruby-GetText-Package.
|
|
7
|
+
# Yingfeng <blogyingfeng at gmail.com>, 2006.
|
|
8
|
+
#
|
|
9
|
+
msgid ""
|
|
10
|
+
msgstr ""
|
|
11
|
+
"Project-Id-Version: ruby-gettext 1.5.0\n"
|
|
12
|
+
"POT-Creation-Date: 2006-06-04 18:48+0900\n"
|
|
13
|
+
"PO-Revision-Date: 2006-04-15 13:11+0300\n"
|
|
14
|
+
"Last-Translator: Yingfeng <blogyingfeng at gmail.com>\n"
|
|
15
|
+
"Language-Team: Simplified Chinese\n"
|
|
16
|
+
"MIME-Version: 1.0\n"
|
|
17
|
+
"Content-Type: text/plain; charset=UTF-8\n"
|
|
18
|
+
"Content-Transfer-Encoding: 8bit\n"
|
|
19
|
+
"Plural-Forms: nplurals=1; plural=0;\n"
|
|
20
|
+
"X-Generator: KBabel 1.9.1\n"
|
|
21
|
+
|
|
22
|
+
#: lib/gettext/rmsgmerge.rb:402
|
|
23
|
+
msgid "Usage: %s def.po ref.pot [-o output.pot]"
|
|
24
|
+
msgstr "使用方法:%s def.po ref.pot [-o output.pot]"
|
|
25
|
+
|
|
26
|
+
#: lib/gettext/rmsgmerge.rb:405
|
|
27
|
+
msgid ""
|
|
28
|
+
"Merges two Uniforum style .po files together. The def.po file is an existing "
|
|
29
|
+
"PO file with translations. The ref.pot file is the last created PO file with "
|
|
30
|
+
"up-to-date source references. ref.pot is generally created by rgettext."
|
|
31
|
+
msgstr ""
|
|
32
|
+
"将两个统一风格的.po文件合并到一起。def.po文件是已经存在的有翻译信息的PO文件,"
|
|
33
|
+
"ref.pot文件是最后创建的拥有最新源参考信息的PO文件,ref.pot由rgettext创建。"
|
|
34
|
+
|
|
35
|
+
#: lib/gettext/rmsgmerge.rb:407 lib/gettext/rgettext.rb:132
|
|
36
|
+
#: lib/gettext/rmsgfmt.rb:50
|
|
37
|
+
msgid "Specific options:"
|
|
38
|
+
msgstr "具体选项:"
|
|
39
|
+
|
|
40
|
+
#: lib/gettext/rmsgmerge.rb:409 lib/gettext/rgettext.rb:134
|
|
41
|
+
#: lib/gettext/rmsgfmt.rb:52
|
|
42
|
+
msgid "write output to specified file"
|
|
43
|
+
msgstr "输出到指定文件"
|
|
44
|
+
|
|
45
|
+
#: lib/gettext/rmsgmerge.rb:420 lib/gettext/rgettext.rb:143
|
|
46
|
+
#: lib/gettext/rmsgfmt.rb:56
|
|
47
|
+
msgid "display version information and exit"
|
|
48
|
+
msgstr "显示版本信息并退出"
|
|
49
|
+
|
|
50
|
+
#: lib/gettext/rmsgmerge.rb:445
|
|
51
|
+
msgid "definition po is not given."
|
|
52
|
+
msgstr "po的定义未给出。"
|
|
53
|
+
|
|
54
|
+
#: lib/gettext/rmsgmerge.rb:447
|
|
55
|
+
msgid "reference pot is not given."
|
|
56
|
+
msgstr "参考pot未指定。"
|
|
57
|
+
|
|
58
|
+
#: lib/gettext/rgettext.rb:42
|
|
59
|
+
msgid "'%{klass}' is ignored."
|
|
60
|
+
msgstr "'%{klass}'被忽略。"
|
|
61
|
+
|
|
62
|
+
#: lib/gettext/rgettext.rb:128
|
|
63
|
+
msgid "Usage: %s input.rb [-o output.pot]"
|
|
64
|
+
msgstr "使用方法:%s input.rb [-o output.pot]"
|
|
65
|
+
|
|
66
|
+
#: lib/gettext/rgettext.rb:130
|
|
67
|
+
msgid "Extract translatable strings from given input files."
|
|
68
|
+
msgstr "从给定输入文件中提取翻译字符串。"
|
|
69
|
+
|
|
70
|
+
#: lib/gettext/rgettext.rb:138
|
|
71
|
+
msgid "File '%s' has already existed."
|
|
72
|
+
msgstr "文件'%s'已经存在。"
|
|
73
|
+
|
|
74
|
+
#: lib/gettext/rgettext.rb:166 lib/gettext/rmsgfmt.rb:30
|
|
75
|
+
msgid "no input files"
|
|
76
|
+
msgstr "没有输入文件"
|
|
77
|
+
|
|
78
|
+
#: lib/gettext/rmsgfmt.rb:46
|
|
79
|
+
msgid "Usage: %s input.po [-o output.mo]"
|
|
80
|
+
msgstr "使用方法: %s input.po [-o output.mo]"
|
|
81
|
+
|
|
82
|
+
#: lib/gettext/rmsgfmt.rb:48
|
|
83
|
+
msgid "Generate binary message catalog from textual translation description."
|
|
84
|
+
msgstr "从文本叙述翻译生成二进制信息目录。"
|
|
85
|
+
|
|
86
|
+
#: lib/gettext/parser/activerecord.rb:38
|
|
87
|
+
msgid "'%{file}' is not found."
|
|
88
|
+
msgstr "'%{file}'未找到。"
|
|
89
|
+
|
|
90
|
+
#: lib/gettext/parser/activerecord.rb:66
|
|
91
|
+
msgid "Ignored '%{file}'. Solve dependencies first."
|
|
92
|
+
msgstr "'%{file}'被忽略,请先解决依赖关系。"
|
|
93
|
+
|
|
94
|
+
#: lib/gettext/parser/activerecord.rb:85
|
|
95
|
+
msgid "No database is available."
|
|
96
|
+
msgstr "没有可用的数据库。"
|
|
97
|
+
|
|
98
|
+
#: lib/gettext/parser/activerecord.rb:116
|
|
99
|
+
msgid "rubygems are not found."
|
|
100
|
+
msgstr ""
|
|
101
|
+
|
|
102
|
+
#: lib/gettext/parser/glade.rb:75
|
|
103
|
+
msgid "%s is not glade-2.0 format."
|
|
104
|
+
msgstr "%s不是glade-2.0格式。"
|
data/pre-setup.rb
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
Copyright(c) 2005,2006 Masao Mutoh
|
|
5
5
|
This program is licenced under the same licence as Ruby.
|
|
6
6
|
|
|
7
|
-
$Id: pre-setup.rb,v 1.
|
|
7
|
+
$Id: pre-setup.rb,v 1.6 2006/05/13 17:20:52 mutoh Exp $
|
|
8
8
|
=end
|
|
9
9
|
|
|
10
10
|
require 'fileutils'
|
|
@@ -20,6 +20,3 @@ FileUtils.rm_rf gettext_dir if FileTest.exist?(gettext_dir)
|
|
|
20
20
|
FileUtils.rm_rf gettext_dir2 if FileTest.exist?(gettext_dir2)
|
|
21
21
|
FileUtils.rm_f locale if FileTest.exist?(locale)
|
|
22
22
|
|
|
23
|
-
rake = "#{ruby} #{File.join(config("bindir"), "rake")} setup"
|
|
24
|
-
|
|
25
|
-
system(rake)
|
data/samples/cgi/helloerb.rhtml
CHANGED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
# CGI/ERB sample for Ruby-GetText-Package.
|
|
2
|
+
#
|
|
3
|
+
# Copyright (C) 2005,2006 Masao Mutoh
|
|
4
|
+
#
|
|
5
|
+
# This file is distributed under the same license as the Ruby-GetText-Package.
|
|
6
|
+
#
|
|
7
|
+
# Yingfeng <blogyingfeng at gmail.com>, 2006.
|
|
8
|
+
#
|
|
9
|
+
msgid ""
|
|
10
|
+
msgstr ""
|
|
11
|
+
"Project-Id-Version: cgi-sample 1.1.1\n"
|
|
12
|
+
"POT-Creation-Date: 2006-03-04 22:50+0900\n"
|
|
13
|
+
"PO-Revision-Date: 2006-04-15 13:11+0300\n"
|
|
14
|
+
"Last-Translator: Yingfeng <blogyingfeng at gmail.com>\n"
|
|
15
|
+
"Language-Team: Simplified Chinese\n"
|
|
16
|
+
"MIME-Version: 1.0\n"
|
|
17
|
+
"Content-Type: text/plain; charset=UTF-8\n"
|
|
18
|
+
"Content-Transfer-Encoding: 8bit\n"
|
|
19
|
+
"Plural-Forms: nplurals=1; plural=0;\n"
|
|
20
|
+
"X-Generator: KBabel 1.9.1\n"
|
|
21
|
+
|
|
22
|
+
#: helloerb1.cgi:32
|
|
23
|
+
msgid "Sample script for CGI/ERB (UTF-8)."
|
|
24
|
+
msgstr "用于CGI/ERB的示例脚本(UTF-8)"
|
|
25
|
+
|
|
26
|
+
#: helloerb.rhtml:5 other.rhtml:5
|
|
27
|
+
msgid "Sample script for CGI/ERB and Ruby-GetText-Package"
|
|
28
|
+
msgstr "用于CGI/ERB和Ruby-GetText-Package的示例脚本"
|
|
29
|
+
|
|
30
|
+
#: helloerb.rhtml:12
|
|
31
|
+
msgid "Hello World"
|
|
32
|
+
msgstr "你好世界"
|
|
33
|
+
|
|
34
|
+
#: helloerb.rhtml:15 other.rhtml:11
|
|
35
|
+
msgid "locale"
|
|
36
|
+
msgstr "本地"
|
|
37
|
+
|
|
38
|
+
#: helloerb.rhtml:16 other.rhtml:12
|
|
39
|
+
msgid "output_charset"
|
|
40
|
+
msgstr "输出字符集"
|
|
41
|
+
|
|
42
|
+
#: helloerb.rhtml:17 other.rhtml:13
|
|
43
|
+
msgid "QUERY_STRING"
|
|
44
|
+
msgstr "QUERY_STRING"
|
|
45
|
+
|
|
46
|
+
#: helloerb.rhtml:19
|
|
47
|
+
msgid "Call a library method which has another textdomain."
|
|
48
|
+
msgstr "调用具备其他textdomain的库方法"
|
|
49
|
+
|
|
50
|
+
#: helloerb.rhtml:21 other.rhtml:15
|
|
51
|
+
msgid "Back"
|
|
52
|
+
msgstr "返回"
|
|
53
|
+
|
|
54
|
+
#: other.rhtml:8
|
|
55
|
+
msgid "Another sample"
|
|
56
|
+
msgstr "另一个示例"
|
|
57
|
+
|
|
58
|
+
#: other.rhtml:9
|
|
59
|
+
msgid "This sample(other.rhtml) is the another ERB file of helloerb1.cgi."
|
|
60
|
+
msgstr "示例(other.rhtml)是helloerb1.cgi的另一个ERB文件"
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
# CGI/ERB sample for Ruby-GetText-Package.
|
|
2
|
+
#
|
|
3
|
+
# Copyright (C) 2005,2006 Masao Mutoh
|
|
4
|
+
#
|
|
5
|
+
# This file is distributed under the same license as the Ruby-GetText-Package.
|
|
6
|
+
#
|
|
7
|
+
# Yingfeng <blogyingfeng at gmail.com>, 2006.
|
|
8
|
+
#
|
|
9
|
+
msgid ""
|
|
10
|
+
msgstr ""
|
|
11
|
+
"Project-Id-Version: cgi-sample 1.1.1\n"
|
|
12
|
+
"POT-Creation-Date: 2006-03-04 22:50+0900\n"
|
|
13
|
+
"PO-Revision-Date: 2006-04-15 13:11+0300\n"
|
|
14
|
+
"Last-Translator: Yingfeng <blogyingfeng at gmail.com>\n"
|
|
15
|
+
"Language-Team: Simplified Chinese\n"
|
|
16
|
+
"MIME-Version: 1.0\n"
|
|
17
|
+
"Content-Type: text/plain; charset=UTF-8\n"
|
|
18
|
+
"Content-Transfer-Encoding: 8bit\n"
|
|
19
|
+
"Plural-Forms: nplurals=1; plural=0;\n"
|
|
20
|
+
"X-Generator: KBabel 1.9.1\n"
|
|
21
|
+
|
|
22
|
+
#: helloerb2.cgi:34
|
|
23
|
+
msgid "Sample script for CGI/ERB (Auto-Detect charset)."
|
|
24
|
+
msgstr "用于CGI/ERB的示例脚本(自动检测字符集)"
|
|
25
|
+
|
|
26
|
+
#: helloerb.rhtml:5
|
|
27
|
+
msgid "Sample script for CGI/ERB and Ruby-GetText-Package"
|
|
28
|
+
msgstr "用于CGI/ERB和Ruby-GetText-Package的示例脚本"
|
|
29
|
+
|
|
30
|
+
#: helloerb.rhtml:12
|
|
31
|
+
msgid "Hello World"
|
|
32
|
+
msgstr "你好世界"
|
|
33
|
+
|
|
34
|
+
#: helloerb.rhtml:15
|
|
35
|
+
msgid "locale"
|
|
36
|
+
msgstr "本地"
|
|
37
|
+
|
|
38
|
+
#: helloerb.rhtml:16
|
|
39
|
+
msgid "output_charset"
|
|
40
|
+
msgstr "输出字符集"
|
|
41
|
+
|
|
42
|
+
#: helloerb.rhtml:17
|
|
43
|
+
msgid "QUERY_STRING"
|
|
44
|
+
msgstr "QUERY_STRING"
|
|
45
|
+
|
|
46
|
+
#: helloerb.rhtml:19
|
|
47
|
+
msgid "Call a library method which has another textdomain."
|
|
48
|
+
msgstr "调用具备其他textdomain的库方法"
|
|
49
|
+
|
|
50
|
+
#: helloerb.rhtml:21
|
|
51
|
+
msgid "Back"
|
|
52
|
+
msgstr "返回"
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# CGI/ERB sample for Ruby-GetText-Package.
|
|
2
|
+
#
|
|
3
|
+
# Copyright (C) 2005,2006 Masao Mutoh
|
|
4
|
+
#
|
|
5
|
+
# This file is distributed under the same license as the Ruby-GetText-Package.
|
|
6
|
+
#
|
|
7
|
+
# Yingfeng <blogyingfeng at gmail.com>, 2006.
|
|
8
|
+
#
|
|
9
|
+
msgid ""
|
|
10
|
+
msgstr ""
|
|
11
|
+
"Project-Id-Version: cgi-sample 1.1.1\n"
|
|
12
|
+
"POT-Creation-Date: 2006-03-04 22:50+0900\n"
|
|
13
|
+
"PO-Revision-Date: 2006-04-15 13:11+0300\n"
|
|
14
|
+
"Last-Translator: Yingfeng <blogyingfeng at gmail.com>\n"
|
|
15
|
+
"Language-Team: Simplified Chinese\n"
|
|
16
|
+
"MIME-Version: 1.0\n"
|
|
17
|
+
"Content-Type: text/plain; charset=UTF-8\n"
|
|
18
|
+
"Content-Transfer-Encoding: 8bit\n"
|
|
19
|
+
"Plural-Forms: nplurals=1; plural=0;\n"
|
|
20
|
+
"X-Generator: KBabel 1.9.1\n"
|
|
21
|
+
|
|
22
|
+
#: hellolib.rb:19
|
|
23
|
+
msgid "This message is from hellolib."
|
|
24
|
+
msgstr "本条信息来自hellolib。"
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
# CGI/ERB sample for Ruby-GetText-Package.
|
|
2
|
+
#
|
|
3
|
+
# Copyright (C) 2005,2006 Masao Mutoh
|
|
4
|
+
#
|
|
5
|
+
# This file is distributed under the same license as the Ruby-GetText-Package.
|
|
6
|
+
#
|
|
7
|
+
# Yingfeng <blogyingfeng at gmail.com>, 2006.
|
|
8
|
+
#
|
|
9
|
+
msgid ""
|
|
10
|
+
msgstr ""
|
|
11
|
+
"Project-Id-Version: cgi-sample 1.1.1\n"
|
|
12
|
+
"POT-Creation-Date: 2006-03-04 22:50+0900\n"
|
|
13
|
+
"PO-Revision-Date: 2006-04-15 13:11+0300\n"
|
|
14
|
+
"Last-Translator: Yingfeng <blogyingfeng at gmail.com>\n"
|
|
15
|
+
"Language-Team: Simplified Chinese\n"
|
|
16
|
+
"MIME-Version: 1.0\n"
|
|
17
|
+
"Content-Type: text/plain; charset=UTF-8\n"
|
|
18
|
+
"Content-Transfer-Encoding: 8bit\n"
|
|
19
|
+
"Plural-Forms: nplurals=1; plural=0;\n"
|
|
20
|
+
"X-Generator: KBabel 1.9.1\n"
|
|
21
|
+
|
|
22
|
+
#: index.cgi:36
|
|
23
|
+
msgid "an ERB/CGI sample (UTF-8)."
|
|
24
|
+
msgstr "一个ERB/CGI例子(UTF-8)。"
|
|
25
|
+
|
|
26
|
+
#: index.cgi:37
|
|
27
|
+
msgid ""
|
|
28
|
+
"an ERB/CGI sample (UTF-8). This sample uses the same container as sample 1 "
|
|
29
|
+
"but has a different rhtml file."
|
|
30
|
+
msgstr "一个ERB/CGI示例(UTF-8)。本示例采用跟示例1相同的容器,但却拥有一个不同的rhtml文件。"
|
|
31
|
+
|
|
32
|
+
#: index.cgi:38
|
|
33
|
+
msgid "an ERB/CGI sample (Auto-Detect charset)."
|
|
34
|
+
msgstr "一个ERB/CGI示例(自动检测字符集)。"
|
|
35
|
+
|
|
36
|
+
#: index.cgi:50 cookie.cgi:44
|
|
37
|
+
msgid "Sample script for CGI/ERB and Ruby-GetText-Package"
|
|
38
|
+
msgstr "用于CGI/ERB和Ruby-GetText-Package的示例脚本"
|
|
39
|
+
|
|
40
|
+
#: index.cgi:55
|
|
41
|
+
msgid "Ruby-GetText CGI sample scripts"
|
|
42
|
+
msgstr "Ruby-GetText CGI示例脚本"
|
|
43
|
+
|
|
44
|
+
#: index.cgi:57
|
|
45
|
+
msgid "Supported Locales:"
|
|
46
|
+
msgstr "目前支持的国家:"
|
|
47
|
+
|
|
48
|
+
#: index.cgi:58
|
|
49
|
+
msgid "Auto-Detect a locale from the WWW browser"
|
|
50
|
+
msgstr "从WWW浏览器自动检测国家"
|
|
51
|
+
|
|
52
|
+
#: index.cgi:66
|
|
53
|
+
msgid "Set locale as a \"lang\" parameter"
|
|
54
|
+
msgstr "用\"lang\"参数设置国家"
|
|
55
|
+
|
|
56
|
+
#: index.cgi:82
|
|
57
|
+
msgid "Set \"lang\" to cookie."
|
|
58
|
+
msgstr "为cookie设置\"lang\""
|
|
59
|
+
|
|
60
|
+
#: index.cgi:83
|
|
61
|
+
msgid ""
|
|
62
|
+
"Click one of the link below, and then click \"Auto-Detect a locale from the "
|
|
63
|
+
"WWW browser\" samples."
|
|
64
|
+
msgstr "点击下面的链接,然后点击\"从WWW浏览器自动检测国家\"例程"
|
|
65
|
+
|
|
66
|
+
#: index.cgi:92
|
|
67
|
+
msgid "Source codes"
|
|
68
|
+
msgstr "源代码"
|
|
69
|
+
|
|
70
|
+
#: index.cgi:103
|
|
71
|
+
msgid "index.cgi is also a Ruby-GetText sample script using CGI(not ERB)."
|
|
72
|
+
msgstr "index.cgi也是Ruby-GetText用于CGI(不是ERB)的示例脚本。"
|
|
73
|
+
|
|
74
|
+
#: cookie.cgi:50
|
|
75
|
+
msgid "Set [%s] as the cookie of your WWW Browser."
|
|
76
|
+
msgstr "将[%s]设置为您的WWW浏览器的cookie。"
|
|
77
|
+
|
|
78
|
+
#: cookie.cgi:54
|
|
79
|
+
msgid "Back"
|
|
80
|
+
msgstr "返回"
|
data/samples/hello.rb
CHANGED
|
@@ -1,12 +1,35 @@
|
|
|
1
1
|
#!/usr/bin/ruby
|
|
2
|
-
# hello.rb - sample for
|
|
2
|
+
# hello.rb - sample for _() and class.
|
|
3
3
|
#
|
|
4
|
-
# Copyright (C) 2001-
|
|
4
|
+
# Copyright (C) 2001-2006 Masao Mutoh
|
|
5
5
|
# This file is distributed under the same license as Ruby-GetText-Package.
|
|
6
6
|
|
|
7
7
|
require 'gettext'
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
class HelloWorld
|
|
10
|
+
include GetText
|
|
10
11
|
|
|
11
|
-
bindtextdomain("hello", "locale")
|
|
12
|
-
|
|
12
|
+
bindtextdomain("hello", "locale")
|
|
13
|
+
|
|
14
|
+
def hello
|
|
15
|
+
print _("Hello World\n")
|
|
16
|
+
end
|
|
17
|
+
end
|
|
18
|
+
|
|
19
|
+
if __FILE__ == $0
|
|
20
|
+
a = HelloWorld.new
|
|
21
|
+
|
|
22
|
+
a.hello # Show in your locale
|
|
23
|
+
|
|
24
|
+
old = GetText.locale
|
|
25
|
+
p old.to_s # Show current locale
|
|
26
|
+
|
|
27
|
+
# Change the locale to "en".
|
|
28
|
+
GetText.set_locale_all("en")
|
|
29
|
+
p GetText.locale.to_s
|
|
30
|
+
a.hello # Show in English
|
|
31
|
+
|
|
32
|
+
# Retrive original locale
|
|
33
|
+
GetText.set_locale_all(old)
|
|
34
|
+
a.hello # Show in your locale
|
|
35
|
+
end
|
data/samples/hello2.rb
CHANGED
|
@@ -1,15 +1,22 @@
|
|
|
1
1
|
#!/usr/bin/ruby
|
|
2
|
-
# hello2.po - sample for
|
|
2
|
+
# hello2.po - sample for _() and module
|
|
3
3
|
#
|
|
4
4
|
# Copyright (C) 2002-2004 Masao Mutoh
|
|
5
5
|
# This file is distributed under the same license as Ruby-GetText-Package.
|
|
6
6
|
|
|
7
7
|
require 'gettext'
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
module Hello
|
|
10
|
+
include GetText
|
|
10
11
|
|
|
11
|
-
bindtextdomain("hello2", "locale")
|
|
12
|
+
bindtextdomain("hello2", "locale")
|
|
12
13
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
module_function
|
|
15
|
+
def hello
|
|
16
|
+
num = 1
|
|
17
|
+
puts _("One is %{num}\n") % {:num => num}
|
|
18
|
+
puts _("Hello %{world}\n") % {:world => _("World")}
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
Hello.hello
|
data/samples/hello_noop.rb
CHANGED
|
@@ -1,18 +1,30 @@
|
|
|
1
1
|
#!/usr/bin/ruby
|
|
2
|
-
# hello_noop.rb - sample for
|
|
2
|
+
# hello_noop.rb - sample for N_() and class.
|
|
3
3
|
#
|
|
4
|
-
# Copyright (C) 2002-
|
|
4
|
+
# Copyright (C) 2002-2006 Masao Mutoh
|
|
5
5
|
# This file is distributed under the same license as Ruby-GetText-Package.
|
|
6
6
|
|
|
7
7
|
require 'gettext'
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
class HelloNoop
|
|
10
|
+
include GetText
|
|
10
11
|
|
|
11
|
-
|
|
12
|
+
MSGS = [N_("Hello World"), N_("Hello World2")]
|
|
12
13
|
|
|
13
|
-
|
|
14
|
+
def initialize
|
|
15
|
+
# You can call bindtextdomain as instance methods.
|
|
16
|
+
# In this case, it initializes(decided the locale lazily)
|
|
17
|
+
# in a instance.
|
|
18
|
+
bindtextdomain("hello_noop", "locale")
|
|
19
|
+
end
|
|
14
20
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
21
|
+
def hello
|
|
22
|
+
MSGS.each do |msg|
|
|
23
|
+
print _(msg), "\n"
|
|
24
|
+
end
|
|
25
|
+
end
|
|
18
26
|
end
|
|
27
|
+
|
|
28
|
+
hello = HelloNoop.new
|
|
29
|
+
|
|
30
|
+
hello.hello
|