gettext 2.3.9 → 3.0.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.
Files changed (106) hide show
  1. data/.yardopts +1 -0
  2. data/README.rdoc +28 -23
  3. data/Rakefile +29 -21
  4. data/doc/text/news.md +57 -0
  5. data/gettext.gemspec +1 -1
  6. data/lib/gettext.rb +13 -29
  7. data/lib/gettext/cgi.rb +1 -1
  8. data/lib/gettext/{runtime/class_info.rb → class_info.rb} +1 -1
  9. data/lib/gettext/{runtime/locale_path.rb → locale_path.rb} +1 -2
  10. data/lib/gettext/{runtime/mo.rb → mo.rb} +18 -33
  11. data/lib/gettext/{tools/po.rb → po.rb} +1 -1
  12. data/lib/gettext/{tools/po_entry.rb → po_entry.rb} +8 -4
  13. data/lib/gettext/{tools/poparser.rb → po_parser.rb} +41 -44
  14. data/lib/gettext/{runtime/textdomain.rb → text_domain.rb} +6 -16
  15. data/lib/gettext/text_domain_group.rb +26 -0
  16. data/lib/gettext/{runtime/textdomain_manager.rb → text_domain_manager.rb} +40 -40
  17. data/lib/gettext/tools.rb +1 -182
  18. data/lib/gettext/tools/msgfmt.rb +1 -1
  19. data/lib/gettext/tools/msginit.rb +1 -1
  20. data/lib/gettext/tools/msgmerge.rb +2 -221
  21. data/lib/gettext/tools/parser/erb.rb +49 -30
  22. data/lib/gettext/tools/parser/glade.rb +44 -36
  23. data/lib/gettext/tools/parser/ruby.rb +126 -37
  24. data/lib/gettext/tools/task.rb +225 -0
  25. data/lib/gettext/tools/xgettext.rb +25 -28
  26. data/lib/gettext/version.rb +1 -1
  27. data/locale/bg/LC_MESSAGES/gettext.mo +0 -0
  28. data/locale/bs/LC_MESSAGES/gettext.mo +0 -0
  29. data/locale/ca/LC_MESSAGES/gettext.mo +0 -0
  30. data/locale/cs/LC_MESSAGES/gettext.mo +0 -0
  31. data/locale/de/LC_MESSAGES/gettext.mo +0 -0
  32. data/locale/el/LC_MESSAGES/gettext.mo +0 -0
  33. data/locale/eo/LC_MESSAGES/gettext.mo +0 -0
  34. data/locale/es/LC_MESSAGES/gettext.mo +0 -0
  35. data/locale/et/LC_MESSAGES/gettext.mo +0 -0
  36. data/locale/fr/LC_MESSAGES/gettext.mo +0 -0
  37. data/locale/hr/LC_MESSAGES/gettext.mo +0 -0
  38. data/locale/hu/LC_MESSAGES/gettext.mo +0 -0
  39. data/locale/it/LC_MESSAGES/gettext.mo +0 -0
  40. data/locale/ja/LC_MESSAGES/gettext.mo +0 -0
  41. data/locale/ko/LC_MESSAGES/gettext.mo +0 -0
  42. data/locale/lv/LC_MESSAGES/gettext.mo +0 -0
  43. data/locale/nb/LC_MESSAGES/gettext.mo +0 -0
  44. data/locale/nl/LC_MESSAGES/gettext.mo +0 -0
  45. data/locale/pt_BR/LC_MESSAGES/gettext.mo +0 -0
  46. data/locale/ru/LC_MESSAGES/gettext.mo +0 -0
  47. data/locale/sr/LC_MESSAGES/gettext.mo +0 -0
  48. data/locale/sv/LC_MESSAGES/gettext.mo +0 -0
  49. data/locale/uk/LC_MESSAGES/gettext.mo +0 -0
  50. data/locale/vi/LC_MESSAGES/gettext.mo +0 -0
  51. data/locale/zh/LC_MESSAGES/gettext.mo +0 -0
  52. data/locale/zh_TW/LC_MESSAGES/gettext.mo +0 -0
  53. data/po/gettext.pot +171 -97
  54. data/samples/hello.rb +3 -2
  55. data/samples/hello2.rb +2 -1
  56. data/samples/hello_gtk2.rb +4 -1
  57. data/samples/hello_gtk_builder.rb +32 -0
  58. data/samples/hello_gtk_builder.ui +46 -0
  59. data/samples/hello_noop.rb +2 -1
  60. data/samples/hello_plural.rb +2 -1
  61. data/samples/hello_tk.rb +2 -1
  62. data/src/{poparser.ry → po_parser.ry} +31 -35
  63. data/test/fixtures/N_.rb +1 -1
  64. data/test/fixtures/_/double_quote_in_double_quote.rb +32 -0
  65. data/test/fixtures/_/double_quote_in_single_quote.rb +32 -0
  66. data/test/fixtures/_/literal_concatenation_with_continuation_line.rb +36 -0
  67. data/test/fixtures/_/middle_new_line.rb +32 -0
  68. data/test/fixtures/_/multiple_lines_literal.rb +35 -0
  69. data/test/fixtures/_/multiple_messages_in_same_line.rb +32 -0
  70. data/test/fixtures/_/multiple_same_messages.rb +36 -0
  71. data/{lib/gettext/runtime/mofile.rb → test/fixtures/_/one_new_line.rb} +12 -6
  72. data/test/fixtures/{multi_textdomain.rb → multi_text_domain.rb} +1 -1
  73. data/test/fixtures/non_ascii.rb +1 -1
  74. data/test/fixtures/simple.rb +1 -1
  75. data/test/fixtures/untranslated.rb +1 -1
  76. data/test/gettext-test-utils.rb +1 -24
  77. data/test/po/ja/_.po +63 -13
  78. data/test/po/ja/non_ascii.po +2 -3
  79. data/test/po/ja/untranslated.po +1 -1
  80. data/test/test_class_info.rb +2 -2
  81. data/test/test_gettext.rb +11 -11
  82. data/test/test_mo.rb +2 -2
  83. data/test/test_parser.rb +93 -96
  84. data/test/test_po_entry.rb +237 -146
  85. data/test/test_po_parser.rb +107 -98
  86. data/test/test_string.rb +1 -1
  87. data/test/{test_textdomain_bind.rb → test_text_domain_bind.rb} +6 -6
  88. data/test/{test_textdomain_multi.rb → test_text_domain_multi.rb} +5 -5
  89. data/test/{test_textdomain_toplevel.rb → test_text_domain_toplevel.rb} +1 -1
  90. data/test/test_thread.rb +1 -1
  91. data/test/tools/files/simple_translation.rb +1 -1
  92. data/test/{parser → tools/parser}/test_ruby.rb +110 -14
  93. data/test/tools/test_msgmerge.rb +17 -276
  94. data/test/tools/test_po.rb +1 -1
  95. data/test/tools/test_xgettext.rb +175 -144
  96. metadata +59 -33
  97. data/lib/gettext/core_ext/iconv.rb +0 -110
  98. data/lib/gettext/core_ext/string.rb +0 -91
  99. data/lib/gettext/parser/erb.rb +0 -5
  100. data/lib/gettext/parser/glade.rb +0 -5
  101. data/lib/gettext/parser/ruby.rb +0 -172
  102. data/lib/gettext/runtime/textdomain_group.rb +0 -26
  103. data/lib/gettext/task.rb +0 -203
  104. data/lib/gettext/utils.rb +0 -39
  105. data/test/test_po_generation.rb +0 -45
  106. data/test/tools/test_tools.rb +0 -61
@@ -10,7 +10,8 @@ require 'gettext'
10
10
  class HelloWorld
11
11
  include GetText
12
12
 
13
- bindtextdomain("hello", :path => "locale")
13
+ base_dir = File.dirname(__FILE__)
14
+ bindtextdomain("hello", :path => File.join(base_dir, "locale"))
14
15
 
15
16
  def hello
16
17
  print _("Hello World\n")
@@ -26,7 +27,7 @@ if __FILE__ == $0
26
27
  p old.to_s # Show current locale
27
28
 
28
29
  # Change the locale to "en".
29
- GetText.set_locale_all("en")
30
+ GetText.set_locale("en")
30
31
  p GetText.locale.to_s
31
32
  a.hello # Show in English
32
33
 
@@ -10,7 +10,8 @@ require 'gettext'
10
10
  module Hello
11
11
  include GetText
12
12
 
13
- bindtextdomain("hello2", :path => "locale")
13
+ base_dir = File.dirname(__FILE__)
14
+ bindtextdomain("hello2", :path => File.join(base_dir, "locale"))
14
15
 
15
16
  module_function
16
17
  def hello
@@ -11,7 +11,10 @@ require 'gtk2'
11
11
  class LocalizedWindow < Gtk::Window
12
12
  include GetText
13
13
 
14
- bindtextdomain("hello_gtk2", :path => "locale", :output_charset => "utf-8")
14
+ base_dir = File.dirname(__FILE__)
15
+ bindtextdomain("hello_gtk2",
16
+ :path => File.join(base_dir, "locale"),
17
+ :output_charset => "utf-8")
15
18
 
16
19
  def initialize
17
20
  super
@@ -0,0 +1,32 @@
1
+ #!/usr/bin/env ruby
2
+ # hello_gtk_builder.rb - sample for Gtk::Builder in Ruby/GTK3
3
+ #
4
+ # Copyright (C) 2013 Kouhei Sutou <kou@clear-code.com>
5
+ # This file is distributed under the same license as gettext.
6
+
7
+ require "gtk3"
8
+
9
+ class HelloGtkBuilder
10
+ def initialize
11
+ domain = "hello_gtk_builder"
12
+ base_dir = File.dirname(__FILE__)
13
+ GLib::GetText.bindtextdomain(domain, File.join(base_dir, "locale"))
14
+
15
+ @builder = Gtk::Builder.new
16
+ @builder.translation_domain = domain
17
+ @builder << File.join(base_dir, "hello_gtk_builder.ui")
18
+ @builder.connect_signals do |name|
19
+ method(name)
20
+ end
21
+
22
+ @window = @builder["window1"]
23
+ @window.show_all
24
+ end
25
+
26
+ def on_quit
27
+ Gtk.main_quit
28
+ end
29
+ end
30
+
31
+ HelloGtkBuilder.new
32
+ Gtk.main
@@ -0,0 +1,46 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <interface>
3
+ <!-- interface-requires gtk+ 3.0 -->
4
+ <object class="GtkWindow" id="window1">
5
+ <property name="visible">True</property>
6
+ <property name="can_focus">False</property>
7
+ <property name="title" translatable="yes">window1</property>
8
+ <child>
9
+ <object class="GtkVBox" id="vbox1">
10
+ <property name="visible">True</property>
11
+ <property name="can_focus">False</property>
12
+ <child>
13
+ <object class="GtkLabel" id="label1">
14
+ <property name="visible">True</property>
15
+ <property name="can_focus">False</property>
16
+ <property name="label" translatable="yes">first line
17
+ second line
18
+ third line</property>
19
+ </object>
20
+ <packing>
21
+ <property name="expand">True</property>
22
+ <property name="fill">False</property>
23
+ <property name="position">0</property>
24
+ </packing>
25
+ </child>
26
+ <child>
27
+ <object class="GtkButton" id="button1">
28
+ <property name="label" translatable="yes">&lt;Hello world&gt;</property>
29
+ <property name="use_action_appearance">False</property>
30
+ <property name="visible">True</property>
31
+ <property name="can_focus">True</property>
32
+ <property name="receives_default">False</property>
33
+ <property name="use_action_appearance">False</property>
34
+ <property name="use_underline">True</property>
35
+ <signal name="clicked" handler="on_quit" swapped="no"/>
36
+ </object>
37
+ <packing>
38
+ <property name="expand">False</property>
39
+ <property name="fill">False</property>
40
+ <property name="position">1</property>
41
+ </packing>
42
+ </child>
43
+ </object>
44
+ </child>
45
+ </object>
46
+ </interface>
@@ -16,7 +16,8 @@ class HelloNoop
16
16
  # You can call bindtextdomain as instance methods.
17
17
  # In this case, it initializes(decided the locale lazily)
18
18
  # in a instance.
19
- bindtextdomain("hello_noop", :path => "locale")
19
+ base_dir = File.dirname(__FILE__)
20
+ bindtextdomain("hello_noop", :path => File.join(base_dir, "locale"))
20
21
  end
21
22
 
22
23
  def hello
@@ -11,7 +11,8 @@ class HelloPlural
11
11
  include GetText
12
12
 
13
13
  def initialize
14
- bindtextdomain("hello_plural", :path => "locale")
14
+ base_dir = File.dirname(__FILE__)
15
+ bindtextdomain("hello_plural", :path => File.join(base_dir, "locale"))
15
16
  end
16
17
 
17
18
  def hello
@@ -9,7 +9,8 @@ require 'gettext'
9
9
  require 'tk'
10
10
 
11
11
  include GetText
12
- bindtextdomain("hello_tk", :path => "locale")
12
+ base_dir = File.dirname(__FILE__)
13
+ bindtextdomain("hello_tk", :path => File.join(base_dir, "locale"))
13
14
 
14
15
  TkLabel.new {
15
16
  text _("hello, tk world")
@@ -1,9 +1,9 @@
1
1
  # -*- mode: ruby; coding: utf-8 -*-
2
2
  #
3
- # poparser.ry - ruby version of msgfmt
3
+ # po_parser.ry - ruby version of msgfmt
4
4
  #
5
5
  # Copyright (C) 2002-2008 Masao Mutoh <mutomasa at gmail.com>
6
- # Copyright (C) 2012 Kouhei Sutou <kou@clear-code.com>
6
+ # Copyright (C) 2012-2013 Kouhei Sutou <kou@clear-code.com>
7
7
  # Copyright (C) 2012-2013 Haruka Yoshihara <yoshihara@clear-code.com>
8
8
  #
9
9
  # You may redistribute it and/or modify it under the same
@@ -66,7 +66,7 @@ class GetText::POParser
66
66
  $stderr.print "msgid = '#{val[1]}\n"
67
67
  end
68
68
  else
69
- on_message('', unescape(val[3]))
69
+ on_message("", unescape(val[3]))
70
70
  end
71
71
  @fuzzy = false
72
72
  else
@@ -117,17 +117,8 @@ class GetText::POParser
117
117
  end
118
118
 
119
119
  ---- header
120
- require "gettext/tools/po"
120
+ require "gettext/po"
121
121
 
122
- # For suppressing warning. PoData is deprecated and will be removed.
123
- module GetText
124
- module Tools
125
- class MsgMerge
126
- class PoData
127
- end
128
- end
129
- end
130
- end
131
122
  ---- inner
132
123
  if GetText.respond_to?(:bindtextdomain)
133
124
  include GetText
@@ -219,7 +210,7 @@ end
219
210
  str = str[1..-1]
220
211
  end
221
212
  end
222
- @q.push [false, '$end']
213
+ @q.push [false, "$end"]
223
214
  if $DEBUG
224
215
  @q.each do |a,b|
225
216
  puts "[#{a}, #{b}]"
@@ -241,8 +232,7 @@ end
241
232
  def on_message(msgid, msgstr)
242
233
  msgstr = nil if msgstr.empty?
243
234
 
244
- if @data.instance_of?(PO) or
245
- @data.instance_of?(GetText::Tools::MsgMerge::PoData)
235
+ if @data.instance_of?(PO)
246
236
  type = detect_entry_type
247
237
  entry = POEntry.new(type)
248
238
  entry.translator_comment = format_comment(@translator_comments)
@@ -255,15 +245,7 @@ end
255
245
  entry.msgid_plural = @msgid_plural
256
246
  entry.msgstr = msgstr
257
247
 
258
- if @data.instance_of?(PO)
259
- @data[@msgctxt, msgid] = entry
260
- elsif @data.instance_of?(GetText::Tools::MsgMerge::PoData)
261
- id = ""
262
- id << "#{@msgctxt}\004" unless @msgctxt.nil?
263
- id << msgid
264
- id << "\000#{@msgid_plural}" unless @msgid_plural.nil?
265
- @data[id] = entry
266
- end
248
+ @data[@msgctxt, msgid] = entry
267
249
  else
268
250
  options = {}
269
251
  options[:msgctxt] = @msgctxt
@@ -293,8 +275,7 @@ end
293
275
 
294
276
  def on_comment(comment)
295
277
  @fuzzy = true if (/fuzzy/ =~ comment)
296
- if @data.instance_of?(PO) or
297
- @data.instance_of?(GetText::Tools::MsgMerge::PoData)
278
+ if @data.instance_of?(PO)
298
279
  if comment == "#"
299
280
  @translator_comments << ""
300
281
  elsif /\A(#.)\s*(.*)\z/ =~ comment
@@ -306,7 +287,7 @@ end
306
287
  when POEntry::EXTRACTED_COMMENT_MARK
307
288
  @extracted_comments << content
308
289
  when POEntry::REFERENCE_COMMENT_MARK
309
- @references << content
290
+ @references.concat(parse_references_line(content))
310
291
  when POEntry::FLAG_MARK
311
292
  @flag << content
312
293
  when POEntry::PREVIOUS_COMMENT_MARK
@@ -331,15 +312,31 @@ end
331
312
  parse(File.open(*args) {|io| io.read }, data)
332
313
  end
333
314
 
315
+ private
334
316
  def detect_file_encoding(po_file)
335
- open(po_file, :encoding => 'ASCII-8BIT') do |input|
317
+ open(po_file, :encoding => "ASCII-8BIT") do |input|
318
+ in_header = false
336
319
  input.each_line do |line|
337
- return Encoding.find($1) if %r["Content-Type:.*\scharset=(.*)\\n"] =~ line
320
+ case line.chomp
321
+ when /\Amsgid\s+"(.*)"\z/
322
+ id = $1
323
+ break unless id.empty?
324
+ in_header = true
325
+ when /\A"Content-Type:.*\scharset=(.*)\\n"\z/
326
+ charset = $1
327
+ next unless in_header
328
+ break if template_charset?(charset)
329
+ return Encoding.find(charset)
330
+ end
338
331
  end
339
332
  end
340
333
  Encoding.default_external
341
334
  end
342
335
 
336
+ def template_charset?(charset)
337
+ charset == "CHARSET"
338
+ end
339
+
343
340
  def detect_entry_type
344
341
  if @msgctxt.nil?
345
342
  if @msgid_plural.nil?
@@ -355,10 +352,9 @@ end
355
352
  end
356
353
  end
357
354
  end
358
- private :detect_file_encoding
359
- ---- footer
360
- # for backward compatibility.
361
- module GetText
362
- PoParser = POParser
355
+
356
+ def parse_references_line(line)
357
+ line.split(/\s+/)
363
358
  end
359
+ ---- footer
364
360
 
@@ -1,4 +1,4 @@
1
- # encoding: utf-8
1
+ # -*- coding: utf-8 -*-
2
2
 
3
3
  require 'gettext'
4
4
  include GetText
@@ -0,0 +1,32 @@
1
+ # -*- coding: utf-8 -*-
2
+ #
3
+ # Copyright (C) 2013 Kouhei Sutou <kou@clear-code.com>
4
+ #
5
+ # License: Ruby's or LGPL
6
+ #
7
+ # This library is free software: you can redistribute it and/or modify
8
+ # it under the terms of the GNU Lesser General Public License as published by
9
+ # the Free Software Foundation, either version 3 of the License, or
10
+ # (at your option) any later version.
11
+ #
12
+ # This library is distributed in the hope that it will be useful,
13
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
14
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
+ # GNU Lesser General Public License for more details.
16
+ #
17
+ # You should have received a copy of the GNU Lesser General Public License
18
+ # along with this program. If not, see <http://www.gnu.org/licenses/>.
19
+
20
+ module Fixtures
21
+ module Method_
22
+ class DoubleQuoteInDoubleQuote
23
+ include GetText
24
+
25
+ bindtextdomain("_", :path => GetTextTestUtils.locale_path)
26
+
27
+ def message
28
+ _("double \"quote\" in double quote")
29
+ end
30
+ end
31
+ end
32
+ end
@@ -0,0 +1,32 @@
1
+ # -*- coding: utf-8 -*-
2
+ #
3
+ # Copyright (C) 2013 Kouhei Sutou <kou@clear-code.com>
4
+ #
5
+ # License: Ruby's or LGPL
6
+ #
7
+ # This library is free software: you can redistribute it and/or modify
8
+ # it under the terms of the GNU Lesser General Public License as published by
9
+ # the Free Software Foundation, either version 3 of the License, or
10
+ # (at your option) any later version.
11
+ #
12
+ # This library is distributed in the hope that it will be useful,
13
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
14
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
+ # GNU Lesser General Public License for more details.
16
+ #
17
+ # You should have received a copy of the GNU Lesser General Public License
18
+ # along with this program. If not, see <http://www.gnu.org/licenses/>.
19
+
20
+ module Fixtures
21
+ module Method_
22
+ class DoubleQuoteInSingleQuote
23
+ include GetText
24
+
25
+ bindtextdomain("_", :path => GetTextTestUtils.locale_path)
26
+
27
+ def message
28
+ _('double "quote" in single quote')
29
+ end
30
+ end
31
+ end
32
+ end
@@ -0,0 +1,36 @@
1
+ # -*- coding: utf-8 -*-
2
+ #
3
+ # Copyright (C) 2013 Kouhei Sutou <kou@clear-code.com>
4
+ #
5
+ # License: Ruby's or LGPL
6
+ #
7
+ # This library is free software: you can redistribute it and/or modify
8
+ # it under the terms of the GNU Lesser General Public License as published by
9
+ # the Free Software Foundation, either version 3 of the License, or
10
+ # (at your option) any later version.
11
+ #
12
+ # This library is distributed in the hope that it will be useful,
13
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
14
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
+ # GNU Lesser General Public License for more details.
16
+ #
17
+ # You should have received a copy of the GNU Lesser General Public License
18
+ # along with this program. If not, see <http://www.gnu.org/licenses/>.
19
+
20
+ module Fixtures
21
+ module Method_
22
+ class LiteralConcatenationWithContinuationLine
23
+ include GetText
24
+
25
+ bindtextdomain("_", :path => GetTextTestUtils.locale_path)
26
+
27
+ def message
28
+ _("literal " \
29
+ "concatenation " \
30
+ "with " \
31
+ "continuation " \
32
+ "line")
33
+ end
34
+ end
35
+ end
36
+ end
@@ -0,0 +1,32 @@
1
+ # -*- coding: utf-8 -*-
2
+ #
3
+ # Copyright (C) 2013 Kouhei Sutou <kou@clear-code.com>
4
+ #
5
+ # License: Ruby's or LGPL
6
+ #
7
+ # This library is free software: you can redistribute it and/or modify
8
+ # it under the terms of the GNU Lesser General Public License as published by
9
+ # the Free Software Foundation, either version 3 of the License, or
10
+ # (at your option) any later version.
11
+ #
12
+ # This library is distributed in the hope that it will be useful,
13
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
14
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
+ # GNU Lesser General Public License for more details.
16
+ #
17
+ # You should have received a copy of the GNU Lesser General Public License
18
+ # along with this program. If not, see <http://www.gnu.org/licenses/>.
19
+
20
+ module Fixtures
21
+ module Method_
22
+ class MiddleNewLine
23
+ include GetText
24
+
25
+ bindtextdomain("_", :path => GetTextTestUtils.locale_path)
26
+
27
+ def message
28
+ _("middle\nnew line")
29
+ end
30
+ end
31
+ end
32
+ end
@@ -0,0 +1,35 @@
1
+ # -*- coding: utf-8 -*-
2
+ #
3
+ # Copyright (C) 2013 Kouhei Sutou <kou@clear-code.com>
4
+ #
5
+ # License: Ruby's or LGPL
6
+ #
7
+ # This library is free software: you can redistribute it and/or modify
8
+ # it under the terms of the GNU Lesser General Public License as published by
9
+ # the Free Software Foundation, either version 3 of the License, or
10
+ # (at your option) any later version.
11
+ #
12
+ # This library is distributed in the hope that it will be useful,
13
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
14
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
+ # GNU Lesser General Public License for more details.
16
+ #
17
+ # You should have received a copy of the GNU Lesser General Public License
18
+ # along with this program. If not, see <http://www.gnu.org/licenses/>.
19
+
20
+ module Fixtures
21
+ module Method_
22
+ class MultipleLinesLiteral
23
+ include GetText
24
+
25
+ bindtextdomain("_", :path => GetTextTestUtils.locale_path)
26
+
27
+ def message
28
+ _("multiple
29
+ lines
30
+ literal
31
+ ")
32
+ end
33
+ end
34
+ end
35
+ end