diff --git a/Readme.md b/Readme.md index 2fc94a0..7e1977b 100644 --- a/Readme.md +++ b/Readme.md @@ -29,18 +29,25 @@ gem 'gettext', '>=3.0.2', :require => false Add the first language using: ```Bash -rake gettext:add_language[XX] +rake gettext:add_language[xx] ``` or ```Bash -LANGUAGE=[XX] rake gettext:add_language +LANGUAGE=[xx] rake gettext:add_language ``` -where XX is the [ISO 639-1](http://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) 2-letter code for the language you want to create. +where `xx` is the lowercased [ISO 639-1](http://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) 2-letter code for the language you want to create. -This will also create the `locale` directory (where the translations are being stored) and run `gettext:find` to find any strings marked for translation. +for example: + +```Bash +rake gettext:add_language[es] +``` + + +This will also create the `locales` directory (where the translations are being stored) and run `gettext:find` to find any strings marked for translation. You can, of course, add more languages using the same command. diff --git a/lib/gettext_i18n_rails/model_attributes_finder.rb b/lib/gettext_i18n_rails/model_attributes_finder.rb index 11a879e..228672e 100644 --- a/lib/gettext_i18n_rails/model_attributes_finder.rb +++ b/lib/gettext_i18n_rails/model_attributes_finder.rb @@ -18,6 +18,7 @@ def store_model_attributes(options) end end f.puts "#DO NOT MODIFY! AUTOMATICALLY GENERATED FILE!" + f.puts "{}" end rescue puts "[Error] Attribute extraction failed. Removing incomplete file (#{file})"