From 552cd8dc57226167efe0303485f5189a38fa0c59 Mon Sep 17 00:00:00 2001 From: Tom Rochette Date: Sun, 31 Jul 2011 09:27:13 -0400 Subject: [PATCH] Replace hardcoded string "diff" in Wiki#show and Repositories_Helper. --- app/helpers/repositories_helper.rb | 2 +- app/views/wiki/show.rhtml | 2 +- config/locales/en.yml | 1 + config/locales/fr.yml | 1 + 4 files changed, 4 insertions(+), 2 deletions(-) diff --git a/app/helpers/repositories_helper.rb b/app/helpers/repositories_helper.rb index b81778b0..aed82d06 100644 --- a/app/helpers/repositories_helper.rb +++ b/app/helpers/repositories_helper.rb @@ -99,7 +99,7 @@ module RepositoriesHelper :path => path_param, :rev => @changeset.identifier) unless c.action == 'D' text << " - #{c.revision}" unless c.revision.blank? - text << ' (' + link_to('diff', :controller => 'repositories', + text << ' (' + link_to(l(:label_diff), :controller => 'repositories', :action => 'diff', :id => @project, :path => path_param, diff --git a/app/views/wiki/show.rhtml b/app/views/wiki/show.rhtml index 6cc7fbc0..4d39ce27 100644 --- a/app/views/wiki/show.rhtml +++ b/app/views/wiki/show.rhtml @@ -17,7 +17,7 @@

<%= link_to(('« ' + l(:label_previous)), :action => 'show', :id => @page.title, :project_id => @page.project, :version => (@content.version - 1)) + " - " if @content.version > 1 %> <%= "#{l(:label_version)} #{@content.version}/#{@page.content.version}" %> - <%= '(' + link_to('diff', :controller => 'wiki', :action => 'diff', :id => @page.title, :project_id => @page.project, :version => @content.version) + ')' if @content.version > 1 %> - + <%= '(' + link_to(l(:label_diff), :controller => 'wiki', :action => 'diff', :id => @page.title, :project_id => @page.project, :version => @content.version) + ')' if @content.version > 1 %> - <%= link_to((l(:label_next) + ' »'), :action => 'show', :id => @page.title, :project_id => @page.project, :version => (@content.version + 1)) + " - " if @content.version < @page.content.version %> <%= link_to(l(:label_current_version), :action => 'show', :id => @page.title, :project_id => @page.project) %>
diff --git a/config/locales/en.yml b/config/locales/en.yml index e08c0731..960e20b8 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -678,6 +678,7 @@ en: label_statistics: Statistics label_commits_per_month: Commits per month label_commits_per_author: Commits per author + label_diff: diff label_view_diff: View differences label_diff_inline: inline label_diff_side_by_side: side by side diff --git a/config/locales/fr.yml b/config/locales/fr.yml index 92e3a48b..2966c559 100644 --- a/config/locales/fr.yml +++ b/config/locales/fr.yml @@ -672,6 +672,7 @@ fr: label_statistics: Statistiques label_commits_per_month: Commits par mois label_commits_per_author: Commits par auteur + label_diff: diff label_view_diff: Voir les différences label_diff_inline: en ligne label_diff_side_by_side: côte à côte