Commit c7903fb7f6d4bbfa2504adec0da277c9481ffa36

Authored by Antonio Terceiro
2 parents 792227eb 117471e2

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
plugins/newsletter/lib/newsletter_plugin/newsletter.rb
... ... @@ -111,15 +111,15 @@ class NewsletterPlugin::Newsletter < Noosfero::Plugin::ActiveRecord
111 111 include DatesHelper
112 112  
113 113 def message_to_public_link
114   - content_tag(:p, N_("If you can't view this email, %s.") % link_to(N_('click here'), '{mailing_url}'), :id => 'newsletter-public-link')
  114 + content_tag(:p, _("If you can't view this email, %s.") % link_to(_('click here'), '{mailing_url}'), :id => 'newsletter-public-link')
115 115 end
116 116  
117 117 def message_to_unsubscribe
118   - 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')
  118 + 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')
119 119 end
120 120  
121 121 def read_more(link_address)
122   - content_tag(:p, link_to(N_('Read more'), link_address, :style => CSS['read-more-link']), :style => CSS['read-more-line'])
  122 + content_tag(:p, link_to(_('Read more'), link_address, :style => CSS['read-more-link']), :style => CSS['read-more-line'])
123 123 end
124 124  
125 125 def post_with_image(post)
... ... @@ -141,7 +141,7 @@ class NewsletterPlugin::Newsletter < Noosfero::Plugin::ActiveRecord
141 141 end
142 142  
143 143 def default_subject
144   - N_('Breaking news')
  144 + _('Breaking news')
145 145 end
146 146  
147 147 def subject
... ...