gettext 1.7.0-mswin32 → 1.8.0-mswin32
Sign up to get free protection for your applications and to get access to all the features.
- data/ChangeLog +139 -0
- data/NEWS +31 -0
- data/README +31 -15
- data/Rakefile +3 -2
- 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/et/LC_MESSAGES/rails.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/data/locale/zh_TW/LC_MESSAGES/rails.mo +0 -0
- data/data/locale/zh_TW/LC_MESSAGES/rgettext.mo +0 -0
- data/lib/gettext.rb +50 -23
- data/lib/gettext/active_record.rb +275 -0
- data/lib/gettext/locale.rb +9 -2
- data/lib/gettext/locale_cgi.rb +5 -4
- data/lib/gettext/locale_object.rb +5 -4
- data/lib/gettext/parser/{activerecord.rb → active_record.rb} +31 -14
- data/lib/gettext/parser/ruby.rb +48 -44
- data/lib/gettext/rails.rb +111 -253
- data/lib/gettext/rgettext.rb +34 -6
- data/lib/gettext/string.rb +3 -2
- data/lib/gettext/textdomain.rb +3 -3
- data/lib/gettext/version.rb +1 -1
- data/po/cs/rails.po +61 -61
- data/po/cs/rgettext.po +37 -55
- data/po/de/rails.po +73 -72
- data/po/de/rgettext.po +39 -56
- data/po/el/rails.po +60 -60
- data/po/el/rgettext.po +26 -44
- data/po/es/rails.po +60 -60
- data/po/es/rgettext.po +28 -52
- data/po/et/rails.po +118 -0
- data/po/fr/rails.po +60 -60
- data/po/fr/rgettext.po +26 -46
- data/po/it/rails.po +68 -68
- data/po/it/rgettext.po +35 -53
- data/po/ja/rails.po +62 -61
- data/po/ja/rgettext.po +27 -45
- data/po/ko/rails.po +61 -60
- data/po/ko/rgettext.po +34 -54
- data/po/nl/rails.po +59 -60
- data/po/nl/rgettext.po +35 -55
- data/po/pt_BR/rails.po +74 -73
- data/po/pt_BR/rgettext.po +36 -52
- data/po/rails.pot +61 -61
- data/po/rgettext.pot +25 -43
- data/po/ru/rails.po +61 -62
- data/po/ru/rgettext.po +26 -51
- data/po/sv/rgettext.po +27 -44
- data/po/zh/rails.po +62 -60
- data/po/zh/rgettext.po +28 -47
- data/po/zh_TW/rails.po +114 -0
- data/po/zh_TW/rgettext.po +121 -0
- data/samples/cgi/locale/zh_TW/LC_MESSAGES/helloerb1.mo +0 -0
- data/samples/cgi/locale/zh_TW/LC_MESSAGES/helloerb2.mo +0 -0
- data/samples/cgi/locale/zh_TW/LC_MESSAGES/hellolib.mo +0 -0
- data/samples/cgi/locale/zh_TW/LC_MESSAGES/main.mo +0 -0
- data/samples/cgi/po/zh_TW/helloerb1.po +67 -0
- data/samples/cgi/po/zh_TW/helloerb2.po +54 -0
- data/samples/cgi/po/zh_TW/hellolib.po +26 -0
- data/samples/cgi/po/zh_TW/main.po +79 -0
- data/samples/locale/zh_TW/LC_MESSAGES/hello.mo +0 -0
- data/samples/locale/zh_TW/LC_MESSAGES/hello2.mo +0 -0
- data/samples/locale/zh_TW/LC_MESSAGES/hello_noop.mo +0 -0
- data/samples/locale/zh_TW/LC_MESSAGES/hello_plural.mo +0 -0
- data/samples/locale/zh_TW/LC_MESSAGES/helloglade2.mo +0 -0
- data/samples/locale/zh_TW/LC_MESSAGES/hellogtk.mo +0 -0
- data/samples/locale/zh_TW/LC_MESSAGES/hellotk.mo +0 -0
- data/samples/po/hellogtk.pot +1 -1
- data/samples/po/zh_TW/hello.po +26 -0
- data/samples/po/zh_TW/hello2.po +34 -0
- data/samples/po/zh_TW/hello_noop.po +30 -0
- data/samples/po/zh_TW/hello_plural.po +28 -0
- data/samples/po/zh_TW/helloglade2.po +40 -0
- data/samples/po/zh_TW/hellogtk.po +25 -0
- data/samples/po/zh_TW/hellotk.po +26 -0
- data/samples/rails/README +8 -11
- data/samples/rails/app/controllers/application.rb +6 -9
- data/samples/rails/app/views/layouts/blog.rhtml +1 -1
- data/samples/rails/config/database.yml +1 -1
- data/samples/rails/config/environment.rb +1 -0
- data/samples/rails/db/schema.rb +90 -0
- data/samples/rails/lib/tasks/gettext.rake +1 -1
- data/samples/rails/locale/cs/LC_MESSAGES/blog.mo +0 -0
- data/samples/rails/locale/de/LC_MESSAGES/blog.mo +0 -0
- data/samples/rails/locale/el/LC_MESSAGES/blog.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/fr/LC_MESSAGES/blog.mo +0 -0
- data/samples/rails/locale/it/LC_MESSAGES/blog.mo +0 -0
- data/samples/rails/locale/ja/LC_MESSAGES/blog.mo +0 -0
- data/samples/rails/locale/ko/LC_MESSAGES/blog.mo +0 -0
- data/samples/rails/locale/nl/LC_MESSAGES/blog.mo +0 -0
- data/samples/rails/locale/pt_BR/LC_MESSAGES/blog.mo +0 -0
- data/samples/rails/locale/ru/LC_MESSAGES/blog.mo +0 -0
- data/samples/rails/locale/zh/LC_MESSAGES/blog.mo +0 -0
- data/samples/rails/locale/zh_TW/LC_MESSAGES/blog.mo +0 -0
- data/samples/rails/po/blog.pot +106 -110
- data/samples/rails/po/cs/blog.po +110 -115
- data/samples/rails/po/de/blog.po +107 -112
- data/samples/rails/po/el/blog.po +105 -109
- data/samples/rails/po/en/blog.po +107 -111
- data/samples/rails/po/es/blog.po +105 -110
- data/samples/rails/po/fr/blog.po +105 -109
- data/samples/rails/po/it/blog.po +105 -109
- data/samples/rails/po/ja/blog.po +105 -109
- data/samples/rails/po/ko/blog.po +105 -109
- data/samples/rails/po/nl/blog.po +105 -110
- data/samples/rails/po/pt_BR/blog.po +105 -109
- data/samples/rails/po/ru/blog.po +105 -107
- data/samples/rails/po/zh/blog.po +105 -109
- data/samples/rails/po/zh_TW/blog.po +107 -0
- data/samples/rails/vendor/plugins/gettext/locale/zh_TW/LC_MESSAGES/gettext_plugin.mo +0 -0
- data/samples/rails/vendor/plugins/gettext/po/zh_TW/gettext_plugin.po +30 -0
- data/test/Rakefile +44 -0
- data/test/fixtures/developer.rb +5 -0
- data/test/fixtures/developers.yml +21 -0
- data/test/fixtures/reply.rb +40 -0
- data/test/fixtures/topic.rb +23 -0
- data/test/fixtures/topics.yml +22 -0
- data/test/gettext_test.rb +2 -2
- data/test/gettext_test_active_record.rb +1479 -0
- data/test/gettext_test_rails.rb +2 -0
- data/test/locale/ja/LC_MESSAGES/active_record.mo +0 -0
- data/test/po/active_record.pot +295 -0
- data/test/po/ja/active_record.po +294 -0
- data/test/test.sh +1 -0
- data/test/test_rubyparser.rb +10 -2
- metadata +66 -6
- data/samples/rails/db/mysql.sql +0 -8
- data/samples/rails/db/postgresql.sql +0 -7
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
data/samples/po/hellogtk.pot
CHANGED
@@ -0,0 +1,26 @@
|
|
1
|
+
# Hello World -- a sample for Ruby-GetText-Package
|
2
|
+
#
|
3
|
+
# Copyright (C) 2001-2006 Masao Mutoh
|
4
|
+
#
|
5
|
+
# This file is distributed under the same license as the Ruby-GetText-Package.
|
6
|
+
#
|
7
|
+
# LIN CHUNG-YI <xmarsh at gmail.com>, 2006.
|
8
|
+
#
|
9
|
+
msgid ""
|
10
|
+
msgstr ""
|
11
|
+
"Project-Id-Version: ruby-gettext 1.1.1\n"
|
12
|
+
"POT-Creation-Date: 2001-12-24 01:30:54+0900\n"
|
13
|
+
"PO-Revision-Date: 2006-08-18 14:48+0800\n"
|
14
|
+
"Last-Translator: LIN CHUNG-YI <xmarsh at gmail.com>\n"
|
15
|
+
"Language-Team: zh_TW <xmarsh at gmail.com>\n"
|
16
|
+
"MIME-Version: 1.0\n"
|
17
|
+
"Content-Type: text/plain; charset=utf-8\n"
|
18
|
+
"Content-Transfer-Encoding: 8bit\n"
|
19
|
+
"Plural-Forms: nplurals=1; plural=0;\n"
|
20
|
+
"X-Poedit-Language: Chinese\n"
|
21
|
+
"X-Poedit-Country: TAIWAN\n"
|
22
|
+
|
23
|
+
#: ../hello.rb:7
|
24
|
+
msgid "Hello World\n"
|
25
|
+
msgstr "哈囉世界\n"
|
26
|
+
|
@@ -0,0 +1,34 @@
|
|
1
|
+
# Hello World 2 -- sample for ruby-gettext-package
|
2
|
+
#
|
3
|
+
# Copyright (C) 2002-2006 Masao Mutoh
|
4
|
+
#
|
5
|
+
# This file is distributed under the same license as the Ruby-GetText-Package.
|
6
|
+
#
|
7
|
+
# LIN CHUNG-YI <xmarsh at gmail.com>, 2006.
|
8
|
+
#
|
9
|
+
msgid ""
|
10
|
+
msgstr ""
|
11
|
+
"Project-Id-Version: ruby-gettext 1.1.1\n"
|
12
|
+
"POT-Creation-Date: 2002-01-01 03:05:08+0900\n"
|
13
|
+
"PO-Revision-Date: 2006-08-18 14:49+0800\n"
|
14
|
+
"Last-Translator: LIN CHUNG-YI <xmarsh at gmail.com>\n"
|
15
|
+
"Language-Team: zh_TW <xmarsh at gmail.com>\n"
|
16
|
+
"MIME-Version: 1.0\n"
|
17
|
+
"Content-Type: text/plain; charset=utf-8\n"
|
18
|
+
"Content-Transfer-Encoding: 8bit\n"
|
19
|
+
"Plural-Forms: nplurals=1; plural=0;\n"
|
20
|
+
"X-Poedit-Language: Chinese\n"
|
21
|
+
"X-Poedit-Country: TAIWAN\n"
|
22
|
+
|
23
|
+
#: hello2.rb:9
|
24
|
+
msgid "World"
|
25
|
+
msgstr "世界"
|
26
|
+
|
27
|
+
#: hello2.rb:8
|
28
|
+
msgid "One is %{num}\n"
|
29
|
+
msgstr "一個是 %{num}\n"
|
30
|
+
|
31
|
+
#: hello2.rb:9
|
32
|
+
msgid "Hello %{world}\n"
|
33
|
+
msgstr "哈囉 %{world}\n"
|
34
|
+
|
@@ -0,0 +1,30 @@
|
|
1
|
+
# Hello World noop -- sample for ruby-gettext-package
|
2
|
+
#
|
3
|
+
# Copyright (C) 2002-2006 Masao Mutoh
|
4
|
+
#
|
5
|
+
# This file is distributed under the same license as the Ruby-GetText-Package.
|
6
|
+
#
|
7
|
+
# LIN CHUNG-YI <xmarsh at gmail.com>, 2006.
|
8
|
+
#
|
9
|
+
msgid ""
|
10
|
+
msgstr ""
|
11
|
+
"Project-Id-Version: ruby-gettext 1.1.1\n"
|
12
|
+
"POT-Creation-Date: 2002-02-21 23:23:08+0900\n"
|
13
|
+
"PO-Revision-Date: 2006-08-18 14:51+0800\n"
|
14
|
+
"Last-Translator: LIN CHUNG-YI <xmarsh at gmail.com>\n"
|
15
|
+
"Language-Team: zh_TW <xmarsh at gmail.com>\n"
|
16
|
+
"MIME-Version: 1.0\n"
|
17
|
+
"Content-Type: text/plain; charset=utf-8\n"
|
18
|
+
"Content-Transfer-Encoding: 8bit\n"
|
19
|
+
"Plural-Forms: nplurals=1; plural=0;\n"
|
20
|
+
"X-Poedit-Language: Chinese\n"
|
21
|
+
"X-Poedit-Country: TAIWAN\n"
|
22
|
+
|
23
|
+
#: hello_noop.rb:8
|
24
|
+
msgid "Hello World"
|
25
|
+
msgstr "哈囉世界"
|
26
|
+
|
27
|
+
#: hello_noop.rb:8
|
28
|
+
msgid "Hello World2"
|
29
|
+
msgstr "哈囉世界二"
|
30
|
+
|
@@ -0,0 +1,28 @@
|
|
1
|
+
# hello_plural.po - sample for plural messages
|
2
|
+
#
|
3
|
+
# Copyright (C) 2002-2006 Masao Mutoh
|
4
|
+
#
|
5
|
+
# This file is distributed under the same license as the Ruby-GetText-Package.
|
6
|
+
#
|
7
|
+
# LIN CHUNG-YI <xmarsh at gmail.com>, 2006.
|
8
|
+
#
|
9
|
+
msgid ""
|
10
|
+
msgstr ""
|
11
|
+
"Project-Id-Version: ruby-gettext 1.1.1\n"
|
12
|
+
"POT-Creation-Date: 2002-10-21 15:32:15+0900\n"
|
13
|
+
"PO-Revision-Date: 2006-08-18 15:01+0800\n"
|
14
|
+
"Last-Translator: LIN CHUNG-YI <xmarsh at gmail.com>\n"
|
15
|
+
"Language-Team: zh_TW <xmarsh at gmail.com>\n"
|
16
|
+
"MIME-Version: 1.0\n"
|
17
|
+
"Content-Type: text/plain; charset=utf-8\n"
|
18
|
+
"Content-Transfer-Encoding: 8bit\n"
|
19
|
+
"Plural-Forms: nplurals=2; plural=n == 1 ? 0 : 1;\n"
|
20
|
+
"X-Poedit-Language: Chinese\n"
|
21
|
+
"X-Poedit-Country: TAIWAN\n"
|
22
|
+
|
23
|
+
#: hello_plural.rb:11
|
24
|
+
msgid "There is an apple.\n"
|
25
|
+
msgid_plural "There are %{num} apples.\n"
|
26
|
+
msgstr[0] "有一個蘋果。\n"
|
27
|
+
msgstr[1] "有 %{num} 個蘋果。\n"
|
28
|
+
|
@@ -0,0 +1,40 @@
|
|
1
|
+
# helloglade2.po - sample for Ruby/Libglade2
|
2
|
+
#
|
3
|
+
# Copyright (C) 2005,2006 Masao Mutoh
|
4
|
+
#
|
5
|
+
# This file is distributed under the same license as the Ruby-GetText-Package.
|
6
|
+
#
|
7
|
+
# LIN CHUNG-YI <xmarsh at gmail.com>, 2006.
|
8
|
+
#
|
9
|
+
msgid ""
|
10
|
+
msgstr ""
|
11
|
+
"Project-Id-Version: ruby-gettext 1.1.1\n"
|
12
|
+
"POT-Creation-Date: 2004-07-03 23:38+0900\n"
|
13
|
+
"PO-Revision-Date: 2006-08-21 09:05+0800\n"
|
14
|
+
"Last-Translator: LIN CHUNG-YI <xmarsh at gmail.com>\n"
|
15
|
+
"Language-Team: zh_TW <xmarsh at gmail.com>\n"
|
16
|
+
"MIME-Version: 1.0\n"
|
17
|
+
"Content-Type: text/plain; charset=UTF-8\n"
|
18
|
+
"Content-Transfer-Encoding: 8bit\n"
|
19
|
+
"Plural-Forms: nplurals=1; plural=0;\n"
|
20
|
+
"X-Poedit-Language: Chinese\n"
|
21
|
+
"X-Poedit-Country: TAIWAN\n"
|
22
|
+
|
23
|
+
#: helloglade2.glade:8
|
24
|
+
msgid "window1"
|
25
|
+
msgstr "視窗一"
|
26
|
+
|
27
|
+
#: helloglade2.glade:29
|
28
|
+
msgid ""
|
29
|
+
"first line\n"
|
30
|
+
"second line\n"
|
31
|
+
"third line"
|
32
|
+
msgstr ""
|
33
|
+
"第一行\n"
|
34
|
+
"第二行\n"
|
35
|
+
"第三行"
|
36
|
+
|
37
|
+
#: helloglade2.glade:53
|
38
|
+
msgid "<Hello world>"
|
39
|
+
msgstr "<哈囉世界>"
|
40
|
+
|
@@ -0,0 +1,25 @@
|
|
1
|
+
# Hello World for Ruby/GTK -- sample for ruby-gettext-package
|
2
|
+
#
|
3
|
+
# Copyright (C) 2001-2006 Masao Mutoh
|
4
|
+
#
|
5
|
+
# This file is distributed under the same license as the Ruby-GetText-Package.
|
6
|
+
#
|
7
|
+
# LIN CHUNG-YI <xmarsh at gmail.com>, 2006.
|
8
|
+
#
|
9
|
+
msgid ""
|
10
|
+
msgstr ""
|
11
|
+
"Project-Id-Version: ruby-gettext 1.1.1\n"
|
12
|
+
"POT-Creation-Date: 2001-12-24 01:52:10+0900\n"
|
13
|
+
"PO-Revision-Date: 2006-08-21 09:06+0800\n"
|
14
|
+
"Last-Translator: LIN CHUNG-YI <xmarsh at gmail.com>\n"
|
15
|
+
"Language-Team: zh_TW <xmarsh at gmail.com>\n"
|
16
|
+
"MIME-Version: 1.0\n"
|
17
|
+
"Content-Type: text/plain; charset=utf-8\n"
|
18
|
+
"Content-Transfer-Encoding: 8bit\n"
|
19
|
+
"X-Poedit-Language: Chinese\n"
|
20
|
+
"X-Poedit-Country: TAIWAN\n"
|
21
|
+
|
22
|
+
#: ../hellogtk.rb:14
|
23
|
+
msgid "hello, gtk world"
|
24
|
+
msgstr "哈囉, gtk 世界"
|
25
|
+
|
@@ -0,0 +1,26 @@
|
|
1
|
+
# hellotk.po - sample for Ruby/TK
|
2
|
+
#
|
3
|
+
# Copyright (C) 2004-2006 Masao Mutoh
|
4
|
+
#
|
5
|
+
# This file is distributed under the same license as the Ruby-GetText-Package.
|
6
|
+
#
|
7
|
+
# LIN CHUNG-YI <xmarsh at gmail.com>, 2006.
|
8
|
+
#
|
9
|
+
msgid ""
|
10
|
+
msgstr ""
|
11
|
+
"Project-Id-Version: ruby-gettext 1.1.1\n"
|
12
|
+
"POT-Creation-Date: 2004-11-05 21:38+0900\n"
|
13
|
+
"PO-Revision-Date: 2006-08-21 09:10+0800\n"
|
14
|
+
"Last-Translator: LIN CHUNG-YI <xmarsh at gmail.com>\n"
|
15
|
+
"Language-Team: zh_TW <xmarsh at gmail.com>\n"
|
16
|
+
"MIME-Version: 1.0\n"
|
17
|
+
"Content-Type: text/plain; charset=UTF-8\n"
|
18
|
+
"Content-Transfer-Encoding: 8bit\n"
|
19
|
+
"Plural-Forms: nplurals=1; plural=0;\n"
|
20
|
+
"X-Poedit-Language: Chinese\n"
|
21
|
+
"X-Poedit-Country: TAIWAN\n"
|
22
|
+
|
23
|
+
#: hellotk.rb:10
|
24
|
+
msgid "hello, tk world"
|
25
|
+
msgstr "哈囉, tk 世界"
|
26
|
+
|
data/samples/rails/README
CHANGED
@@ -3,7 +3,7 @@ Ruby-GetText Sample blog for Ruby on Rails and Ruby-GetText-Package.
|
|
3
3
|
Requirement
|
4
4
|
-----------
|
5
5
|
* ruby-1.8.3 or later
|
6
|
-
* rails-1.
|
6
|
+
* rails-1.1.4 or later
|
7
7
|
* rake
|
8
8
|
* mysql
|
9
9
|
|
@@ -13,26 +13,26 @@ Installation
|
|
13
13
|
2. Create DB and a table
|
14
14
|
* using db/mysql.sql.
|
15
15
|
a) $ mysqladmin -u <root> create blog
|
16
|
-
b) $ mysql -u <root> blog < db/mysql.sql
|
17
16
|
* using db/postgresql.sql.
|
18
17
|
a) $ su - postgres
|
19
18
|
b) $ createdb blog
|
20
|
-
c) $ psql blog < db/postgresql.sql
|
21
19
|
|
22
20
|
* for testing, change the dbname: blog => blog_test.
|
23
21
|
|
24
22
|
3. Edit config/database.xml
|
25
|
-
4. Create
|
23
|
+
4. Create database tables using rake.
|
24
|
+
* rake db:schema:load
|
25
|
+
5. Create mofiles using rake.
|
26
26
|
$ rake makemo
|
27
27
|
|
28
|
-
|
28
|
+
6. (One click ruby installer for Windonws user only)
|
29
29
|
On command prompt:
|
30
30
|
|
31
31
|
> set PATH=c:\ruby\bin;%PATH%
|
32
32
|
(If you have GTK+ and Ruby/GTK2)
|
33
33
|
> set PATH=c:\gtk\bin;%PATH%
|
34
34
|
|
35
|
-
|
35
|
+
7. Then run the http server.
|
36
36
|
|
37
37
|
$ ruby script/server
|
38
38
|
|
@@ -76,11 +76,8 @@ Files
|
|
76
76
|
mofiles by "rake makemo".
|
77
77
|
- blog.po[t] is for blog_controller and its views.
|
78
78
|
|
79
|
-
* db/
|
80
|
-
-
|
81
|
-
|
82
|
-
* db/postgresql.sql
|
83
|
-
- a sql to create a database table for postgresql.
|
79
|
+
* db/schema.rb
|
80
|
+
- A file to create a database table with rake db:schema:load.
|
84
81
|
|
85
82
|
* public/stylesheets/blog.css
|
86
83
|
- a CSS file for this sample.
|
@@ -4,9 +4,6 @@
|
|
4
4
|
#
|
5
5
|
# This file is distributed under the same license as Ruby-GetText-Package.
|
6
6
|
|
7
|
-
# Require 'gettext/rails' first.
|
8
|
-
require 'gettext/rails'
|
9
|
-
|
10
7
|
class ApplicationController < ActionController::Base
|
11
8
|
# Initialize GetText and Content-Type.
|
12
9
|
# You need to call this once a request from WWW browser.
|
@@ -19,13 +16,13 @@ class ApplicationController < ActionController::Base
|
|
19
16
|
init_gettext "blog" # textdomain, charset = "UTF-8", content_type = "text/html"
|
20
17
|
|
21
18
|
=begin
|
22
|
-
# You can
|
23
|
-
def
|
24
|
-
|
25
|
-
|
26
|
-
|
19
|
+
# You can set callback methods. These methods are called on the each WWW request.
|
20
|
+
def before_init_gettext(cgi)
|
21
|
+
p "before_init_gettext"
|
22
|
+
end
|
23
|
+
def after_init_gettext(cgi)
|
24
|
+
p "after_init_gettext"
|
27
25
|
end
|
28
|
-
use_localized_templates false
|
29
26
|
=end
|
30
27
|
|
31
28
|
=begin
|
@@ -0,0 +1,90 @@
|
|
1
|
+
# This file is autogenerated. Instead of editing this file, please use the
|
2
|
+
# migrations feature of ActiveRecord to incrementally modify your database, and
|
3
|
+
# then regenerate this schema definition.
|
4
|
+
|
5
|
+
ActiveRecord::Schema.define(:version => 1) do
|
6
|
+
|
7
|
+
create_table "articles", :force => true do |t|
|
8
|
+
t.column "title", :string, :default => "", :null => false
|
9
|
+
t.column "description", :text, :default => "", :null => false
|
10
|
+
t.column "lastupdate", :date
|
11
|
+
end
|
12
|
+
|
13
|
+
create_table "engine_schema_info", :id => false, :force => true do |t|
|
14
|
+
t.column "engine_name", :string
|
15
|
+
t.column "version", :integer
|
16
|
+
end
|
17
|
+
|
18
|
+
create_table "foos", :force => true do |t|
|
19
|
+
t.column "name", :string, :default => "", :null => false
|
20
|
+
end
|
21
|
+
|
22
|
+
create_table "globalize_countries", :force => true do |t|
|
23
|
+
t.column "code", :string, :limit => 2
|
24
|
+
t.column "english_name", :string
|
25
|
+
t.column "date_format", :string
|
26
|
+
t.column "currency_format", :string
|
27
|
+
t.column "currency_code", :string, :limit => 3
|
28
|
+
t.column "thousands_sep", :string, :limit => 2
|
29
|
+
t.column "decimal_sep", :string, :limit => 2
|
30
|
+
t.column "currency_decimal_sep", :string, :limit => 2
|
31
|
+
t.column "number_grouping_scheme", :string
|
32
|
+
end
|
33
|
+
|
34
|
+
add_index "globalize_countries", ["code"], :name => "globalize_countries_code_index"
|
35
|
+
|
36
|
+
create_table "globalize_languages", :force => true do |t|
|
37
|
+
t.column "iso_639_1", :string, :limit => 2
|
38
|
+
t.column "iso_639_2", :string, :limit => 3
|
39
|
+
t.column "iso_639_3", :string, :limit => 3
|
40
|
+
t.column "rfc_3066", :string
|
41
|
+
t.column "english_name", :string
|
42
|
+
t.column "english_name_locale", :string
|
43
|
+
t.column "english_name_modifier", :string
|
44
|
+
t.column "native_name", :string
|
45
|
+
t.column "native_name_locale", :string
|
46
|
+
t.column "native_name_modifier", :string
|
47
|
+
t.column "macro_language", :boolean
|
48
|
+
t.column "direction", :string
|
49
|
+
t.column "pluralization", :string
|
50
|
+
t.column "scope", :string, :limit => 1
|
51
|
+
end
|
52
|
+
|
53
|
+
add_index "globalize_languages", ["iso_639_1"], :name => "globalize_languages_iso_639_1_index"
|
54
|
+
add_index "globalize_languages", ["iso_639_2"], :name => "globalize_languages_iso_639_2_index"
|
55
|
+
add_index "globalize_languages", ["iso_639_3"], :name => "globalize_languages_iso_639_3_index"
|
56
|
+
add_index "globalize_languages", ["rfc_3066"], :name => "globalize_languages_rfc_3066_index"
|
57
|
+
|
58
|
+
create_table "globalize_translations", :force => true do |t|
|
59
|
+
t.column "type", :string
|
60
|
+
t.column "tr_key", :string
|
61
|
+
t.column "table_name", :string
|
62
|
+
t.column "item_id", :integer
|
63
|
+
t.column "facet", :string
|
64
|
+
t.column "language_id", :integer
|
65
|
+
t.column "pluralization_index", :integer
|
66
|
+
t.column "text", :text
|
67
|
+
end
|
68
|
+
|
69
|
+
add_index "globalize_translations", ["tr_key", "language_id"], :name => "globalize_translations_tr_key_index"
|
70
|
+
add_index "globalize_translations", ["table_name", "item_id", "language_id"], :name => "globalize_translations_table_name_index"
|
71
|
+
|
72
|
+
create_table "users", :force => true do |t|
|
73
|
+
t.column "login", :string, :limit => 80, :default => "", :null => false
|
74
|
+
t.column "salted_password", :string, :limit => 40, :default => "", :null => false
|
75
|
+
t.column "email", :string, :limit => 60, :default => "", :null => false
|
76
|
+
t.column "firstname", :string, :limit => 40
|
77
|
+
t.column "lastname", :string, :limit => 40
|
78
|
+
t.column "salt", :string, :limit => 40, :default => "", :null => false
|
79
|
+
t.column "verified", :integer, :default => 0
|
80
|
+
t.column "role", :string, :limit => 40
|
81
|
+
t.column "security_token", :string, :limit => 40
|
82
|
+
t.column "token_expiry", :datetime
|
83
|
+
t.column "created_at", :datetime
|
84
|
+
t.column "updated_at", :datetime
|
85
|
+
t.column "logged_in_at", :datetime
|
86
|
+
t.column "deleted", :integer, :default => 0
|
87
|
+
t.column "delete_after", :datetime
|
88
|
+
end
|
89
|
+
|
90
|
+
end
|