Avoid using "other" as a translation key
authorTom Hughes <tom@compton.nu>
Sat, 16 Jun 2018 15:21:07 +0000 (16:21 +0100)
committerTom Hughes <tom@compton.nu>
Sat, 16 Jun 2018 15:21:07 +0000 (16:21 +0100)
app/views/reports/new.html.erb
config/locales/en.yml
test/system/report_diary_comment_test.rb
test/system/report_diary_entry_test.rb
test/system/report_note_test.rb
test/system/report_user_test.rb

index d748bd7..98d1358 100644 (file)
@@ -25,7 +25,7 @@
       <% Report.categories_for(@report.issue.reportable).each do |c| %>
         <li>
           <%= radio_button :report, :category, c, :required => true %>
-          <%= label_tag "report_category_#{c}", t(".categories.#{@report.issue.reportable.class.name.underscore}.#{c}") %> <br/>
+          <%= label_tag "report_category_#{c}", t(".categories.#{@report.issue.reportable.class.name.underscore}.#{c}_label") %> <br/>
         </li>
       <% end %>
       </ul>
index 85950e1..a403d29 100644 (file)
@@ -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      
index 356aac0..5b66bce 100644 (file)
@@ -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"
index 950deb6..1aac8ba 100644 (file)
@@ -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"
index a18366d..24deac2 100644 (file)
@@ -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"
index 758c91e..8a30c80 100644 (file)
@@ -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"