From: Tom Hughes Date: Sat, 16 Jun 2018 15:21:07 +0000 (+0100) Subject: Avoid using "other" as a translation key X-Git-Tag: live~3497 X-Git-Url: https://git.openstreetmap.org./rails.git/commitdiff_plain/0071025400589cdf0320466609bdbb6ed27e1fb4?ds=sidebyside Avoid using "other" as a translation key --- diff --git a/app/views/reports/new.html.erb b/app/views/reports/new.html.erb index d748bd747..98d135890 100644 --- a/app/views/reports/new.html.erb +++ b/app/views/reports/new.html.erb @@ -25,7 +25,7 @@ <% Report.categories_for(@report.issue.reportable).each do |c| %>
  • <%= radio_button :report, :category, c, :required => true %> - <%= label_tag "report_category_#{c}", t(".categories.#{@report.issue.reportable.class.name.underscore}.#{c}") %>
    + <%= label_tag "report_category_#{c}", t(".categories.#{@report.issue.reportable.class.name.underscore}.#{c}_label") %>
  • <% end %> diff --git a/config/locales/en.yml b/config/locales/en.yml index 85950e1bc..a403d2959 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -1002,26 +1002,26 @@ en: resolve_with_user: You have already tried to resolve the problem with the user concerned categories: diary_entry: - spam: This diary entry is/contains spam - offensive: This diary entry is obscene/offensive - threat: This diary entry contains a threat - other: Other + spam_label: This diary entry is/contains spam + offensive_label: This diary entry is obscene/offensive + threat_label: This diary entry contains a threat + other_label: Other diary_comment: - spam: This diary comment is/contains spam - offensive: This diary comment is obscene/offensive - threat: This diary comment contains a threat - other: Other + spam_label: This diary comment is/contains spam + offensive_label: This diary comment is obscene/offensive + threat_label: This diary comment contains a threat + other_label: Other user: - spam: This user profile is/contains spam - offensive: This user profile is obscene/offensive - threat: This user profile contains a threat - vandal: This user is a vandal - other: Other + spam_label: This user profile is/contains spam + offensive_label: This user profile is obscene/offensive + threat_label: This user profile contains a threat + vandal_label: This user is a vandal + other_label: Other note: - spam: This note is spam - personal: This note contains personal data - abusive: This note is abusive - other: Other + spam_label: This note is spam + personal_label: This note contains personal data + abusive_label: This note is abusive + other_label: Other create: successful_report: Your report has been registered sucessfully provide_details: Please provide the required details diff --git a/test/system/report_diary_comment_test.rb b/test/system/report_diary_comment_test.rb index 356aac016..5b66bcee7 100644 --- a/test/system/report_diary_comment_test.rb +++ b/test/system/report_diary_comment_test.rb @@ -23,7 +23,7 @@ class ReportDiaryCommentTest < ApplicationSystemTestCase assert page.has_content? "Report" assert page.has_content? I18n.t("reports.new.disclaimer.intro") - choose I18n.t("reports.new.categories.diary_comment.spam") + choose I18n.t("reports.new.categories.diary_comment.spam_label") fill_in "report_details", :with => "This comment is spam" assert_difference "Issue.count", 1 do click_on "Create Report" diff --git a/test/system/report_diary_entry_test.rb b/test/system/report_diary_entry_test.rb index 950deb695..1aac8ba70 100644 --- a/test/system/report_diary_entry_test.rb +++ b/test/system/report_diary_entry_test.rb @@ -22,7 +22,7 @@ class ReportDiaryEntryTest < ApplicationSystemTestCase assert page.has_content? "Report" assert page.has_content? I18n.t("reports.new.disclaimer.intro") - choose I18n.t("reports.new.categories.diary_entry.spam") + choose I18n.t("reports.new.categories.diary_entry.spam_label") fill_in "report_details", :with => "This is advertising" assert_difference "Issue.count", 1 do click_on "Create Report" @@ -45,7 +45,7 @@ class ReportDiaryEntryTest < ApplicationSystemTestCase assert page.has_content? "Report" assert page.has_content? I18n.t("reports.new.disclaimer.intro") - choose I18n.t("reports.new.categories.diary_entry.spam") + choose I18n.t("reports.new.categories.diary_entry.spam_label") fill_in "report_details", :with => "This is advertising" assert_no_difference "Issue.count" do click_on "Create Report" diff --git a/test/system/report_note_test.rb b/test/system/report_note_test.rb index a18366d01..24deac2cb 100644 --- a/test/system/report_note_test.rb +++ b/test/system/report_note_test.rb @@ -18,7 +18,7 @@ class ReportNoteTest < ApplicationSystemTestCase assert page.has_content? "Report" assert page.has_content? I18n.t("reports.new.disclaimer.intro") - choose I18n.t("reports.new.categories.note.spam") + choose I18n.t("reports.new.categories.note.spam_label") fill_in "report_details", :with => "This is spam" assert_difference "Issue.count", 1 do click_on "Create Report" @@ -38,7 +38,7 @@ class ReportNoteTest < ApplicationSystemTestCase assert page.has_content? "Report" assert page.has_content? I18n.t("reports.new.disclaimer.intro") - choose I18n.t("reports.new.categories.note.spam") + choose I18n.t("reports.new.categories.note.spam_label") fill_in "report_details", :with => "This is spam" assert_difference "Issue.count", 1 do click_on "Create Report" diff --git a/test/system/report_user_test.rb b/test/system/report_user_test.rb index 758c91eda..8a30c80e0 100644 --- a/test/system/report_user_test.rb +++ b/test/system/report_user_test.rb @@ -18,7 +18,7 @@ class ReportUserTest < ApplicationSystemTestCase assert page.has_content? "Report" assert page.has_content? I18n.t("reports.new.disclaimer.intro") - choose I18n.t("reports.new.categories.user.vandal") + choose I18n.t("reports.new.categories.user.vandal_label") fill_in "report_details", :with => "This user is a vandal" assert_difference "Issue.count", 1 do click_on "Create Report"