Add support for localized message transalations in MacVim by ychin · Pull Request #1070 · macvim-dev/macvim

@ychin

This enables localized translated messages in MacVim, instead of only
using English.

- Get Travis to compile MacVim with gettext dependencies which is a
  pre-requisite for multilang localized messages. Also add a quick
  regression test to make sure localized messages will keep working.
- Add a post-build phase to copy all locale .mo files to VIMRUNTIME/lang
  so they will be bundled along with the rest in the app package. Normal
  Vim usually installs the localized files to a global location like
  /usr/local/share/locale/ but macOS applications are all self-contained
  bundles we don't want to do this. Use VIMRUNTIME/lang as the
  destination because that's also what the Windows build uses and
  existing code already knows to use it by using bindtextdomain.
- Fix vim.h header to not unbind bindtextdomain for MacVim. There is
  previously a little bit of hack there where it would only use
  bindtextdomain when DYNAMIC_GETTEXT is set because that's only set for
  Windows. Just add a special case for MacVim for now to get similar
  behavior to Windows.

Close macvim-dev#991

@ychin ychin deleted the macvim-locale-message-translation branch

August 10, 2020 10:30

ychin added a commit to ychin/macvim that referenced this pull request

Aug 11, 2020
Since macvim-dev#1070 added support for localized messages for MacVim, add some
translations for some MacVim-specific messages (only add intro text
and :version output for now) for some languages (es, ja, zh) to make the
intro screen look less like an odd mix.

@ychin ychin mentioned this pull request

Aug 11, 2020

@ychin ychin mentioned this pull request

Aug 19, 2020

5 tasks

@ychin ychin mentioned this pull request

Oct 3, 2020

11 tasks

@ychin ychin mentioned this pull request

Dec 19, 2020

ychin added a commit to ychin/macvim that referenced this pull request

Nov 27, 2022
When adding support for gettext in macvim-dev#1070, a MacVim-specific ifdef was
added unnecessary around `bindtextdomain`. That ifdef isn't actually
necessary and it seems to have been done due to an incorrect
understanding of the ifdef logic there regarding `FEAT_GETTEXT`. Just
remove it to clean it up. Localization should still work.

@ychin ychin mentioned this pull request

Nov 27, 2022

ychin added a commit to ychin/macvim that referenced this pull request

Jan 2, 2023
When adding support for gettext in macvim-dev#1070, a MacVim-specific ifdef was
added unnecessary around `bindtextdomain`. That ifdef isn't actually
necessary and it seems to have been done due to an incorrect
understanding of the ifdef logic there regarding `FEAT_GETTEXT`. Just
remove it to clean it up. Localization should still work.