Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

MS-Windows: ":language messages" only works once - #20862

#20862
Closed
h-east wants to merge 1 commit into
vim:mastervim/vim:masterfrom
h-east:win32-gettext-cache-reseth-east/vim:win32-gettext-cache-resetCopy head branch name to clipboard
Closed

MS-Windows: ":language messages" only works once#20862
h-east wants to merge 1 commit into
vim:mastervim/vim:masterfrom
h-east:win32-gettext-cache-reseth-east/vim:win32-gettext-cache-resetCopy head branch name to clipboard

Conversation

@h-east

@h-east h-east commented Jul 28, 2026

Copy link
Copy Markdown
Member
Problem:  On MS-Windows ":language messages" has no effect once messages
          have been translated, the previous language keeps being used.
Solution: Make gettext drop the translations it cached.

related: #18622

That report is mainly about the 32-bit build, which is a different problem.
What this fixes is the observation there that ":lan mes" does not change all
messages, with some of them staying in the previous language until Vim is
restarted.

No test is added: gettext() with a domain argument calls textdomain(), which
increments _nl_msg_cat_cntr by itself, so test_gettext_utf8.vim passes even
without this fix although it does switch the message language twice. Testing
this without a domain argument would need a catalog for the VIMPACKAGE domain,
which bindtextdomain() refuses.

Problem:  On MS-Windows ":language messages" has no effect once messages
          have been translated, the previous language keeps being used.
Solution: Make gettext drop the translations it cached.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@chrisbra

Copy link
Copy Markdown
Member

thanks

@chrisbra chrisbra closed this in a29d16a Jul 28, 2026
@h-east
h-east deleted the win32-gettext-cache-reset branch July 28, 2026 18:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.