gettext_rails 2.0.0 → 2.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (48) hide show
  1. data/ChangeLog +9 -0
  2. data/README.rdoc +3 -7
  3. data/Rakefile +4 -4
  4. data/lib/gettext_rails/action_mailer.rb +1 -1
  5. data/lib/gettext_rails/action_view/active_record_helper.rb +8 -3
  6. data/lib/gettext_rails/version.rb +1 -2
  7. data/sample/app/controllers/application_controller.rb +6 -4
  8. data/test/Rakefile +1 -0
  9. data/test/app/controllers/articles_controller.rb +0 -16
  10. data/test/app/controllers/users_controller.rb +6 -6
  11. data/test/app/views/users/error_message.html.erb +50 -0
  12. data/test/app/views/users/{custom_error_message_fr.html.erb → error_message_fr.html.erb} +0 -8
  13. data/test/config/environment.rb +0 -1
  14. data/test/config/routes.rb +1 -6
  15. data/test/locale/ja/LC_MESSAGES/rails_test.mo +0 -0
  16. data/test/po/ja/rails_test.po +4 -4
  17. data/test/public/index.html +1 -3
  18. data/test/test/functional/articles_controller_test.rb +0 -16
  19. data/test/test/functional/users_controller_test.rb +10 -22
  20. data/test/test/result/en/error_message.html +46 -0
  21. data/test/test/result/fr/error_message.html +16 -0
  22. data/test/test/result/ja/error_message.html +46 -0
  23. metadata +14 -50
  24. data/replace.rb +0 -21
  25. data/sample/db/development.sqlite3 +0 -0
  26. data/sample/db/production.sqlite3 +0 -0
  27. data/sample/db/test.sqlite3 +0 -0
  28. data/sample/log/development.log +0 -635
  29. data/sample/log/production.log +0 -79475
  30. data/sample/log/test.log +0 -1592
  31. data/sample/test/result/en/list.html +0 -69
  32. data/test/app/views/articles/change_title_error_messages_for.html.erb +0 -15
  33. data/test/app/views/articles/multi_error_messages_for.html.erb +0 -19
  34. data/test/app/views/users/custom_error_message.html.erb +0 -13
  35. data/test/db/development.sqlite3 +0 -0
  36. data/test/db/test.sqlite3 +0 -0
  37. data/test/log/development.log +0 -1284
  38. data/test/log/test.log +0 -5595
  39. data/test/test/result/en/change_title_error_messages_for.html +0 -89
  40. data/test/test/result/en/custom_error_message.html +0 -84
  41. data/test/test/result/en/custom_error_message_with_plural.html +0 -84
  42. data/test/test/result/en/multi_error_messages_for.html +0 -155
  43. data/test/test/result/fr/custom_error_message.html +0 -84
  44. data/test/test/result/fr/custom_error_message_with_plural.html +0 -84
  45. data/test/test/result/ja/change_title_error_messages_for.html +0 -89
  46. data/test/test/result/ja/custom_error_message.html +0 -84
  47. data/test/test/result/ja/custom_error_message_with_plural.html +0 -84
  48. data/test/test/result/ja/multi_error_messages_for.html +0 -155
@@ -1,89 +0,0 @@
1
- <html>
2
- <head>
3
- <meta http-equiv="content-type" content="text/html;charset=UTF-8" />
4
- <title>Ruby-GetText-Package Test Application</title>
5
- <link href="/stylesheets/scaffold.css" media="screen" rel="Stylesheet" type="text/css" />
6
- </head>
7
- <body>
8
-
9
- <p style="color: green"></p>
10
-
11
- <div class="errorExplanation" id="errorExplanation"><h2>Message Titles</h2><p>Message Explanations</p><ul><li>Title can't be blank</li><li>Description is too short (minimum is 3 characters)</li></ul></div>
12
-
13
- <!--[form:article]-->
14
- <p><label for="article_title">Title</label><br/>
15
- <div class="fieldWithErrors"><input id="article_title" name="article[title]" size="30" type="text" value="" /></div></p>
16
-
17
- <p><label for="article_description">Description</label><br/>
18
- <div class="fieldWithErrors"><textarea cols="40" id="article_description" name="article[description]" rows="20"></textarea></div></p>
19
-
20
- <p><label for="article_lastupdate">Lastupdate</label><br/>
21
- <select id="article_lastupdate_1i" name="article[lastupdate(1i)]">
22
- <option value="2002">2002</option>
23
- <option value="2003">2003</option>
24
- <option value="2004">2004</option>
25
- <option value="2005">2005</option>
26
- <option value="2006">2006</option>
27
- <option selected="selected" value="2007">2007</option>
28
- <option value="2008">2008</option>
29
- <option value="2009">2009</option>
30
- <option value="2010">2010</option>
31
- <option value="2011">2011</option>
32
- <option value="2012">2012</option>
33
- </select>
34
- <select id="article_lastupdate_2i" name="article[lastupdate(2i)]">
35
- <option value="1">January</option>
36
- <option value="2">February</option>
37
- <option value="3">March</option>
38
- <option selected="selected" value="4">April</option>
39
- <option value="5">May</option>
40
- <option value="6">June</option>
41
- <option value="7">July</option>
42
- <option value="8">August</option>
43
- <option value="9">September</option>
44
- <option value="10">October</option>
45
- <option value="11">November</option>
46
- <option value="12">December</option>
47
- </select>
48
- <select id="article_lastupdate_3i" name="article[lastupdate(3i)]">
49
- <option selected="selected" value="1">1</option>
50
- <option value="2">2</option>
51
- <option value="3">3</option>
52
- <option value="4">4</option>
53
- <option value="5">5</option>
54
- <option value="6">6</option>
55
- <option value="7">7</option>
56
- <option value="8">8</option>
57
- <option value="9">9</option>
58
- <option value="10">10</option>
59
- <option value="11">11</option>
60
- <option value="12">12</option>
61
- <option value="13">13</option>
62
- <option value="14">14</option>
63
- <option value="15">15</option>
64
- <option value="16">16</option>
65
- <option value="17">17</option>
66
- <option value="18">18</option>
67
- <option value="19">19</option>
68
- <option value="20">20</option>
69
- <option value="21">21</option>
70
- <option value="22">22</option>
71
- <option value="23">23</option>
72
- <option value="24">24</option>
73
- <option value="25">25</option>
74
- <option value="26">26</option>
75
- <option value="27">27</option>
76
- <option value="28">28</option>
77
- <option value="29">29</option>
78
- <option value="30">30</option>
79
- <option value="31">31</option>
80
- </select>
81
- </p>
82
- <!--[eoform:article]-->
83
-
84
-
85
-
86
- <br/>
87
- <a href="/">Back to Top</a>
88
- </body>
89
- </html>
@@ -1,84 +0,0 @@
1
- <html>
2
- <head>
3
- <meta http-equiv="content-type" content="text/html;charset=UTF-8" />
4
- <title>Ruby-GetText-Package Test Application</title>
5
- <link href="/stylesheets/scaffold.css" media="screen" rel="Stylesheet" type="text/css" />
6
- </head>
7
- <body>
8
- <p style="color: green"></p>
9
-
10
- <div class="errorExplanation" id="errorExplanation"><h2>Singular Custom Error message user: 1</h2><p>Singular Custom Error explanation 1</p><ul><li>Name is too short (minimum is 10 characters)</li></ul></div>
11
-
12
- <!--[form:article]-->
13
- <p><label for="user_name">Name</label><br/>
14
- <div class="fieldWithErrors"><input id="user_name" name="user[name]" size="30" type="text" value="foo" /></div></p>
15
-
16
- <p><label for="user_lastupdate">Lastupdate</label><br/>
17
- <select id="user_lastupdate_1i" name="user[lastupdate(1i)]">
18
- <option value="2002">2002</option>
19
- <option value="2003">2003</option>
20
- <option value="2004">2004</option>
21
- <option value="2005">2005</option>
22
- <option value="2006">2006</option>
23
- <option selected="selected" value="2007">2007</option>
24
- <option value="2008">2008</option>
25
- <option value="2009">2009</option>
26
- <option value="2010">2010</option>
27
- <option value="2011">2011</option>
28
- <option value="2012">2012</option>
29
- </select>
30
- <select id="user_lastupdate_2i" name="user[lastupdate(2i)]">
31
- <option selected="selected" value="1">January</option>
32
- <option value="2">February</option>
33
- <option value="3">March</option>
34
- <option value="4">April</option>
35
- <option value="5">May</option>
36
- <option value="6">June</option>
37
- <option value="7">July</option>
38
- <option value="8">August</option>
39
- <option value="9">September</option>
40
- <option value="10">October</option>
41
- <option value="11">November</option>
42
- <option value="12">December</option>
43
- </select>
44
- <select id="user_lastupdate_3i" name="user[lastupdate(3i)]">
45
- <option selected="selected" value="1">1</option>
46
- <option value="2">2</option>
47
- <option value="3">3</option>
48
- <option value="4">4</option>
49
- <option value="5">5</option>
50
- <option value="6">6</option>
51
- <option value="7">7</option>
52
- <option value="8">8</option>
53
- <option value="9">9</option>
54
- <option value="10">10</option>
55
- <option value="11">11</option>
56
- <option value="12">12</option>
57
- <option value="13">13</option>
58
- <option value="14">14</option>
59
- <option value="15">15</option>
60
- <option value="16">16</option>
61
- <option value="17">17</option>
62
- <option value="18">18</option>
63
- <option value="19">19</option>
64
- <option value="20">20</option>
65
- <option value="21">21</option>
66
- <option value="22">22</option>
67
- <option value="23">23</option>
68
- <option value="24">24</option>
69
- <option value="25">25</option>
70
- <option value="26">26</option>
71
- <option value="27">27</option>
72
- <option value="28">28</option>
73
- <option value="29">29</option>
74
- <option value="30">30</option>
75
- <option value="31">31</option>
76
- </select>
77
- </p>
78
- <!--[eoform:article]-->
79
-
80
-
81
-
82
- <a href="/">Back to Top</a>
83
- </body>
84
- </html>
@@ -1,84 +0,0 @@
1
- <html>
2
- <head>
3
- <meta http-equiv="content-type" content="text/html;charset=UTF-8" />
4
- <title>Ruby-GetText-Package Test Application</title>
5
- <link href="/stylesheets/scaffold.css" media="screen" rel="Stylesheet" type="text/css" />
6
- </head>
7
- <body>
8
- <p style="color: green"></p>
9
-
10
- <div class="errorExplanation" id="errorExplanation"><h2>Plural Custom Error message user: 2</h2><p>Plural Custom Error explanation 2</p><ul><li>Name is too short (minimum is 10 characters)</li><li>Lastupdate can't be blank</li></ul></div>
11
-
12
- <!--[form:article]-->
13
- <p><label for="user_name">Name</label><br/>
14
- <div class="fieldWithErrors"><input id="user_name" name="user[name]" size="30" type="text" value="foo" /></div></p>
15
-
16
- <p><label for="user_lastupdate">Lastupdate</label><br/>
17
- <div class="fieldWithErrors"><select id="user_lastupdate_1i" name="user[lastupdate(1i)]">
18
- <option value="2002">2002</option>
19
- <option value="2003">2003</option>
20
- <option value="2004">2004</option>
21
- <option value="2005">2005</option>
22
- <option value="2006">2006</option>
23
- <option selected="selected" value="2007">2007</option>
24
- <option value="2008">2008</option>
25
- <option value="2009">2009</option>
26
- <option value="2010">2010</option>
27
- <option value="2011">2011</option>
28
- <option value="2012">2012</option>
29
- </select>
30
- <select id="user_lastupdate_2i" name="user[lastupdate(2i)]">
31
- <option selected="selected" value="1">January</option>
32
- <option value="2">February</option>
33
- <option value="3">March</option>
34
- <option value="4">April</option>
35
- <option value="5">May</option>
36
- <option value="6">June</option>
37
- <option value="7">July</option>
38
- <option value="8">August</option>
39
- <option value="9">September</option>
40
- <option value="10">October</option>
41
- <option value="11">November</option>
42
- <option value="12">December</option>
43
- </select>
44
- <select id="user_lastupdate_3i" name="user[lastupdate(3i)]">
45
- <option selected="selected" value="1">1</option>
46
- <option value="2">2</option>
47
- <option value="3">3</option>
48
- <option value="4">4</option>
49
- <option value="5">5</option>
50
- <option value="6">6</option>
51
- <option value="7">7</option>
52
- <option value="8">8</option>
53
- <option value="9">9</option>
54
- <option value="10">10</option>
55
- <option value="11">11</option>
56
- <option value="12">12</option>
57
- <option value="13">13</option>
58
- <option value="14">14</option>
59
- <option value="15">15</option>
60
- <option value="16">16</option>
61
- <option value="17">17</option>
62
- <option value="18">18</option>
63
- <option value="19">19</option>
64
- <option value="20">20</option>
65
- <option value="21">21</option>
66
- <option value="22">22</option>
67
- <option value="23">23</option>
68
- <option value="24">24</option>
69
- <option value="25">25</option>
70
- <option value="26">26</option>
71
- <option value="27">27</option>
72
- <option value="28">28</option>
73
- <option value="29">29</option>
74
- <option value="30">30</option>
75
- <option value="31">31</option>
76
- </select>
77
- </div></p>
78
- <!--[eoform:article]-->
79
-
80
-
81
-
82
- <a href="/">Back to Top</a>
83
- </body>
84
- </html>
@@ -1,155 +0,0 @@
1
- <html>
2
- <head>
3
- <meta http-equiv="content-type" content="text/html;charset=UTF-8" />
4
- <title>Ruby-GetText-Package Test Application</title>
5
- <link href="/stylesheets/scaffold.css" media="screen" rel="Stylesheet" type="text/css" />
6
- </head>
7
- <body>
8
-
9
- <p style="color: green"></p>
10
-
11
- <div class="errorExplanation" id="errorExplanation"><h2>3 errors prohibited this Contents from being saved</h2><p>There were problems with the following fields:</p><ul><li>Title can't be blank</li><li>Description is too short (minimum is 3 characters)</li><li>Name is too short (minimum is 10 characters)</li></ul></div>
12
-
13
- <!--[form:article]-->
14
- <p><label for="article_title">Title</label><br/>
15
- <div class="fieldWithErrors"><input id="article_title" name="article[title]" size="30" type="text" value="" /></div></p>
16
-
17
- <p><label for="article_description">Description</label><br/>
18
- <div class="fieldWithErrors"><textarea cols="40" id="article_description" name="article[description]" rows="20"></textarea></div></p>
19
-
20
- <p><label for="article_lastupdate">Lastupdate</label><br/>
21
- <select id="article_lastupdate_1i" name="article[lastupdate(1i)]">
22
- <option value="2002">2002</option>
23
- <option value="2003">2003</option>
24
- <option value="2004">2004</option>
25
- <option value="2005">2005</option>
26
- <option value="2006">2006</option>
27
- <option selected="selected" value="2007">2007</option>
28
- <option value="2008">2008</option>
29
- <option value="2009">2009</option>
30
- <option value="2010">2010</option>
31
- <option value="2011">2011</option>
32
- <option value="2012">2012</option>
33
- </select>
34
- <select id="article_lastupdate_2i" name="article[lastupdate(2i)]">
35
- <option value="1">January</option>
36
- <option value="2">February</option>
37
- <option value="3">March</option>
38
- <option selected="selected" value="4">April</option>
39
- <option value="5">May</option>
40
- <option value="6">June</option>
41
- <option value="7">July</option>
42
- <option value="8">August</option>
43
- <option value="9">September</option>
44
- <option value="10">October</option>
45
- <option value="11">November</option>
46
- <option value="12">December</option>
47
- </select>
48
- <select id="article_lastupdate_3i" name="article[lastupdate(3i)]">
49
- <option selected="selected" value="1">1</option>
50
- <option value="2">2</option>
51
- <option value="3">3</option>
52
- <option value="4">4</option>
53
- <option value="5">5</option>
54
- <option value="6">6</option>
55
- <option value="7">7</option>
56
- <option value="8">8</option>
57
- <option value="9">9</option>
58
- <option value="10">10</option>
59
- <option value="11">11</option>
60
- <option value="12">12</option>
61
- <option value="13">13</option>
62
- <option value="14">14</option>
63
- <option value="15">15</option>
64
- <option value="16">16</option>
65
- <option value="17">17</option>
66
- <option value="18">18</option>
67
- <option value="19">19</option>
68
- <option value="20">20</option>
69
- <option value="21">21</option>
70
- <option value="22">22</option>
71
- <option value="23">23</option>
72
- <option value="24">24</option>
73
- <option value="25">25</option>
74
- <option value="26">26</option>
75
- <option value="27">27</option>
76
- <option value="28">28</option>
77
- <option value="29">29</option>
78
- <option value="30">30</option>
79
- <option value="31">31</option>
80
- </select>
81
- </p>
82
-
83
- <p><label for="user_name">Name</label><br/>
84
- <div class="fieldWithErrors"><input id="user_name" name="user[name]" size="30" type="text" value="" /></div></p>
85
-
86
- <p><label for="user_lastupdate">Lastupdate</label><br/>
87
- <select id="user_lastupdate_1i" name="user[lastupdate(1i)]">
88
- <option value="2002">2002</option>
89
- <option value="2003">2003</option>
90
- <option value="2004">2004</option>
91
- <option value="2005">2005</option>
92
- <option value="2006">2006</option>
93
- <option selected="selected" value="2007">2007</option>
94
- <option value="2008">2008</option>
95
- <option value="2009">2009</option>
96
- <option value="2010">2010</option>
97
- <option value="2011">2011</option>
98
- <option value="2012">2012</option>
99
- </select>
100
- <select id="user_lastupdate_2i" name="user[lastupdate(2i)]">
101
- <option value="1">January</option>
102
- <option value="2">February</option>
103
- <option value="3">March</option>
104
- <option selected="selected" value="4">April</option>
105
- <option value="5">May</option>
106
- <option value="6">June</option>
107
- <option value="7">July</option>
108
- <option value="8">August</option>
109
- <option value="9">September</option>
110
- <option value="10">October</option>
111
- <option value="11">November</option>
112
- <option value="12">December</option>
113
- </select>
114
- <select id="user_lastupdate_3i" name="user[lastupdate(3i)]">
115
- <option selected="selected" value="1">1</option>
116
- <option value="2">2</option>
117
- <option value="3">3</option>
118
- <option value="4">4</option>
119
- <option value="5">5</option>
120
- <option value="6">6</option>
121
- <option value="7">7</option>
122
- <option value="8">8</option>
123
- <option value="9">9</option>
124
- <option value="10">10</option>
125
- <option value="11">11</option>
126
- <option value="12">12</option>
127
- <option value="13">13</option>
128
- <option value="14">14</option>
129
- <option value="15">15</option>
130
- <option value="16">16</option>
131
- <option value="17">17</option>
132
- <option value="18">18</option>
133
- <option value="19">19</option>
134
- <option value="20">20</option>
135
- <option value="21">21</option>
136
- <option value="22">22</option>
137
- <option value="23">23</option>
138
- <option value="24">24</option>
139
- <option value="25">25</option>
140
- <option value="26">26</option>
141
- <option value="27">27</option>
142
- <option value="28">28</option>
143
- <option value="29">29</option>
144
- <option value="30">30</option>
145
- <option value="31">31</option>
146
- </select>
147
- </p>
148
- <!--[eoform:article]-->
149
-
150
-
151
-
152
- <br/>
153
- <a href="/">Back to Top</a>
154
- </body>
155
- </html>
@@ -1,84 +0,0 @@
1
- <html>
2
- <head>
3
- <meta http-equiv="content-type" content="text/html;charset=UTF-8" />
4
- <title>Ruby-GetText-Package Test Application</title>
5
- <link href="/stylesheets/scaffold.css" media="screen" rel="Stylesheet" type="text/css" />
6
- </head>
7
- <body>
8
- <p style="color: green"></p>
9
-
10
- <div class="errorExplanation" id="errorExplanation"><h2>French: Singular Custom Error message user: 1</h2><p>French: Singular Custom Error explanation 1</p><ul><li>Name est trop court (min. 10 caractères)</li></ul></div>
11
-
12
- <!--[form:article]-->
13
- <p><label for="user_name">Name</label><br/>
14
- <div class="fieldWithErrors"><input id="user_name" name="user[name]" size="30" type="text" value="foo" /></div></p>
15
-
16
- <p><label for="user_lastupdate">Lastupdate</label><br/>
17
- <select id="user_lastupdate_1i" name="user[lastupdate(1i)]">
18
- <option value="2002">2002</option>
19
- <option value="2003">2003</option>
20
- <option value="2004">2004</option>
21
- <option value="2005">2005</option>
22
- <option value="2006">2006</option>
23
- <option selected="selected" value="2007">2007</option>
24
- <option value="2008">2008</option>
25
- <option value="2009">2009</option>
26
- <option value="2010">2010</option>
27
- <option value="2011">2011</option>
28
- <option value="2012">2012</option>
29
- </select>
30
- <select id="user_lastupdate_2i" name="user[lastupdate(2i)]">
31
- <option selected="selected" value="1">January</option>
32
- <option value="2">February</option>
33
- <option value="3">March</option>
34
- <option value="4">April</option>
35
- <option value="5">May</option>
36
- <option value="6">June</option>
37
- <option value="7">July</option>
38
- <option value="8">August</option>
39
- <option value="9">September</option>
40
- <option value="10">October</option>
41
- <option value="11">November</option>
42
- <option value="12">December</option>
43
- </select>
44
- <select id="user_lastupdate_3i" name="user[lastupdate(3i)]">
45
- <option selected="selected" value="1">1</option>
46
- <option value="2">2</option>
47
- <option value="3">3</option>
48
- <option value="4">4</option>
49
- <option value="5">5</option>
50
- <option value="6">6</option>
51
- <option value="7">7</option>
52
- <option value="8">8</option>
53
- <option value="9">9</option>
54
- <option value="10">10</option>
55
- <option value="11">11</option>
56
- <option value="12">12</option>
57
- <option value="13">13</option>
58
- <option value="14">14</option>
59
- <option value="15">15</option>
60
- <option value="16">16</option>
61
- <option value="17">17</option>
62
- <option value="18">18</option>
63
- <option value="19">19</option>
64
- <option value="20">20</option>
65
- <option value="21">21</option>
66
- <option value="22">22</option>
67
- <option value="23">23</option>
68
- <option value="24">24</option>
69
- <option value="25">25</option>
70
- <option value="26">26</option>
71
- <option value="27">27</option>
72
- <option value="28">28</option>
73
- <option value="29">29</option>
74
- <option value="30">30</option>
75
- <option value="31">31</option>
76
- </select>
77
- </p>
78
- <!--[eoform:article]-->
79
-
80
-
81
-
82
- <a href="/">Back to Top</a>
83
- </body>
84
- </html>