Skip to content
Browse files

check the default extension to see if we need to add the suffix

  • Loading branch information...
1 parent 389a7e9 commit 03e0765322cdf1af6a2a7db0df90595e7a295e39 @peburrows committed
Showing with 11 additions and 2 deletions.
  1. +11 −2 app/models/translator_tags.rb
View
13 app/models/translator_tags.rb
@@ -61,7 +61,11 @@ module TranslatorTags
req = tag.globals.page.request
page = tag.locals.page
- suffix = req.suffixize(req.language.split('-').first)
+ unless req.language == TranslatorExtension.defaults[:language]
+ suffix = req.suffixize(req.language.split('-').first)
+ else
+ suffix = ""
+ end
base_part_name = tag_part_name(tag)
# part_name = base_part_name + "#{suffix}"
@@ -78,7 +82,12 @@ module TranslatorTags
req = tag.globals.page.request
page = tag.locals.page
- suffix = req.suffixize(req.language)
+ unless req.language == TranslatorExtension.defaults[:language]
+ suffix = req.suffixize(req.language)
+ else
+ suffix = ""
+ end
+
base_part_name = tag_part_name(tag)
render_translated_page_part(tag, page, req, base_part_name, suffix)
end

0 comments on commit 03e0765

Please sign in to comment.
Something went wrong with that request. Please try again.