haml-rails-with-i18n 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +20 -0
- data/lib/generators/haml/scaffold/templates/edit.html.haml +1 -1
- data/lib/haml-rails/version.rb +1 -1
- metadata +2 -2
data/README.md
CHANGED
@@ -4,6 +4,7 @@ Haml-rails provides Haml generators for Rails 3. It also enables Haml as the tem
|
|
4
4
|
|
5
5
|
To use it, add this line to your Gemfile:
|
6
6
|
|
7
|
+
gem "haml"
|
7
8
|
gem "haml-rails-with-i18n"
|
8
9
|
|
9
10
|
Then on your config/application.rb:
|
@@ -18,6 +19,25 @@ Finally, install the gems from the console:
|
|
18
19
|
|
19
20
|
You will have to execute rails g haml:locale at least once in order to get the locale translations in English.
|
20
21
|
|
22
|
+
Alternatively, you can just add the following rules to your existing en.yml file:
|
23
|
+
|
24
|
+
en:
|
25
|
+
edit_link: Edit
|
26
|
+
back_link: Back
|
27
|
+
show_link: Show
|
28
|
+
destroy_link: Destroy
|
29
|
+
new_link: "New %{model}"
|
30
|
+
|
31
|
+
form_error_explanation:
|
32
|
+
singular: "1 error prohibited this %{model} from being saved"
|
33
|
+
plural: "%{count} errors prohibited this %{model} from being saved"
|
34
|
+
|
35
|
+
index_title: "Listing %{model}"
|
36
|
+
edit_title: "Editing %{model}"
|
37
|
+
new_title: "New %{model}"
|
38
|
+
|
39
|
+
confirm_destroy_message: "Are you sure?"
|
40
|
+
|
21
41
|
Once you've done that, any time you generate a controller or scaffold, you'll get Haml instead of ERB templates. On top of that, when your Rails application loads, Haml will be loaded and initialized completely automatically! The modern world is just so amazing.
|
22
42
|
|
23
43
|
### Contributors
|
data/lib/haml-rails/version.rb
CHANGED