From 1d886ddfa64d2133351ac68e724af41b18dc057c Mon Sep 17 00:00:00 2001 From: Emilio Blanco Date: Fri, 1 Apr 2011 08:23:32 -0300 Subject: [PATCH] Translate common folder names --- app/helpers/navigation_helper.rb | 2 +- app/helpers/webmail_helper.rb | 4 +++- config/locales/es-ES.yml | 5 +++++ 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/app/helpers/navigation_helper.rb b/app/helpers/navigation_helper.rb index 9484558..59ca17b 100644 --- a/app/helpers/navigation_helper.rb +++ b/app/helpers/navigation_helper.rb @@ -52,7 +52,7 @@ module NavigationHelper def short_fn(folder) if folder.name.include? folder.delim - "   " + folder.name.split(folder.delim).last + folder.name.split(folder.delim).last else folder.name end diff --git a/app/helpers/webmail_helper.rb b/app/helpers/webmail_helper.rb index bbea329..447a04e 100644 --- a/app/helpers/webmail_helper.rb +++ b/app/helpers/webmail_helper.rb @@ -37,7 +37,9 @@ module WebmailHelper def folder_link(folder) return folder.name if folder.attribs.include?(:Noselect) - title = folder.unseen > 0 ? "#{short_fn(folder)} (#{folder.unseen})" : "#{short_fn(folder)}" + folder_name = short_fn(folder) + folder_name = t(folder_name.downcase.to_sym, :default => folder_name) + title = folder.unseen > 0 ? "#{folder_name} (#{folder.unseen})" : "#{folder_name}" link = link_to title, :controller => 'webmail', :action => 'messages', :folder_name => folder.name link = content_tag('b', link) if folder.name == @folder_name link += ' ' + empty_trash_link(folder.name) if folder.trash? diff --git a/config/locales/es-ES.yml b/config/locales/es-ES.yml index ab65906..6fb97d8 100644 --- a/config/locales/es-ES.yml +++ b/config/locales/es-ES.yml @@ -21,6 +21,11 @@ es-ES: delete: borrar copy: copiar move: mover + junk: Basura + sent: Enviados + inbox: Bandeja de Entrada + trash: Basura + drafts: Borradores mark_read: marcar como leido mark_unread: marcar comono leido destination_txt: Destino para operaciones de copiado y movido