From cdaeadd60565d012814757291aa5a172435450b5 Mon Sep 17 00:00:00 2001 From: Richard Date: Fri, 14 Feb 2014 13:35:22 +0100 Subject: [PATCH 1/2] Added locales for export card field names which can't get translated. --- app/views/export_card_configurations/_form.html.erb | 8 ++++---- config/locales/de.yml | 4 ++++ config/locales/en.yml | 4 ++++ 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/app/views/export_card_configurations/_form.html.erb b/app/views/export_card_configurations/_form.html.erb index fc9d07cae8..f4d295b687 100644 --- a/app/views/export_card_configurations/_form.html.erb +++ b/app/views/export_card_configurations/_form.html.erb @@ -28,11 +28,11 @@ See doc/COPYRIGHT.md for more details.

<%= f.text_field :name, :required => true %>

<%= f.text_area :description, :class => "wiki-edit" %>

-

<%= f.text_field :per_page, :required => true %>

-

<%= f.text_field :page_size, :required => true, :value => "A4", :readonly => true %>

-

<%= f.select :orientation, [:landscape, :portrait], :required => true %>

+

<%= f.text_field :per_page, :required => true, :label => I18n.t('export_config_per_page') %>

+

<%= f.text_field :page_size, :required => true, :value => "A4", :readonly => true, :label => I18n.t('export_config_page_size') %>

+

<%= f.select :orientation, [:landscape, :portrait], :required => true, :label => I18n.t('export_config_orientation') %>

- <% field = (f.text_area :rows, :required => true, :class => "wiki-edit") %> + <% field = (f.text_area :rows, :required => true, :class => "wiki-edit", :label => I18n.t('export_config_rows')) %> <%= render partial: "rows_format_help", locals: { field: field } %> diff --git a/config/locales/de.yml b/config/locales/de.yml index 220bbe62e7..2d6065b146 100644 --- a/config/locales/de.yml +++ b/config/locales/de.yml @@ -43,3 +43,7 @@ de: validation_error_uknown_key: "Unbekannter Schlüssel:" yaml_error: "YAML Fehler:" help_link_rows_format: "Rows formatieren" + export_config_per_page: "Pro Seite" + export_config_page_size: "Seitengröße" + export_config_orientation: "Ausrichtung" + export_config_rows: "Reihen" diff --git a/config/locales/en.yml b/config/locales/en.yml index 770ee1c91f..831bbfefad 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -43,3 +43,7 @@ en: validation_error_uknown_key: "Unknown key:" yaml_error: "YAML error:" help_link_rows_format: "Rows Formatting" + export_config_per_page: "Per page" + export_config_page_size: "Page size" + export_config_orientation: "Orientation" + export_config_rows: "Rows" From 7053db304fedaa70b32cfb69e76bc65c33453b26 Mon Sep 17 00:00:00 2001 From: Richard Date: Tue, 18 Feb 2014 09:26:03 +0100 Subject: [PATCH 2/2] Using locales in configs index. --- app/views/export_card_configurations/index.html.erb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/views/export_card_configurations/index.html.erb b/app/views/export_card_configurations/index.html.erb index 9ae59ba931..fa4282adc1 100644 --- a/app/views/export_card_configurations/index.html.erb +++ b/app/views/export_card_configurations/index.html.erb @@ -42,13 +42,13 @@ See doc/COPYRIGHT.md for more details. <%= Type.human_attribute_name(:name) %> - <%= Type.human_attribute_name(:page_size) %> + <%= l(:export_config_page_size) %> - <%= Type.human_attribute_name(:per_page) %> + <%= l(:export_config_per_page) %> - <%= Type.human_attribute_name(:orientation) %> + <%= l(:export_config_orientation) %> <%= Type.human_attribute_name(:active) %>