diff --git a/UltiSnips/rails.snippets b/UltiSnips/rails.snippets index 6ed1529..8bdc069 100644 --- a/UltiSnips/rails.snippets +++ b/UltiSnips/rails.snippets @@ -893,4 +893,8 @@ setup do end endsnippet +snippet trans "Translation snippet" +I18n.t('`!v substitute(substitute(substitute(@%, substitute(getcwd() . "/", "\/", "\\\\/", "g"), "", ""), "\\(\\.\\(html\\|js\\)\\.\\(haml\\|erb\\)\\|\\(_controller\\)\\?\\.rb\\)$", "", ""), "/", ".", "g")`.${2:${1/[^\w]/_/g}}${3}', :default => "${1:some_text}"${4})${5:$0} +endsnippet + # vim:ft=snippets: diff --git a/doc/UltiSnips.txt b/doc/UltiSnips.txt index 1c95d28..9660f39 100644 --- a/doc/UltiSnips.txt +++ b/doc/UltiSnips.txt @@ -780,6 +780,7 @@ Contributers are listed in chronological order: Jan Mollowitz (phux) Georgi Valkov (gvalkov) Miek Gieben (miek) + graudeejs (graudeejs)