Skip to content

Commit

Permalink
apply path from stefanoverna#15
Browse files Browse the repository at this point in the history
... to have haml support
  • Loading branch information
benjmin-r authored Sep 14, 2017
1 parent 925186c commit 5bc5d39
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion plugin/i18n.vim
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,15 @@ function! I18nTranslateString()
let key = s:askForI18nKey()
if &filetype == 'eruby' || &filetype == 'eruby.html' || &filetype == 'slim' || &filetype == 'haml'
let fullKey = s:determineFullKey(key)

if IsSyntaxRuby() != -1
let @x = s:generateI18nCall(key, variables, "t('", "')")
else
elseif &filetype == 'eruby' || &filetype == 'eruby.html' || &filetype == 'slim'
let @x = s:generateI18nCall(key, variables, "<%= t('", "') %>")
elseif &filetype == 'haml'
let @x = s:generateI18nCall(key, variables, "= t('", "')")
endif

call s:addStringToYamlStore(text, fullKey)
else
let @x = s:generateI18nCall(key, variables, "t('", "')")
Expand Down

0 comments on commit 5bc5d39

Please sign in to comment.