This patch add 3 variables, which should be "translated" in runtime/lang/menu*.vim files.
-- -- You received this message from the "vim_dev" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
From 406bf566e62704c6d5f55c4526a6f8fafcd550f5 Mon Sep 17 00:00:00 2001 From: Sergey Alyoshin <[email protected]> Date: Thu, 17 May 2018 00:01:06 +0300 Subject: [PATCH] Add spell popup menu translation possibility --- runtime/menu.vim | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/runtime/menu.vim b/runtime/menu.vim index 0c9b743f6..f7c7a6a4c 100644 --- a/runtime/menu.vim +++ b/runtime/menu.vim @@ -946,7 +946,10 @@ if has("spell") let s:suglist = spellsuggest(w, 10) endif if len(s:suglist) > 0 - let s:changeitem = 'Change\ "' . escape(w, ' .'). '"\ to' + if !exists("g:menutrans_spell_change_s_to") + let g:menutrans_spell_change_s_to = 'Change\ "%s"\ to' + endif + let s:changeitem = printf(g:menutrans_spell_change_s_to, escape(w, ' .')) let s:fromword = w let pri = 1 " set 'cpo' to include the <CR> @@ -958,10 +961,16 @@ if has("spell") let pri += 1 endfor - let s:additem = 'Add\ "' . escape(w, ' .') . '"\ to\ Word\ List' + if !exists("g:menutrans_spell_add_s_to_word_list") + let g:menutrans_spell_add_s_to_word_list = 'Add\ "%s"\ to\ Word\ List' + endif + let s:additem = printf(g:menutrans_spell_add_s_to_word_list, escape(w, ' .')) exe 'anoremenu 1.6 PopUp.' . s:additem . ' :spellgood ' . w . '<CR>' - let s:ignoreitem = 'Ignore\ "' . escape(w, ' .') . '"' + if !exists("g:menutrans_spell_ignore_s") + let g:menutrans_spell_ignore = 'Ignore\ "%s"' + endif + let s:ignoreitem = printf(g:menutrans_spell_ignore_s, escape(w, ' .')) exe 'anoremenu 1.7 PopUp.' . s:ignoreitem . ' :spellgood! ' . w . '<CR>' anoremenu 1.8 PopUp.-SpellSep- : -- 2.14.2
