japetheape / gettext_to_i18n

Transforms gettext to I18n API and generate SimpleBackend locale file

This URL has Read+Write access

gettext_to_i18n / README
32bdde30 » japetheape 2008-09-08 first commit 1 GettextToI18n
2 =============
84ad5388 » japetheape 2008-09-08 Added first draft for extra... 3
ad11c2dc » japetheape 2008-09-15 Some other update to the RE... 4 This plugin will convert your complete Rails project from Gettext calls to the new i18n api calls introduced in Rails 2.2.2. NB: This plugin is higly experimental, so before running, BACKUP YOUR CODE. It will touch your code and things always can go wrong!
5
32bdde30 » japetheape 2008-09-08 first commit 6
803a02bd » japetheape 2008-09-16 Now completely converts and... 7 Example
8 =======
b040c751 » japetheape 2008-09-15 Updated README. 9 <%=_("Some string that will be translated, into %{lan}" % {:lan => 'english'}) %>
09993439 » japetheape 2008-09-08 updated documentation 10
b040c751 » japetheape 2008-09-15 Updated README. 11 will be converted into:
32bdde30 » japetheape 2008-09-08 first commit 12
ad11c2dc » japetheape 2008-09-15 Some other update to the RE... 13 <%=t(:message_0, :lan => 'english', :scope => [:controller, :controller_name]) %>
32bdde30 » japetheape 2008-09-08 first commit 14
b040c751 » japetheape 2008-09-15 Updated README. 15 it will then place a entry:
16
17 "Some string that will be translated, into {{lan}}"
18
19 in the standard.yml locale file it generates.
20
21
803a02bd » japetheape 2008-09-16 Now completely converts and... 22 About namespaces
23 ========
b040c751 » japetheape 2008-09-15 Updated README. 24 By default the plugin walks all files in the app directory. It places the message id's into namespaces. The namespace are divided like this:
25
26 Controllers: translation[:txt][:controller][:controller_name]
27 Views: translation[:txt][:view][:view_colleciton_name]
ad11c2dc » japetheape 2008-09-15 Some other update to the RE... 28 -> etc.
29
b040c751 » japetheape 2008-09-15 Updated README. 30
31
803a02bd » japetheape 2008-09-16 Now completely converts and... 32 Usage
33 =======
84ad5388 » japetheape 2008-09-08 Added first draft for extra... 34 To convert all your views, controllers and models to the new format.
32bdde30 » japetheape 2008-09-08 first commit 35
803a02bd » japetheape 2008-09-16 Now completely converts and... 36 rake gettext_to_i18n:transform
37
38
39 Installation
40 =======
41 ./script/plugin install git://github.com/japetheape/gettext_to_i18n.git
42
32bdde30 » japetheape 2008-09-08 first commit 43
44
b040c751 » japetheape 2008-09-15 Updated README. 45 -------------
8171c48d » japetheape 2008-09-08 Added variable change 46 Copyright (c) 2008 Jaap van der Meer, released under the MIT license