]> git.openstreetmap.org Git - rails.git/commitdiff
Tweak the copyright page translation
authorTom Hughes <tom@compton.nu>
Tue, 27 Apr 2010 15:00:10 +0000 (16:00 +0100)
committerTom Hughes <tom@compton.nu>
Tue, 27 Apr 2010 15:00:10 +0000 (16:00 +0100)
app/views/site/copyright.html.erb
config/routes.rb

index 897f9cda30c5223e769d4bb7901656ac1730adac..eaaf3f3661f4ff9ba8b4e068753f1ad382164ec6 100644 (file)
@@ -10,9 +10,9 @@
           { :rel => "license" }) %>
 </p>
 
-<% if I18n.locale.to_s == "en" or params['locale'] == 'en' %>
+<% if I18n.locale == 'en' or params[:copyright_locale] == 'en' %>
   <!-- Maybe ease foreigners back to their native page -->
-  <% if params['orig_locale'] and params['orig_locale'] != params['locale'] %>
+  <% if t('license_page.legal_babble') != t('license_page.legal_babble', :locale => :en) %>
     <h2><%= t 'license_page.native.title' %></h2>
     <p>
       <%= t 'license_page.native.text',
     <hr />
   <% end %>
 
-  <%= t('license_page.legal_babble', :locale => 'en') %>
+  <%= t('license_page.legal_babble', :locale => :en) %>
 <% else %>
   <!-- Maybe note that this page has been translated -->
-  <% if t('license_page.legal_babble') != t('license_page.legal_babble', :locale => 'en') %>
+  <% if t('license_page.legal_babble') != t('license_page.legal_babble', :locale => :en) %>
     <h2><%= t 'license_page.foreign.title' %></h2>
     <p>
       <%= t 'license_page.foreign.text',
               :english_original_link => link_to(t('license_page.foreign.english_link'),
                                                 :controller => 'site',
                                                 :action => 'copyright',
-                                                :locale => 'en',
-                                                :orig_locale => I18n.locale.to_s) %>
+                                                :copyright_locale => 'en') %>
     </p>
     <hr />
   <% end %>
+
   <%= t('license_page.legal_babble') %>
 <% end %>
index df6efef60643cdf05941fb2cfe2f6cc74386eaff..9a86f920058a179eecdb1f7d3ba9183801a30287 100644 (file)
@@ -89,6 +89,7 @@ ActionController::Routing::Routes.draw do |map|
   map.connect '/', :controller => 'site', :action => 'index'
   map.connect '/edit', :controller => 'site', :action => 'edit'
   map.connect '/copyright', :controller => 'site', :action => 'copyright'
+  map.connect '/copyright/:copyright_locale', :controller => 'site', :action => 'copyright'
   map.connect '/history', :controller => 'changeset', :action => 'list'
   map.connect '/history/feed', :controller => 'changeset', :action => 'list', :format => :atom
   map.connect '/export', :controller => 'site', :action => 'export'