gettext_activerecord 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (96) hide show
  1. data/COPYING +55 -0
  2. data/ChangeLog +4 -0
  3. data/README.rdoc +172 -0
  4. data/Rakefile +110 -0
  5. data/data/locale/bg/LC_MESSAGES/gettext_activerecord.mo +0 -0
  6. data/data/locale/bs/LC_MESSAGES/gettext_activerecord.mo +0 -0
  7. data/data/locale/ca/LC_MESSAGES/gettext_activerecord.mo +0 -0
  8. data/data/locale/cs/LC_MESSAGES/gettext_activerecord.mo +0 -0
  9. data/data/locale/de/LC_MESSAGES/gettext_activerecord.mo +0 -0
  10. data/data/locale/el/LC_MESSAGES/gettext_activerecord.mo +0 -0
  11. data/data/locale/eo/LC_MESSAGES/gettext_activerecord.mo +0 -0
  12. data/data/locale/es/LC_MESSAGES/gettext_activerecord.mo +0 -0
  13. data/data/locale/et/LC_MESSAGES/gettext_activerecord.mo +0 -0
  14. data/data/locale/fr/LC_MESSAGES/gettext_activerecord.mo +0 -0
  15. data/data/locale/hr/LC_MESSAGES/gettext_activerecord.mo +0 -0
  16. data/data/locale/hu/LC_MESSAGES/gettext_activerecord.mo +0 -0
  17. data/data/locale/it/LC_MESSAGES/gettext_activerecord.mo +0 -0
  18. data/data/locale/ja/LC_MESSAGES/gettext_activerecord.mo +0 -0
  19. data/data/locale/ko/LC_MESSAGES/gettext_activerecord.mo +0 -0
  20. data/data/locale/lv/LC_MESSAGES/gettext_activerecord.mo +0 -0
  21. data/data/locale/nb/LC_MESSAGES/gettext_activerecord.mo +0 -0
  22. data/data/locale/nl/LC_MESSAGES/gettext_activerecord.mo +0 -0
  23. data/data/locale/pt_BR/LC_MESSAGES/gettext_activerecord.mo +0 -0
  24. data/data/locale/ru/LC_MESSAGES/gettext_activerecord.mo +0 -0
  25. data/data/locale/sr/LC_MESSAGES/gettext_activerecord.mo +0 -0
  26. data/data/locale/ua/LC_MESSAGES/gettext_activerecord.mo +0 -0
  27. data/data/locale/vi/LC_MESSAGES/gettext_activerecord.mo +0 -0
  28. data/data/locale/zh/LC_MESSAGES/gettext_activerecord.mo +0 -0
  29. data/data/locale/zh_TW/LC_MESSAGES/gettext_activerecord.mo +0 -0
  30. data/lib/gettext_activerecord/base.rb +66 -0
  31. data/lib/gettext_activerecord/i18n.rb +27 -0
  32. data/lib/gettext_activerecord/migration.rb +16 -0
  33. data/lib/gettext_activerecord/parser.rb +216 -0
  34. data/lib/gettext_activerecord/schema_definitions.rb +28 -0
  35. data/lib/gettext_activerecord/tools.rb +25 -0
  36. data/lib/gettext_activerecord/validations.rb +189 -0
  37. data/lib/gettext_activerecord/version.rb +12 -0
  38. data/lib/gettext_activerecord.rb +19 -0
  39. data/po/bg/gettext_activerecord.po +115 -0
  40. data/po/bs/gettext_activerecord.po +125 -0
  41. data/po/ca/gettext_activerecord.po +116 -0
  42. data/po/cs/gettext_activerecord.po +124 -0
  43. data/po/de/gettext_activerecord.po +117 -0
  44. data/po/el/gettext_activerecord.po +115 -0
  45. data/po/eo/gettext_activerecord.po +116 -0
  46. data/po/es/gettext_activerecord.po +116 -0
  47. data/po/et/gettext_activerecord.po +116 -0
  48. data/po/fr/gettext_activerecord.po +118 -0
  49. data/po/gettext_activerecord.pot +113 -0
  50. data/po/hr/gettext_activerecord.po +125 -0
  51. data/po/hu/gettext_activerecord.po +116 -0
  52. data/po/it/gettext_activerecord.po +122 -0
  53. data/po/ja/gettext_activerecord.po +116 -0
  54. data/po/ko/gettext_activerecord.po +123 -0
  55. data/po/lv/gettext_activerecord.po +116 -0
  56. data/po/nb/gettext_activerecord.po +117 -0
  57. data/po/nl/gettext_activerecord.po +123 -0
  58. data/po/pt_BR/gettext_activerecord.po +117 -0
  59. data/po/ru/gettext_activerecord.po +117 -0
  60. data/po/sr/gettext_activerecord.po +117 -0
  61. data/po/test.rb +8 -0
  62. data/po/ua/gettext_activerecord.po +120 -0
  63. data/po/vi/gettext_activerecord.po +116 -0
  64. data/po/zh/gettext_activerecord.po +119 -0
  65. data/po/zh_TW/gettext_activerecord.po +119 -0
  66. data/replace.rb +21 -0
  67. data/sample/README.rdoc +9 -0
  68. data/sample/Rakefile +32 -0
  69. data/sample/book.rb +3 -0
  70. data/sample/config/database.yml +3 -0
  71. data/sample/data/locale/ja/LC_MESSAGES/sample_ar.mo +0 -0
  72. data/sample/db/development.sqlite3 +0 -0
  73. data/sample/db/schema.rb +5 -0
  74. data/sample/locale/ja/LC_MESSAGES/sample_ar.mo +0 -0
  75. data/sample/po/ja/sample_ar.po +29 -0
  76. data/sample/po/sample_ar.pot +29 -0
  77. data/sample/sample.rb +22 -0
  78. data/test/Rakefile +43 -0
  79. data/test/db/migrate.rb +41 -0
  80. data/test/db/sqlite.rb +8 -0
  81. data/test/helper.rb +38 -0
  82. data/test/locale/ja/LC_MESSAGES/active_record.mo +0 -0
  83. data/test/models/book.rb +3 -0
  84. data/test/models/developer.rb +5 -0
  85. data/test/models/inept_wizard.rb +3 -0
  86. data/test/models/reply.rb +40 -0
  87. data/test/models/topic.rb +68 -0
  88. data/test/models/user.rb +3 -0
  89. data/test/models/wizard.rb +5 -0
  90. data/test/po/active_record.pot +388 -0
  91. data/test/po/ja/active_record.po +387 -0
  92. data/test/test_parser.rb +95 -0
  93. data/test/test_validations.rb +2575 -0
  94. data/test/vendor/repair_helper.rb +50 -0
  95. data/test.rb +2 -0
  96. metadata +268 -0
@@ -0,0 +1,117 @@
1
+ #
2
+ # a po-file for Ruby-GetText-Package and Ruby on Rails.
3
+ #
4
+ # Copyright (C) 2005-2008 Masao Mutoh
5
+ #
6
+ # This file is distributed under the same license as the Ruby-GetText-Package.
7
+ #
8
+ # Slobodan Paunović <slobodan dot paunovic at gmail dot com>, 2008
9
+ #
10
+ msgid ""
11
+ msgstr ""
12
+ "Project-Id-Version: gettext_activerecord 0.1.0\n"
13
+ "POT-Creation-Date: 2009-02-09 01:48+0900\n"
14
+ "PO-Revision-Date: 2008-07-13 08:52+0200\n"
15
+ "Last-Translator: Slobodan Paunović <slobodan dot paunovic at gmail dot com>\n"
16
+ "Language-Team: Serbian\n"
17
+ "MIME-Version: 1.0\n"
18
+ "Content-Type: text/plain; charset=UTF-8\n"
19
+ "Content-Transfer-Encoding: 8bit\n"
20
+ "Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%"
21
+ "10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n"
22
+
23
+ #: lib/gettext_activerecord/parser.rb:60
24
+ msgid "'%{file}' is not found."
25
+ msgstr ""
26
+
27
+ #: lib/gettext_activerecord/parser.rb:104
28
+ msgid "Ignored '%{file}'. Solve dependencies first."
29
+ msgstr ""
30
+
31
+ #: lib/gettext_activerecord/parser.rb:131
32
+ msgid "No database is available."
33
+ msgstr ""
34
+
35
+ #: lib/gettext_activerecord/parser.rb:167
36
+ msgid "rubygems are not found."
37
+ msgstr ""
38
+
39
+ #: lib/gettext_activerecord/active_record.rb:27
40
+ msgid "Validation failed: %{error_messages}"
41
+ msgstr "Провера није успела: %{error_messages}"
42
+
43
+ #: lib/gettext_activerecord/active_record.rb:218
44
+ msgid "%{attribute} is not included in the list"
45
+ msgstr "%{attribute} се не налази у листи"
46
+
47
+ #: lib/gettext_activerecord/active_record.rb:219
48
+ msgid "%{attribute} is reserved"
49
+ msgstr "%{attribute} је резервисано"
50
+
51
+ #: lib/gettext_activerecord/active_record.rb:220
52
+ msgid "%{attribute} is invalid"
53
+ msgstr "%{attribute} није исправно"
54
+
55
+ #: lib/gettext_activerecord/active_record.rb:221
56
+ msgid "%{attribute} doesn't match confirmation"
57
+ msgstr "%{attribute} се не слаже са потврдом"
58
+
59
+ #: lib/gettext_activerecord/active_record.rb:222
60
+ msgid "%{attribute} must be accepted"
61
+ msgstr "%{attribute} мора да се прихвати"
62
+
63
+ #: lib/gettext_activerecord/active_record.rb:223
64
+ msgid "%{attribute} can't be empty"
65
+ msgstr "%{attribute} не сме бити празно"
66
+
67
+ #: lib/gettext_activerecord/active_record.rb:224
68
+ msgid "%{attribute} can't be blank"
69
+ msgstr "%{attribute} не сме бити празно"
70
+
71
+ #: lib/gettext_activerecord/active_record.rb:225
72
+ msgid "%{attribute} is too long (maximum is %{count} characters)"
73
+ msgstr "%{attribute} је сувише дугачко (максимум је %{count} карактера)"
74
+
75
+ #: lib/gettext_activerecord/active_record.rb:226
76
+ msgid "%{attribute} is too short (minimum is %{count} characters)"
77
+ msgstr "%{attribute} је сувише кратко (минимум је %{count} карактера)"
78
+
79
+ #: lib/gettext_activerecord/active_record.rb:227
80
+ msgid "%{attribute} is the wrong length (should be %{count} characters)"
81
+ msgstr "%{attribute} је погрешне дужине (треба да има %{count} карактера)"
82
+
83
+ #: lib/gettext_activerecord/active_record.rb:228
84
+ msgid "%{attribute} has already been taken"
85
+ msgstr "%{attribute} је већ заузето"
86
+
87
+ #: lib/gettext_activerecord/active_record.rb:229
88
+ msgid "%{attribute} is not a number"
89
+ msgstr "%{attribute} није број"
90
+
91
+ #: lib/gettext_activerecord/active_record.rb:230
92
+ msgid "%{attribute} must be greater than %{count}"
93
+ msgstr "%{attribute} мора бити веће од %{count}"
94
+
95
+ #: lib/gettext_activerecord/active_record.rb:231
96
+ msgid "%{attribute} must be greater than or equal to %{count}"
97
+ msgstr "%{attribute} мора бити веће или једнако од %{count}"
98
+
99
+ #: lib/gettext_activerecord/active_record.rb:232
100
+ msgid "%{attribute} must be equal to %{count}"
101
+ msgstr "%{attribute} мора бити једнако %{count}"
102
+
103
+ #: lib/gettext_activerecord/active_record.rb:233
104
+ msgid "%{attribute} must be less than %{count}"
105
+ msgstr "%{attribute} мора бити мање од %{count}"
106
+
107
+ #: lib/gettext_activerecord/active_record.rb:234
108
+ msgid "%{attribute} must be less than or equal to %{count}"
109
+ msgstr "%{attribute} мора бити мање или једнако од %{count}"
110
+
111
+ #: lib/gettext_activerecord/active_record.rb:235
112
+ msgid "%{attribute} must be odd"
113
+ msgstr "%{attribute} мора бити непарно"
114
+
115
+ #: lib/gettext_activerecord/active_record.rb:236
116
+ msgid "%{attribute} must be even"
117
+ msgstr "%{attribute} мора бити парно"
data/po/test.rb ADDED
@@ -0,0 +1,8 @@
1
+ ARGV.each do |v|
2
+ s = open(v).read
3
+ ret = s.gsub(/%\{fn\}/, "%{attribute}").gsub(/%d/, "%{count}")
4
+ open(v, "w") do |out|
5
+ out.write(ret)
6
+ end
7
+ end
8
+
@@ -0,0 +1,120 @@
1
+ # translation of rails.po to Ukrainian
2
+ #
3
+ # a po-file for Ruby-GetText-Package and Ruby on Rails.
4
+ #
5
+ # Copyright (C) 2005-2008 Masao Mutoh
6
+ #
7
+ # This file is distributed under the same license as the Ruby-GetText-Package.
8
+ #
9
+ # Alex Rootoff, 2007,2008
10
+ #
11
+ msgid ""
12
+ msgstr ""
13
+ "Project-Id-Version: gettext_activerecord 0.1.0\n"
14
+ "POT-Creation-Date: 2009-02-09 01:48+0900\n"
15
+ "PO-Revision-Date: 2008-07-14 05:33+0200\n"
16
+ "Last-Translator: Alex Rootoff <rootoff at pisem.net>\n"
17
+ "Language-Team: Ukrainian\n"
18
+ "MIME-Version: 1.0\n"
19
+ "Content-Type: text/plain; charset=UTF-8\n"
20
+ "Content-Transfer-Encoding: 8bit\n"
21
+ "Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%"
22
+ "10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
23
+ "n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
24
+ "n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
25
+
26
+ #: lib/gettext_activerecord/parser.rb:60
27
+ msgid "'%{file}' is not found."
28
+ msgstr ""
29
+
30
+ #: lib/gettext_activerecord/parser.rb:104
31
+ msgid "Ignored '%{file}'. Solve dependencies first."
32
+ msgstr ""
33
+
34
+ #: lib/gettext_activerecord/parser.rb:131
35
+ msgid "No database is available."
36
+ msgstr ""
37
+
38
+ #: lib/gettext_activerecord/parser.rb:167
39
+ msgid "rubygems are not found."
40
+ msgstr ""
41
+
42
+ #: lib/gettext_activerecord/active_record.rb:27
43
+ msgid "Validation failed: %{error_messages}"
44
+ msgstr "Перевірка правильності завершилась невдачею: %{error_messages}"
45
+
46
+ #: lib/gettext_activerecord/active_record.rb:218
47
+ msgid "%{attribute} is not included in the list"
48
+ msgstr "%{attribute} не включено в перелік"
49
+
50
+ #: lib/gettext_activerecord/active_record.rb:219
51
+ msgid "%{attribute} is reserved"
52
+ msgstr "%{attribute} зарезервовано"
53
+
54
+ #: lib/gettext_activerecord/active_record.rb:220
55
+ msgid "%{attribute} is invalid"
56
+ msgstr "%{attribute} недійсний"
57
+
58
+ #: lib/gettext_activerecord/active_record.rb:221
59
+ msgid "%{attribute} doesn't match confirmation"
60
+ msgstr "%{attribute} не підтверджено"
61
+
62
+ #: lib/gettext_activerecord/active_record.rb:222
63
+ msgid "%{attribute} must be accepted"
64
+ msgstr "%{attribute} необхідно прийняти"
65
+
66
+ #: lib/gettext_activerecord/active_record.rb:223
67
+ msgid "%{attribute} can't be empty"
68
+ msgstr "%{attribute} не може бути пустим"
69
+
70
+ #: lib/gettext_activerecord/active_record.rb:224
71
+ msgid "%{attribute} can't be blank"
72
+ msgstr "%{attribute} не може бути пустим чи невизначеним"
73
+
74
+ #: lib/gettext_activerecord/active_record.rb:225
75
+ msgid "%{attribute} is too long (maximum is %{count} characters)"
76
+ msgstr "%{attribute} задовгий (має бути щонайбільше %{count} символів)"
77
+
78
+ #: lib/gettext_activerecord/active_record.rb:226
79
+ msgid "%{attribute} is too short (minimum is %{count} characters)"
80
+ msgstr "%{attribute} закороткий (має бути щонайменше %{count} символів)"
81
+
82
+ #: lib/gettext_activerecord/active_record.rb:227
83
+ msgid "%{attribute} is the wrong length (should be %{count} characters)"
84
+ msgstr "%{attribute} неправильна довжина (має бути %{count} символів)"
85
+
86
+ #: lib/gettext_activerecord/active_record.rb:228
87
+ msgid "%{attribute} has already been taken"
88
+ msgstr "%{attribute} вже зайнято"
89
+
90
+ #: lib/gettext_activerecord/active_record.rb:229
91
+ msgid "%{attribute} is not a number"
92
+ msgstr "%{attribute} не є числом"
93
+
94
+ #: lib/gettext_activerecord/active_record.rb:230
95
+ msgid "%{attribute} must be greater than %{count}"
96
+ msgstr "%{attribute} має бути більше, ніж %{count}"
97
+
98
+ #: lib/gettext_activerecord/active_record.rb:231
99
+ msgid "%{attribute} must be greater than or equal to %{count}"
100
+ msgstr "%{attribute} має бути щонайменше %{count}"
101
+
102
+ #: lib/gettext_activerecord/active_record.rb:232
103
+ msgid "%{attribute} must be equal to %{count}"
104
+ msgstr "%{attribute} має бути %{count}"
105
+
106
+ #: lib/gettext_activerecord/active_record.rb:233
107
+ msgid "%{attribute} must be less than %{count}"
108
+ msgstr "%{attribute} має бути менше, ніж %{count}"
109
+
110
+ #: lib/gettext_activerecord/active_record.rb:234
111
+ msgid "%{attribute} must be less than or equal to %{count}"
112
+ msgstr "%{attribute} має бути щонайбільше %{count}"
113
+
114
+ #: lib/gettext_activerecord/active_record.rb:235
115
+ msgid "%{attribute} must be odd"
116
+ msgstr "%{attribute} має бути непарним"
117
+
118
+ #: lib/gettext_activerecord/active_record.rb:236
119
+ msgid "%{attribute} must be even"
120
+ msgstr "%{attribute} має бути парним"
@@ -0,0 +1,116 @@
1
+ #
2
+ # a po-file for Ruby-GetText-Package and Ruby on Rails.
3
+ #
4
+ # Copyright (C) 2005-2008 Masao Mutoh
5
+ #
6
+ # This file is distributed under the same license as the Ruby-GetText-Package.
7
+ #
8
+ # Ngoc DAO Thanh <ngocdaothanh at gmail.com>, 2007,2008.
9
+ #
10
+ msgid ""
11
+ msgstr ""
12
+ "Project-Id-Version: gettext_activerecord 0.1.0\n"
13
+ "POT-Creation-Date: 2009-02-09 01:48+0900\n"
14
+ "PO-Revision-Date: 2008-07-13 21:24+0900\n"
15
+ "Last-Translator: Ngoc Dao <ngocdaothanh@gmail.com>\n"
16
+ "Language-Team: Vietnamese\n"
17
+ "MIME-Version: 1.0\n"
18
+ "Content-Type: text/plain; charset=UTF-8\n"
19
+ "Content-Transfer-Encoding: 8bit\n"
20
+ "Plural-Forms: nplurals=2; plural=(n != 1);\n"
21
+
22
+ #: lib/gettext_activerecord/parser.rb:60
23
+ msgid "'%{file}' is not found."
24
+ msgstr ""
25
+
26
+ #: lib/gettext_activerecord/parser.rb:104
27
+ msgid "Ignored '%{file}'. Solve dependencies first."
28
+ msgstr ""
29
+
30
+ #: lib/gettext_activerecord/parser.rb:131
31
+ msgid "No database is available."
32
+ msgstr ""
33
+
34
+ #: lib/gettext_activerecord/parser.rb:167
35
+ msgid "rubygems are not found."
36
+ msgstr ""
37
+
38
+ #: lib/gettext_activerecord/active_record.rb:27
39
+ msgid "Validation failed: %{error_messages}"
40
+ msgstr "Kiểm chứng thất bại: %{error_messages}"
41
+
42
+ #: lib/gettext_activerecord/active_record.rb:218
43
+ msgid "%{attribute} is not included in the list"
44
+ msgstr "%{attribute} không có trong danh sách"
45
+
46
+ #: lib/gettext_activerecord/active_record.rb:219
47
+ msgid "%{attribute} is reserved"
48
+ msgstr "%{attribute} được dành riêng"
49
+
50
+ #: lib/gettext_activerecord/active_record.rb:220
51
+ msgid "%{attribute} is invalid"
52
+ msgstr "%{attribute} không hợp lệ"
53
+
54
+ #: lib/gettext_activerecord/active_record.rb:221
55
+ msgid "%{attribute} doesn't match confirmation"
56
+ msgstr "%{attribute} không khớp với xác nhận"
57
+
58
+ #: lib/gettext_activerecord/active_record.rb:222
59
+ msgid "%{attribute} must be accepted"
60
+ msgstr "%{attribute} phải được chấp nhận"
61
+
62
+ #: lib/gettext_activerecord/active_record.rb:223
63
+ msgid "%{attribute} can't be empty"
64
+ msgstr "%{attribute} không được rỗng"
65
+
66
+ #: lib/gettext_activerecord/active_record.rb:224
67
+ msgid "%{attribute} can't be blank"
68
+ msgstr "%{attribute} không được trống"
69
+
70
+ #: lib/gettext_activerecord/active_record.rb:225
71
+ msgid "%{attribute} is too long (maximum is %{count} characters)"
72
+ msgstr "%{attribute} quá dài (tối đa là %{count} kí tự)"
73
+
74
+ #: lib/gettext_activerecord/active_record.rb:226
75
+ msgid "%{attribute} is too short (minimum is %{count} characters)"
76
+ msgstr "%{attribute} quá ngắn (tối thiểu là %{count} kí tự)"
77
+
78
+ #: lib/gettext_activerecord/active_record.rb:227
79
+ msgid "%{attribute} is the wrong length (should be %{count} characters)"
80
+ msgstr "%{attribute} sai chiều dài (phải là %{count} kí tự)"
81
+
82
+ #: lib/gettext_activerecord/active_record.rb:228
83
+ msgid "%{attribute} has already been taken"
84
+ msgstr "%{attribute} đã tồn tại"
85
+
86
+ #: lib/gettext_activerecord/active_record.rb:229
87
+ msgid "%{attribute} is not a number"
88
+ msgstr "%{attribute} không phải là số"
89
+
90
+ #: lib/gettext_activerecord/active_record.rb:230
91
+ msgid "%{attribute} must be greater than %{count}"
92
+ msgstr "%{attribute} phải lớn hơn %{count}"
93
+
94
+ #: lib/gettext_activerecord/active_record.rb:231
95
+ msgid "%{attribute} must be greater than or equal to %{count}"
96
+ msgstr "%{attribute} phải lớn hơn hoặc bằng %{count}"
97
+
98
+ #: lib/gettext_activerecord/active_record.rb:232
99
+ msgid "%{attribute} must be equal to %{count}"
100
+ msgstr "%{attribute} phải bằng %{count}"
101
+
102
+ #: lib/gettext_activerecord/active_record.rb:233
103
+ msgid "%{attribute} must be less than %{count}"
104
+ msgstr "%{attribute} phải nhỏ hơn %{count}"
105
+
106
+ #: lib/gettext_activerecord/active_record.rb:234
107
+ msgid "%{attribute} must be less than or equal to %{count}"
108
+ msgstr "%{attribute} phải nhỏ hơn hoặc bằng %{count}"
109
+
110
+ #: lib/gettext_activerecord/active_record.rb:235
111
+ msgid "%{attribute} must be odd"
112
+ msgstr "%{attribute} phải lẻ"
113
+
114
+ #: lib/gettext_activerecord/active_record.rb:236
115
+ msgid "%{attribute} must be even"
116
+ msgstr "%{attribute} phải chẵn"
@@ -0,0 +1,119 @@
1
+ # translation of rails.po to Simplified Chinese
2
+ #
3
+ # a po-file for Ruby-GetText-Package and Ruby on Rails.
4
+ #
5
+ # Copyright (C) 2006-2008 Masao Mutoh
6
+ #
7
+ # This file is distributed under the same license as the Ruby-GetText-Package.
8
+ #
9
+ # Yang Bob <bob.yang.dev at gmail.com>, 2006-2008.
10
+ # Yingfeng <blogyingfeng at gmail.com>, 2006.
11
+ #
12
+ msgid ""
13
+ msgstr ""
14
+ "Project-Id-Version: gettext_activerecord 0.1.0\n"
15
+ "POT-Creation-Date: 2009-02-09 01:48+0900\n"
16
+ "PO-Revision-Date: 2006-04-15 13:36+0300\n"
17
+ "Last-Translator: Yang Bob <bob.yang.dev at gmail.com>\n"
18
+ "Language-Team: Simplified Chinese\n"
19
+ "MIME-Version: 1.0\n"
20
+ "Content-Type: text/plain; charset=UTF-8\n"
21
+ "Content-Transfer-Encoding: 8bit\n"
22
+ "Plural-Forms: nplurals=1; plural=0;\n"
23
+ "X-Generator: KBabel 1.9.1\n"
24
+
25
+ #: lib/gettext_activerecord/parser.rb:60
26
+ msgid "'%{file}' is not found."
27
+ msgstr ""
28
+
29
+ #: lib/gettext_activerecord/parser.rb:104
30
+ msgid "Ignored '%{file}'. Solve dependencies first."
31
+ msgstr ""
32
+
33
+ #: lib/gettext_activerecord/parser.rb:131
34
+ msgid "No database is available."
35
+ msgstr ""
36
+
37
+ #: lib/gettext_activerecord/parser.rb:167
38
+ msgid "rubygems are not found."
39
+ msgstr ""
40
+
41
+ #: lib/gettext_activerecord/active_record.rb:27
42
+ msgid "Validation failed: %{error_messages}"
43
+ msgstr "验证失败:%{error_messages}"
44
+
45
+ #: lib/gettext_activerecord/active_record.rb:218
46
+ msgid "%{attribute} is not included in the list"
47
+ msgstr "%{attribute}没有包含在本列表中"
48
+
49
+ #: lib/gettext_activerecord/active_record.rb:219
50
+ msgid "%{attribute} is reserved"
51
+ msgstr "%{attribute}是保留关键字"
52
+
53
+ #: lib/gettext_activerecord/active_record.rb:220
54
+ msgid "%{attribute} is invalid"
55
+ msgstr "%{attribute}无效"
56
+
57
+ #: lib/gettext_activerecord/active_record.rb:221
58
+ msgid "%{attribute} doesn't match confirmation"
59
+ msgstr "%{attribute}与确认输入的内容不一致"
60
+
61
+ #: lib/gettext_activerecord/active_record.rb:222
62
+ msgid "%{attribute} must be accepted"
63
+ msgstr "%{attribute}必须被接受"
64
+
65
+ #: lib/gettext_activerecord/active_record.rb:223
66
+ msgid "%{attribute} can't be empty"
67
+ msgstr "%{attribute}不能为空"
68
+
69
+ #: lib/gettext_activerecord/active_record.rb:224
70
+ msgid "%{attribute} can't be blank"
71
+ msgstr "%{attribute}不能为空"
72
+
73
+ #: lib/gettext_activerecord/active_record.rb:225
74
+ msgid "%{attribute} is too long (maximum is %{count} characters)"
75
+ msgstr "%{attribute}超出长度范围了(最多允许%{count}个字符)"
76
+
77
+ #: lib/gettext_activerecord/active_record.rb:226
78
+ msgid "%{attribute} is too short (minimum is %{count} characters)"
79
+ msgstr "%{attribute}太短了 (不能少于%{count}个字符)"
80
+
81
+ #: lib/gettext_activerecord/active_record.rb:227
82
+ msgid "%{attribute} is the wrong length (should be %{count} characters)"
83
+ msgstr "%{attribute}长度错误 (应当包含%{count}个字符)"
84
+
85
+ #: lib/gettext_activerecord/active_record.rb:228
86
+ msgid "%{attribute} has already been taken"
87
+ msgstr "%{attribute}已经被使用了"
88
+
89
+ #: lib/gettext_activerecord/active_record.rb:229
90
+ msgid "%{attribute} is not a number"
91
+ msgstr "%{attribute}不是数字"
92
+
93
+ #: lib/gettext_activerecord/active_record.rb:230
94
+ msgid "%{attribute} must be greater than %{count}"
95
+ msgstr "%{attribute}必须大于"
96
+
97
+ #: lib/gettext_activerecord/active_record.rb:231
98
+ msgid "%{attribute} must be greater than or equal to %{count}"
99
+ msgstr "%{attribute}必须大于等于"
100
+
101
+ #: lib/gettext_activerecord/active_record.rb:232
102
+ msgid "%{attribute} must be equal to %{count}"
103
+ msgstr "%{attribute}必须等于"
104
+
105
+ #: lib/gettext_activerecord/active_record.rb:233
106
+ msgid "%{attribute} must be less than %{count}"
107
+ msgstr "%{attribute}必须小于"
108
+
109
+ #: lib/gettext_activerecord/active_record.rb:234
110
+ msgid "%{attribute} must be less than or equal to %{count}"
111
+ msgstr "%{attribute}必须小于等于"
112
+
113
+ #: lib/gettext_activerecord/active_record.rb:235
114
+ msgid "%{attribute} must be odd"
115
+ msgstr "%{attribute}必须是奇数"
116
+
117
+ #: lib/gettext_activerecord/active_record.rb:236
118
+ msgid "%{attribute} must be even"
119
+ msgstr "%{attribute}必须是偶数"
@@ -0,0 +1,119 @@
1
+ #
2
+ # a po-file for Ruby-GetText-Package and Ruby on Rails.
3
+ #
4
+ # Copyright (C) 2005-2008 Masao Mutoh
5
+ #
6
+ # This file is distributed under the same license as the Ruby-GetText-Package.
7
+ #
8
+ # Yang Bob <bob.yang.dev at gmail.com>, 2006-2008.
9
+ # LIN CHUNG-YI <xmarsh at gmail.com>, 2006.
10
+ #
11
+ msgid ""
12
+ msgstr ""
13
+ "Project-Id-Version: gettext_activerecord 0.1.0\n"
14
+ "POT-Creation-Date: 2009-02-09 01:48+0900\n"
15
+ "PO-Revision-Date: 2006-08-21 09:27+0800\n"
16
+ "Last-Translator: Yang Bob <bob.yang.dev at gmail.com>\n"
17
+ "Language-Team: zh_TW <xmarsh at gmail.com>\n"
18
+ "MIME-Version: 1.0\n"
19
+ "Content-Type: text/plain; charset=UTF-8\n"
20
+ "Content-Transfer-Encoding: 8bit\n"
21
+ "X-Poedit-Language: Chinese\n"
22
+ "X-Poedit-Country: TAIWAN\n"
23
+ "Plural-Forms: nplurals=1; plural=0;\n"
24
+
25
+ #: lib/gettext_activerecord/parser.rb:60
26
+ msgid "'%{file}' is not found."
27
+ msgstr ""
28
+
29
+ #: lib/gettext_activerecord/parser.rb:104
30
+ msgid "Ignored '%{file}'. Solve dependencies first."
31
+ msgstr ""
32
+
33
+ #: lib/gettext_activerecord/parser.rb:131
34
+ msgid "No database is available."
35
+ msgstr ""
36
+
37
+ #: lib/gettext_activerecord/parser.rb:167
38
+ msgid "rubygems are not found."
39
+ msgstr ""
40
+
41
+ #: lib/gettext_activerecord/active_record.rb:27
42
+ msgid "Validation failed: %{error_messages}"
43
+ msgstr "校驗失敗:%{error_messages}"
44
+
45
+ #: lib/gettext_activerecord/active_record.rb:218
46
+ msgid "%{attribute} is not included in the list"
47
+ msgstr "%{attribute}沒有包含在列表中"
48
+
49
+ #: lib/gettext_activerecord/active_record.rb:219
50
+ msgid "%{attribute} is reserved"
51
+ msgstr "%{attribute}被保留"
52
+
53
+ #: lib/gettext_activerecord/active_record.rb:220
54
+ msgid "%{attribute} is invalid"
55
+ msgstr "%{attribute}是無效"
56
+
57
+ #: lib/gettext_activerecord/active_record.rb:221
58
+ msgid "%{attribute} doesn't match confirmation"
59
+ msgstr "%{attribute}不符和確認標準"
60
+
61
+ #: lib/gettext_activerecord/active_record.rb:222
62
+ msgid "%{attribute} must be accepted"
63
+ msgstr "%{attribute}必須接受"
64
+
65
+ #: lib/gettext_activerecord/active_record.rb:223
66
+ msgid "%{attribute} can't be empty"
67
+ msgstr "%{attribute}不能是空白"
68
+
69
+ #: lib/gettext_activerecord/active_record.rb:224
70
+ msgid "%{attribute} can't be blank"
71
+ msgstr "%{attribute}不能是空白"
72
+
73
+ #: lib/gettext_activerecord/active_record.rb:225
74
+ msgid "%{attribute} is too long (maximum is %{count} characters)"
75
+ msgstr "%{attribute}太長 (最長是%{count}个字)"
76
+
77
+ #: lib/gettext_activerecord/active_record.rb:226
78
+ msgid "%{attribute} is too short (minimum is %{count} characters)"
79
+ msgstr "%{attribute}太短 (最短是%{count}个字)"
80
+
81
+ #: lib/gettext_activerecord/active_record.rb:227
82
+ msgid "%{attribute} is the wrong length (should be %{count} characters)"
83
+ msgstr "%{attribute}字數錯誤 (應該是%{count}個字)"
84
+
85
+ #: lib/gettext_activerecord/active_record.rb:228
86
+ msgid "%{attribute} has already been taken"
87
+ msgstr "%{attribute}已被使用"
88
+
89
+ #: lib/gettext_activerecord/active_record.rb:229
90
+ msgid "%{attribute} is not a number"
91
+ msgstr "%{attribute}不是數字"
92
+
93
+ #: lib/gettext_activerecord/active_record.rb:230
94
+ msgid "%{attribute} must be greater than %{count}"
95
+ msgstr "%{attribute}必須大於"
96
+
97
+ #: lib/gettext_activerecord/active_record.rb:231
98
+ msgid "%{attribute} must be greater than or equal to %{count}"
99
+ msgstr "%{attribute}必須大於等於"
100
+
101
+ #: lib/gettext_activerecord/active_record.rb:232
102
+ msgid "%{attribute} must be equal to %{count}"
103
+ msgstr "%{attribute}必須等於"
104
+
105
+ #: lib/gettext_activerecord/active_record.rb:233
106
+ msgid "%{attribute} must be less than %{count}"
107
+ msgstr "%{attribute}必須小於"
108
+
109
+ #: lib/gettext_activerecord/active_record.rb:234
110
+ msgid "%{attribute} must be less than or equal to %{count}"
111
+ msgstr "%{attribute}必須小於等於"
112
+
113
+ #: lib/gettext_activerecord/active_record.rb:235
114
+ msgid "%{attribute} must be odd"
115
+ msgstr "%{attribute}必須是奇数"
116
+
117
+ #: lib/gettext_activerecord/active_record.rb:236
118
+ msgid "%{attribute} must be even"
119
+ msgstr "%{attribute}必須是偶数"
data/replace.rb ADDED
@@ -0,0 +1,21 @@
1
+ Dir.glob("**/*") do |v|
2
+ lines = []
3
+ changed = false
4
+ next if File.directory? v
5
+ IO.foreach(v) {|line|
6
+ if line =~ /mutoh(at|@)highway.ne.jp/
7
+ lines << line.gsub(/mutoh( at |@)highway.ne.jp/, "mutomasa at gmail.com")
8
+ changed = true
9
+ else
10
+ lines << line
11
+ end
12
+ }
13
+ if changed
14
+ out = open(v, "w")
15
+ lines.each {|l|
16
+ out.write l
17
+ }
18
+ out.close
19
+ end
20
+ end
21
+
@@ -0,0 +1,9 @@
1
+ = Sample for gettext_activerecord
2
+ == USAGE
3
+ (Install sqlite3 and sqlite3-ruby first)
4
+
5
+ $ Edit config/database.yml if you need.
6
+ $ rake createdb
7
+ $ rake makemo
8
+ $ ruby sample.rb
9
+ (or ruby -I/gettext/path/lib sample.rb)
data/sample/Rakefile ADDED
@@ -0,0 +1,32 @@
1
+ $LOAD_PATH.unshift "../lib"
2
+
3
+ gettext_path = File.join(ENV["GETTEXT_PATH"] || "../../gettext/", "lib")
4
+ $LOAD_PATH.unshift gettext_path
5
+
6
+ require 'rubygems'
7
+ require 'gettext'
8
+
9
+ desc "Create mo files"
10
+ task :makemo do
11
+ require 'gettext_activerecord/tools'
12
+ GetText.create_mofiles
13
+ end
14
+
15
+ desc "Update po files"
16
+ task :updatepo do
17
+ require 'gettext_activerecord/tools'
18
+ # Read Database information from "config/database.yml"
19
+ GetText.update_pofiles("sample_ar", ["book.rb"],
20
+ "sample AR 1.0.0")
21
+ end
22
+
23
+ task :createdb do
24
+ require 'active_record'
25
+ config = YAML.load(IO.read("config/database.yml"))["development"]
26
+ ActiveRecord::Base.establish_connection(config)
27
+ require 'db/schema.rb'
28
+ end
29
+
30
+ task :dropdb do
31
+ rm "db/development.sqlite3"
32
+ end
data/sample/book.rb ADDED
@@ -0,0 +1,3 @@
1
+ class Book < ActiveRecord::Base
2
+ validates_length_of :title, :minimum => 10
3
+ end
@@ -0,0 +1,3 @@
1
+ development:
2
+ adapter: "sqlite3"
3
+ database: db/development.sqlite3
Binary file