gettext 3.0.3 → 3.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/rmsgcat +22 -0
- data/doc/text/news.md +14 -0
- data/lib/gettext/class_info.rb +2 -1
- data/lib/gettext/po.rb +17 -10
- data/lib/gettext/po_entry.rb +112 -19
- data/lib/gettext/po_parser.rb +9 -5
- data/lib/gettext/tools/msgcat.rb +246 -0
- data/lib/gettext/tools/msginit.rb +4 -2
- data/lib/gettext/tools/msgmerge.rb +23 -14
- data/lib/gettext/tools/xgettext.rb +2 -2
- data/lib/gettext/version.rb +1 -1
- data/po/gettext.pot +113 -54
- data/src/po_parser.ry +9 -5
- data/test/test_class_info.rb +42 -1
- data/test/test_po.rb +18 -0
- data/test/test_po_entry.rb +163 -7
- data/test/tools/test_msgcat.rb +397 -0
- data/test/tools/test_msgmerge.rb +23 -3
- metadata +6 -2
data/test/tools/test_msgmerge.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# -*- coding: utf-8 -*-
|
2
2
|
#
|
3
|
-
# Copyright (C) 2012-
|
3
|
+
# Copyright (C) 2012-2014 Kouhei Sutou <kou@clear-code.com>
|
4
4
|
# Copyright (C) 2010 Eddie Lau <tatonlto@gmail.com>
|
5
5
|
#
|
6
6
|
# License: Ruby's or LGPL
|
@@ -471,6 +471,26 @@ msgstr ""
|
|
471
471
|
msgid "Hello"
|
472
472
|
msgstr ""
|
473
473
|
|
474
|
+
#: hello.rb:3
|
475
|
+
msgid "Hello World"
|
476
|
+
msgstr ""
|
477
|
+
|
478
|
+
#: hello.rb:2
|
479
|
+
msgid "World"
|
480
|
+
msgstr "Translated World"
|
481
|
+
PO
|
482
|
+
end
|
483
|
+
|
484
|
+
def test_sort_by_file
|
485
|
+
@msgmerge.run("--update",
|
486
|
+
"--sort-by-file",
|
487
|
+
@po_file_path, @pot_file_path)
|
488
|
+
assert_equal(<<-PO, File.read(@po_file_path))
|
489
|
+
#{po_header(@pot_formatted_time, @po_formatted_time)}
|
490
|
+
#: hello.rb:1
|
491
|
+
msgid "Hello"
|
492
|
+
msgstr ""
|
493
|
+
|
474
494
|
#: hello.rb:2
|
475
495
|
msgid "World"
|
476
496
|
msgstr "Translated World"
|
@@ -481,9 +501,9 @@ msgstr ""
|
|
481
501
|
PO
|
482
502
|
end
|
483
503
|
|
484
|
-
def
|
504
|
+
def test_sort_by_location
|
485
505
|
@msgmerge.run("--update",
|
486
|
-
"--sort-by-
|
506
|
+
"--sort-by-location",
|
487
507
|
@po_file_path, @pot_file_path)
|
488
508
|
assert_equal(<<-PO, File.read(@po_file_path))
|
489
509
|
#{po_header(@pot_formatted_time, @po_formatted_time)}
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gettext
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.0.
|
4
|
+
version: 3.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kouhei Sutou
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2014-02-02 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: locale
|
@@ -147,6 +147,7 @@ email:
|
|
147
147
|
executables:
|
148
148
|
- rmsgmerge
|
149
149
|
- rmsgfmt
|
150
|
+
- rmsgcat
|
150
151
|
- rxgettext
|
151
152
|
- rmsginit
|
152
153
|
extensions: []
|
@@ -180,6 +181,7 @@ files:
|
|
180
181
|
- locale/de/LC_MESSAGES/gettext.mo
|
181
182
|
- bin/rmsgmerge
|
182
183
|
- bin/rmsgfmt
|
184
|
+
- bin/rmsgcat
|
183
185
|
- bin/rxgettext
|
184
186
|
- bin/rmsginit
|
185
187
|
- doc/text/news.md
|
@@ -193,6 +195,7 @@ files:
|
|
193
195
|
- lib/gettext/text_domain.rb
|
194
196
|
- lib/gettext/po_parser.rb
|
195
197
|
- lib/gettext/tools/msgfmt.rb
|
198
|
+
- lib/gettext/tools/msgcat.rb
|
196
199
|
- lib/gettext/tools/msgmerge.rb
|
197
200
|
- lib/gettext/tools/msginit.rb
|
198
201
|
- lib/gettext/tools/xgettext.rb
|
@@ -934,6 +937,7 @@ files:
|
|
934
937
|
- test/locale/ja/LC_MESSAGES/untranslated.mo
|
935
938
|
- test/test_string.rb
|
936
939
|
- test/tools/test_msginit.rb
|
940
|
+
- test/tools/test_msgcat.rb
|
937
941
|
- test/tools/test_msgmerge.rb
|
938
942
|
- test/tools/files/simple_2.po
|
939
943
|
- test/tools/files/simple_translation.rb
|