gettext 3.3.6 → 3.4.0
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 +58 -0
- data/gettext.gemspec +4 -3
- data/lib/gettext/mo.rb +7 -5
- data/lib/gettext/tools/msginit.rb +221 -50
- data/lib/gettext/tools/msgmerge.rb +13 -0
- data/lib/gettext/tools/parser/glade.rb +38 -40
- data/lib/gettext/tools/parser/gtk_builder_ui_definitions.rb +6 -3
- data/lib/gettext/tools/parser/ruby.rb +2 -2
- 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/{gladeparser.glade → glade/2.glade} +0 -0
- data/test/fixtures/glade/3.glade +63 -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_i.rb → percent_lower_i.rb} +0 -0
- data/test/fixtures/ruby/{percent_w.rb → percent_lower_w.rb} +0 -0
- data/test/fixtures/ruby/{percent_I.rb → percent_upper_i.rb} +0 -0
- data/test/fixtures/ruby/{percent_W.rb → percent_upper_w.rb} +0 -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/test_parser.rb +35 -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 +4 -4
- data/test/tools/test_msginit.rb +82 -3
- data/test/tools/test_msgmerge.rb +34 -0
- metadata +28 -11
@@ -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
File without changes
|
File without changes
|
File without changes
|
File without changes
|
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 ""
|
data/test/po/np_.pot
CHANGED
@@ -1,22 +1,25 @@
|
|
1
1
|
# SOME DESCRIPTIVE TITLE.
|
2
2
|
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
|
3
|
-
# This file is distributed under the same license as the
|
3
|
+
# This file is distributed under the same license as the np_ package.
|
4
4
|
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
5
5
|
#
|
6
6
|
#, fuzzy
|
7
7
|
msgid ""
|
8
8
|
msgstr ""
|
9
|
-
"Project-Id-Version:
|
10
|
-
"
|
11
|
-
"
|
9
|
+
"Project-Id-Version: np_ 3.3.8\n"
|
10
|
+
"Report-Msgid-Bugs-To: \n"
|
11
|
+
"POT-Creation-Date: 2021-06-09 11:31+0900\n"
|
12
|
+
"PO-Revision-Date: 2021-06-09 11:31+0900\n"
|
12
13
|
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
13
14
|
"Language-Team: LANGUAGE <LL@li.org>\n"
|
15
|
+
"Language: \n"
|
14
16
|
"MIME-Version: 1.0\n"
|
15
17
|
"Content-Type: text/plain; charset=UTF-8\n"
|
16
18
|
"Content-Transfer-Encoding: 8bit\n"
|
17
19
|
"Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"
|
18
20
|
|
19
|
-
#: ../fixtures/np_.rb:28 ../fixtures/np_.rb:29 ../fixtures/np_.rb:33
|
21
|
+
#: ../fixtures/np_.rb:28 ../fixtures/np_.rb:29 ../fixtures/np_.rb:33
|
22
|
+
#: ../fixtures/np_.rb:34
|
20
23
|
msgctxt "Magazine"
|
21
24
|
msgid "a book"
|
22
25
|
msgid_plural "%{num} books"
|
data/test/po/ns_.pot
CHANGED
@@ -1,16 +1,18 @@
|
|
1
1
|
# SOME DESCRIPTIVE TITLE.
|
2
2
|
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
|
3
|
-
# This file is distributed under the same license as the
|
3
|
+
# This file is distributed under the same license as the ns_ package.
|
4
4
|
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
5
5
|
#
|
6
6
|
#, fuzzy
|
7
7
|
msgid ""
|
8
8
|
msgstr ""
|
9
|
-
"Project-Id-Version:
|
10
|
-
"
|
11
|
-
"
|
9
|
+
"Project-Id-Version: ns_ 3.3.8\n"
|
10
|
+
"Report-Msgid-Bugs-To: \n"
|
11
|
+
"POT-Creation-Date: 2021-06-09 11:31+0900\n"
|
12
|
+
"PO-Revision-Date: 2021-06-09 11:31+0900\n"
|
12
13
|
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
13
14
|
"Language-Team: LANGUAGE <LL@li.org>\n"
|
15
|
+
"Language: \n"
|
14
16
|
"MIME-Version: 1.0\n"
|
15
17
|
"Content-Type: text/plain; charset=UTF-8\n"
|
16
18
|
"Content-Transfer-Encoding: 8bit\n"
|
data/test/po/p_.pot
CHANGED
@@ -6,10 +6,10 @@
|
|
6
6
|
#, fuzzy
|
7
7
|
msgid ""
|
8
8
|
msgstr ""
|
9
|
-
"Project-Id-Version: p_ 3.
|
9
|
+
"Project-Id-Version: p_ 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"
|
data/test/po/s_.pot
CHANGED
@@ -1,16 +1,18 @@
|
|
1
1
|
# SOME DESCRIPTIVE TITLE.
|
2
2
|
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
|
3
|
-
# This file is distributed under the same license as the
|
3
|
+
# This file is distributed under the same license as the s_ package.
|
4
4
|
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
5
5
|
#
|
6
6
|
#, fuzzy
|
7
7
|
msgid ""
|
8
8
|
msgstr ""
|
9
|
-
"Project-Id-Version:
|
10
|
-
"
|
11
|
-
"
|
9
|
+
"Project-Id-Version: s_ 3.3.8\n"
|
10
|
+
"Report-Msgid-Bugs-To: \n"
|
11
|
+
"POT-Creation-Date: 2021-06-09 11:31+0900\n"
|
12
|
+
"PO-Revision-Date: 2021-06-09 11:31+0900\n"
|
12
13
|
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
13
14
|
"Language-Team: LANGUAGE <LL@li.org>\n"
|
15
|
+
"Language: \n"
|
14
16
|
"MIME-Version: 1.0\n"
|
15
17
|
"Content-Type: text/plain; charset=UTF-8\n"
|
16
18
|
"Content-Transfer-Encoding: 8bit\n"
|
data/test/test_parser.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
# -*- coding: utf-8 -*-
|
2
2
|
#
|
3
3
|
# Copyright (C) 2012 Haruka Yoshihara <yoshihara@clear-code.com>
|
4
|
-
# Copyright (C) 2012-
|
4
|
+
# Copyright (C) 2012-2021 Sutou Kouhei <kou@clear-code.com>
|
5
5
|
# Copyright (C) 2010 masone (Christian Felder) <ema@rh-productions.ch>
|
6
6
|
# Copyright (C) 2009 Vladimir Dobriakov <vladimir@geekq.net>
|
7
7
|
# Copyright (C) 2009-2010 Masao Mutoh
|
@@ -23,7 +23,6 @@
|
|
23
23
|
|
24
24
|
require "tempfile"
|
25
25
|
require "gettext/tools/parser/ruby"
|
26
|
-
require "gettext/tools/parser/glade"
|
27
26
|
require "gettext/tools/parser/erb"
|
28
27
|
|
29
28
|
require "gettext/tools/xgettext"
|
@@ -97,6 +96,40 @@ class TestGetTextParser < Test::Unit::TestCase
|
|
97
96
|
['fixtures/upper_n_.rb:64'])
|
98
97
|
end
|
99
98
|
|
99
|
+
def test_Nn_
|
100
|
+
@ary = @xgettext.parse(['fixtures/upper_nn_.rb'])
|
101
|
+
|
102
|
+
assert_plural_target('aaa', 'aaas',
|
103
|
+
['fixtures/upper_nn_.rb:10'])
|
104
|
+
assert_plural_target("aaa\n", "aaas\n",
|
105
|
+
['fixtures/upper_nn_.rb:14'])
|
106
|
+
assert_plural_target("bbb\nccc", "bbbs\ncccs",
|
107
|
+
['fixtures/upper_nn_.rb:18'])
|
108
|
+
assert_plural_target("bbb\nccc\nddd\n", "bbbs\ncccs\nddds\n",
|
109
|
+
['fixtures/upper_nn_.rb:22'])
|
110
|
+
assert_plural_target('eee', 'eees',
|
111
|
+
[
|
112
|
+
'fixtures/upper_nn_.rb:33',
|
113
|
+
'fixtures/upper_nn_.rb:37',
|
114
|
+
])
|
115
|
+
assert_plural_target('fff', 'fffs',
|
116
|
+
['fixtures/upper_nn_.rb:37'])
|
117
|
+
assert_plural_target('ggghhhiii', 'gggshhhsiiis',
|
118
|
+
['fixtures/upper_nn_.rb:41'])
|
119
|
+
assert_plural_target('a"b"c"', 'as"bs"cs"',
|
120
|
+
['fixtures/upper_nn_.rb:50'])
|
121
|
+
assert_plural_target('d"e"f"', 'ds"es"fs"',
|
122
|
+
['fixtures/upper_nn_.rb:54'])
|
123
|
+
assert_plural_target('jjj', 'jjjs',
|
124
|
+
['fixtures/upper_nn_.rb:58'])
|
125
|
+
assert_plural_target('kkk', 'kkks',
|
126
|
+
['fixtures/upper_nn_.rb:59'])
|
127
|
+
assert_plural_target('lllmmm', 'lllsmmms',
|
128
|
+
['fixtures/upper_nn_.rb:63'])
|
129
|
+
assert_plural_target("nnn\nooo", "nnns\nooos",
|
130
|
+
['fixtures/upper_nn_.rb:71'])
|
131
|
+
end
|
132
|
+
|
100
133
|
def test_n_
|
101
134
|
@xgettext.parse_options[:comment_tag] = "TRANSLATORS:"
|
102
135
|
@ary = @xgettext.parse(['fixtures/lower_n_.rb'])
|
@@ -144,21 +177,6 @@ class TestGetTextParser < Test::Unit::TestCase
|
|
144
177
|
end
|
145
178
|
end
|
146
179
|
|
147
|
-
class TestGlade < self
|
148
|
-
def test_old_style
|
149
|
-
# Old style (~2.0.4)
|
150
|
-
ary = GetText::GladeParser.parse('fixtures/gladeparser.glade')
|
151
|
-
|
152
|
-
assert_equal(['window1', 'fixtures/gladeparser.glade:8'], ary[0])
|
153
|
-
assert_equal(['normal text', 'fixtures/gladeparser.glade:29'], ary[1])
|
154
|
-
assert_equal(['1st line\n2nd line\n3rd line', 'fixtures/gladeparser.glade:50'], ary[2])
|
155
|
-
assert_equal(['<span color="red" weight="bold" size="large">markup </span>', 'fixtures/gladeparser.glade:73'], ary[3])
|
156
|
-
assert_equal(['<span color="red">1st line markup </span>\n<span color="blue">2nd line markup</span>', 'fixtures/gladeparser.glade:94'], ary[4])
|
157
|
-
assert_equal(['<span>"markup" with <escaped strings></span>', 'fixtures/gladeparser.glade:116'], ary[5])
|
158
|
-
assert_equal(['duplicated', 'fixtures/gladeparser.glade:137', 'fixtures/gladeparser.glade:158'], ary[6])
|
159
|
-
end
|
160
|
-
end
|
161
|
-
|
162
180
|
class TestErbParser < self
|
163
181
|
include Helper::Path
|
164
182
|
|