Skip to content

Commit

Permalink
Sometimes we don't need to change the translation, like when the key …
Browse files Browse the repository at this point in the history
…exists.
  • Loading branch information
parndt committed Aug 30, 2010
1 parent c4d486d commit 56ba163
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion vendor/refinerycms/core/lib/refinery/application_helper.rb
Expand Up @@ -4,7 +4,11 @@ module ApplicationHelper
include Refinery::HtmlTruncationHelper

def t(key, options = {})
super.to_s.gsub(/<span[^>]*>/, 'i18n: ').gsub('</span>', '').gsub(', ', '.')
if (val = super) =~ /class.+?translation_missing/
val = val.to_s.gsub(/<span[^>]*>/, 'i18n: ').gsub('</span>', '').gsub(', ', '.')
end

val
end

# This is used to display the title of the current object (normally a page) in the browser's titlebar.
Expand Down

0 comments on commit 56ba163

Please sign in to comment.