File: testlib5.rb

package info (click to toggle)
libgettext-ruby 1.7.0-1
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 3,892 kB
  • ctags: 1,198
  • sloc: ruby: 6,738; ansic: 67; makefile: 38; sql: 14; sh: 6
file content (70 lines) | stat: -rw-r--r-- 969 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
class TestLib5
  include GetText
  def initialize
    bindtextdomain("test1", "locale")
    bindtextdomain("test2", "locale")
  end
  def test
    _("language")
  end
  def test2
    _("LANGUAGE")
  end
end

class TestLib6 < TestLib5
end

module TestLib7
  include GetText
  bindtextdomain("test1", "locale")

  module_function
  def test
    _("language")
  end

  class TestLib8
    include GetText
    def test
      _("language")
    end
    # Doesn't translate
    def test2
      _("LANGUAGE")
    end
  end

  class TestLib9
    include GetText
    def initialize
      bindtextdomain("test2", "locale")
    end
    def test
      _("language")
    end
    def test2
      _("LANGUAGE")
    end
  end
end

class TestLib10
  include GetText
  def initialize
    bindtextdomain("test1", "locale")
  end

  def test
    eval("_(\"language\")")
  end
end

class TestLib11
  include GetText
  bindtextdomain("test1", "locale")

  def test
    _("language")
  end
end