gettext 3.3.3 → 3.3.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Rakefile +4 -0
- data/doc/text/news.md +231 -0
- data/gettext.gemspec +1 -1
- data/lib/gettext/locale_path.rb +12 -8
- data/lib/gettext/mo.rb +7 -5
- data/lib/gettext/tools/msginit.rb +216 -50
- data/lib/gettext/tools/msgmerge.rb +13 -0
- data/lib/gettext/tools/parser/erb.rb +9 -1
- data/lib/gettext/tools/parser/glade.rb +38 -40
- data/lib/gettext/tools/parser/gtk_builder_ui_definitions.rb +6 -6
- data/lib/gettext/tools/parser/ruby.rb +50 -29
- data/lib/gettext/version.rb +2 -2
- data/locale/bg/LC_MESSAGES/gettext.mo +0 -0
- data/locale/bs/LC_MESSAGES/gettext.mo +0 -0
- data/locale/ca/LC_MESSAGES/gettext.mo +0 -0
- data/locale/cs/LC_MESSAGES/gettext.mo +0 -0
- data/locale/de/LC_MESSAGES/gettext.mo +0 -0
- data/locale/el/LC_MESSAGES/gettext.mo +0 -0
- data/locale/eo/LC_MESSAGES/gettext.mo +0 -0
- data/locale/es/LC_MESSAGES/gettext.mo +0 -0
- data/locale/et/LC_MESSAGES/gettext.mo +0 -0
- data/locale/fr/LC_MESSAGES/gettext.mo +0 -0
- data/locale/hr/LC_MESSAGES/gettext.mo +0 -0
- data/locale/hu/LC_MESSAGES/gettext.mo +0 -0
- data/locale/it/LC_MESSAGES/gettext.mo +0 -0
- data/locale/ja/LC_MESSAGES/gettext.mo +0 -0
- data/locale/ko/LC_MESSAGES/gettext.mo +0 -0
- data/locale/lv/LC_MESSAGES/gettext.mo +0 -0
- data/locale/nb/LC_MESSAGES/gettext.mo +0 -0
- data/locale/nl/LC_MESSAGES/gettext.mo +0 -0
- data/locale/pt_BR/LC_MESSAGES/gettext.mo +0 -0
- data/locale/ru/LC_MESSAGES/gettext.mo +0 -0
- data/locale/sr/LC_MESSAGES/gettext.mo +0 -0
- data/locale/uk/LC_MESSAGES/gettext.mo +0 -0
- data/locale/vi/LC_MESSAGES/gettext.mo +0 -0
- data/locale/zh/LC_MESSAGES/gettext.mo +0 -0
- data/locale/zh_TW/LC_MESSAGES/gettext.mo +0 -0
- data/po/bg/gettext.edit.po +36 -554
- data/po/bg/gettext.po +0 -423
- data/po/bs/gettext.edit.po +36 -554
- data/po/bs/gettext.po +0 -423
- data/po/ca/gettext.edit.po +36 -554
- data/po/ca/gettext.po +0 -423
- data/po/cs/gettext.edit.po +36 -554
- data/po/cs/gettext.po +0 -423
- data/po/de/gettext.edit.po +36 -554
- data/po/de/gettext.po +0 -423
- data/po/el/gettext.edit.po +36 -554
- data/po/el/gettext.po +0 -423
- data/po/eo/gettext.edit.po +36 -554
- data/po/eo/gettext.po +0 -423
- data/po/es/gettext.edit.po +36 -554
- data/po/es/gettext.po +0 -423
- data/po/et/gettext.edit.po +36 -554
- data/po/et/gettext.po +0 -423
- data/po/fr/gettext.edit.po +36 -554
- data/po/fr/gettext.po +0 -423
- data/po/gettext.pot +37 -619
- data/po/hr/gettext.edit.po +36 -554
- data/po/hr/gettext.po +0 -423
- data/po/hu/gettext.edit.po +36 -554
- data/po/hu/gettext.po +0 -423
- data/po/it/gettext.edit.po +36 -554
- data/po/it/gettext.po +0 -423
- data/po/ja/gettext.edit.po +36 -554
- data/po/ja/gettext.po +0 -423
- data/po/ko/gettext.edit.po +36 -554
- data/po/ko/gettext.po +0 -423
- data/po/lv/gettext.edit.po +36 -554
- data/po/lv/gettext.po +0 -423
- data/po/nb/gettext.edit.po +36 -554
- data/po/nb/gettext.po +0 -423
- data/po/nl/gettext.edit.po +36 -554
- data/po/nl/gettext.po +0 -423
- data/po/pt_BR/gettext.edit.po +36 -554
- data/po/pt_BR/gettext.po +0 -423
- data/po/ru/gettext.edit.po +36 -554
- data/po/ru/gettext.po +0 -423
- data/po/sr/gettext.edit.po +36 -554
- data/po/sr/gettext.po +0 -423
- data/po/sv/gettext.edit.po +34 -555
- data/po/sv/gettext.po +0 -423
- data/po/uk/gettext.edit.po +36 -554
- data/po/uk/gettext.po +0 -423
- data/po/vi/gettext.edit.po +36 -554
- data/po/vi/gettext.po +0 -423
- data/po/zh/gettext.edit.po +36 -554
- data/po/zh/gettext.po +0 -423
- data/po/zh_TW/gettext.edit.po +36 -554
- data/po/zh_TW/gettext.po +0 -423
- data/test/fixtures/_.rb +1 -1
- data/test/fixtures/_/pipe.rb +32 -0
- data/test/fixtures/erb/minus.rhtml +12 -0
- data/test/fixtures/{gladeparser.glade → glade/2.glade} +0 -0
- data/test/fixtures/glade/3.glade +63 -0
- data/test/fixtures/gtk_builder_ui_definitions.ui~ +68 -0
- data/test/fixtures/multi_text_domain.rb +12 -12
- data/test/fixtures/np_.rb +1 -1
- data/test/fixtures/ns_.rb +1 -1
- data/test/fixtures/p_.rb +1 -1
- data/test/fixtures/ruby/percent_lower_i.rb +1 -0
- data/test/fixtures/ruby/percent_lower_w.rb +1 -0
- data/test/fixtures/ruby/percent_upper_i.rb +1 -0
- data/test/fixtures/ruby/percent_upper_w.rb +1 -0
- data/test/fixtures/s_.rb +1 -1
- data/test/fixtures/simple.rb +1 -1
- data/test/fixtures/upper_nn_.rb +77 -0
- data/test/po/_.pot +20 -4
- data/test/po/ja/_.edit.po +24 -0
- data/test/po/np_.pot +8 -5
- data/test/po/ns_.pot +6 -4
- data/test/po/p_.pot +3 -3
- data/test/po/s_.pot +6 -4
- data/test/run-test.rb +0 -1
- data/test/test_parser.rb +42 -17
- data/test/tools/parser/test_glade.rb +91 -0
- data/test/tools/parser/test_gtk_builder_ui_definitions.rb +19 -1
- data/test/tools/parser/test_ruby.rb +42 -0
- data/test/tools/test_msginit.rb +77 -3
- data/test/tools/test_msgmerge.rb +34 -0
- metadata +37 -28
File without changes
|
@@ -0,0 +1,63 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<!-- Generated with glade 3.38.2 -->
|
3
|
+
<interface>
|
4
|
+
<requires lib="gtk+" version="3.24"/>
|
5
|
+
<object class="GtkWindow">
|
6
|
+
<property name="can-focus">False</property>
|
7
|
+
<child>
|
8
|
+
<object class="GtkBox">
|
9
|
+
<property name="visible">True</property>
|
10
|
+
<property name="can-focus">False</property>
|
11
|
+
<property name="orientation">vertical</property>
|
12
|
+
<child>
|
13
|
+
<object class="GtkLabel">
|
14
|
+
<property name="visible">True</property>
|
15
|
+
<property name="can-focus">False</property>
|
16
|
+
<property name="label">untranslatable label</property>
|
17
|
+
</object>
|
18
|
+
<packing>
|
19
|
+
<property name="expand">False</property>
|
20
|
+
<property name="fill">True</property>
|
21
|
+
<property name="position">0</property>
|
22
|
+
</packing>
|
23
|
+
</child>
|
24
|
+
<child>
|
25
|
+
<object class="GtkLabel">
|
26
|
+
<property name="visible">True</property>
|
27
|
+
<property name="can-focus">False</property>
|
28
|
+
<property name="label" translatable="yes" comments="comment for translator">label with comment</property>
|
29
|
+
</object>
|
30
|
+
<packing>
|
31
|
+
<property name="expand">False</property>
|
32
|
+
<property name="fill">True</property>
|
33
|
+
<property name="position">1</property>
|
34
|
+
</packing>
|
35
|
+
</child>
|
36
|
+
<child>
|
37
|
+
<object class="GtkLabel">
|
38
|
+
<property name="visible">True</property>
|
39
|
+
<property name="can-focus">False</property>
|
40
|
+
<property name="label" translatable="yes">label without comment</property>
|
41
|
+
</object>
|
42
|
+
<packing>
|
43
|
+
<property name="expand">False</property>
|
44
|
+
<property name="fill">True</property>
|
45
|
+
<property name="position">2</property>
|
46
|
+
</packing>
|
47
|
+
</child>
|
48
|
+
<child>
|
49
|
+
<object class="GtkLabel">
|
50
|
+
<property name="visible">True</property>
|
51
|
+
<property name="can-focus">False</property>
|
52
|
+
<property name="label" translatable="yes" context="context">label with context</property>
|
53
|
+
</object>
|
54
|
+
<packing>
|
55
|
+
<property name="expand">False</property>
|
56
|
+
<property name="fill">True</property>
|
57
|
+
<property name="position">3</property>
|
58
|
+
</packing>
|
59
|
+
</child>
|
60
|
+
</object>
|
61
|
+
</child>
|
62
|
+
</object>
|
63
|
+
</interface>
|
@@ -0,0 +1,68 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<!-- Generated with glade 3.22.1 -->
|
3
|
+
<interface>
|
4
|
+
<requires lib="gtk+" version="3.20"/>
|
5
|
+
<object class="GtkWindow">
|
6
|
+
<property name="can_focus">False</property>
|
7
|
+
<child>
|
8
|
+
<placeholder/>
|
9
|
+
</child>
|
10
|
+
<child>
|
11
|
+
<object class="GtkBox">
|
12
|
+
<property name="visible">True</property>
|
13
|
+
<property name="can_focus">False</property>
|
14
|
+
<property name="orientation">vertical</property>
|
15
|
+
<child>
|
16
|
+
<object class="GtkLabel">
|
17
|
+
<property name="visible">True</property>
|
18
|
+
<property name="can_focus">False</property>
|
19
|
+
<property name="label" translatable="yes" context="context" comments="comment">label with context</property>
|
20
|
+
</object>
|
21
|
+
<packing>
|
22
|
+
<property name="expand">False</property>
|
23
|
+
<property name="fill">True</property>
|
24
|
+
<property name="position">0</property>
|
25
|
+
</packing>
|
26
|
+
</child>
|
27
|
+
<child>
|
28
|
+
<object class="GtkLabel">
|
29
|
+
<property name="visible">True</property>
|
30
|
+
<property name="can_focus">False</property>
|
31
|
+
<property name="label" translatable="yes">label simple</property>
|
32
|
+
</object>
|
33
|
+
<packing>
|
34
|
+
<property name="expand">False</property>
|
35
|
+
<property name="fill">True</property>
|
36
|
+
<property name="position">1</property>
|
37
|
+
</packing>
|
38
|
+
</child>
|
39
|
+
<child>
|
40
|
+
<object class="GtkLabel">
|
41
|
+
<property name="visible">True</property>
|
42
|
+
<property name="can_focus">False</property>
|
43
|
+
<property name="label">not trnanslatable label</property>
|
44
|
+
</object>
|
45
|
+
<packing>
|
46
|
+
<property name="expand">False</property>
|
47
|
+
<property name="fill">True</property>
|
48
|
+
<property name="position">2</property>
|
49
|
+
</packing>
|
50
|
+
</child>
|
51
|
+
<child>
|
52
|
+
<object class="GtkLabel">
|
53
|
+
<property name="visible">True</property>
|
54
|
+
<property name="can_focus">False</property>
|
55
|
+
<property name="label" translatable="yes">multiple
|
56
|
+
lines
|
57
|
+
label</property>
|
58
|
+
</object>
|
59
|
+
<packing>
|
60
|
+
<property name="expand">False</property>
|
61
|
+
<property name="fill">True</property>
|
62
|
+
<property name="position">3</property>
|
63
|
+
</packing>
|
64
|
+
</child>
|
65
|
+
</object>
|
66
|
+
</child>
|
67
|
+
</object>
|
68
|
+
</interface>
|
@@ -4,8 +4,8 @@ module MultiTextDomain
|
|
4
4
|
class C11
|
5
5
|
include GetText
|
6
6
|
def initialize
|
7
|
-
bindtextdomain("test1", :path =>
|
8
|
-
bindtextdomain("test2", :path =>
|
7
|
+
bindtextdomain("test1", :path => Helper::Path.locale_path)
|
8
|
+
bindtextdomain("test2", :path => Helper::Path.locale_path)
|
9
9
|
end
|
10
10
|
def test
|
11
11
|
_("language")
|
@@ -17,8 +17,8 @@ module MultiTextDomain
|
|
17
17
|
|
18
18
|
class C12
|
19
19
|
include GetText
|
20
|
-
bindtextdomain("test1", :path =>
|
21
|
-
bindtextdomain("test2", :path =>
|
20
|
+
bindtextdomain("test1", :path => Helper::Path.locale_path)
|
21
|
+
bindtextdomain("test2", :path => Helper::Path.locale_path)
|
22
22
|
|
23
23
|
def test
|
24
24
|
_("language")
|
@@ -36,7 +36,7 @@ module MultiTextDomain
|
|
36
36
|
|
37
37
|
module M1
|
38
38
|
include GetText
|
39
|
-
bindtextdomain("test1", :path =>
|
39
|
+
bindtextdomain("test1", :path => Helper::Path.locale_path)
|
40
40
|
|
41
41
|
module_function
|
42
42
|
def test
|
@@ -57,7 +57,7 @@ module MultiTextDomain
|
|
57
57
|
|
58
58
|
class M1C1
|
59
59
|
include GetText
|
60
|
-
bindtextdomain("test2", :path =>
|
60
|
+
bindtextdomain("test2", :path => Helper::Path.locale_path)
|
61
61
|
def test
|
62
62
|
_("language")
|
63
63
|
end
|
@@ -69,7 +69,7 @@ module MultiTextDomain
|
|
69
69
|
class M1C2
|
70
70
|
include GetText
|
71
71
|
def initialize
|
72
|
-
bindtextdomain("test2", :path =>
|
72
|
+
bindtextdomain("test2", :path => Helper::Path.locale_path)
|
73
73
|
end
|
74
74
|
def test
|
75
75
|
_("language")
|
@@ -84,7 +84,7 @@ module MultiTextDomain
|
|
84
84
|
class C2
|
85
85
|
include GetText
|
86
86
|
def initialize
|
87
|
-
bindtextdomain("test1", :path =>
|
87
|
+
bindtextdomain("test1", :path => Helper::Path.locale_path)
|
88
88
|
end
|
89
89
|
|
90
90
|
def test
|
@@ -98,7 +98,7 @@ module MultiTextDomain
|
|
98
98
|
|
99
99
|
class C3
|
100
100
|
include GetText
|
101
|
-
bindtextdomain("test1", :path =>
|
101
|
+
bindtextdomain("test1", :path => Helper::Path.locale_path)
|
102
102
|
|
103
103
|
def test
|
104
104
|
_("language")
|
@@ -110,7 +110,7 @@ module MultiTextDomain
|
|
110
110
|
end
|
111
111
|
|
112
112
|
class C4 < C3
|
113
|
-
bindtextdomain("test2", :path =>
|
113
|
+
bindtextdomain("test2", :path => Helper::Path.locale_path)
|
114
114
|
|
115
115
|
def test2
|
116
116
|
_("LANGUAGE")
|
@@ -123,13 +123,13 @@ module MultiTextDomain
|
|
123
123
|
|
124
124
|
class C51
|
125
125
|
include GetText
|
126
|
-
bindtextdomain("test3", :path =>
|
126
|
+
bindtextdomain("test3", :path => Helper::Path.locale_path)
|
127
127
|
def test
|
128
128
|
_("language")
|
129
129
|
end
|
130
130
|
end
|
131
131
|
|
132
132
|
class C52 < C12
|
133
|
-
bindtextdomain("test3", :path =>
|
133
|
+
bindtextdomain("test3", :path => Helper::Path.locale_path)
|
134
134
|
end
|
135
135
|
end
|
data/test/fixtures/np_.rb
CHANGED
data/test/fixtures/ns_.rb
CHANGED
data/test/fixtures/p_.rb
CHANGED
@@ -0,0 +1 @@
|
|
1
|
+
%i(hello world)
|
@@ -0,0 +1 @@
|
|
1
|
+
%w(Hello World)
|
@@ -0,0 +1 @@
|
|
1
|
+
%I(hello world)
|
@@ -0,0 +1 @@
|
|
1
|
+
%W(Hello World)
|
data/test/fixtures/s_.rb
CHANGED
data/test/fixtures/simple.rb
CHANGED
@@ -0,0 +1,77 @@
|
|
1
|
+
# -*- coding: utf-8 -*-
|
2
|
+
|
3
|
+
require 'gettext'
|
4
|
+
include GetText
|
5
|
+
|
6
|
+
class TestRubyParser_Nn
|
7
|
+
bindtextdomain("testNn_rubyparser", :path => "locale")
|
8
|
+
|
9
|
+
def testNn_1
|
10
|
+
Nn_("aaa", "aaas")
|
11
|
+
end
|
12
|
+
|
13
|
+
def testNn_2
|
14
|
+
Nn_("aaa\n", "aaas\n")
|
15
|
+
end
|
16
|
+
|
17
|
+
def testNn_3
|
18
|
+
Nn_("bbb\nccc", "bbbs\ncccs")
|
19
|
+
end
|
20
|
+
|
21
|
+
def testNn_4
|
22
|
+
Nn_("bbb
|
23
|
+
ccc
|
24
|
+
ddd
|
25
|
+
",
|
26
|
+
"bbbs
|
27
|
+
cccs
|
28
|
+
ddds
|
29
|
+
")
|
30
|
+
end
|
31
|
+
|
32
|
+
def testNn_5
|
33
|
+
Nn_("eee", "eees")
|
34
|
+
end
|
35
|
+
|
36
|
+
def testNn_6
|
37
|
+
Nn_("eee", "eees") + "foo" + Nn_("fff", "fffs")
|
38
|
+
end
|
39
|
+
|
40
|
+
def testNn_7
|
41
|
+
Nn_("ggg"\
|
42
|
+
"hhh"\
|
43
|
+
"iii",
|
44
|
+
"gggs"\
|
45
|
+
"hhhs"\
|
46
|
+
"iiis")
|
47
|
+
end
|
48
|
+
|
49
|
+
def testNn_8
|
50
|
+
Nn_('a"b"c"', 'as"bs"cs"')
|
51
|
+
end
|
52
|
+
|
53
|
+
def testNn_9
|
54
|
+
Nn_("d\"e\"f\"", "ds\"es\"fs\"")
|
55
|
+
end
|
56
|
+
|
57
|
+
def testNn_10
|
58
|
+
Nn_("jjj", "jjjs") +
|
59
|
+
Nn_("kkk", "kkks")
|
60
|
+
end
|
61
|
+
|
62
|
+
def testNn_11
|
63
|
+
Nn_("lll" + "mmm", "llls" + "mmms")
|
64
|
+
end
|
65
|
+
|
66
|
+
def testNn_12
|
67
|
+
puts Nn_(msg, msgs), "ppp" #Ignored
|
68
|
+
end
|
69
|
+
|
70
|
+
def testNn_13
|
71
|
+
Nn_("nnn\n" +
|
72
|
+
"ooo",
|
73
|
+
"nnns\n" +
|
74
|
+
"ooos")
|
75
|
+
end
|
76
|
+
end
|
77
|
+
|
data/test/po/_.pot
CHANGED
@@ -6,10 +6,10 @@
|
|
6
6
|
#, fuzzy
|
7
7
|
msgid ""
|
8
8
|
msgstr ""
|
9
|
-
"Project-Id-Version: _ 3.3.
|
9
|
+
"Project-Id-Version: _ 3.3.8\n"
|
10
10
|
"Report-Msgid-Bugs-To: \n"
|
11
|
-
"POT-Creation-Date:
|
12
|
-
"PO-Revision-Date:
|
11
|
+
"POT-Creation-Date: 2021-06-09 11:31+0900\n"
|
12
|
+
"PO-Revision-Date: 2021-06-09 11:31+0900\n"
|
13
13
|
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
14
14
|
"Language-Team: LANGUAGE <LL@li.org>\n"
|
15
15
|
"Language: \n"
|
@@ -165,6 +165,22 @@ msgid ""
|
|
165
165
|
"one new line\n"
|
166
166
|
msgstr ""
|
167
167
|
|
168
|
-
#: ../fixtures/_/percent_strings.rb:
|
168
|
+
#: ../fixtures/_/percent_strings.rb:31
|
169
|
+
msgid "in_symbol_array"
|
170
|
+
msgstr ""
|
171
|
+
|
172
|
+
#: ../fixtures/_/percent_strings.rb:39
|
169
173
|
msgid "hello world"
|
170
174
|
msgstr ""
|
175
|
+
|
176
|
+
#: ../fixtures/_/percent_strings.rb:47
|
177
|
+
msgid "in_string_array"
|
178
|
+
msgstr ""
|
179
|
+
|
180
|
+
#: ../fixtures/_/pipe.rb:26
|
181
|
+
msgid "Hello"
|
182
|
+
msgstr ""
|
183
|
+
|
184
|
+
#: ../fixtures/_/pipe.rb:28
|
185
|
+
msgid "World"
|
186
|
+
msgstr ""
|
data/test/po/ja/_.edit.po
CHANGED
@@ -93,6 +93,10 @@ msgid ""
|
|
93
93
|
"Here document2\n"
|
94
94
|
msgstr ""
|
95
95
|
|
96
|
+
#: ../fixtures/_.rb:109
|
97
|
+
msgid "in_quote"
|
98
|
+
msgstr ""
|
99
|
+
|
96
100
|
#. TRANSLATORS: This is a proper name. See the gettext
|
97
101
|
#. manual, section Names. Note this is actually a non-ASCII
|
98
102
|
#. name: The first name is (with Unicode escapes)
|
@@ -160,3 +164,23 @@ msgstr "ONE LINE"
|
|
160
164
|
msgid ""
|
161
165
|
"one new line\n"
|
162
166
|
msgstr ""
|
167
|
+
|
168
|
+
#: ../fixtures/_/percent_strings.rb:31
|
169
|
+
msgid "in_symbol_array"
|
170
|
+
msgstr ""
|
171
|
+
|
172
|
+
#: ../fixtures/_/percent_strings.rb:39
|
173
|
+
msgid "hello world"
|
174
|
+
msgstr ""
|
175
|
+
|
176
|
+
#: ../fixtures/_/percent_strings.rb:47
|
177
|
+
msgid "in_string_array"
|
178
|
+
msgstr ""
|
179
|
+
|
180
|
+
#: ../fixtures/_/pipe.rb:26
|
181
|
+
msgid "Hello"
|
182
|
+
msgstr ""
|
183
|
+
|
184
|
+
#: ../fixtures/_/pipe.rb:28
|
185
|
+
msgid "World"
|
186
|
+
msgstr ""
|