Skip to content

Preview: Set locale back when completed - #249

Merged
vjr merged 1 commit into
mainfrom
ryonakano/fix-format-dropdown-locale
Aug 23, 2026
Merged

vjr merged 1 commit into
mainfrom
ryonakano/fix-format-dropdown-locale

Conversation

@ryonakano

Copy link
Copy Markdown
Member

Fixes #248

This issue is because reload_languages () calls Intl.setlocale (), which affects the execution of all locale-sensitive C library functions as written in valadoc:

The modifications remain in effect and influences the execution of all locale-sensitive C library functions until the next call to setlocale. If locale is a null pointer, setlocale queries the current C locale without modifying it.

W call Gnome.Languages.get_country_from_locale () in reload_formats () to construct the formats dropdown, and we pass null as the second parameter translation. Gnome.Languages.get_country_from_locale () calls setlocale() to retrieve the current value of LC_MESSAGES if translation is null. Here, LC_MESSAGES is affected by Intl.setlocale () in reload_languages ().

@ryonakano
ryonakano requested a review from a team August 23, 2026 05:29

@vjr vjr left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code looks good, fixes the issue for me with English, India region and format, thanks.

@vjr
vjr merged commit 4d5ceda into main Aug 23, 2026
4 checks passed
@vjr
vjr deleted the ryonakano/fix-format-dropdown-locale branch August 23, 2026 10:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Formats dropdown is partly displayed in Cyrillic script

2 participants