From 1be7bb8a047ccad1cd49a5e6e623f6a12d42b918 Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Tue, 2 Jun 2009 08:13:41 +0000 Subject: [PATCH] Make a few more strings translatable in the diary entry controller and tidy up the translations for some of the partials. --- app/controllers/diary_entry_controller.rb | 10 +++++----- app/views/diary_entry/_diary_comment.rhtml | 2 +- app/views/diary_entry/_diary_entry.rhtml | 10 +++++----- config/locales/de.yml | 22 ++++++++++++--------- config/locales/en.yml | 23 ++++++++++++++-------- config/locales/fr.yml | 20 +++++++++++-------- config/locales/is.yml | 20 +++++++++++-------- config/locales/sl.yml | 20 +++++++++++-------- 8 files changed, 75 insertions(+), 52 deletions(-) diff --git a/app/controllers/diary_entry_controller.rb b/app/controllers/diary_entry_controller.rb index d5f6f59fc..388df43fe 100644 --- a/app/controllers/diary_entry_controller.rb +++ b/app/controllers/diary_entry_controller.rb @@ -8,7 +8,7 @@ class DiaryEntryController < ApplicationController before_filter :check_database_writable, :only => [:new, :edit] def new - @title = I18n.t('diary_entry.list.new') + @title = t 'diary_entry.new.title' if params[:diary_entry] @diary_entry = DiaryEntry.new(params[:diary_entry]) @@ -26,7 +26,7 @@ class DiaryEntryController < ApplicationController end def edit - @title= I18n.t('diary_entry.edit.title') + @title= t 'diary_entry.edit.title' @diary_entry = DiaryEntry.find(params[:id]) if @user != @diary_entry.user @@ -59,7 +59,7 @@ class DiaryEntryController < ApplicationController @this_user = User.find_by_display_name(params[:display_name], :conditions => {:visible => true}) if @this_user - @title = @this_user.display_name + "'s diary" + @title = t 'diary_entry.list.user_title', :user => @this_user.display_name @entry_pages, @entries = paginate(:diary_entries, :conditions => ['user_id = ?', @this_user.id], :order => 'created_at DESC', @@ -70,7 +70,7 @@ class DiaryEntryController < ApplicationController render :action => 'no_such_user', :status => :not_found end else - @title = I18n.t('diary_entry.list.title') + @title = t 'diary_entry.list.title' @entry_pages, @entries = paginate(:diary_entries, :include => :user, :conditions => ["users.visible = ?", true], :order => 'created_at DESC', @@ -119,7 +119,7 @@ class DiaryEntryController < ApplicationController if user @entry = DiaryEntry.find(:first, :conditions => ['user_id = ? AND id = ?', user.id, params[:id]]) if @entry - @title = "Users' diaries | #{params[:display_name]}" + @title = t 'diary_entry.view.title', :user => params[:display_name] else render :action => 'no_such_entry', :status => :not_found end diff --git a/app/views/diary_entry/_diary_comment.rhtml b/app/views/diary_entry/_diary_comment.rhtml index 45cce0b25..d4f7af6fc 100644 --- a/app/views/diary_entry/_diary_comment.rhtml +++ b/app/views/diary_entry/_diary_comment.rhtml @@ -1,3 +1,3 @@ -

<%= t('diary_entry.comment_from', :link_user => (link_to h(diary_comment.user.display_name), :controller => 'user', :action => 'view', :display_name => diary_comment.user.display_name), :comment_created_at => l(diary_comment.created_at)) %>

+

<%= t('diary_entry.diary_comment.comment_from', :link_user => (link_to h(diary_comment.user.display_name), :controller => 'user', :action => 'view', :display_name => diary_comment.user.display_name), :comment_created_at => l(diary_comment.created_at)) %>

<%= htmlize(diary_comment.body) %>
diff --git a/app/views/diary_entry/_diary_entry.rhtml b/app/views/diary_entry/_diary_entry.rhtml index a83f7ba25..a855d7158 100644 --- a/app/views/diary_entry/_diary_entry.rhtml +++ b/app/views/diary_entry/_diary_entry.rhtml @@ -3,17 +3,17 @@ <% if diary_entry.latitude and diary_entry.longitude %> <%= t 'map.coordinates' %>
<%= diary_entry.latitude %>; <%= diary_entry.longitude %>
(<%=link_to (t 'map.view'), :controller => 'site', :action => 'index', :lat => diary_entry.latitude, :lon => diary_entry.longitude, :zoom => 14 %> / <%=link_to (t 'map.edit'), :controller => 'site', :action => 'edit', :lat => diary_entry.latitude, :lon => diary_entry.longitude, :zoom => 14 %>)
<% end %> -<%= t 'diary_entry.posted_by', :link_user => (link_to h(diary_entry.user.display_name), :controller => 'user', :action => 'view', :display_name => diary_entry.user.display_name), :created => l(diary_entry.created_at), :language => diary_entry.language.name %> +<%= t 'diary_entry.diary_entry.posted_by', :link_user => (link_to h(diary_entry.user.display_name), :controller => 'user', :action => 'view', :display_name => diary_entry.user.display_name), :created => l(diary_entry.created_at), :language => diary_entry.language.name %> <% if params[:action] == 'list' %>
-<%= link_to t('diary_entry.comment_link'), :action => 'view', :display_name => diary_entry.user.display_name, :id => diary_entry.id, :anchor => 'newcomment' %> +<%= link_to t('diary_entry.diary_entry.comment_link'), :action => 'view', :display_name => diary_entry.user.display_name, :id => diary_entry.id, :anchor => 'newcomment' %> | -<%= link_to t('diary_entry.reply_link'), :controller => 'message', :action => 'new', :user_id => diary_entry.user.id, :title => "Re: #{diary_entry.title}" %> +<%= link_to t('diary_entry.diary_entry.reply_link'), :controller => 'message', :action => 'new', :user_id => diary_entry.user.id, :title => "Re: #{diary_entry.title}" %> | -<%= link_to t('diary_entry.comment_count', :count => diary_entry.diary_comments.count), :action => 'view', :display_name => diary_entry.user.display_name, :id => diary_entry.id, :anchor => 'comments' %> +<%= link_to t('diary_entry.diary_entry.comment_count', :count => diary_entry.diary_comments.count), :action => 'view', :display_name => diary_entry.user.display_name, :id => diary_entry.id, :anchor => 'comments' %> <% end %> <% if @user == diary_entry.user %> -| <%= link_to t('diary_entry.edit_link'), :action => 'edit', :display_name => @user.display_name, :id => diary_entry.id %> +| <%= link_to t('diary_entry.diary_entry.edit_link'), :action => 'edit', :display_name => @user.display_name, :id => diary_entry.id %> <% end %>

diff --git a/config/locales/de.yml b/config/locales/de.yml index 7caf3f9b1..f2d55817f 100644 --- a/config/locales/de.yml +++ b/config/locales/de.yml @@ -145,6 +145,8 @@ de: for_all_changes: "Änderungen von allen Nutzern {{recent_changes_link}}" recent_changes: "Letzte Änderungen" diary_entry: + new: + title: Selbst Bloggen list: title: "Blogs" new: Selbst Bloggen @@ -169,14 +171,16 @@ de: body: "Wir konnten leider keinen Blogeintrag oder Kommentar mit der Nummer {{id}} finden. Du hast dich möglicherweise vertippt oder du bist einem ungültigem Link gefolgt." no_such_user: body: "Wir konnten leider keinen Benutzer mit dem Namen {{user}} finden. Du hast dich möglicherweise vertippt oder du bist einem ungültigem Link gefolgt." - posted_by: "Verfasst von {{link_user}} am {{created}} in {{language}}" - comment_link: Kommentar zu diesem Eintrag - reply_link: Antworte auf diesen Eintrag - comment_count: - one: 1 Kommentar - other: "{{count}} Kommentare" - edit_link: Bearbeite diesen Eintrag - comment_from: "Kommentar von {{link_user}} um {{comment_created_at}}" + diary_entry: + posted_by: "Verfasst von {{link_user}} am {{created}} in {{language}}" + comment_link: Kommentar zu diesem Eintrag + reply_link: Antworte auf diesen Eintrag + comment_count: + one: 1 Kommentar + other: "{{count}} Kommentare" + edit_link: Bearbeite diesen Eintrag + diary_comment: + comment_from: "Kommentar von {{link_user}} um {{comment_created_at}}" export: start: area_to_export: "Bereich für den Export" @@ -507,4 +511,4 @@ de: set_home: flash success: "Standort erfolgreich gespeichert" go_public: - flash success: "Alle deine Bearbeitungen sind nun öffentlich und du kannst nun die Kartendaten bearbeiten." \ No newline at end of file + flash success: "Alle deine Bearbeitungen sind nun öffentlich und du kannst nun die Kartendaten bearbeiten." diff --git a/config/locales/en.yml b/config/locales/en.yml index 831944229..3c993e690 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -217,8 +217,11 @@ en: for_all_changes: "For changes by all users see {{recent_changes_link}}" recent_changes: "Recent Changes" diary_entry: + new: + title: New Diary Entry list: title: "Users' diaries" + user_title: "{{user}}'s diary" new: New Diary Entry new_title: Compose a new entry in your user diary no_entries: No diary entries @@ -236,19 +239,23 @@ en: use_map_link: "use map" save_button: "Save" marker_text: Diary entry location + view: + title: "Users' diaries | {{user}}" no_such_entry: heading: "No entry with the id: {{id}}" body: "Sorry, there is no diary entry or comment with the id {{id}}. Please check your spelling, or maybe the link you clicked is wrong." no_such_user: body: "Sorry, there is no user with the name {{user}}. Please check your spelling, or maybe the link you clicked is wrong." - posted_by: "Posted by {{link_user}} at {{created}} in {{language}}" - comment_link: Comment on this entry - reply_link: Reply to this entry - comment_count: - one: 1 comment - other: "{{count}} comments" - edit_link: Edit this entry - comment_from: "Comment from {{link_user}} at {{comment_created_at}}" + diary_entry: + posted_by: "Posted by {{link_user}} at {{created}} in {{language}}" + comment_link: Comment on this entry + reply_link: Reply to this entry + comment_count: + one: 1 comment + other: "{{count}} comments" + edit_link: Edit this entry + diary_comment: + comment_from: "Comment from {{link_user}} at {{comment_created_at}}" export: start: area_to_export: "Area to Export" diff --git a/config/locales/fr.yml b/config/locales/fr.yml index 07984479e..8ff4a8495 100644 --- a/config/locales/fr.yml +++ b/config/locales/fr.yml @@ -78,6 +78,8 @@ fr: edited_by: "Édité par" at_timestamp: "le" diary_entry: + new: + title: "Nouvelle entrée du journal" list: new: "Nouvelle entrée du journal" new_title: "Ajouter une nouvelle entrée dans votre journal" @@ -100,14 +102,16 @@ fr: body: "Desolé, il n'y a aucune entrée dans le journal ou commentaires avec l'id {{id}}. Veuillez vérifier l'orthographe, ou le lien que vous avez cliqué n'est pas valide." no_such_user: body: "Desolé, il n'y pas d'utilisateur avec le nom {{user}}. Veuillez vérifier l'orthographe, ou le lien que vous avez cliqué n'est pas valide." - posted_by: "Posté par {{link_user}} à {{created}} en {{language}}" - comment_link: "Commenter cette entrée" - reply_link: "Répondre a cette entrée" - comment_count: - one: "1 commentaire" - other: "{{count}} commentaires" - edit_link: "Éditer cette entrée" - comment_from: "Commentaire de {{link_user}} le {{comment_created_at}}" + diary_entry: + posted_by: "Posté par {{link_user}} à {{created}} en {{language}}" + comment_link: "Commenter cette entrée" + reply_link: "Répondre a cette entrée" + comment_count: + one: "1 commentaire" + other: "{{count}} commentaires" + edit_link: "Éditer cette entrée" + diary_comment: + comment_from: "Commentaire de {{link_user}} le {{comment_created_at}}" layouts: welcome_user: "Bienvenue, {{user_link}}" inbox: "Boite aux lettres ({{size}})" diff --git a/config/locales/is.yml b/config/locales/is.yml index f860761e9..f2ee8cebb 100644 --- a/config/locales/is.yml +++ b/config/locales/is.yml @@ -216,6 +216,8 @@ is: for_all_changes: "Sjá {{recent_changes_link}} til að sjá breytingar eftir alla notendur" recent_changes: "nýlegar breytingar" diary_entry: + new: + title: "Ný bloggfærsla" list: title: "Blogg notenda" new: "Ný bloggfærsla" @@ -240,14 +242,16 @@ is: body: "Sorry, there is no diary entry or comment with the id {{id}}. Please check your spelling, or maybe the link you clicked is wrong." no_such_user: body: "Sorry, there is no user with the name {{user}}. Please check your spelling, or maybe the link you clicked is wrong." - posted_by: "Posted by {{link_user}} at {{created}} in {{language}}" - comment_link: "Bæta við athugasemd" - reply_link: "Senda höfund skilaboð" - comment_count: - one: "1 athugasemd" - other: "{{count}} athugasemdir" - edit_link: "Breyta þessari færslu" - comment_from: "Athugasemd eftir {{link_user}} þann {{comment_created_at}}" + diary_entry: + posted_by: "Posted by {{link_user}} at {{created}} in {{language}}" + comment_link: "Bæta við athugasemd" + reply_link: "Senda höfund skilaboð" + comment_count: + one: "1 athugasemd" + other: "{{count}} athugasemdir" + edit_link: "Breyta þessari færslu" + diary_comment: + comment_from: "Athugasemd eftir {{link_user}} þann {{comment_created_at}}" export: start: area_to_export: "Svæði til að niðurhala" diff --git a/config/locales/sl.yml b/config/locales/sl.yml index 59da9ab69..4d5468075 100644 --- a/config/locales/sl.yml +++ b/config/locales/sl.yml @@ -216,6 +216,8 @@ sl: for_all_changes: "For changes by all users see {{recent_changes_link}}" recent_changes: "Nedavne spremembe" diary_entry: + new: + title: Nov zapis v dnevnik uporabnikov list: title: "Dnevniki uporabnikov" new: Nov zapis v dnevnik uporabnikov @@ -240,14 +242,16 @@ sl: body: "Sorry, there is no diary entry or comment with the id {{id}}. Please check your spelling, or maybe the link you clicked is wrong." no_such_user: body: "Oprostite, uporabnika z imenom {{user}} ni. Prosimo, preverite črkovanje in povezavo, ki ste jo kliknili." - posted_by: "Objavil {{link_user}} ob {{created}} v jeziku {{language}}" - comment_link: Komentiraj ta vnos - reply_link: Odgovori na ta vnos - comment_count: - one: 1 komentar - other: "{{count}} komentarjev" - edit_link: Uredi ta vnos - comment_from: "Comment from {{link_user}} at {{comment_created_at}}" + diary_entry: + posted_by: "Objavil {{link_user}} ob {{created}} v jeziku {{language}}" + comment_link: Komentiraj ta vnos + reply_link: Odgovori na ta vnos + comment_count: + one: 1 komentar + other: "{{count}} komentarjev" + edit_link: Uredi ta vnos + diary_comment: + comment_from: "Comment from {{link_user}} at {{comment_created_at}}" export: start: area_to_export: "Področje za izvoz" -- 2.43.2