Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gettext support #97

Merged
merged 14 commits into from
Apr 6, 2024
Merged

gettext support #97

merged 14 commits into from
Apr 6, 2024

Conversation

ksqsf
Copy link
Member

@ksqsf ksqsf commented Apr 3, 2024

gettext only affects C++ sources. Run Fcitx5 with LANG=zh_CN.UTF-8 or LANG=en_US.UTF-8, and the option names (from domains fcitx5 and fcitx5-macos) should appear in the specified language. The locale is determined by system settings, not from envvars.

image image

Please also take a look at my translations.

(NOTE: text domains from plugins (e.g. fcitx5-chinese-addons and fcitx5-rime) are not registered successfully due to hardcoded locale dir, so option names from e.g. Pinyin are still English.) (Addon text domains are hardcoded for now. The text domain should be read from metadata in the future.)

@ksqsf ksqsf requested a review from eagleoflqj April 3, 2024 17:35
@wengxt
Copy link

wengxt commented Apr 3, 2024

@ksqsf do you want to use fcitx’s transifex for gettext? We have many scripts to pull, merge, and update pot files

assets/po/zh_CN.po Outdated Show resolved Hide resolved
src/fcitx.cpp Outdated Show resolved Hide resolved
@eagleoflqj
Copy link
Member

do you want to use fcitx’s transifex for gettext

Yes we'd like to use it later when it is ready for initial release. Currently the default implementation doesn't recognize that option value N_ needs translating.

Copy link
Member

@eagleoflqj eagleoflqj left a comment

Choose a reason for hiding this comment

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

This is a huge step. LGTM!

@eagleoflqj eagleoflqj merged commit b5e6c57 into master Apr 6, 2024
4 checks passed
@eagleoflqj eagleoflqj deleted the i18n branch April 6, 2024 00:19
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.

3 participants