gettext 1.6.0 → 1.7.0
Sign up to get free protection for your applications and to get access to all the features.
- data/ChangeLog +65 -0
- data/NEWS +20 -0
- data/README +9 -9
- data/Rakefile +30 -2
- data/data/locale/cs/LC_MESSAGES/rails.mo +0 -0
- data/data/locale/cs/LC_MESSAGES/rgettext.mo +0 -0
- data/data/locale/de/LC_MESSAGES/rails.mo +0 -0
- data/data/locale/de/LC_MESSAGES/rgettext.mo +0 -0
- data/data/locale/el/LC_MESSAGES/rails.mo +0 -0
- data/data/locale/el/LC_MESSAGES/rgettext.mo +0 -0
- data/data/locale/es/LC_MESSAGES/rails.mo +0 -0
- data/data/locale/es/LC_MESSAGES/rgettext.mo +0 -0
- data/data/locale/fr/LC_MESSAGES/rails.mo +0 -0
- data/data/locale/fr/LC_MESSAGES/rgettext.mo +0 -0
- data/data/locale/it/LC_MESSAGES/rails.mo +0 -0
- data/data/locale/it/LC_MESSAGES/rgettext.mo +0 -0
- data/data/locale/ja/LC_MESSAGES/rails.mo +0 -0
- data/data/locale/ja/LC_MESSAGES/rgettext.mo +0 -0
- data/data/locale/ko/LC_MESSAGES/rails.mo +0 -0
- data/data/locale/ko/LC_MESSAGES/rgettext.mo +0 -0
- data/data/locale/nl/LC_MESSAGES/rails.mo +0 -0
- data/data/locale/nl/LC_MESSAGES/rgettext.mo +0 -0
- data/data/locale/pt_BR/LC_MESSAGES/rails.mo +0 -0
- data/data/locale/pt_BR/LC_MESSAGES/rgettext.mo +0 -0
- data/data/locale/ru/LC_MESSAGES/rails.mo +0 -0
- data/data/locale/ru/LC_MESSAGES/rgettext.mo +0 -0
- data/data/locale/sv/LC_MESSAGES/rgettext.mo +0 -0
- data/data/locale/zh/LC_MESSAGES/rails.mo +0 -0
- data/data/locale/zh/LC_MESSAGES/rgettext.mo +0 -0
- data/doc/classes/ActionController/Base.html +169 -0
- data/doc/classes/ActionController/Base.src/M000014.html +37 -0
- data/doc/classes/ActionController/Base.src/M000015.html +30 -0
- data/doc/classes/ActiveRecord/Base.html +210 -0
- data/doc/classes/ActiveRecord/Base.src/M000114.html +30 -0
- data/doc/classes/ActiveRecord/Base.src/M000115.html +30 -0
- data/doc/classes/ActiveRecord/Base.src/M000116.html +30 -0
- data/doc/classes/ActiveRecord/Base.src/M000117.html +30 -0
- data/doc/classes/ActiveRecord/Base.src/M000118.html +37 -0
- data/doc/classes/ActiveRecord/Base.src/M000119.html +30 -0
- data/doc/classes/ActiveRecord/Base.src/M000120.html +30 -0
- data/doc/classes/ActiveRecord/ConnectionAdapters/Column.html +117 -0
- data/doc/classes/ActiveRecord/ConnectionAdapters/Column.src/M000113.html +30 -0
- data/doc/classes/ActiveRecord/Migration.html +96 -0
- data/doc/classes/GetText.html +863 -0
- data/doc/classes/GetText.src/M000017.html +30 -0
- data/doc/classes/GetText.src/M000018.html +31 -0
- data/doc/classes/GetText.src/M000019.html +46 -0
- data/doc/classes/GetText.src/M000020.html +42 -0
- data/doc/classes/GetText.src/M000021.html +32 -0
- data/doc/classes/GetText.src/M000022.html +30 -0
- data/doc/classes/GetText.src/M000023.html +30 -0
- data/doc/classes/GetText.src/M000024.html +31 -0
- data/doc/classes/GetText.src/M000025.html +30 -0
- data/doc/classes/GetText.src/M000026.html +49 -0
- data/doc/classes/GetText.src/M000027.html +38 -0
- data/doc/classes/GetText.src/M000028.html +35 -0
- data/doc/classes/GetText.src/M000029.html +44 -0
- data/doc/classes/GetText.src/M000030.html +30 -0
- data/doc/classes/GetText.src/M000031.html +30 -0
- data/doc/classes/GetText.src/M000032.html +36 -0
- data/doc/classes/GetText.src/M000033.html +53 -0
- data/doc/classes/GetText.src/M000034.html +46 -0
- data/doc/classes/GetText.src/M000035.html +31 -0
- data/doc/classes/GetText.src/M000036.html +31 -0
- data/doc/classes/GetText.src/M000037.html +30 -0
- data/doc/classes/GetText.src/M000038.html +30 -0
- data/doc/classes/GetText.src/M000039.html +30 -0
- data/doc/classes/GetText.src/M000040.html +30 -0
- data/doc/classes/GetText.src/M000041.html +48 -0
- data/doc/classes/GetText.src/M000042.html +18 -0
- data/doc/classes/GetText.src/M000043.html +34 -0
- data/doc/classes/GetText.src/M000044.html +30 -0
- data/doc/classes/GetText.src/M000045.html +20 -0
- data/doc/classes/GetText/ActiveRecordParser.html +148 -0
- data/doc/classes/GetText/ActiveRecordParser.src/M000048.html +35 -0
- data/doc/classes/GetText/ActiveRecordParser.src/M000049.html +30 -0
- data/doc/classes/GetText/ErbContainer.html +161 -0
- data/doc/classes/GetText/ErbContainer.src/M000046.html +31 -0
- data/doc/classes/GetText/ErbContainer.src/M000047.html +30 -0
- data/doc/classes/GetText/ErbParser.html +113 -0
- data/doc/classes/GetText/ErbParser.src/M000051.html +32 -0
- data/doc/classes/GetText/GetText.html +89 -0
- data/doc/classes/GetText/GetText/Container.html +95 -0
- data/doc/classes/GetText/GladeParser.html +109 -0
- data/doc/classes/GetText/NoboundTextDomainError.html +98 -0
- data/doc/classes/GetText/PoParser.html +121 -0
- data/doc/classes/GetText/PoParser.src/M000068.html +30 -0
- data/doc/classes/GetText/Rails.html +172 -0
- data/doc/classes/GetText/Rails.src/M000050.html +43 -0
- data/doc/classes/GetText/RubyParser.html +99 -0
- data/doc/classes/GetText/TextDomain.html +345 -0
- data/doc/classes/GetText/TextDomain.src/M000052.html +30 -0
- data/doc/classes/GetText/TextDomain.src/M000053.html +30 -0
- data/doc/classes/GetText/TextDomain.src/M000054.html +30 -0
- data/doc/classes/GetText/TextDomain.src/M000055.html +58 -0
- data/doc/classes/GetText/TextDomain.src/M000056.html +32 -0
- data/doc/classes/GetText/TextDomain.src/M000057.html +35 -0
- data/doc/classes/GetText/TextDomain.src/M000058.html +49 -0
- data/doc/classes/GetText/TextDomain.src/M000059.html +30 -0
- data/doc/classes/GetText/TextDomain.src/M000060.html +18 -0
- data/doc/classes/GetText/TextDomain.src/M000061.html +18 -0
- data/doc/classes/GetText/TextDomain.src/M000062.html +18 -0
- data/doc/classes/GetText/TextDomain.src/M000063.html +46 -0
- data/doc/classes/GetText/TextDomain.src/M000064.html +20 -0
- data/doc/classes/GetText/TextDomain.src/M000065.html +23 -0
- data/doc/classes/GetText/TextDomain.src/M000066.html +37 -0
- data/doc/classes/GetText/TextDomain.src/M000067.html +18 -0
- data/doc/classes/GetText/TextDomainManager.html +253 -0
- data/doc/classes/GetText/TextDomainManager.src/M000052.html +18 -0
- data/doc/classes/GetText/TextDomainManager.src/M000053.html +18 -0
- data/doc/classes/GetText/TextDomainManager.src/M000054.html +20 -0
- data/doc/classes/GetText/TextDomainManager.src/M000055.html +18 -0
- data/doc/classes/GetText/TextDomainManager.src/M000056.html +20 -0
- data/doc/classes/GetText/TextDomainManager.src/M000057.html +31 -0
- data/doc/classes/GetText/TextDomainManager.src/M000058.html +21 -0
- data/doc/classes/GetText/TextDomainManager.src/M000059.html +24 -0
- data/doc/classes/GetText/TextDomainManager.src/M000060.html +30 -0
- data/doc/classes/GetText/TextDomainManager.src/M000061.html +30 -0
- data/doc/classes/GetText/TextDomainManager.src/M000062.html +32 -0
- data/doc/classes/GetText/TextDomainManager.src/M000063.html +30 -0
- data/doc/classes/GetText/TextDomainManager.src/M000064.html +32 -0
- data/doc/classes/GetText/TextDomainManager.src/M000065.html +43 -0
- data/doc/classes/GetText/TextDomainManager.src/M000066.html +33 -0
- data/doc/classes/GetText/TextDomainManager.src/M000067.html +36 -0
- data/doc/classes/Iconv.html +140 -0
- data/doc/classes/Iconv.src/M000016.html +41 -0
- data/doc/classes/Iconv/Failure.html +86 -0
- data/doc/classes/Iconv/IllegalSequence.html +96 -0
- data/doc/classes/Iconv/InvalidCharacter.html +96 -0
- data/doc/classes/Iconv/InvalidEncoding.html +96 -0
- data/doc/classes/Locale.html +648 -0
- data/doc/classes/Locale.src/M000069.html +32 -0
- data/doc/classes/Locale.src/M000070.html +31 -0
- data/doc/classes/Locale.src/M000071.html +30 -0
- data/doc/classes/Locale.src/M000072.html +34 -0
- data/doc/classes/Locale.src/M000073.html +31 -0
- data/doc/classes/Locale.src/M000074.html +30 -0
- data/doc/classes/Locale.src/M000075.html +30 -0
- data/doc/classes/Locale.src/M000076.html +31 -0
- data/doc/classes/Locale.src/M000077.html +40 -0
- data/doc/classes/Locale.src/M000078.html +31 -0
- data/doc/classes/Locale.src/M000079.html +46 -0
- data/doc/classes/Locale.src/M000080.html +32 -0
- data/doc/classes/Locale.src/M000081.html +31 -0
- data/doc/classes/Locale.src/M000082.html +30 -0
- data/doc/classes/Locale.src/M000083.html +30 -0
- data/doc/classes/Locale.src/M000084.html +30 -0
- data/doc/classes/Locale.src/M000085.html +32 -0
- data/doc/classes/Locale.src/M000086.html +31 -0
- data/doc/classes/Locale.src/M000087.html +31 -0
- data/doc/classes/Locale.src/M000088.html +30 -0
- data/doc/classes/Locale/Object.html +420 -0
- data/doc/classes/Locale/Object.src/M000104.html +53 -0
- data/doc/classes/Locale/Object.src/M000105.html +34 -0
- data/doc/classes/Locale/Object.src/M000106.html +32 -0
- data/doc/classes/Locale/Object.src/M000107.html +32 -0
- data/doc/classes/Locale/Object.src/M000108.html +33 -0
- data/doc/classes/Locale/Object.src/M000109.html +33 -0
- data/doc/classes/Locale/Object.src/M000110.html +30 -0
- data/doc/classes/Locale/SystemCGI.html +247 -0
- data/doc/classes/Locale/SystemCGI.src/M000094.html +48 -0
- data/doc/classes/Locale/SystemCGI.src/M000095.html +30 -0
- data/doc/classes/Locale/SystemCGI.src/M000096.html +31 -0
- data/doc/classes/Locale/SystemCGI.src/M000097.html +31 -0
- data/doc/classes/Locale/SystemCGI.src/M000098.html +31 -0
- data/doc/classes/Locale/SystemCGI.src/M000099.html +32 -0
- data/doc/classes/Locale/SystemCGI.src/M000100.html +31 -0
- data/doc/classes/Locale/SystemCGI.src/M000101.html +30 -0
- data/doc/classes/Locale/SystemPosix.html +133 -0
- data/doc/classes/Locale/SystemPosix.src/M000102.html +39 -0
- data/doc/classes/Locale/SystemPosix.src/M000103.html +34 -0
- data/doc/classes/Locale/SystemWin32.html +206 -0
- data/doc/classes/Locale/SystemWin32.src/M000089.html +31 -0
- data/doc/classes/Locale/SystemWin32.src/M000090.html +48 -0
- data/doc/classes/Locale/SystemWin32.src/M000091.html +32 -0
- data/doc/classes/Locale/SystemWin32.src/M000092.html +31 -0
- data/doc/classes/Locale/SystemWin32.src/M000093.html +30 -0
- data/doc/classes/MOFile.html +279 -0
- data/doc/classes/MOFile.src/M000001.html +31 -0
- data/doc/classes/MOFile.src/M000002.html +34 -0
- data/doc/classes/MOFile.src/M000003.html +37 -0
- data/doc/classes/MOFile.src/M000004.html +42 -0
- data/doc/classes/MOFile.src/M000005.html +93 -0
- data/doc/classes/MOFile.src/M000006.html +38 -0
- data/doc/classes/MOFile.src/M000007.html +34 -0
- data/doc/classes/MOFile.src/M000008.html +42 -0
- data/doc/classes/MOFile.src/M000009.html +93 -0
- data/doc/classes/MOFile.src/M000010.html +31 -0
- data/doc/classes/MOFile.src/M000011.html +30 -0
- data/doc/classes/MOFile.src/M000012.html +30 -0
- data/doc/classes/MOFile/InvalidFormat.html +92 -0
- data/doc/classes/String.html +150 -0
- data/doc/classes/String.src/M000013.html +44 -0
- data/doc/created.rid +1 -0
- data/doc/files/lib/gettext/cgi_rb.html +98 -0
- data/doc/files/lib/gettext/container_rb.html +96 -0
- data/doc/files/lib/gettext/erb_rb.html +97 -0
- data/doc/files/lib/gettext/iconv_rb.html +97 -0
- data/doc/files/lib/gettext/locale_cgi_rb.html +92 -0
- data/doc/files/lib/gettext/locale_object_rb.html +92 -0
- data/doc/files/lib/gettext/locale_posix_rb.html +92 -0
- data/doc/files/lib/gettext/locale_rb.html +99 -0
- data/doc/files/lib/gettext/locale_table_win32_rb.html +92 -0
- data/doc/files/lib/gettext/locale_win32_rb.html +96 -0
- data/doc/files/lib/gettext/mo_rb.html +96 -0
- data/doc/files/lib/gettext/parser/activerecord_rb.html +103 -0
- data/doc/files/lib/gettext/parser/erb_rb.html +97 -0
- data/doc/files/lib/gettext/parser/glade_rb.html +97 -0
- data/doc/files/lib/gettext/parser/ruby_rb.html +98 -0
- data/doc/files/lib/gettext/poparser_rb.html +96 -0
- data/doc/files/lib/gettext/rails_rb.html +99 -0
- data/doc/files/lib/gettext/rgettext_rb.html +98 -0
- data/doc/files/lib/gettext/rmsgfmt_rb.html +100 -0
- data/doc/files/lib/gettext/rmsgmerge_rb.html +100 -0
- data/doc/files/lib/gettext/string_rb.html +92 -0
- data/doc/files/lib/gettext/textdomain_rb.html +97 -0
- data/doc/files/lib/gettext/textdomainmanager_rb.html +97 -0
- data/doc/files/lib/gettext/utils_rb.html +98 -0
- data/doc/files/lib/gettext/version_rb.html +92 -0
- data/doc/files/lib/gettext_rb.html +101 -0
- data/doc/fr_class_index.html +45 -0
- data/doc/fr_file_index.html +41 -0
- data/doc/fr_method_index.html +135 -0
- data/doc/frame-style.css +33 -0
- data/doc/index.html +26 -0
- data/doc/rdoc-style.css +180 -0
- data/jamis.rb +590 -0
- data/lib/gettext.rb +38 -12
- data/lib/gettext/container.rb +6 -2
- data/lib/gettext/iconv.rb +2 -2
- data/lib/gettext/locale_cgi.rb +3 -2
- data/lib/gettext/locale_object.rb +8 -8
- data/lib/gettext/locale_posix.rb +2 -2
- data/lib/gettext/locale_table_win32.rb +3 -3
- data/lib/gettext/locale_win32.rb +2 -2
- data/lib/gettext/mo.rb +5 -2
- data/lib/gettext/parser/activerecord.rb +27 -17
- data/lib/gettext/parser/glade.rb +7 -11
- data/lib/gettext/parser/ruby.rb +2 -3
- data/lib/gettext/rails.rb +220 -85
- data/lib/gettext/rgettext.rb +2 -2
- data/lib/gettext/rmsgfmt.rb +3 -3
- data/lib/gettext/rmsgmerge.rb +2 -2
- data/lib/gettext/string.rb +2 -1
- data/lib/gettext/textdomain.rb +5 -2
- data/lib/gettext/textdomainmanager.rb +3 -3
- data/lib/gettext/version.rb +1 -1
- data/po/cs/rails.po +63 -22
- data/po/cs/rgettext.po +71 -37
- data/po/de/rails.po +54 -16
- data/po/de/rgettext.po +56 -22
- data/po/el/rails.po +54 -16
- data/po/el/rgettext.po +56 -22
- data/po/es/rails.po +57 -20
- data/po/es/rgettext.po +70 -30
- data/po/fr/rails.po +57 -19
- data/po/fr/rgettext.po +61 -25
- data/po/it/rails.po +54 -16
- data/po/it/rgettext.po +56 -22
- data/po/ja/rails.po +55 -18
- data/po/ja/rgettext.po +58 -24
- data/po/ko/rails.po +68 -33
- data/po/ko/rgettext.po +77 -37
- data/po/nl/rails.po +61 -22
- data/po/nl/rgettext.po +72 -36
- data/po/pt_BR/rails.po +54 -16
- data/po/pt_BR/rgettext.po +56 -22
- data/po/rails.pot +54 -16
- data/po/rgettext.pot +55 -21
- data/po/ru/rails.po +68 -26
- data/po/ru/rgettext.po +70 -30
- data/po/sv/rgettext.po +55 -21
- data/po/zh/rails.po +51 -16
- data/po/zh/rgettext.po +59 -23
- data/samples/rails/app/controllers/application.rb +7 -1
- data/samples/rails/app/models/article.rb +0 -6
- data/src/poparser.ry +1 -1
- data/test/gettext_test.rb +1 -1
- data/test/gettext_test_parser.rb +0 -1
- data/test/test_rubyparser.rb +0 -11
- metadata +233 -8
@@ -0,0 +1,30 @@
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
<html>
|
6
|
+
<head><title>rmsgmerge (GetText)</title>
|
7
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
8
|
+
<style>
|
9
|
+
.ruby-comment { color: green; font-style: italic }
|
10
|
+
.ruby-constant { color: #4433aa; font-weight: bold; }
|
11
|
+
.ruby-identifier { color: #222222; }
|
12
|
+
.ruby-ivar { color: #2233dd; }
|
13
|
+
.ruby-keyword { color: #3333FF; font-weight: bold }
|
14
|
+
.ruby-node { color: #777777; }
|
15
|
+
.ruby-operator { color: #111111; }
|
16
|
+
.ruby-regexp { color: #662222; }
|
17
|
+
.ruby-value { color: #662222; font-style: italic }
|
18
|
+
.kw { color: #3333FF; font-weight: bold }
|
19
|
+
.cmt { color: green; font-style: italic }
|
20
|
+
.str { color: #662222; font-style: italic }
|
21
|
+
.re { color: #662222; }
|
22
|
+
</style>
|
23
|
+
</head>
|
24
|
+
<body bgcolor="white">
|
25
|
+
<pre><span class="ruby-comment cmt"># File lib/gettext/rmsgmerge.rb, line 489</span>
|
26
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">rmsgmerge</span>(<span class="ruby-identifier">reference</span> = <span class="ruby-keyword kw">nil</span>, <span class="ruby-identifier">definition</span> = <span class="ruby-keyword kw">nil</span>, <span class="ruby-identifier">out</span> = <span class="ruby-constant">STDOUT</span>)
|
27
|
+
<span class="ruby-constant">RMsgMerge</span>.<span class="ruby-identifier">run</span>(<span class="ruby-identifier">reference</span>, <span class="ruby-identifier">definition</span>, <span class="ruby-identifier">out</span>)
|
28
|
+
<span class="ruby-keyword kw">end</span></pre>
|
29
|
+
</body>
|
30
|
+
</html>
|
@@ -0,0 +1,31 @@
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
<html>
|
6
|
+
<head><title>rgettext (GetText)</title>
|
7
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
8
|
+
<style>
|
9
|
+
.ruby-comment { color: green; font-style: italic }
|
10
|
+
.ruby-constant { color: #4433aa; font-weight: bold; }
|
11
|
+
.ruby-identifier { color: #222222; }
|
12
|
+
.ruby-ivar { color: #2233dd; }
|
13
|
+
.ruby-keyword { color: #3333FF; font-weight: bold }
|
14
|
+
.ruby-node { color: #777777; }
|
15
|
+
.ruby-operator { color: #111111; }
|
16
|
+
.ruby-regexp { color: #662222; }
|
17
|
+
.ruby-value { color: #662222; font-style: italic }
|
18
|
+
.kw { color: #3333FF; font-weight: bold }
|
19
|
+
.cmt { color: green; font-style: italic }
|
20
|
+
.str { color: #662222; font-style: italic }
|
21
|
+
.re { color: #662222; }
|
22
|
+
</style>
|
23
|
+
</head>
|
24
|
+
<body bgcolor="white">
|
25
|
+
<pre><span class="ruby-comment cmt"># File lib/gettext/rgettext.rb, line 197</span>
|
26
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">rgettext</span>(<span class="ruby-identifier">targetfiles</span> = <span class="ruby-keyword kw">nil</span>, <span class="ruby-identifier">out</span> = <span class="ruby-constant">STDOUT</span>)
|
27
|
+
<span class="ruby-constant">RGetText</span>.<span class="ruby-identifier">run</span>(<span class="ruby-identifier">targetfiles</span>, <span class="ruby-identifier">out</span>)
|
28
|
+
<span class="ruby-keyword kw">self</span>
|
29
|
+
<span class="ruby-keyword kw">end</span></pre>
|
30
|
+
</body>
|
31
|
+
</html>
|
@@ -0,0 +1,46 @@
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
<html>
|
6
|
+
<head><title>msgmerge (GetText)</title>
|
7
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
8
|
+
<style>
|
9
|
+
.ruby-comment { color: green; font-style: italic }
|
10
|
+
.ruby-constant { color: #4433aa; font-weight: bold; }
|
11
|
+
.ruby-identifier { color: #222222; }
|
12
|
+
.ruby-ivar { color: #2233dd; }
|
13
|
+
.ruby-keyword { color: #3333FF; font-weight: bold }
|
14
|
+
.ruby-node { color: #777777; }
|
15
|
+
.ruby-operator { color: #111111; }
|
16
|
+
.ruby-regexp { color: #662222; }
|
17
|
+
.ruby-value { color: #662222; font-style: italic }
|
18
|
+
.kw { color: #3333FF; font-weight: bold }
|
19
|
+
.cmt { color: green; font-style: italic }
|
20
|
+
.str { color: #662222; font-style: italic }
|
21
|
+
.re { color: #662222; }
|
22
|
+
</style>
|
23
|
+
</head>
|
24
|
+
<body bgcolor="white">
|
25
|
+
<pre><span class="ruby-comment cmt"># File lib/gettext/utils.rb, line 37</span>
|
26
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">msgmerge</span>(<span class="ruby-identifier">defpo</span>, <span class="ruby-identifier">refpo</span>, <span class="ruby-identifier">app_version</span>)
|
27
|
+
<span class="ruby-identifier">$stderr</span>.<span class="ruby-identifier">puts</span> <span class="ruby-identifier">defpo</span>
|
28
|
+
<span class="ruby-identifier">cmd</span> = <span class="ruby-constant">ENV</span>[<span class="ruby-value str">"MSGMERGE_PATH"</span>]
|
29
|
+
<span class="ruby-identifier">cmd</span> <span class="ruby-operator">||=</span> <span class="ruby-value str">"msgmerge"</span>
|
30
|
+
|
31
|
+
<span class="ruby-identifier">cont</span> = <span class="ruby-value str">""</span>
|
32
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-constant">FileTest</span>.<span class="ruby-identifier">exist?</span> <span class="ruby-identifier">defpo</span>
|
33
|
+
<span class="ruby-identifier">cont</span> = <span class="ruby-node">`#{cmd} #{defpo} #{refpo}`</span>
|
34
|
+
<span class="ruby-keyword kw">else</span>
|
35
|
+
<span class="ruby-constant">File</span>.<span class="ruby-identifier">open</span>(<span class="ruby-identifier">refpo</span>) <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">io</span><span class="ruby-operator">|</span>
|
36
|
+
<span class="ruby-identifier">cont</span> = <span class="ruby-identifier">io</span>.<span class="ruby-identifier">read</span>
|
37
|
+
<span class="ruby-keyword kw">end</span>
|
38
|
+
<span class="ruby-keyword kw">end</span>
|
39
|
+
<span class="ruby-identifier">cont</span>.<span class="ruby-identifier">sub!</span>(<span class="ruby-regexp re">/(Project-Id-Version\:).*$/</span>, <span class="ruby-node">"\\1 #{app_version}\\n\""</span>)
|
40
|
+
<span class="ruby-constant">File</span>.<span class="ruby-identifier">open</span>(<span class="ruby-identifier">defpo</span>, <span class="ruby-value str">"w"</span>) <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">out</span><span class="ruby-operator">|</span>
|
41
|
+
<span class="ruby-identifier">out</span>.<span class="ruby-identifier">write</span>(<span class="ruby-identifier">cont</span>)
|
42
|
+
<span class="ruby-keyword kw">end</span>
|
43
|
+
<span class="ruby-keyword kw">self</span>
|
44
|
+
<span class="ruby-keyword kw">end</span></pre>
|
45
|
+
</body>
|
46
|
+
</html>
|
@@ -0,0 +1,42 @@
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
<html>
|
6
|
+
<head><title>create_mofiles (GetText)</title>
|
7
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
8
|
+
<style>
|
9
|
+
.ruby-comment { color: green; font-style: italic }
|
10
|
+
.ruby-constant { color: #4433aa; font-weight: bold; }
|
11
|
+
.ruby-identifier { color: #222222; }
|
12
|
+
.ruby-ivar { color: #2233dd; }
|
13
|
+
.ruby-keyword { color: #3333FF; font-weight: bold }
|
14
|
+
.ruby-node { color: #777777; }
|
15
|
+
.ruby-operator { color: #111111; }
|
16
|
+
.ruby-regexp { color: #662222; }
|
17
|
+
.ruby-value { color: #662222; font-style: italic }
|
18
|
+
.kw { color: #3333FF; font-weight: bold }
|
19
|
+
.cmt { color: green; font-style: italic }
|
20
|
+
.str { color: #662222; font-style: italic }
|
21
|
+
.re { color: #662222; }
|
22
|
+
</style>
|
23
|
+
</head>
|
24
|
+
<body bgcolor="white">
|
25
|
+
<pre><span class="ruby-comment cmt"># File lib/gettext/utils.rb, line 75</span>
|
26
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">create_mofiles</span>(<span class="ruby-identifier">verbose</span> = <span class="ruby-keyword kw">false</span>,
|
27
|
+
<span class="ruby-identifier">podir</span> = <span class="ruby-value str">"./po"</span>, <span class="ruby-identifier">targetdir</span> = <span class="ruby-value str">"./data/locale"</span>,
|
28
|
+
<span class="ruby-identifier">targetpath_rule</span> = <span class="ruby-value str">"%s/LC_MESSAGES"</span>)
|
29
|
+
|
30
|
+
<span class="ruby-identifier">modir</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">join</span>(<span class="ruby-identifier">targetdir</span>, <span class="ruby-identifier">targetpath_rule</span>)
|
31
|
+
<span class="ruby-constant">Dir</span>.<span class="ruby-identifier">glob</span>(<span class="ruby-constant">File</span>.<span class="ruby-identifier">join</span>(<span class="ruby-identifier">podir</span>, <span class="ruby-value str">"*/*.po"</span>)) <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">file</span><span class="ruby-operator">|</span>
|
32
|
+
<span class="ruby-identifier">lang</span>, <span class="ruby-identifier">basename</span> = <span class="ruby-regexp re">/\/([^\/]+?)\/(.*)\.po/</span>.<span class="ruby-identifier">match</span>(<span class="ruby-identifier">file</span>[<span class="ruby-identifier">podir</span>.<span class="ruby-identifier">size</span><span class="ruby-operator">..</span><span class="ruby-value">-1</span>]).<span class="ruby-identifier">to_a</span>[<span class="ruby-value">1</span>,<span class="ruby-value">2</span>]
|
33
|
+
<span class="ruby-identifier">outdir</span> = <span class="ruby-identifier">modir</span> <span class="ruby-operator">%</span> <span class="ruby-identifier">lang</span>
|
34
|
+
<span class="ruby-constant">FileUtils</span>.<span class="ruby-identifier">mkdir_p</span>(<span class="ruby-identifier">outdir</span>) <span class="ruby-keyword kw">unless</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">directory?</span>(<span class="ruby-identifier">outdir</span>)
|
35
|
+
<span class="ruby-identifier">rmsgfmt</span>(<span class="ruby-identifier">file</span>, <span class="ruby-constant">File</span>.<span class="ruby-identifier">join</span>(<span class="ruby-identifier">outdir</span>, <span class="ruby-node">"#{basename}.mo"</span>))
|
36
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">verbose</span>
|
37
|
+
<span class="ruby-identifier">$stderr</span>.<span class="ruby-identifier">puts</span> <span class="ruby-node">%Q[#{file} -> #{File.join(outdir, "#{basename}.mo")}]</span>
|
38
|
+
<span class="ruby-keyword kw">end</span>
|
39
|
+
<span class="ruby-keyword kw">end</span>
|
40
|
+
<span class="ruby-keyword kw">end</span></pre>
|
41
|
+
</body>
|
42
|
+
</html>
|
@@ -0,0 +1,32 @@
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
<html>
|
6
|
+
<head><title>update_pofiles (GetText)</title>
|
7
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
8
|
+
<style>
|
9
|
+
.ruby-comment { color: green; font-style: italic }
|
10
|
+
.ruby-constant { color: #4433aa; font-weight: bold; }
|
11
|
+
.ruby-identifier { color: #222222; }
|
12
|
+
.ruby-ivar { color: #2233dd; }
|
13
|
+
.ruby-keyword { color: #3333FF; font-weight: bold }
|
14
|
+
.ruby-node { color: #777777; }
|
15
|
+
.ruby-operator { color: #111111; }
|
16
|
+
.ruby-regexp { color: #662222; }
|
17
|
+
.ruby-value { color: #662222; font-style: italic }
|
18
|
+
.kw { color: #3333FF; font-weight: bold }
|
19
|
+
.cmt { color: green; font-style: italic }
|
20
|
+
.str { color: #662222; font-style: italic }
|
21
|
+
.re { color: #662222; }
|
22
|
+
</style>
|
23
|
+
</head>
|
24
|
+
<body bgcolor="white">
|
25
|
+
<pre><span class="ruby-comment cmt"># File lib/gettext/utils.rb, line 106</span>
|
26
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">update_pofiles</span>(<span class="ruby-identifier">textdomain</span>, <span class="ruby-identifier">files</span>, <span class="ruby-identifier">app_version</span>, <span class="ruby-identifier">po_root</span> = <span class="ruby-value str">"po"</span>, <span class="ruby-identifier">refpot</span> = <span class="ruby-value str">"tmp.pot"</span>)
|
27
|
+
<span class="ruby-identifier">rgettext</span>(<span class="ruby-identifier">files</span>, <span class="ruby-identifier">refpot</span>)
|
28
|
+
<span class="ruby-identifier">msgmerge_all</span>(<span class="ruby-identifier">textdomain</span>, <span class="ruby-identifier">app_version</span>, <span class="ruby-identifier">po_root</span>, <span class="ruby-identifier">refpot</span>)
|
29
|
+
<span class="ruby-constant">File</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-identifier">refpot</span>)
|
30
|
+
<span class="ruby-keyword kw">end</span></pre>
|
31
|
+
</body>
|
32
|
+
</html>
|
@@ -0,0 +1,30 @@
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
<html>
|
6
|
+
<head><title>rmsgfmt (GetText)</title>
|
7
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
8
|
+
<style>
|
9
|
+
.ruby-comment { color: green; font-style: italic }
|
10
|
+
.ruby-constant { color: #4433aa; font-weight: bold; }
|
11
|
+
.ruby-identifier { color: #222222; }
|
12
|
+
.ruby-ivar { color: #2233dd; }
|
13
|
+
.ruby-keyword { color: #3333FF; font-weight: bold }
|
14
|
+
.ruby-node { color: #777777; }
|
15
|
+
.ruby-operator { color: #111111; }
|
16
|
+
.ruby-regexp { color: #662222; }
|
17
|
+
.ruby-value { color: #662222; font-style: italic }
|
18
|
+
.kw { color: #3333FF; font-weight: bold }
|
19
|
+
.cmt { color: green; font-style: italic }
|
20
|
+
.str { color: #662222; font-style: italic }
|
21
|
+
.re { color: #662222; }
|
22
|
+
</style>
|
23
|
+
</head>
|
24
|
+
<body bgcolor="white">
|
25
|
+
<pre><span class="ruby-comment cmt"># File lib/gettext/rmsgfmt.rb, line 79</span>
|
26
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">rmsgfmt</span>(<span class="ruby-identifier">targetfile</span> = <span class="ruby-keyword kw">nil</span>, <span class="ruby-identifier">output_path</span> = <span class="ruby-keyword kw">nil</span>)
|
27
|
+
<span class="ruby-constant">RMsgfmt</span>.<span class="ruby-identifier">run</span>(<span class="ruby-identifier">targetfile</span>, <span class="ruby-identifier">output_path</span>)
|
28
|
+
<span class="ruby-keyword kw">end</span></pre>
|
29
|
+
</body>
|
30
|
+
</html>
|
@@ -0,0 +1,30 @@
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
<html>
|
6
|
+
<head><title>set_cgi (GetText)</title>
|
7
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
8
|
+
<style>
|
9
|
+
.ruby-comment { color: green; font-style: italic }
|
10
|
+
.ruby-constant { color: #4433aa; font-weight: bold; }
|
11
|
+
.ruby-identifier { color: #222222; }
|
12
|
+
.ruby-ivar { color: #2233dd; }
|
13
|
+
.ruby-keyword { color: #3333FF; font-weight: bold }
|
14
|
+
.ruby-node { color: #777777; }
|
15
|
+
.ruby-operator { color: #111111; }
|
16
|
+
.ruby-regexp { color: #662222; }
|
17
|
+
.ruby-value { color: #662222; font-style: italic }
|
18
|
+
.kw { color: #3333FF; font-weight: bold }
|
19
|
+
.cmt { color: green; font-style: italic }
|
20
|
+
.str { color: #662222; font-style: italic }
|
21
|
+
.re { color: #662222; }
|
22
|
+
</style>
|
23
|
+
</head>
|
24
|
+
<body bgcolor="white">
|
25
|
+
<pre><span class="ruby-comment cmt"># File lib/gettext/cgi.rb, line 47</span>
|
26
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">set_cgi</span>(<span class="ruby-identifier">cgi_</span>)
|
27
|
+
<span class="ruby-constant">Locale</span>.<span class="ruby-identifier">set_cgi</span>(<span class="ruby-identifier">cgi_</span>)
|
28
|
+
<span class="ruby-keyword kw">end</span></pre>
|
29
|
+
</body>
|
30
|
+
</html>
|
@@ -0,0 +1,31 @@
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
<html>
|
6
|
+
<head><title>cgi= (GetText)</title>
|
7
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
8
|
+
<style>
|
9
|
+
.ruby-comment { color: green; font-style: italic }
|
10
|
+
.ruby-constant { color: #4433aa; font-weight: bold; }
|
11
|
+
.ruby-identifier { color: #222222; }
|
12
|
+
.ruby-ivar { color: #2233dd; }
|
13
|
+
.ruby-keyword { color: #3333FF; font-weight: bold }
|
14
|
+
.ruby-node { color: #777777; }
|
15
|
+
.ruby-operator { color: #111111; }
|
16
|
+
.ruby-regexp { color: #662222; }
|
17
|
+
.ruby-value { color: #662222; font-style: italic }
|
18
|
+
.kw { color: #3333FF; font-weight: bold }
|
19
|
+
.cmt { color: green; font-style: italic }
|
20
|
+
.str { color: #662222; font-style: italic }
|
21
|
+
.re { color: #662222; }
|
22
|
+
</style>
|
23
|
+
</head>
|
24
|
+
<body bgcolor="white">
|
25
|
+
<pre><span class="ruby-comment cmt"># File lib/gettext/cgi.rb, line 54</span>
|
26
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">cgi=</span>(<span class="ruby-identifier">cgi_</span>)
|
27
|
+
<span class="ruby-identifier">set_cgi</span>(<span class="ruby-identifier">cgi_</span>)
|
28
|
+
<span class="ruby-identifier">cgi_</span>
|
29
|
+
<span class="ruby-keyword kw">end</span></pre>
|
30
|
+
</body>
|
31
|
+
</html>
|
@@ -0,0 +1,30 @@
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
<html>
|
6
|
+
<head><title>cgi (GetText)</title>
|
7
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
8
|
+
<style>
|
9
|
+
.ruby-comment { color: green; font-style: italic }
|
10
|
+
.ruby-constant { color: #4433aa; font-weight: bold; }
|
11
|
+
.ruby-identifier { color: #222222; }
|
12
|
+
.ruby-ivar { color: #2233dd; }
|
13
|
+
.ruby-keyword { color: #3333FF; font-weight: bold }
|
14
|
+
.ruby-node { color: #777777; }
|
15
|
+
.ruby-operator { color: #111111; }
|
16
|
+
.ruby-regexp { color: #662222; }
|
17
|
+
.ruby-value { color: #662222; font-style: italic }
|
18
|
+
.kw { color: #3333FF; font-weight: bold }
|
19
|
+
.cmt { color: green; font-style: italic }
|
20
|
+
.str { color: #662222; font-style: italic }
|
21
|
+
.re { color: #662222; }
|
22
|
+
</style>
|
23
|
+
</head>
|
24
|
+
<body bgcolor="white">
|
25
|
+
<pre><span class="ruby-comment cmt"># File lib/gettext/cgi.rb, line 61</span>
|
26
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">cgi</span>
|
27
|
+
<span class="ruby-constant">Locale</span>.<span class="ruby-identifier">cgi</span>
|
28
|
+
<span class="ruby-keyword kw">end</span></pre>
|
29
|
+
</body>
|
30
|
+
</html>
|
@@ -0,0 +1,49 @@
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
<html>
|
6
|
+
<head><title>bindtextdomain (GetText)</title>
|
7
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
8
|
+
<style>
|
9
|
+
.ruby-comment { color: green; font-style: italic }
|
10
|
+
.ruby-constant { color: #4433aa; font-weight: bold; }
|
11
|
+
.ruby-identifier { color: #222222; }
|
12
|
+
.ruby-ivar { color: #2233dd; }
|
13
|
+
.ruby-keyword { color: #3333FF; font-weight: bold }
|
14
|
+
.ruby-node { color: #777777; }
|
15
|
+
.ruby-operator { color: #111111; }
|
16
|
+
.ruby-regexp { color: #662222; }
|
17
|
+
.ruby-value { color: #662222; font-style: italic }
|
18
|
+
.kw { color: #3333FF; font-weight: bold }
|
19
|
+
.cmt { color: green; font-style: italic }
|
20
|
+
.str { color: #662222; font-style: italic }
|
21
|
+
.re { color: #662222; }
|
22
|
+
</style>
|
23
|
+
</head>
|
24
|
+
<body bgcolor="white">
|
25
|
+
<pre><span class="ruby-comment cmt"># File lib/gettext.rb, line 56</span>
|
26
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">bindtextdomain</span>(<span class="ruby-identifier">domainname</span>, <span class="ruby-identifier">options</span> = {}, <span class="ruby-identifier">locale_</span> = <span class="ruby-keyword kw">nil</span>, <span class="ruby-identifier">charset</span> = <span class="ruby-keyword kw">nil</span>)
|
27
|
+
<span class="ruby-identifier">opt</span> = {}
|
28
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">options</span>.<span class="ruby-identifier">kind_of?</span> <span class="ruby-constant">String</span>
|
29
|
+
<span class="ruby-comment cmt"># For backward compatibility</span>
|
30
|
+
<span class="ruby-identifier">opt</span> = {<span class="ruby-identifier">:path</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">options</span>, <span class="ruby-identifier">:locale</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">locale_</span>, <span class="ruby-identifier">:charset</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">charset</span>}
|
31
|
+
<span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">options</span>
|
32
|
+
<span class="ruby-identifier">opt</span> = <span class="ruby-identifier">options</span>
|
33
|
+
<span class="ruby-keyword kw">end</span>
|
34
|
+
<span class="ruby-identifier">opt</span>[<span class="ruby-identifier">:locale</span>] = <span class="ruby-identifier">opt</span>[<span class="ruby-identifier">:locale</span>] <span class="ruby-operator">?</span> <span class="ruby-constant">Locale</span><span class="ruby-operator">::</span><span class="ruby-constant">Object</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">opt</span>[<span class="ruby-identifier">:locale</span>]) <span class="ruby-operator">:</span> <span class="ruby-constant">Locale</span>.<span class="ruby-identifier">get</span>
|
35
|
+
<span class="ruby-identifier">opt</span>[<span class="ruby-identifier">:charset</span>] = <span class="ruby-identifier">output_charset</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">output_charset</span>
|
36
|
+
<span class="ruby-identifier">locale</span>.<span class="ruby-identifier">charset</span> = <span class="ruby-identifier">opt</span>[<span class="ruby-identifier">:charset</span>] <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">opt</span>[<span class="ruby-identifier">:charset</span>]
|
37
|
+
<span class="ruby-constant">Locale</span>.<span class="ruby-identifier">set_current</span>(<span class="ruby-identifier">opt</span>[<span class="ruby-identifier">:locale</span>])
|
38
|
+
<span class="ruby-identifier">manager</span> = <span class="ruby-ivar">@@__textdomainmanagers</span>[<span class="ruby-identifier">bound_target</span>]
|
39
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">manager</span>
|
40
|
+
<span class="ruby-identifier">manager</span>.<span class="ruby-identifier">set_locale</span>(<span class="ruby-identifier">opt</span>[<span class="ruby-identifier">:locale</span>])
|
41
|
+
<span class="ruby-keyword kw">else</span>
|
42
|
+
<span class="ruby-identifier">manager</span> = <span class="ruby-constant">TextDomainManager</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">bound_target</span>, <span class="ruby-identifier">opt</span>[<span class="ruby-identifier">:locale</span>])
|
43
|
+
<span class="ruby-ivar">@@__textdomainmanagers</span>[<span class="ruby-identifier">bound_target</span>] = <span class="ruby-identifier">manager</span>
|
44
|
+
<span class="ruby-keyword kw">end</span>
|
45
|
+
<span class="ruby-identifier">manager</span>.<span class="ruby-identifier">add_textdomain</span>(<span class="ruby-identifier">domainname</span>, <span class="ruby-identifier">opt</span>)
|
46
|
+
<span class="ruby-identifier">manager</span>
|
47
|
+
<span class="ruby-keyword kw">end</span></pre>
|
48
|
+
</body>
|
49
|
+
</html>
|
@@ -0,0 +1,38 @@
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
<html>
|
6
|
+
<head><title>textdomain (GetText)</title>
|
7
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
8
|
+
<style>
|
9
|
+
.ruby-comment { color: green; font-style: italic }
|
10
|
+
.ruby-constant { color: #4433aa; font-weight: bold; }
|
11
|
+
.ruby-identifier { color: #222222; }
|
12
|
+
.ruby-ivar { color: #2233dd; }
|
13
|
+
.ruby-keyword { color: #3333FF; font-weight: bold }
|
14
|
+
.ruby-node { color: #777777; }
|
15
|
+
.ruby-operator { color: #111111; }
|
16
|
+
.ruby-regexp { color: #662222; }
|
17
|
+
.ruby-value { color: #662222; font-style: italic }
|
18
|
+
.kw { color: #3333FF; font-weight: bold }
|
19
|
+
.cmt { color: green; font-style: italic }
|
20
|
+
.str { color: #662222; font-style: italic }
|
21
|
+
.re { color: #662222; }
|
22
|
+
</style>
|
23
|
+
</head>
|
24
|
+
<body bgcolor="white">
|
25
|
+
<pre><span class="ruby-comment cmt"># File lib/gettext.rb, line 85</span>
|
26
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">textdomain</span>(<span class="ruby-identifier">domainname</span>)
|
27
|
+
<span class="ruby-identifier">domain</span> = <span class="ruby-constant">TextDomainManager</span>.<span class="ruby-identifier">textdomain</span>(<span class="ruby-identifier">domainname</span>)
|
28
|
+
<span class="ruby-identifier">raise</span> <span class="ruby-constant">NoboundTextDomainError</span>, <span class="ruby-node">"#{domainname} is not bound."</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">domain</span>
|
29
|
+
<span class="ruby-identifier">manager</span> = <span class="ruby-ivar">@@__textdomainmanagers</span>[<span class="ruby-identifier">bound_target</span>]
|
30
|
+
<span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">manager</span>
|
31
|
+
<span class="ruby-identifier">manager</span> = <span class="ruby-constant">TextDomainManager</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">bound_target</span>, <span class="ruby-constant">Locale</span>.<span class="ruby-identifier">get</span>)
|
32
|
+
<span class="ruby-ivar">@@__textdomainmanagers</span>[<span class="ruby-identifier">bound_target</span>] = <span class="ruby-identifier">manager</span>
|
33
|
+
<span class="ruby-keyword kw">end</span>
|
34
|
+
<span class="ruby-identifier">manager</span>.<span class="ruby-identifier">add_textdomain</span>(<span class="ruby-identifier">domainname</span>)
|
35
|
+
<span class="ruby-identifier">manager</span>.<span class="ruby-identifier">set_locale</span>(<span class="ruby-constant">Locale</span>.<span class="ruby-identifier">get</span>)
|
36
|
+
<span class="ruby-keyword kw">end</span></pre>
|
37
|
+
</body>
|
38
|
+
</html>
|
@@ -0,0 +1,35 @@
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
<html>
|
6
|
+
<head><title>gettext (GetText)</title>
|
7
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
8
|
+
<style>
|
9
|
+
.ruby-comment { color: green; font-style: italic }
|
10
|
+
.ruby-constant { color: #4433aa; font-weight: bold; }
|
11
|
+
.ruby-identifier { color: #222222; }
|
12
|
+
.ruby-ivar { color: #2233dd; }
|
13
|
+
.ruby-keyword { color: #3333FF; font-weight: bold }
|
14
|
+
.ruby-node { color: #777777; }
|
15
|
+
.ruby-operator { color: #111111; }
|
16
|
+
.ruby-regexp { color: #662222; }
|
17
|
+
.ruby-value { color: #662222; font-style: italic }
|
18
|
+
.kw { color: #3333FF; font-weight: bold }
|
19
|
+
.cmt { color: green; font-style: italic }
|
20
|
+
.str { color: #662222; font-style: italic }
|
21
|
+
.re { color: #662222; }
|
22
|
+
</style>
|
23
|
+
</head>
|
24
|
+
<body bgcolor="white">
|
25
|
+
<pre><span class="ruby-comment cmt"># File lib/gettext.rb, line 138</span>
|
26
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">gettext</span>(<span class="ruby-identifier">msgid</span>)
|
27
|
+
<span class="ruby-identifier">ret</span> = <span class="ruby-keyword kw">nil</span>
|
28
|
+
<span class="ruby-identifier">each_textdomain</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">textdomain</span><span class="ruby-operator">|</span>
|
29
|
+
<span class="ruby-identifier">ret</span> = <span class="ruby-identifier">textdomain</span>.<span class="ruby-identifier">gettext</span>(<span class="ruby-identifier">msgid</span>)
|
30
|
+
<span class="ruby-keyword kw">break</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">ret</span>
|
31
|
+
}
|
32
|
+
<span class="ruby-identifier">ret</span> <span class="ruby-value">? </span><span class="ruby-identifier">ret</span> <span class="ruby-operator">:</span> <span class="ruby-identifier">msgid</span>
|
33
|
+
<span class="ruby-keyword kw">end</span></pre>
|
34
|
+
</body>
|
35
|
+
</html>
|
@@ -0,0 +1,44 @@
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
<html>
|
6
|
+
<head><title>ngettext (GetText)</title>
|
7
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
8
|
+
<style>
|
9
|
+
.ruby-comment { color: green; font-style: italic }
|
10
|
+
.ruby-constant { color: #4433aa; font-weight: bold; }
|
11
|
+
.ruby-identifier { color: #222222; }
|
12
|
+
.ruby-ivar { color: #2233dd; }
|
13
|
+
.ruby-keyword { color: #3333FF; font-weight: bold }
|
14
|
+
.ruby-node { color: #777777; }
|
15
|
+
.ruby-operator { color: #111111; }
|
16
|
+
.ruby-regexp { color: #662222; }
|
17
|
+
.ruby-value { color: #662222; font-style: italic }
|
18
|
+
.kw { color: #3333FF; font-weight: bold }
|
19
|
+
.cmt { color: green; font-style: italic }
|
20
|
+
.str { color: #662222; font-style: italic }
|
21
|
+
.re { color: #662222; }
|
22
|
+
</style>
|
23
|
+
</head>
|
24
|
+
<body bgcolor="white">
|
25
|
+
<pre><span class="ruby-comment cmt"># File lib/gettext.rb, line 161</span>
|
26
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">ngettext</span>(<span class="ruby-identifier">arg1</span>, <span class="ruby-identifier">arg2</span>, <span class="ruby-identifier">arg3</span> = <span class="ruby-keyword kw">nil</span>)
|
27
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">arg1</span>.<span class="ruby-identifier">kind_of?</span>(<span class="ruby-constant">Array</span>)
|
28
|
+
<span class="ruby-identifier">msgid</span> = <span class="ruby-identifier">arg1</span>[<span class="ruby-value">0</span>]
|
29
|
+
<span class="ruby-identifier">msgid_plural</span> = <span class="ruby-identifier">arg1</span>[<span class="ruby-value">1</span>]
|
30
|
+
<span class="ruby-identifier">n</span> = <span class="ruby-identifier">arg2</span>
|
31
|
+
<span class="ruby-keyword kw">else</span>
|
32
|
+
<span class="ruby-identifier">msgid</span> = <span class="ruby-identifier">arg1</span>
|
33
|
+
<span class="ruby-identifier">msgid_plural</span> = <span class="ruby-identifier">arg2</span>
|
34
|
+
<span class="ruby-identifier">n</span> = <span class="ruby-identifier">arg3</span>
|
35
|
+
<span class="ruby-keyword kw">end</span>
|
36
|
+
<span class="ruby-identifier">ret</span> = <span class="ruby-keyword kw">nil</span>
|
37
|
+
<span class="ruby-identifier">each_textdomain</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">textdomain</span><span class="ruby-operator">|</span>
|
38
|
+
<span class="ruby-identifier">ret</span> = <span class="ruby-identifier">textdomain</span>.<span class="ruby-identifier">ngettext</span>(<span class="ruby-identifier">msgid</span>, <span class="ruby-identifier">msgid_plural</span>, <span class="ruby-identifier">n</span>)
|
39
|
+
<span class="ruby-keyword kw">break</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">ret</span>
|
40
|
+
}
|
41
|
+
<span class="ruby-identifier">ret</span> <span class="ruby-value">? </span><span class="ruby-identifier">ret</span> <span class="ruby-operator">:</span> (<span class="ruby-identifier">n</span> <span class="ruby-operator">==</span> <span class="ruby-value">1</span> <span class="ruby-operator">?</span> <span class="ruby-identifier">msgid</span> <span class="ruby-operator">:</span> <span class="ruby-identifier">msgid_plural</span>)
|
42
|
+
<span class="ruby-keyword kw">end</span></pre>
|
43
|
+
</body>
|
44
|
+
</html>
|