]> git.openstreetmap.org Git - rails.git/commitdiff
Add language codes to diary bodies
authorTom Hughes <tom@compton.nu>
Sat, 26 Jun 2010 15:35:25 +0000 (16:35 +0100)
committerTom Hughes <tom@compton.nu>
Sat, 26 Jun 2010 15:35:25 +0000 (16:35 +0100)
Wrap diary bodies in a div with the correct language code for the
entry set on the div. Closes #2572.

app/views/diary_entry/_diary_entry.html.erb

index 17078a8bb9f42be93b20e1be82f03cd6a1d0a542..8991e1d54e05f04a7b1f3864fc19daf213232bcc 100644 (file)
@@ -1,5 +1,7 @@
 <b><%= link_to h(diary_entry.title), :action => 'view', :display_name => diary_entry.user.display_name, :id => diary_entry.id %></b><br />
+<div xml:lang="<%= diary_entry.language_code %>" lang="<%= diary_entry.language_code %>">
 <%= htmlize(diary_entry.body) %>
+</div>
 <% if diary_entry.latitude and diary_entry.longitude %>
 <%= render :partial => "location", :object => diary_entry %>
 <br />