]> git.openstreetmap.org Git - rails.git/commitdiff
Use underscore versions of model names for translation keys.
authorAndy Allan <git@gravitystorm.co.uk>
Wed, 14 Mar 2018 04:12:24 +0000 (12:12 +0800)
committerAndy Allan <git@gravitystorm.co.uk>
Wed, 14 Mar 2018 04:12:24 +0000 (12:12 +0800)
app/views/reports/new.html.erb
config/locales/en.yml
test/system/report_anonymous_note_test.rb
test/system/report_diary_entry_test.rb

index 9812c6806f2c0c59e999f9426ecd48e06de32242..e5ac6373fc7eb008d515b8b6466f7048d4e4cf8c 100644 (file)
@@ -25,7 +25,7 @@
       <% Report.categories_for(@report.issue.reportable).each do |c| %>
         <li>
           <%= radio_button :report, :category, c %>
-          <%= label_tag "report_category_#{c}", t("reports.categories.#{@report.issue.reportable.class.name}.#{c}") %> <br/>
+          <%= label_tag "report_category_#{c}", t("reports.categories.#{@report.issue.reportable.class.name.underscore}.#{c}") %> <br/>
         </li>
       <% end %>
       </ul>
index 1e37c0fc04821f9681a6937f22c24b22d6df0b05..7e4d0131903aef9b49006b0422438281eea0d761 100644 (file)
@@ -1040,23 +1040,23 @@ en:
     new:
       title_html: "Report %{link}"
     categories:
-      DiaryEntry:
+      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
-      DiaryComment:
+      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
-      User:
+      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
-      Note:
+      note:
         spam: This note is spam
         vandalism: This note is vandalism
         personal: This note contains personal data
index a5a15d3a0fb07891d9045ab58af55ef2cefd6736..07621ab23995a7123839f6ddbfe452186d7471c0 100644 (file)
@@ -18,7 +18,7 @@ class ReportAnonymousNoteTest < ApplicationSystemTestCase
     assert page.has_content? "Report"
     assert page.has_content? I18n.t("issues.new.disclaimer.intro")
 
-    choose I18n.t("reports.categories.Note.spam")
+    choose I18n.t("reports.categories.note.spam")
     fill_in "report_details", :with => "This is spam"
     click_on "Create Report"
 
index 988bfbe1f095cc450088d09946c64ac30941efbe..3be8b3fd7b65ce49da0cfdeee200b8c3655cb54b 100644 (file)
@@ -22,7 +22,7 @@ class ReportDiaryEntryTest < ApplicationSystemTestCase
     assert page.has_content? "Report"
     assert page.has_content? I18n.t("issues.new.disclaimer.intro")
 
-    choose I18n.t("reports.categories.DiaryEntry.spam")
+    choose I18n.t("reports.categories.diary_entry.spam")
     fill_in "report_details", :with => "This is advertising"
     click_on "Create Report"
 
@@ -41,7 +41,7 @@ class ReportDiaryEntryTest < ApplicationSystemTestCase
     assert page.has_content? "Report"
     assert page.has_content? I18n.t("issues.new.disclaimer.intro")
 
-    choose I18n.t("reports.categories.DiaryEntry.spam")
+    choose I18n.t("reports.categories.diary_entry.spam")
     fill_in "report_details", :with => "This is advertising"
     click_on "Create Report"