From 9ceb3e2fd19b9ebceaa39ab5756c6186e24c1c23 Mon Sep 17 00:00:00 2001 From: MrZYX <pr0fkill@gmail.com> Date: Sun, 7 Nov 2010 22:12:50 +0100 Subject: [PATCH] found some still untranslatable strings in helpers and stuff --- app/helpers/application_helper.rb | 2 +- app/helpers/aspects_helper.rb | 2 +- app/mailers/notifier.rb | 4 ++-- config/locales/diaspora/en.yml | 8 ++++++++ 4 files changed, 12 insertions(+), 4 deletions(-) diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 08e4856feb..cade35c04f 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -164,7 +164,7 @@ module ApplicationHelper return @@youtube_title_cache[id] end - ret = 'Unknown Video Title' #TODO add translation + ret = I18n.t 'application.helper.youtube_title.unknown' http = Net::HTTP.new('gdata.youtube.com', 80) path = '/feeds/api/videos/'+id+'?v=2' resp, data = http.get(path, nil) diff --git a/app/helpers/aspects_helper.rb b/app/helpers/aspects_helper.rb index d627b3e695..233b310f11 100644 --- a/app/helpers/aspects_helper.rb +++ b/app/helpers/aspects_helper.rb @@ -9,7 +9,7 @@ module AspectsHelper def remove_link( aspect ) if aspect.people.size == 0 - link_to I18n.t('aspects.helper.remove'), aspect, :method => :delete, :confirm => "Are you sure you want to delete this aspect?" + link_to I18n.t('aspects.helper.remove'), aspect, :method => :delete, :confirm => I18n.t('aspects.helper.are_you_sure') else "<span class='grey' title=#{I18n.t('aspects.helper.aspect_not_empty')}>#{I18n.t('aspects.helper.remove')}</span>" end diff --git a/app/mailers/notifier.rb b/app/mailers/notifier.rb index e95b34b15d..c624470d26 100644 --- a/app/mailers/notifier.rb +++ b/app/mailers/notifier.rb @@ -11,7 +11,7 @@ class Notifier < ActionMailer::Base attachments.inline['diaspora_white_on_grey.png'] = ATTACHMENT mail(:to => "#{@receiver.real_name} <#{@receiver.email}>", - :subject => "new Diaspora* friend request from #{@sender.real_name}", :host => APP_CONFIG[:terse_pod_url]) + :subject => I18n.t('notifier.new_request.subject', :from => @sender.real_name), :host => APP_CONFIG[:terse_pod_url]) end def request_accepted(recipient_id, sender_id, aspect_id) @@ -21,6 +21,6 @@ class Notifier < ActionMailer::Base attachments.inline['diaspora_white_on_grey.png'] = ATTACHMENT mail(:to => "#{@receiver.real_name} <#{@receiver.email}>", - :subject => "#{@sender.real_name} has accepted your friend request on Diaspora*", :host => APP_CONFIG[:terse_pod_url]) + :subject => I18n.t('notifier.request_accepted.subject', :name => @sender.real_name), :host => APP_CONFIG[:terse_pod_url]) end end diff --git a/config/locales/diaspora/en.yml b/config/locales/diaspora/en.yml index ff98f67209..a8cf0acbd1 100644 --- a/config/locales/diaspora/en.yml +++ b/config/locales/diaspora/en.yml @@ -45,6 +45,8 @@ en: application: helper: unknown_person: "unknown person" + youtube_title: + unknown: "Unknown Video Title" error_messages: helper: invalid_fields: "Invalid Fields" @@ -128,6 +130,7 @@ en: helper: remove: "remove" aspect_not_empty: "Aspect not empty" + are_you_sure: "Are you sure you want to delete this aspect?" remove_from_aspect: success: "Successfully removed person from aspect" failure: "Failed to remove person from aspect" @@ -308,5 +311,10 @@ en: dashboards: helper: home: "Home" + notifier: + new_request: + subject: "new Diaspora* friend request from %{from}" + request_accepted: + subject: "%{name} has accepted your friend request on Diaspora*" date: order: [:month, :day, :year] -- GitLab