gettext 1.6.0-mswin32 → 1.7.0-mswin32

Sign up to get free protection for your applications and to get access to all the features.
Files changed (104) hide show
  1. data/ChangeLog +65 -0
  2. data/NEWS +20 -0
  3. data/README +9 -9
  4. data/Rakefile +4 -4
  5. data/data/locale/cs/LC_MESSAGES/rails.mo +0 -0
  6. data/data/locale/cs/LC_MESSAGES/rgettext.mo +0 -0
  7. data/data/locale/de/LC_MESSAGES/rails.mo +0 -0
  8. data/data/locale/de/LC_MESSAGES/rgettext.mo +0 -0
  9. data/data/locale/el/LC_MESSAGES/rails.mo +0 -0
  10. data/data/locale/el/LC_MESSAGES/rgettext.mo +0 -0
  11. data/data/locale/es/LC_MESSAGES/rails.mo +0 -0
  12. data/data/locale/es/LC_MESSAGES/rgettext.mo +0 -0
  13. data/data/locale/fr/LC_MESSAGES/rails.mo +0 -0
  14. data/data/locale/fr/LC_MESSAGES/rgettext.mo +0 -0
  15. data/data/locale/it/LC_MESSAGES/rails.mo +0 -0
  16. data/data/locale/it/LC_MESSAGES/rgettext.mo +0 -0
  17. data/data/locale/ja/LC_MESSAGES/rails.mo +0 -0
  18. data/data/locale/ja/LC_MESSAGES/rgettext.mo +0 -0
  19. data/data/locale/ko/LC_MESSAGES/rails.mo +0 -0
  20. data/data/locale/ko/LC_MESSAGES/rgettext.mo +0 -0
  21. data/data/locale/nl/LC_MESSAGES/rails.mo +0 -0
  22. data/data/locale/nl/LC_MESSAGES/rgettext.mo +0 -0
  23. data/data/locale/pt_BR/LC_MESSAGES/rails.mo +0 -0
  24. data/data/locale/pt_BR/LC_MESSAGES/rgettext.mo +0 -0
  25. data/data/locale/ru/LC_MESSAGES/rails.mo +0 -0
  26. data/data/locale/ru/LC_MESSAGES/rgettext.mo +0 -0
  27. data/data/locale/sv/LC_MESSAGES/rgettext.mo +0 -0
  28. data/data/locale/zh/LC_MESSAGES/rails.mo +0 -0
  29. data/data/locale/zh/LC_MESSAGES/rgettext.mo +0 -0
  30. data/ext/gettext/Makefile +178 -0
  31. data/ext/gettext/locale_system-i386-mswin32.def +2 -0
  32. data/ext/gettext/locale_system-i386-mswin32.exp +0 -0
  33. data/ext/gettext/locale_system-i386-mswin32.lib +0 -0
  34. data/ext/gettext/locale_system-i386-mswin32.pdb +0 -0
  35. data/ext/gettext/locale_system.obj +0 -0
  36. data/ext/gettext/locale_system.so +0 -0
  37. data/ext/gettext/mkmf.log +16 -0
  38. data/ext/gettext/vc70.pdb +0 -0
  39. data/lib/gettext.rb +38 -12
  40. data/lib/gettext/container.rb +2 -2
  41. data/lib/gettext/iconv.rb +2 -2
  42. data/lib/gettext/locale_cgi.rb +3 -2
  43. data/lib/gettext/locale_object.rb +8 -8
  44. data/lib/gettext/locale_posix.rb +2 -2
  45. data/lib/gettext/locale_table_win32.rb +3 -3
  46. data/lib/gettext/locale_win32.rb +2 -2
  47. data/lib/gettext/mo.rb +5 -2
  48. data/lib/gettext/parser/activerecord.rb +27 -17
  49. data/lib/gettext/parser/glade.rb +7 -11
  50. data/lib/gettext/parser/ruby.rb +2 -3
  51. data/lib/gettext/poparser.rb +298 -298
  52. data/lib/gettext/rails.rb +220 -85
  53. data/lib/gettext/rgettext.rb +2 -2
  54. data/lib/gettext/rmsgfmt.rb +3 -3
  55. data/lib/gettext/rmsgmerge.rb +2 -2
  56. data/lib/gettext/string.rb +2 -1
  57. data/lib/gettext/textdomain.rb +5 -2
  58. data/lib/gettext/textdomainmanager.rb +3 -3
  59. data/lib/gettext/version.rb +1 -1
  60. data/lib/locale_system.so +0 -0
  61. data/po/cs/rails.po +63 -22
  62. data/po/cs/rgettext.po +71 -37
  63. data/po/de/rails.po +54 -16
  64. data/po/de/rgettext.po +56 -22
  65. data/po/el/rails.po +54 -16
  66. data/po/el/rgettext.po +56 -22
  67. data/po/es/rails.po +57 -20
  68. data/po/es/rgettext.po +70 -30
  69. data/po/fr/rails.po +57 -19
  70. data/po/fr/rgettext.po +61 -25
  71. data/po/it/rails.po +54 -16
  72. data/po/it/rgettext.po +56 -22
  73. data/po/ja/rails.po +55 -18
  74. data/po/ja/rgettext.po +58 -24
  75. data/po/ko/rails.po +68 -33
  76. data/po/ko/rgettext.po +77 -37
  77. data/po/nl/rails.po +61 -22
  78. data/po/nl/rgettext.po +72 -36
  79. data/po/pt_BR/rails.po +54 -16
  80. data/po/pt_BR/rgettext.po +56 -22
  81. data/po/rails.pot +54 -16
  82. data/po/rgettext.pot +55 -21
  83. data/po/ru/rails.po +68 -26
  84. data/po/ru/rgettext.po +70 -30
  85. data/po/sv/rgettext.po +55 -21
  86. data/po/zh/rails.po +51 -16
  87. data/po/zh/rgettext.po +59 -23
  88. data/samples/rails/app/controllers/application.rb +7 -1
  89. data/samples/rails/app/models/article.rb +0 -6
  90. data/samples/rails/locale/cs/LC_MESSAGES/gettext_plugin.mo +0 -0
  91. data/samples/rails/locale/de/LC_MESSAGES/gettext_plugin.mo +0 -0
  92. data/samples/rails/locale/el/LC_MESSAGES/gettext_plugin.mo +0 -0
  93. data/samples/rails/locale/es/LC_MESSAGES/gettext_plugin.mo +0 -0
  94. data/samples/rails/locale/fr/LC_MESSAGES/gettext_plugin.mo +0 -0
  95. data/samples/rails/locale/ja/LC_MESSAGES/gettext_plugin.mo +0 -0
  96. data/samples/rails/locale/ko/LC_MESSAGES/gettext_plugin.mo +0 -0
  97. data/samples/rails/locale/nl/LC_MESSAGES/gettext_plugin.mo +0 -0
  98. data/samples/rails/locale/pt_BR/LC_MESSAGES/gettext_plugin.mo +0 -0
  99. data/samples/rails/locale/ru/LC_MESSAGES/gettext_plugin.mo +0 -0
  100. data/src/poparser.ry +1 -1
  101. data/test/gettext_test.rb +1 -1
  102. data/test/gettext_test_parser.rb +0 -1
  103. data/test/test_rubyparser.rb +0 -11
  104. metadata +21 -7
data/ChangeLog CHANGED
@@ -1,3 +1,68 @@
1
+ 2006-07-16 Masao Mutoh <mutoh@highway.ne.jp>
2
+
3
+ * lib/gettext/rails.rb: Code cleanup.
4
+ ActiveRecord::Base.set_error_message_(title|explanation) have been deprecated.
5
+ Use ActionView::Helpers::ActiveRecordHelper::L10n.set_error_message_(title|explanation)
6
+ instead. Suggested by Kouhei Sutou
7
+ * po/zh/rails.po, rgettext.po: Updated by Yingfeng.
8
+ * NEWS: Updated.
9
+
10
+ 2006-07-15 Masao Mutoh <mutoh@highway.ne.jp>
11
+
12
+ * lib/gettext/rails.rb: Localize ActiveRecord::Errors#on.
13
+ Now error_message_on is localized.
14
+ Reported by kdmsnr.
15
+
16
+ 2006-07-14 Masao Mutoh <mutoh@highway.ne.jp>
17
+
18
+ * lib/gettext/parser/activerecord.rb: Add "untranslate" feature.
19
+ * lib/gettext/rails.rb: ditto. Add ActiveRecord::Base.untranslate
20
+ .untranslate_all, .unstranslate?
21
+ The idea is from Gyoung-Yoon Noh.
22
+
23
+ 2006-07-13 Masao Mutoh <mutoh@highway.ne.jp>
24
+
25
+ * po/nl/rails.po, rgettext.po: Updated by Menno Jonkers.
26
+ * lib/gettext/rails.rb: Support ActiveRecord::Migration.
27
+ Suggested by OZAWA Sakuro.
28
+
29
+ 2006-07-12 Masao Mutoh <mutoh@highway.ne.jp>
30
+
31
+ * po/ko/rails.po, rgettext.po: Updated by Gyoung-Yoon Noh.
32
+
33
+ 2006-07-11 Masao Mutoh <mutoh@highway.ne.jp>
34
+
35
+ * po/ru/rails.po, rgettext.po: Updated by Yuri Kozlov.
36
+ * po/fr/rails.po, rgettext.po: Updated by Laurent Sansonetti.
37
+ * po/cs/rails.po, rgettext.po: Updated by Karel Miarka.
38
+
39
+ 2006-07-09 Masao Mutoh <mutoh@highway.ne.jp>
40
+
41
+ * po/es/rails.po, rgettext.po: Updated by David Espada.
42
+ * lib/gettext/rails.rb: Increment minor version.
43
+ * README: Updated.
44
+
45
+ 2006-06-14 Masao Mutoh <mutoh@highway.ne.jp>
46
+
47
+ * lib/gettext/rails.rb: Fix a problem N_() isn't found in
48
+ ActiveRecord. Reported by arton.
49
+
50
+ 2006-06-12 Masao Mutoh <mutoh@highway.ne.jp>
51
+
52
+ * lib/gettext/parser/glade.rb: Show error message correctly.
53
+ * Rakefile: Added src/poparse.ry as the target for updatepo.
54
+ * po/rgettext.pot, po/*/rgettext.po: Updated.
55
+
56
+ 2006-06-11 Masao Mutoh <mutoh@highway.ne.jp>
57
+
58
+ * lib/gettext/parser/ruby.rb: Fixed to extract duplicated messages when "\n"
59
+ was used in msgid.
60
+ * lib/gettext/rails.rb, po/rails.pot, po/*/rails.po: Localize
61
+ ActionView::Helpers::DateHelper.distance_of_time_in_words.
62
+ * lib/gettext.rb: Added GetText.current_textdomain_info for debuging.
63
+ * lib/gettext/textdomain.rb: Break if the first mo-file found.
64
+ * lib/gettext/mo.rb: Added to accessor(r) to filename.
65
+
1
66
  2006-06-09 Masao Mutoh <mutoh@highway.ne.jp>
2
67
 
3
68
  * samples/*.rb, samples/po/*: Code cleanup 2.
data/NEWS CHANGED
@@ -1,3 +1,23 @@
1
+ = Ruby-GetText-Package-1.7.0 (2006-07-17)
2
+
3
+ * GetText.current_textdomain_info for debuging
4
+ * Fixed bugs, code cleanup.
5
+ * Update translations
6
+ * Chinese(zh), Czech(cs), Dutch(nl), English(default), French(fr)
7
+ Spanish(es), Japanese(ja), Korean(ko), Russian(ru)
8
+ * Improve to support Ruby on Rails
9
+ * Localize ActionView::Helpers::DateHelper.distance_of_time_in_words.
10
+ * Localize #error_message_on.
11
+ * Add ActiveRecord::Base.untranslate, .untranslate_all to prevend to
12
+ translate columns.
13
+
14
+ Thanks to:
15
+ Translators:
16
+ David Espada, Karel Miarka, Laurent Sansonetti, Yuri Kozlov,
17
+ Gyoung-Yoon Noh, Menno Jonkers, Yingfeng
18
+ Bug reports and suggestions:
19
+ arton, OZAWA Sakuro, kdmsnr, Kouhei Sutou
20
+
1
21
  = Ruby-GetText-Package-1.6.0 (2006-06-09)
2
22
 
3
23
  * Support Chinese(zh_CN), Italian(it).
data/README CHANGED
@@ -128,19 +128,19 @@ Swedish(sv) - Nikolai Weibull <mailing-lists.ruby-talk at rawuncu
128
128
 
129
129
  Status of translations
130
130
  ----------------------
131
- Chinese(zh) - 1.6.0
132
- Czech(cs) - 1.6.0
133
- Dutch(nl) - 1.6.0
134
- English(default) - 1.6.0
135
- French(fr) - 1.6.0
131
+ Chinese(zh) - 1.7.0
132
+ Czech(cs) - 1.7.0
133
+ Dutch(nl) - 1.7.0
134
+ English(default) - 1.7.0
135
+ French(fr) - 1.7.0
136
136
  German(de) - 1.6.0
137
137
  Greek(el) - 1.6.0
138
- Spanish(es) - 1.6.0
138
+ Spanish(es) - 1.7.0
139
139
  Italian(it) - 1.6.0
140
- Japanese(ja) - 1.6.0
141
- Korean(ko) - 1.6.0
140
+ Japanese(ja) - 1.7.0
141
+ Korean(ko) - 1.7.0
142
142
  Portuguese(Brazil)(pt_BR) - 1.6.0
143
- Russian(ru) - 1.6.0
143
+ Russian(ru) - 1.7.0
144
144
  Swedish(sv) - 0.8.0 (old)
145
145
 
146
146
  Maintainer
data/Rakefile CHANGED
@@ -82,7 +82,7 @@ end
82
82
 
83
83
  desc "Create *.mo from *.po"
84
84
  task :makemo => [:makemo_test] do
85
- $stderr.puts "Create rgettext/rmsgfmt mo files."
85
+ $stderr.puts "Create rgettext/rails mo files."
86
86
  mkdir_p "samples/rails/log" unless FileTest.exist? "samples/rails/log"
87
87
 
88
88
  GetText.create_mofiles(false)
@@ -104,7 +104,7 @@ desc "Update pot/po files to match new version."
104
104
  task :updatepo do
105
105
  #lib/gettext/*.rb -> rgettext.po
106
106
  GetText.update_pofiles("rgettext",
107
- Dir.glob("lib/**/*.rb") - ["lib/gettext/rails.rb"],
107
+ Dir.glob("lib/**/*.rb") + ["src/poparser.ry"] - ["lib/gettext/rails.rb"],
108
108
  "ruby-gettext #{GetText::VERSION}")
109
109
 
110
110
  #lib/gettext/rails.rb -> rails.po
@@ -139,7 +139,7 @@ end
139
139
  ############################################################
140
140
  # Package tasks
141
141
  ############################################################
142
- =begin
142
+
143
143
  if /mswin32/ =~ RUBY_PLATFORM
144
144
  task :gem => [:mswin32so]
145
145
  task :mswin32so do
@@ -150,7 +150,7 @@ if /mswin32/ =~ RUBY_PLATFORM
150
150
  end
151
151
  end
152
152
  end
153
- =end
153
+
154
154
  desc "Create gem and tar.gz"
155
155
  spec = Gem::Specification.new do |s|
156
156
  s.name = 'gettext'
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
Binary file
Binary file
Binary file
Binary file
@@ -0,0 +1,178 @@
1
+
2
+ SHELL = /bin/sh
3
+
4
+ #### Start of system configuration section. ####
5
+
6
+ srcdir = .
7
+ topdir = e:/ruby/lib/ruby/1.8/i386-mswin32
8
+ hdrdir = $(topdir)
9
+ VPATH = $(srcdir);$(topdir);$(hdrdir)
10
+
11
+ DESTDIR = e:
12
+ prefix = $(DESTDIR)/ruby
13
+ exec_prefix = $(prefix)
14
+ sitedir = $(prefix)/lib/ruby/site_ruby
15
+ rubylibdir = $(libdir)/ruby/$(ruby_version)
16
+ top_srcdir = $(DESTDIR)/develop/win/ruby/ruby-1.8.4
17
+ archdir = $(rubylibdir)/$(arch)
18
+ sbindir = $(exec_prefix)/sbin
19
+ datadir = $(prefix)/share
20
+ includedir = $(prefix)/include
21
+ infodir = $(prefix)/info
22
+ sysconfdir = $(prefix)/etc
23
+ mandir = $(prefix)/man
24
+ libdir = $(exec_prefix)/lib
25
+ sharedstatedir = $(DESTDIR)/etc
26
+ oldincludedir = $(DESTDIR)/usr/include
27
+ sitearchdir = $(sitelibdir)/$(sitearch)
28
+ localstatedir = $(DESTDIR)/var
29
+ bindir = $(exec_prefix)/bin
30
+ sitelibdir = $(sitedir)/$(ruby_version)
31
+ libexecdir = $(exec_prefix)/libexec
32
+
33
+ CC = cl -nologo
34
+ LIBRUBY = $(RUBY_SO_NAME).lib
35
+ LIBRUBY_A = $(RUBY_SO_NAME)-static.lib
36
+ LIBRUBYARG_SHARED = $(LIBRUBY)
37
+ LIBRUBYARG_STATIC = $(LIBRUBY_A)
38
+
39
+ CFLAGS = -MD -Zi -O2b2xg- -G6
40
+ CPPFLAGS = -I. -I$(topdir) -I$(hdrdir) -I$(srcdir) -DHAVE_WINDOWS_H
41
+ CXXFLAGS = $(CFLAGS)
42
+ DLDFLAGS = -link -incremental:no -debug -opt:ref -opt:icf -dll $(LIBPATH) -def:$(DEFFILE) -implib:$(*F:.so=)-$(arch).lib -pdb:$(*F:.so=)-$(arch).pdb
43
+ LDSHARED = cl -nologo -LD
44
+ AR = lib -nologo
45
+ EXEEXT = .exe
46
+
47
+ RUBY_INSTALL_NAME = ruby
48
+ RUBY_SO_NAME = msvcrt-ruby18
49
+ arch = i386-mswin32
50
+ sitearch = i386-msvcrt
51
+ ruby_version = 1.8
52
+ ruby = e:/ruby/bin/ruby
53
+ RUBY = $(ruby:/=\)
54
+ RM = $(RUBY) -run -e rm -- -f
55
+ MAKEDIRS = @$(RUBY) -run -e mkdir -- -p
56
+ INSTALL = copy > nul
57
+ INSTALL_PROG = $(INSTALL)
58
+ INSTALL_DATA = $(INSTALL)
59
+ COPY = copy > nul
60
+
61
+ #### End of system configuration section. ####
62
+
63
+ preload =
64
+
65
+ libpath = $(libdir)
66
+ LIBPATH = -libpath:"$(libdir)"
67
+ DEFFILE = $(TARGET)-$(arch).def
68
+
69
+ CLEANFILES =
70
+ DISTCLEANFILES = vc*.pdb $(DEFFILE)
71
+
72
+ extout =
73
+ extout_prefix =
74
+ target_prefix =
75
+ LOCAL_LIBS =
76
+ LIBS = $(LIBRUBYARG_SHARED) oldnames.lib user32.lib advapi32.lib wsock32.lib
77
+ SRCS = locale_system.c
78
+ OBJS = locale_system.obj
79
+ TARGET = locale_system
80
+ DLLIB = $(TARGET).so
81
+ STATIC_LIB =
82
+
83
+ RUBYCOMMONDIR = $(sitedir)$(target_prefix)
84
+ RUBYLIBDIR = $(sitelibdir)$(target_prefix)
85
+ RUBYARCHDIR = $(sitearchdir)$(target_prefix)
86
+
87
+ TARGET_SO = $(DLLIB)
88
+ CLEANLIBS = $(TARGET).so $(TARGET).il? $(TARGET).tds $(TARGET).map
89
+ CLEANOBJS = *.obj *.lib *.s[ol] *.pdb *.exp *.bak
90
+
91
+ all: $(DLLIB)
92
+ static: $(STATIC_LIB)
93
+
94
+ clean:
95
+ @-$(RM) $(CLEANLIBS:/=\) $(CLEANOBJS:/=\) $(CLEANFILES:/=\)
96
+
97
+ distclean: clean
98
+ @-$(RM) Makefile extconf.h conftest.* mkmf.log
99
+ @-$(RM) core ruby$(EXEEXT) *~ $(DISTCLEANFILES:/=\)
100
+
101
+ realclean: distclean
102
+ install: install-so install-rb
103
+
104
+ install-so: $(RUBYARCHDIR)
105
+ install-so: $(RUBYARCHDIR)/$(DLLIB)
106
+ $(RUBYARCHDIR)/$(DLLIB): $(DLLIB)
107
+ $(INSTALL_PROG) $(DLLIB:/=\) $(RUBYARCHDIR:/=\)
108
+ install-rb: pre-install-rb install-rb-default
109
+ install-rb-default: pre-install-rb-default
110
+ pre-install-rb: Makefile
111
+ pre-install-rb-default: Makefile
112
+ $(RUBYARCHDIR):
113
+ $(MAKEDIRS) $@
114
+
115
+ site-install: site-install-so site-install-rb
116
+ site-install-so: install-so
117
+ site-install-rb: install-rb
118
+
119
+ .SUFFIXES: .c .m .cc .cxx .cpp .obj
120
+
121
+ {$(srcdir)}.cc{}.obj:
122
+ $(CXX) $(CXXFLAGS) $(CPPFLAGS) -c -Tp$(<:\=/)
123
+
124
+ {$(topdir)}.cc{}.obj:
125
+ $(CXX) $(CXXFLAGS) $(CPPFLAGS) -c -Tp$(<:\=/)
126
+
127
+ {$(hdrdir)}.cc{}.obj:
128
+ $(CXX) $(CXXFLAGS) $(CPPFLAGS) -c -Tp$(<:\=/)
129
+
130
+ .cc.obj:
131
+ $(CXX) $(CXXFLAGS) $(CPPFLAGS) -c -Tp$(<:\=/)
132
+
133
+ {$(srcdir)}.cxx{}.obj:
134
+ $(CXX) $(CXXFLAGS) $(CPPFLAGS) -c -Tp$(<:\=/)
135
+
136
+ {$(topdir)}.cxx{}.obj:
137
+ $(CXX) $(CXXFLAGS) $(CPPFLAGS) -c -Tp$(<:\=/)
138
+
139
+ {$(hdrdir)}.cxx{}.obj:
140
+ $(CXX) $(CXXFLAGS) $(CPPFLAGS) -c -Tp$(<:\=/)
141
+
142
+ .cxx.obj:
143
+ $(CXX) $(CXXFLAGS) $(CPPFLAGS) -c -Tp$(<:\=/)
144
+
145
+ {$(srcdir)}.cpp{}.obj:
146
+ $(CXX) $(CXXFLAGS) $(CPPFLAGS) -c -Tp$(<:\=/)
147
+
148
+ {$(topdir)}.cpp{}.obj:
149
+ $(CXX) $(CXXFLAGS) $(CPPFLAGS) -c -Tp$(<:\=/)
150
+
151
+ {$(hdrdir)}.cpp{}.obj:
152
+ $(CXX) $(CXXFLAGS) $(CPPFLAGS) -c -Tp$(<:\=/)
153
+
154
+ .cpp.obj:
155
+ $(CXX) $(CXXFLAGS) $(CPPFLAGS) -c -Tp$(<:\=/)
156
+
157
+ {$(srcdir)}.c{}.obj:
158
+ $(CC) $(CFLAGS) $(CPPFLAGS) -c -Tc$(<:\=/)
159
+
160
+ {$(topdir)}.c{}.obj:
161
+ $(CC) $(CFLAGS) $(CPPFLAGS) -c -Tc$(<:\=/)
162
+
163
+ {$(hdrdir)}.c{}.obj:
164
+ $(CC) $(CFLAGS) $(CPPFLAGS) -c -Tc$(<:\=/)
165
+
166
+ .c.obj:
167
+ $(CC) $(CFLAGS) $(CPPFLAGS) -c -Tc$(<:\=/)
168
+
169
+ $(DLLIB): $(DEFFILE) $(OBJS)
170
+ @-$(RM) $@
171
+ $(LDSHARED) -Fe$(@) $(OBJS) $(LIBS) $(LOCAL_LIBS) $(DLDFLAGS)
172
+
173
+
174
+
175
+ $(DEFFILE):
176
+ $(RUBY) -e "puts 'EXPORTS', 'Init_$(TARGET)'" > $@
177
+
178
+ $(OBJS): {.;$(srcdir);$(topdir);$(hdrdir)}ruby.h {.;$(srcdir);$(topdir);$(hdrdir)}defines.h
@@ -0,0 +1,2 @@
1
+ EXPORTS
2
+ Init_locale_system
Binary file
Binary file
@@ -0,0 +1,16 @@
1
+ have_header: checking for windows.h... -------------------- yes
2
+
3
+ "cl -I. -Ie:/ruby/lib/ruby/1.8/i386-mswin32 -MD -Zi -O2b2xg- -G6 conftest.c -P"
4
+ Microsoft (R) 32-bit C/C++ Standard Compiler Version 13.10.3077 for 80x86
5
+ Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
6
+
7
+ cl : Command line warning D4029 : optimization is not available in the standard edition compiler
8
+ cl : Command line warning D4002 : ignoring unknown option '-Og-'
9
+ conftest.c
10
+ checked program was:
11
+ /* begin */
12
+ #include <windows.h>
13
+ /* end */
14
+
15
+ --------------------
16
+
Binary file
data/lib/gettext.rb CHANGED
@@ -10,7 +10,7 @@
10
10
  You may redistribute it and/or modify it under the same
11
11
  license terms as Ruby.
12
12
 
13
- $Id: gettext.rb,v 1.14 2006/06/07 15:56:04 mutoh Exp $
13
+ $Id: gettext.rb,v 1.15 2006/06/11 15:36:20 mutoh Exp $
14
14
  =end
15
15
 
16
16
  require 'rbconfig'
@@ -31,27 +31,25 @@ module GetText
31
31
 
32
32
  @@__textdomainmanagers = Hash.new
33
33
 
34
+ # call-seq:
35
+ # bindtextdomain(domainname, options = {})
36
+ #
34
37
  # Bind a textdomain(%{path}/%{locale}/LC_MESSAGES/%{domainname}.mo) to your program.
35
38
  # Normally, the texdomain scope becomes a ruby-script-file.
36
39
  # So you need to call this function each ruby-script-files.
37
40
  # On the other hand, if you call this function under GetText::Container
38
- #(gettext/container, gettext/erb, gettext/rails), the textdomain scope becomes a Class/Module.
39
- #
41
+ # (gettext/container, gettext/erb, gettext/rails), the textdomain scope becomes a Class/Module.
40
42
  # * domainname: the textdomain name.
41
43
  # * options: options as an Hash.
42
44
  # * :path - the path to the mo-files. When the value is nil, it will search default paths such as
43
45
  # /usr/share/locale, /usr/local/share/locale)
44
46
  # * :locale - the locale string such as "ja_JP.UTF-8". Generally, you should use GetText.set_locale instead.
45
47
  # The value is searched order by:
46
- #
47
48
  # the value of this value > System default language.
48
- #
49
49
  # * :charset - output charset. This affect the current textdomain only. Generally, you should use GetText.set_output_charset instead.
50
50
  # The value is searched order by:
51
- #
52
51
  # the value of Locale.set_output_charset > ENV["OUTPUT_CHARSET"] > this value > System default charset.
53
52
  # * Returns: the GetText::TextDomain.
54
- #
55
53
  # Note: Don't use locale_, charset argument(not in options).
56
54
  # They are remained for backward compatibility.
57
55
  #
@@ -102,7 +100,7 @@ module GetText
102
100
  # * klass: a class/module to find. Default is the class of self.
103
101
  # * ignore_targets: Ignore tragets.
104
102
  # * Returns: a bound GetText::TextDomain or nil.
105
- def each_textdomain(klass = bound_target, ignore_targets = [])
103
+ def each_textdomain(klass = bound_target, ignore_targets = []) #:nodoc:
106
104
  (klass.ancestors + [GetText]).each do |target|
107
105
  unless ignore_targets.include? target
108
106
  ignore_targets << target
@@ -145,7 +143,7 @@ module GetText
145
143
  }
146
144
  ret ? ret : msgid
147
145
  end
148
-
146
+
149
147
  # call-seq:
150
148
  # ngettext(msgid, msgid_plural, n)
151
149
  # ngettext(msgids, n) # msgids = [msgid, msgid_plural]
@@ -313,7 +311,7 @@ module GetText
313
311
  end
314
312
 
315
313
  # Deprecated. Now this function do nothing. Use GetText.output_charset= instead.
316
- def set_charset(cs)
314
+ def set_charset(cs) #:nodoc:
317
315
  $stderr.puts "Deprecated. Now this function do nothing. Use GetText.output_charset= instead." if $DEBUG
318
316
  self
319
317
  end
@@ -325,12 +323,40 @@ module GetText
325
323
 
326
324
  # Add default locale path.
327
325
  # * path: a new locale path. (e.g.) "/usr/share/locale/%{locale}/LC_MESSAGES/%{name}.mo"
328
- # ('locale' => "ja_JP", 'name' => "textdomain")
326
+ # ('locale' => "ja_JP", 'name' => "textdomain")
329
327
  # * Returns: the new DEFAULT_LOCALE_PATHS
330
328
  def add_default_locale_path(path)
331
329
  TextDomain.add_default_locale_path(path)
332
330
  end
333
331
 
332
+ # Show the current textdomain information. This function is for debugging.
333
+ # * options: options as a Hash.
334
+ # * :with_messages - show informations with messages of the current mo file. Default is false.
335
+ # * :out - An output target. Default is STDOUT.
336
+ # * :with_paths - show the load paths for mo-files.
337
+ # * Returns: localized text by msgid. If there are not binded mo-file, it will return msgid.
338
+ def current_textdomain_info(options = {})
339
+ opts = {:with_messages => false, :with_paths => false, :out => STDOUT}.merge(options)
340
+ ret = nil
341
+ each_textdomain {|textdomain|
342
+ opts[:out].puts "TextDomain name: \"#{textdomain.name}\""
343
+ opts[:out].puts "TextDomain current locale: \"#{textdomain.current_locale}\""
344
+ opts[:out].puts "TextDomain current mo filename: \"#{textdomain.current_mo.filename}\""
345
+ if opts[:with_paths]
346
+ opts[:out].puts "TextDomain locale file paths:"
347
+ textdomain.locale_paths.each do |v|
348
+ opts[:out].puts " #{v}"
349
+ end
350
+ end
351
+ if opts[:with_messages]
352
+ opts[:out].puts "The messages in the mo file:"
353
+ textdomain.current_mo.each{|k, v|
354
+ opts[:out].puts " \"#{k}\": \"#{v}\""
355
+ }
356
+ end
357
+ }
358
+ end
359
+
334
360
  alias :setlocale :locale= #:nodoc:
335
361
  alias :_ :gettext #:nodoc:
336
362
  alias :n_ :ngettext #:nodoc:
@@ -339,5 +365,5 @@ module GetText
339
365
  module_function :bindtextdomain, :textdomain, :each_textdomain,
340
366
  :N_, :gettext, :_, :ngettext, :n_, :sgettext, :s_, :bound_target,
341
367
  :setlocale, :set_locale, :locale=, :set_locale_all, :locale, :charset=, :set_charset,
342
- :set_output_charset, :output_charset=, :output_charset
368
+ :set_output_charset, :output_charset=, :output_charset, :current_textdomain_info
343
369
  end