Tom wrote:
> I have set LANG to "en_US.UTF-8" in my environment. But when I launch gvim
> and it comes to creating menus, the menu.vim script ends up executing
> translations for UK English.
>
> The reason seems to be the fact, that there is no lang/en_us.utf-8.vim
> translation script shipped with Vim. So when menu.vim fails to find
> translation for lang/menu_en_us*.vim filename pattern it throws away the "
> _en.utf-8" suffix from it and accepts whatever flavour of "en" language
> which happens to be the one for "en_gb" by default.
>
> It's not a big deal. And I know that I can set langmenu to 'none' in my
> .vimrc to work around the issue. But I think it would do no harm to include
> a dummy menu_en_us.utf-8.vim file (or it's latin1 variation) in the default
> vim runtime files. Or modify the menu.vim script to skip doing translations
> in case of "en_US" v:lang. All US users would benefit from it.
Hah, never noticed this. It's a simple change:
@@ -29,7 +29,8 @@
let s:lang = v:lang
endif
" A language name must be at least two characters, don't accept "C"
- if strlen(s:lang) > 1
+ " Also skip "en_US" to avoid picking up "en_gb" translations.
+ if strlen(s:lang) > 1 && s:lang !~? '^en_us'
" When the language does not include the charset add 'encoding'
if s:lang =~ '^\a\a$\|^\a\a_\a\a$'
let s:lang = s:lang . '.' . &enc
--
Computers are not intelligent. They only think they are.
/// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
--
--
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].
To view this discussion on the web visit
https://groups.google.com/d/msgid/vim_dev/201909261821.x8QILoN0014963%40masaka.moolenaar.net.