diff options
author | Phil Hughes <me@iamphill.com> | 2017-04-21 09:16:50 +0100 |
---|---|---|
committer | Phil Hughes <me@iamphill.com> | 2017-04-21 09:16:50 +0100 |
commit | 4f31d5963f44b1803fa54d0732cae86b0ec45e06 (patch) | |
tree | 5033cfe8a1c87294125c1d4426aa35df0b1a3a8e /config/initializers | |
parent | dc5136a70d2481f214769a9e28cf82958f3ab124 (diff) | |
download | gitlab-ce-4f31d5963f44b1803fa54d0732cae86b0ec45e06.tar.gz |
Revert line being commented outjs-translations
Diffstat (limited to 'config/initializers')
-rw-r--r-- | config/initializers/gettext_rails_i18n_patch.rb | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/config/initializers/gettext_rails_i18n_patch.rb b/config/initializers/gettext_rails_i18n_patch.rb index 744e983a094..c6b3795d0c4 100644 --- a/config/initializers/gettext_rails_i18n_patch.rb +++ b/config/initializers/gettext_rails_i18n_patch.rb @@ -1,16 +1,16 @@ module GettextI18nRails class HamlParser - # singleton_class.send(:alias_method, :old_convert_to_code, :convert_to_code) - # - # # We need to convert text in Mustache format - # # to a format that can be parsed by Gettext scripts. - # # If we found a content like "{{ 'Stage' | translate }}" - # # in a HAML file we convert it to "= _('Stage')", that way - # # it can be processed by the "rake gettext:find" script. - # def self.convert_to_code(text) - # text.gsub!(/{{ (.*)( \| translate) }}/, "= _(\\1)") - # - # old_convert_to_code(text) - # end + singleton_class.send(:alias_method, :old_convert_to_code, :convert_to_code) + + # We need to convert text in Mustache format + # to a format that can be parsed by Gettext scripts. + # If we found a content like "{{ 'Stage' | translate }}" + # in a HAML file we convert it to "= _('Stage')", that way + # it can be processed by the "rake gettext:find" script. + def self.convert_to_code(text) + text.gsub!(/{{ (.*)( \| translate) }}/, "= _(\\1)") + + old_convert_to_code(text) + end end end |