[Git][noosfero/noosfero][master] 2 commits: newsletter: Fixes string internationalization for mailing

Antonio Terceiro gitlab at gitlab.com
Wed Oct 7 09:38:08 BRT 2015


Antonio Terceiro pushed to branch master at Noosfero / noosfero


Commits:
117471e2 by Larissa Reis at 2015-10-06T15:56:33Z
newsletter: Fixes string internationalization for mailing

Only marking the strings for translation with `N_()` wasn't enough and
strings weren't being translated for mailing.

- - - - -
c7903fb7 by Antonio Terceiro at 2015-10-07T12:37:39Z
Merge branch 'newsletter-mail-strings-translation' into 'master'

newsletter: Fixes string internationalization for mailing

Only marking the strings for translation with `N_()` wasn't enough and strings weren't being translated for mailing.

See merge request !693
- - - - -


1 changed file:

- plugins/newsletter/lib/newsletter_plugin/newsletter.rb


Changes:

=====================================
plugins/newsletter/lib/newsletter_plugin/newsletter.rb
=====================================
--- a/plugins/newsletter/lib/newsletter_plugin/newsletter.rb
+++ b/plugins/newsletter/lib/newsletter_plugin/newsletter.rb
@@ -111,15 +111,15 @@ class NewsletterPlugin::Newsletter < Noosfero::Plugin::ActiveRecord
   include DatesHelper
 
   def message_to_public_link
-    content_tag(:p, N_("If you can't view this email, %s.") % link_to(N_('click here'), '{mailing_url}'), :id => 'newsletter-public-link')
+    content_tag(:p, _("If you can't view this email, %s.") % link_to(_('click here'), '{mailing_url}'), :id => 'newsletter-public-link')
   end
 
   def message_to_unsubscribe
-    content_tag(:div, N_("This is an automatically generated email, please do not reply. If you do not wish to receive future newsletter emails, %s.") % link_to(N_("cancel your subscription here"), self.unsubscribe_url, :style => CSS['public-link']), :style => CSS['newsletter-unsubscribe'], :id => 'newsletter-unsubscribe')
+    content_tag(:div, _("This is an automatically generated email, please do not reply. If you do not wish to receive future newsletter emails, %s.") % link_to(_("cancel your subscription here"), self.unsubscribe_url, :style => CSS['public-link']), :style => CSS['newsletter-unsubscribe'], :id => 'newsletter-unsubscribe')
   end
 
   def read_more(link_address)
-    content_tag(:p, link_to(N_('Read more'), link_address, :style => CSS['read-more-link']), :style => CSS['read-more-line'])
+    content_tag(:p, link_to(_('Read more'), link_address, :style => CSS['read-more-link']), :style => CSS['read-more-line'])
   end
 
   def post_with_image(post)
@@ -141,7 +141,7 @@ class NewsletterPlugin::Newsletter < Noosfero::Plugin::ActiveRecord
   end
 
   def default_subject
-    N_('Breaking news')
+    _('Breaking news')
   end
 
   def subject



View it on GitLab: https://gitlab.com/noosfero/noosfero/compare/792227ebb311b24d7420bd2271ba3ab3922ed628...c7903fb7f6d4bbfa2504adec0da277c9481ffa36
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listas.softwarelivre.org/pipermail/noosfero-dev/attachments/20151007/cfd0f816/attachment.html>


More information about the Noosfero-dev mailing list