Project

General

Profile

Internationalization

Added by Aleksandar Pavic almost 8 years ago

Is there some tool that extracts string to lang file?


Replies (3)

RE: Internationalization - Added by Aleksandar Pavic almost 8 years ago

I know there is:

rake locales

but how to use it to extract new strings from plugins for example?

RE: Internationalization - Added by Jan from Planio www.plan.io almost 8 years ago

Redmine uses the Rails Internationalization (I18n) API with flat YAML files.

You can find Redmine's files in config/locales/*.yml and plugin locale files in plugins/$PLUGIN_NAME/config/locales/*.yml.

RE: Internationalization - Added by Aleksandar Pavic almost 8 years ago

Yup I know that, but what I want is a command to extract strings from views, much like

http://stackoverflow.com/questions/3554803/is-there-a-tool-for-assisting-with-ruby-rails-internationalization

I can see this few tasks

rake locales                                     # Updates and checks locales against en.yml
rake locales:add_key                             # Adds a new top-level translation string to all locale file (only works for childless keys, probably doesn't work on...
rake locales:check_interpolation                 # Checks interpolation arguments in locals against en.yml
rake locales:check_parsing_by_psych              # Check parsing yaml by psych library on Ruby 1.9
rake locales:dup                                 # Duplicates a key
rake locales:remove_key                          # Removes a translation string from all locale file (only works for top-level childless non-multiline keys, probably ...
rake locales:update                              # Updates language files based on en.yml content (only works for new top level keys)

but I how to run it in a plugin's directory...?

    (1-3/3)