13
14
15
16
17
18
19
20
21
22
23
24
25
|
# File 'lib/redmine/generators/translation_generator.rb', line 13
def add_translations
translation "label_#{singular_table_name}", human_name
translation "label_#{singular_table_name}_plural", plural_name.capitalize
translation "label_#{singular_table_name}_new", "New #{human_name}"
translation "label_#{singular_table_name}_edit", "Edit #{human_name}"
translation "label_#{singular_table_name}_created", "#{human_name} was successfully created."
translation "label_#{singular_table_name}_updated", "#{human_name} was successfully updated."
translation "label_#{singular_table_name}_destroyed", "#{human_name} was successfully deleted."
attributes.each do |attribute|
translation "field_#{attribute.name}", attribute.human_name
end
end
|