gettext 1.1.1-mswin32 → 1.2.0-mswin32
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.
- data/ChangeLog +128 -0
- data/NEWS +10 -0
- data/README +21 -23
- data/Rakefile +40 -21
- data/bin/rgettext +1 -1
- data/bin/rmsgfmt +1 -1
- data/bin/rmsgmerge +1 -1
- 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/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/sv/LC_MESSAGES/rgettext.mo +0 -0
- data/ext/gettext/{gettext/Makefile → Makefile} +3 -3
- data/ext/gettext/extconf.rb +20 -0
- data/ext/gettext/locale_system-i386-mswin32.def +2 -0
- data/ext/gettext/{gettext/_locale.c → locale_system.c} +15 -19
- data/ext/gettext/locale_system.exp +0 -0
- data/ext/gettext/locale_system.lib +0 -0
- data/ext/gettext/locale_system.obj +0 -0
- data/ext/gettext/{gettext/_locale.pdb → locale_system.pdb} +0 -0
- data/ext/gettext/locale_system.so +0 -0
- data/ext/gettext/mkmf.log +10 -0
- data/ext/gettext/{gettext/vc70.pdb → vc70.pdb} +0 -0
- data/lib/gettext.rb +186 -38
- data/lib/gettext/cgi.rb +35 -69
- data/lib/gettext/container.rb +14 -5
- data/lib/gettext/erb.rb +30 -2
- data/lib/gettext/iconv.rb +19 -4
- data/lib/gettext/locale.rb +188 -39
- data/lib/gettext/locale_cgi.rb +102 -0
- data/lib/gettext/locale_object.rb +131 -0
- data/lib/gettext/locale_posix.rb +50 -0
- data/lib/gettext/locale_table_win32.rb +224 -182
- data/lib/gettext/locale_win32.rb +59 -35
- data/lib/gettext/mo.rb +2 -2
- data/lib/gettext/parser/activerecord.rb +19 -5
- data/lib/gettext/parser/erb.rb +6 -3
- data/lib/gettext/parser/glade.rb +5 -5
- data/lib/gettext/parser/ruby.rb +6 -6
- data/lib/gettext/poparser.rb +298 -297
- data/lib/gettext/rails.rb +122 -44
- data/lib/gettext/rgettext.rb +21 -8
- data/lib/gettext/rmsgfmt.rb +16 -8
- data/lib/gettext/rmsgmerge.rb +172 -50
- data/lib/gettext/string.rb +25 -3
- data/lib/gettext/textdomain.rb +89 -90
- data/lib/gettext/utils.rb +63 -3
- data/lib/gettext/version.rb +2 -2
- data/lib/locale_system.so +0 -0
- data/po/cs/rails.po +28 -28
- data/po/cs/rgettext.po +14 -14
- data/po/de/rails.po +29 -26
- data/po/de/rgettext.po +24 -17
- data/po/el/rails.po +26 -26
- data/po/el/rgettext.po +18 -15
- data/po/es/rails.po +26 -26
- data/po/es/rgettext.po +16 -16
- data/po/fr/rails.po +27 -27
- data/po/fr/rgettext.po +14 -14
- data/po/it/rgettext.po +14 -14
- data/po/ja/rails.po +24 -24
- data/po/ja/rgettext.po +14 -14
- data/po/ko/rails.po +24 -24
- data/po/ko/rgettext.po +17 -18
- data/po/nl/rails.po +27 -27
- data/po/nl/rgettext.po +18 -18
- data/po/pt_BR/rails.po +26 -26
- data/po/pt_BR/rgettext.po +14 -14
- data/po/rails.pot +26 -26
- data/po/rgettext.pot +14 -14
- data/po/sv/rgettext.po +14 -14
- data/post-setup.rb +8 -3
- data/pre-setup.rb +14 -1
- data/samples/cgi/http.rb +2 -1
- data/samples/makemo.rb +1 -1
- data/samples/rails/app/models/article.rb +15 -1
- data/samples/rails/config/database.yml +1 -1
- data/samples/rails/locale/cs/LC_MESSAGES/blog.mo +0 -0
- data/samples/rails/locale/cs/LC_MESSAGES/gettext_plugin.mo +0 -0
- data/samples/rails/locale/de/LC_MESSAGES/blog.mo +0 -0
- data/samples/rails/locale/de/LC_MESSAGES/gettext_plugin.mo +0 -0
- data/samples/rails/locale/el/LC_MESSAGES/blog.mo +0 -0
- data/samples/rails/locale/el/LC_MESSAGES/gettext_plugin.mo +0 -0
- data/samples/rails/locale/en/LC_MESSAGES/blog.mo +0 -0
- data/samples/rails/locale/es/LC_MESSAGES/blog.mo +0 -0
- data/samples/rails/locale/es/LC_MESSAGES/gettext_plugin.mo +0 -0
- data/samples/rails/locale/fr/LC_MESSAGES/blog.mo +0 -0
- data/samples/rails/locale/fr/LC_MESSAGES/gettext_plugin.mo +0 -0
- data/samples/rails/locale/ja/LC_MESSAGES/blog.mo +0 -0
- data/samples/rails/locale/ja/LC_MESSAGES/gettext_plugin.mo +0 -0
- data/samples/rails/locale/ko/LC_MESSAGES/blog.mo +0 -0
- data/samples/rails/locale/ko/LC_MESSAGES/gettext_plugin.mo +0 -0
- data/samples/rails/locale/nl/LC_MESSAGES/blog.mo +0 -0
- data/samples/rails/locale/nl/LC_MESSAGES/gettext_plugin.mo +0 -0
- data/samples/rails/locale/pt_BR/LC_MESSAGES/blog.mo +0 -0
- data/samples/rails/locale/pt_BR/LC_MESSAGES/gettext_plugin.mo +0 -0
- data/samples/rails/po/blog.pot +1 -1
- data/samples/rails/po/cs/blog.po +1 -2
- data/samples/rails/po/cs/gettext_plugin.po +1 -1
- data/samples/rails/po/de/blog.po +1 -2
- data/samples/rails/po/de/gettext_plugin.po +1 -1
- data/samples/rails/po/el/blog.po +1 -1
- data/samples/rails/po/el/gettext_plugin.po +1 -1
- data/samples/rails/po/en/blog.po +1 -1
- data/samples/rails/po/es/blog.po +1 -2
- data/samples/rails/po/es/gettext_plugin.po +1 -1
- data/samples/rails/po/fr/blog.po +1 -1
- data/samples/rails/po/fr/gettext_plugin.po +1 -1
- data/samples/rails/po/gettext_plugin.pot +1 -1
- data/samples/rails/po/ja/blog.po +2 -1
- data/samples/rails/po/ja/gettext_plugin.po +1 -1
- data/samples/rails/po/ko/blog.po +1 -2
- data/samples/rails/po/ko/gettext_plugin.po +1 -1
- data/samples/rails/po/nl/blog.po +1 -3
- data/samples/rails/po/nl/gettext_plugin.po +1 -1
- data/samples/rails/po/pt_BR/blog.po +1 -1
- data/samples/rails/po/pt_BR/gettext_plugin.po +1 -1
- data/setup.rb +799 -574
- data/src/poparser.ry +6 -5
- data/test/gettext_runner.rb +3 -1
- data/test/gettext_test.rb +40 -24
- data/test/gettext_test_cgi.rb +60 -6
- data/test/gettext_test_locale.rb +136 -0
- data/test/gettext_test_parser.rb +12 -12
- data/test/locale/la/LC_MESSAGES/plural_error.mo +0 -0
- data/test/po/la/plural_error.po +21 -0
- data/test/test.bat +2 -0
- data/test/test.sh +2 -4
- data/test/test_rubyparser_n_.rb +64 -0
- metadata +24 -21
- data/ext/gettext/gettext/MANIFEST +0 -3
- data/ext/gettext/gettext/_locale-i386-mswin32.def +0 -2
- data/ext/gettext/gettext/_locale.exp +0 -0
- data/ext/gettext/gettext/_locale.lib +0 -0
- data/ext/gettext/gettext/_locale.obj +0 -0
- data/ext/gettext/gettext/_locale.so +0 -0
- data/ext/gettext/gettext/extconf.rb +0 -20
- data/ext/gettext/gettext/mkmf.log +0 -16
- data/lib/_locale.so +0 -0
- data/lib/gettext/locale_default.rb +0 -35
- data/po/it/messages.mo +0 -0
- data/samples/cgi/po/it/messages.mo +0 -0
data/ChangeLog
CHANGED
@@ -1,3 +1,131 @@
|
|
1
|
+
2006-02-23 Masao Mutoh <mutoh@highway.ne.jp>
|
2
|
+
|
3
|
+
* Rakefile: Fix a problem to make package on Win32.
|
4
|
+
* lib/gettext/textdomain.rb: Rename @mo to @current_mo
|
5
|
+
and add a attr_reader for @current_mo.
|
6
|
+
* README, NEWS: updated.
|
7
|
+
* lib/gettext/rails.rb: Fix to translate error message
|
8
|
+
title/explanation.
|
9
|
+
* lib/gettext/parser/activerecord.rb: Fix an abort when
|
10
|
+
config/database.xml is not defined.
|
11
|
+
|
12
|
+
2006-02-22 Masao Mutoh <mutoh@highway.ne.jp>
|
13
|
+
|
14
|
+
* lib/gettext/rmsgfmt.rb, string.rb, iconv.rb, utils.rb, rgettext.rb,
|
15
|
+
lib/gettext/parser/*.rb: Apply RDoc.
|
16
|
+
* lib/gettext/version.rb: Increment minor version.
|
17
|
+
|
18
|
+
2006-02-21 Masao Mutoh <mutoh@highway.ne.jp>
|
19
|
+
|
20
|
+
* test/test.bat: Added for Win32.
|
21
|
+
* test/gettext_test_locale.rb: Added Win32 tests.
|
22
|
+
* lib/gettext/locale_win32.rb: Fix problems.
|
23
|
+
* lib/gettext/locale_object.rb: Added Locale::Object#to_win
|
24
|
+
|
25
|
+
2006-02-20 Masao Mutoh <mutoh@highway.ne.jp>
|
26
|
+
|
27
|
+
* src/poparser.ry: Added ignore_fuzzy as the 3rd parameter
|
28
|
+
of GetText::PoParser#parse to parse fuzzy comments.
|
29
|
+
Pointed out by speakillof.
|
30
|
+
* lib/gettext/rmsgmerge.rb: Follow the PoParser change below.
|
31
|
+
* test/gettext_test_locale.rb: Apply Locale.clear.
|
32
|
+
* lib/gettext/locale.rb: Added Locale.clear.
|
33
|
+
|
34
|
+
2006-02-18 Masao Mutoh <mutoh@highway.ne.jp>
|
35
|
+
|
36
|
+
* lib/gettext/locale_cgi.rb: Separate from cgi.rb.
|
37
|
+
* lib/gettext/locale_posix.rb: Rename from locale_default.rb.
|
38
|
+
|
39
|
+
2006-02-16 Masao Mutoh <mutoh@highway.ne.jp>
|
40
|
+
|
41
|
+
* lib/gettext/textdomain.rb: Add comments.
|
42
|
+
* lib/gettext.rb: Apply Locale::Object. Code cleanup. Add RDoc.
|
43
|
+
* test/gettext_test.rb: Apply gettext.rb changes
|
44
|
+
* test/test.sh: Remove OUTPUT_CHARSET setting.
|
45
|
+
|
46
|
+
2006-02-15 Masao Mutoh <mutoh@highway.ne.jp>
|
47
|
+
|
48
|
+
* lib/gettext/locale_win32.rb, locale_default.rb, locale.rb: A first argument
|
49
|
+
of Locale::System.get_charset becomes Locale::Object.
|
50
|
+
* lib/gettext/textdomain.rb: Apply Locale::Object, Code cleanup.
|
51
|
+
* lib/gettext.rb: Add GetText.add_default_locale_path.
|
52
|
+
* lib/gettext/locale_object.rb: Add Locale::Object#==.
|
53
|
+
* lib/gettext/textdomain.rb: Add GetText::TextDomain.add_default_locale_path.
|
54
|
+
Pointed out at Bug#3510.
|
55
|
+
|
56
|
+
2006-02-14 Masao Mutoh <mutoh@highway.ne.jp>
|
57
|
+
|
58
|
+
* Rakefile: Fix compilation problems on mswin32.
|
59
|
+
* ext/gettext/locale_system.c: locale_id returns language ID not LCID.
|
60
|
+
|
61
|
+
2006-02-13 Masao Mutoh <mutoh@highway.ne.jp>
|
62
|
+
|
63
|
+
* lib/gettext/locale_table_win32.rb: Replace the table and add charset info.
|
64
|
+
* lib/gettext/locale_win32.rb: ditto.
|
65
|
+
|
66
|
+
2006-02-10 Masao Mutoh <mutoh@highway.ne.jp>
|
67
|
+
|
68
|
+
* lib/gettext/locale_object.rb: Add script, sort_order properties.
|
69
|
+
|
70
|
+
2006-02-09 Masao Mutoh <mutoh@highway.ne.jp>
|
71
|
+
|
72
|
+
* test/gettext_test_locale.rb: Added modifier test.
|
73
|
+
* lib/gettext/locale_object.rb: Added to parse modifier.
|
74
|
+
* lib/gettext/locale.rb: Fixed bug of Locale#set_current.
|
75
|
+
* test/gettext_test_cgi.rb: Added tests.
|
76
|
+
* lib/gettext/cgi.rb: Apply RDoc.
|
77
|
+
* lib/gettext/locale_default.rb, locale.rb: Modify RDoc.
|
78
|
+
* lib/gettext/locale_win32.rb: Imprement pseudo Locale::System.get_charset().
|
79
|
+
|
80
|
+
2006-02-07 Masao Mutoh <mutoh@highway.ne.jp>
|
81
|
+
|
82
|
+
* test/gettext_test_locale.rb: Added for new Locale.
|
83
|
+
* lib/gettext/locale.rb: Refactored. Follow to support Locale::Object.
|
84
|
+
Add Locale.set_default, .default=, .system, .default, .current,
|
85
|
+
.set_current, .current=, .current_charset. Reimplemented .get/.set.
|
86
|
+
Locale.set(loctype, localestr) is deprecated. Use Locale.set(localestr) instead.
|
87
|
+
Locale.setlocale(loctype, localestr) is deprecated. Use Locale.set(localestr) instead.
|
88
|
+
Locale.get(loctype) is deprecated. Use Locale.get instead.
|
89
|
+
|
90
|
+
2006-02-05 Masao Mutoh <mutoh@highway.ne.jp>
|
91
|
+
|
92
|
+
* test/test_rubyparser_n_.rb: Rename from test/test_rubyparser_n.rb.
|
93
|
+
This has a problem on Windows with test/test_rubyparser_N.rb.
|
94
|
+
|
95
|
+
2006-02-04 Masao Mutoh <mutoh@highway.ne.jp>
|
96
|
+
|
97
|
+
* pre-setup.rb: Remove previous installed files first.
|
98
|
+
* ext/gettext/gettext: Removed.
|
99
|
+
* ext/gettext/locale_system.c: Added as Accessor to system(win32/posix).
|
100
|
+
(Move from ext/gettext/gettext/_locale.c)
|
101
|
+
* ext/gettext/extconf.rb: ditto.
|
102
|
+
* lib/gettext/locale_default.rb: Follow above changes. Apply RDoc.
|
103
|
+
* lib/gettext/locale_win32.rb: Follow above changes. Apply RDoc.
|
104
|
+
* lib/gettext/locale.rb: Code cleanup. Apply RDoc.
|
105
|
+
* lib/gettext/locale_object.rb: Added Locale::Object. Apply RDoc.
|
106
|
+
* setup.rb: Update to 3.4.1.
|
107
|
+
|
108
|
+
2006-01-25 Masao Mutoh <mutoh@highway.ne.jp>
|
109
|
+
|
110
|
+
* lib/gettext/rmsgmerge.rb: Fixed bugs.
|
111
|
+
Follow the comment messages to GNU GetText. By speakillof.
|
112
|
+
|
113
|
+
2006-01-20 Masao Mutoh <mutoh@highway.ne.jp>
|
114
|
+
|
115
|
+
* lib/gettext/rails.rb: Added ActiveRecord::Base#error_message_(title|explanation).
|
116
|
+
Reimplement ActionView::Helpers::ActiveRecordHelper::L10n.error_messages_for to
|
117
|
+
separate error_message_(title|explanation) to be able to be overrided by user.
|
118
|
+
The idea is from Trung Tran.
|
119
|
+
* samples/rails/app/models/article.rb: Add a sample of
|
120
|
+
ActiveRecord::Base#error_message_(title|explanation).
|
121
|
+
|
122
|
+
2006-01-19 Masao Mutoh <mutoh@highway.ne.jp>
|
123
|
+
|
124
|
+
* lib/gettext.rb: n_() accepts first arguments as an Array([msgid, msgid_plural]).
|
125
|
+
* test/gettext_test.rb: Add tests for n_(ary, n), Nn_().
|
126
|
+
* lib/gettext/parser/ruby.rb: Added Nn_() is same purpose with N_, but for n_.
|
127
|
+
* lib/gettext.rb: Added Nn_(msgid, msgid_plural).
|
128
|
+
|
1
129
|
2006-01-14 Masao Mutoh <mutoh@highway.ne.jp>
|
2
130
|
|
3
131
|
* samples/rails/po/*/blog.po: Updated.
|
data/NEWS
CHANGED
@@ -1,3 +1,13 @@
|
|
1
|
+
= Ruby-GetText-Package-1.2.0 (2006-02-23)
|
2
|
+
|
3
|
+
* Re-implement Locale module and Implements Locale::Object,
|
4
|
+
Locale::System, etc.
|
5
|
+
* Fix bugs.
|
6
|
+
* Apply RDoc (not complete)
|
7
|
+
* Improve to support Ruby on Rails.
|
8
|
+
* Add GetText.Nn_.
|
9
|
+
* Add rmsgmerge (Experimental)
|
10
|
+
|
1
11
|
= Ruby-GetText-Package-1.1.1 (2006-01-14)
|
2
12
|
|
3
13
|
* Bugfixes.
|
data/README
CHANGED
@@ -4,8 +4,12 @@ Ruby-Gettext-Package
|
|
4
4
|
Ruby-GetText-Package is a Localization(L10n) library and tools
|
5
5
|
which modeled after GNU gettext package.
|
6
6
|
|
7
|
-
|
8
|
-
client-side locale information(environment
|
7
|
+
This library provides to translate original messages to localized
|
8
|
+
messages properly using client-side locale information(environment
|
9
|
+
variable or CGI variable).
|
10
|
+
|
11
|
+
And the tools for developers support to create, use, and modify
|
12
|
+
localized message files(message catalogs) easily.
|
9
13
|
|
10
14
|
Features:
|
11
15
|
|
@@ -36,7 +40,9 @@ Ruby-Gettext-Package
|
|
36
40
|
Requirements
|
37
41
|
------------
|
38
42
|
|
39
|
-
* Ruby 1.8.
|
43
|
+
* Ruby 1.8.3 or later <http://www.ruby-lang.org/ja/>
|
44
|
+
|
45
|
+
(options)
|
40
46
|
* GNU gettext 0.10.35 or later
|
41
47
|
<http://www.gnu.org/software/gettext/gettext.html>
|
42
48
|
(for Development only)
|
@@ -66,18 +72,13 @@ Usage
|
|
66
72
|
|
67
73
|
If you are developer of the application which depends on this library,
|
68
74
|
see:
|
69
|
-
http://gettext.rubyforge.org/
|
70
|
-
http://gettext.rubyforge.org/ja/ (Japanese)
|
71
|
-
|
75
|
+
http://gettext.rubyforge.org/
|
72
76
|
|
73
77
|
License
|
74
78
|
-------
|
75
79
|
This program is licenced under the same licence as Ruby.
|
76
80
|
(See the file 'COPYING'.)
|
77
81
|
|
78
|
-
* Ruby-GetText-Package
|
79
|
-
Copyright (C) 2001-2006 Masao Mutoh <mutoh@highwhay.ne.jp>
|
80
|
-
|
81
82
|
* mo.rb
|
82
83
|
Copyright (C) 2001-2004 Masao Mutoh <mutoh@highwhay.ne.jp>
|
83
84
|
Copyright (C) 2001,2002 Masahiro Sakai <s01397ms@sfc.keio.ac.jp>
|
@@ -90,11 +91,8 @@ License
|
|
90
91
|
Copyright (C) 2001-2005 Masao Mutoh <mutoh@highwhay.ne.jp>
|
91
92
|
Copyright (C) 2001,2002 Yasushi Shoji <yashi@yashi.com>
|
92
93
|
|
93
|
-
* rmsgfmt
|
94
|
-
Copyright (C) 2003,2005 Masao Mutoh <mutoh@highwhay.ne.jp>
|
95
|
-
|
96
94
|
* setup.rb
|
97
|
-
Copyright (C) 2000-
|
95
|
+
Copyright (C) 2000-2005 Minero Aoki <aamine@loveruby.net>
|
98
96
|
This file is released under LGPL. See the top of the install.rb.
|
99
97
|
|
100
98
|
* Others
|
@@ -120,18 +118,18 @@ Swedish - Nikolai Weibull <mailing-lists.ruby-talk at rawuncut.elitem
|
|
120
118
|
|
121
119
|
Status of translations
|
122
120
|
----------------------
|
123
|
-
cs - 1.
|
124
|
-
fr - 1.
|
125
|
-
de - 1.
|
126
|
-
el - 1.
|
127
|
-
es - 1.
|
121
|
+
cs - 1.2.0
|
122
|
+
fr - 1.2.0
|
123
|
+
de - 1.2.0
|
124
|
+
el - 1.2.0
|
125
|
+
es - 1.2.0
|
128
126
|
it - 1.0.0
|
129
|
-
ja - 1.
|
130
|
-
ko - 1.
|
131
|
-
nl - 1.
|
132
|
-
pt_BR - 1.
|
127
|
+
ja - 1.2.0
|
128
|
+
ko - 1.2.0
|
129
|
+
nl - 1.2.0
|
130
|
+
pt_BR - 1.2.0
|
133
131
|
sv - 0.8.0
|
134
132
|
|
135
133
|
Maintainer
|
136
134
|
----------
|
137
|
-
Masao Mutoh<mutoh@highway.ne.jp>
|
135
|
+
Masao Mutoh <mutoh@highway.ne.jp>
|
data/Rakefile
CHANGED
@@ -11,6 +11,7 @@
|
|
11
11
|
#
|
12
12
|
|
13
13
|
$:.unshift "./lib"
|
14
|
+
$:.unshift "./ext/gettext"
|
14
15
|
|
15
16
|
require 'rubygems'
|
16
17
|
require 'rake'
|
@@ -57,16 +58,24 @@ EOS
|
|
57
58
|
file.close
|
58
59
|
tmpfile.close
|
59
60
|
File.delete("src/poparser.tmp.rb")
|
60
|
-
|
61
|
+
$stderr.puts "Create #{poparser_path}."
|
62
|
+
require 'gettext/utils'
|
61
63
|
end
|
62
64
|
end
|
63
65
|
|
64
66
|
############################################################
|
65
67
|
# Manage po/mo files
|
66
68
|
############################################################
|
67
|
-
|
69
|
+
begin
|
70
|
+
require 'gettext'
|
71
|
+
require 'gettext/poparser'
|
72
|
+
require 'gettext/utils'
|
73
|
+
rescue LoadError
|
74
|
+
puts "gettext/poparser was not found."
|
75
|
+
end
|
68
76
|
|
69
77
|
task :makemo_test do
|
78
|
+
require 'gettext/utils'
|
70
79
|
$stderr.puts "Create test mo files."
|
71
80
|
GetText.create_mofiles(false, "test/po", "test/locale")
|
72
81
|
end
|
@@ -74,7 +83,7 @@ end
|
|
74
83
|
desc "Create *.mo from *.po"
|
75
84
|
task :makemo => [:poparser, :makemo_test] do
|
76
85
|
$stderr.puts "Create rgettext/rmsgfmt mo files."
|
77
|
-
GetText.create_mofiles(
|
86
|
+
GetText.create_mofiles(false)
|
78
87
|
|
79
88
|
$stderr.puts "Create samples mo files."
|
80
89
|
GetText.create_mofiles(false, "samples/po", "samples/locale")
|
@@ -126,27 +135,38 @@ end
|
|
126
135
|
############################################################
|
127
136
|
# Package tasks
|
128
137
|
############################################################
|
138
|
+
|
139
|
+
if /mswin32/ =~ RUBY_PLATFORM
|
140
|
+
task :gem => [:mswin32so]
|
141
|
+
task :mswin32so do
|
142
|
+
FileUtils.cd 'ext/gettext' do
|
143
|
+
system "#{RUBYBIN} extconf.rb"
|
144
|
+
system "nmake"
|
145
|
+
FileUtils.cp 'locale_system.so', '../../lib/'
|
146
|
+
end
|
147
|
+
end
|
148
|
+
end
|
149
|
+
|
129
150
|
desc "Create gem and tar.gz"
|
130
151
|
spec = Gem::Specification.new do |s|
|
131
152
|
s.name = 'gettext'
|
132
153
|
s.version = PKG_VERSION
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
154
|
+
|
155
|
+
if /mswin32|mingw/ =~ RUBY_PLATFORM
|
156
|
+
s.platform = Gem::Platform::WIN32
|
157
|
+
else
|
158
|
+
s.extensions << "ext/gettext/extconf.rb"
|
159
|
+
s.extensions.concat Dir.glob('**/extconf.rb')
|
139
160
|
end
|
140
|
-
|
141
|
-
s.
|
142
|
-
s.extensions.concat Dir.glob('**/extconf.rb')
|
143
|
-
end
|
144
|
-
s.summary = 'Ruby-GetText-Package is Native Language Support Library and Tools which modeled after GNU gettext package.'
|
161
|
+
|
162
|
+
s.summary = 'Ruby-GetText-Package is a libary and tools to localize messages.'
|
145
163
|
s.author = 'Masao Mutoh'
|
146
164
|
s.email = 'mutoh@highway.ne.jp'
|
147
|
-
s.homepage = 'http://
|
165
|
+
s.homepage = 'http://www.yotabanana.com/hiki/ruby-gettext.html'
|
148
166
|
s.rubyforge_project = "gettext"
|
149
|
-
|
167
|
+
files = FileList['**/*'].to_a.select{|v| v !~ /pkg|CVS/}
|
168
|
+
files << "lib/locale_system.so" if /mswin32/ =~ RUBY_PLATFORM
|
169
|
+
s.files = files
|
150
170
|
s.require_path = 'lib'
|
151
171
|
s.executables = Dir.entries('bin').delete_if {|item| /^\.|CVS|~$/ =~ item }
|
152
172
|
s.bindir = 'bin'
|
@@ -158,10 +178,10 @@ end
|
|
158
178
|
end
|
159
179
|
|
160
180
|
unless /mswin32/ =~ RUBY_PLATFORM
|
161
|
-
Rake::PackageTask.new("ruby-gettext-package", PKG_VERSION) do |
|
162
|
-
|
163
|
-
|
164
|
-
|
181
|
+
Rake::PackageTask.new("ruby-gettext-package", PKG_VERSION) do |o|
|
182
|
+
o.package_files = FileList['**/*'].to_a.select{|v| v !~ /pkg|CVS/}
|
183
|
+
o.need_tar_gz = true
|
184
|
+
o.need_zip = false
|
165
185
|
end
|
166
186
|
end
|
167
187
|
|
@@ -171,7 +191,6 @@ Rake::GemPackageTask.new(spec) do |p|
|
|
171
191
|
p.need_zip = false
|
172
192
|
end
|
173
193
|
|
174
|
-
|
175
194
|
############################################################
|
176
195
|
# Misc tasks
|
177
196
|
############################################################
|
data/bin/rgettext
CHANGED
data/bin/rmsgfmt
CHANGED
data/bin/rmsgmerge
CHANGED
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
@@ -37,7 +37,7 @@ LIBRUBYARG_SHARED = $(LIBRUBY)
|
|
37
37
|
LIBRUBYARG_STATIC = $(LIBRUBY_A)
|
38
38
|
|
39
39
|
CFLAGS = -MD -Zi -O2b2xg- -G6
|
40
|
-
CPPFLAGS = -I. -I$(topdir) -I$(hdrdir) -I$(srcdir)
|
40
|
+
CPPFLAGS = -I. -I$(topdir) -I$(hdrdir) -I$(srcdir) -I. -I./.. -I./../missing
|
41
41
|
CXXFLAGS = $(CFLAGS)
|
42
42
|
DLDFLAGS = -link -incremental:no -debug -opt:ref -opt:icf -dll $(LIBPATH) -def:$(DEFFILE)
|
43
43
|
LDSHARED = cl -nologo -LD
|
@@ -68,8 +68,8 @@ DISTCLEANFILES = $(DEFFILE)
|
|
68
68
|
target_prefix =
|
69
69
|
LOCAL_LIBS =
|
70
70
|
LIBS = $(LIBRUBYARG_SHARED) oldnames.lib user32.lib advapi32.lib wsock32.lib
|
71
|
-
OBJS =
|
72
|
-
TARGET =
|
71
|
+
OBJS = locale_system.obj
|
72
|
+
TARGET = locale_system
|
73
73
|
DLLIB = $(TARGET).so
|
74
74
|
STATIC_LIB = $(TARGET).lib
|
75
75
|
|