Skip to content

i18n: translation support for command palete#11641

Open
EriksRemess wants to merge 4 commits intoghostty-org:mainfrom
EriksRemess:i18n-command-palette
Open

i18n: translation support for command palete#11641
EriksRemess wants to merge 4 commits intoghostty-org:mainfrom
EriksRemess:i18n-command-palette

Conversation

@EriksRemess
Copy link
Copy Markdown
Member

Most obvious next step in translating Ghostty is the command palette.
Added support for i18n.N_ (https://docs.gtk.org/glib/i18n.html#macros).
Made a Latvian translation for the command palette to test. Codex did bulk of the translations but I verified them.

Copy link
Copy Markdown
Contributor

@mitchellh mitchellh left a comment

Choose a reason for hiding this comment

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

I definitely want more reviewers, but this in general makes sense. I made one note.

Comment thread src/os/i18n.zig
@mitchellh mitchellh added this to the 1.4.0 milestone Mar 19, 2026
@00-kat 00-kat added translations Translations of the Ghostty app gtk Issues exclusive to GTK which are not OS-specific and removed gtk Issues exclusive to GTK which are not OS-specific labels Mar 19, 2026
@00-kat
Copy link
Copy Markdown
Contributor

00-kat commented Mar 19, 2026

It would be nice if Latvian translation updates were done in a separate future PR, since that requires a review from a completely different set of people as the rest of the code and is orthogonal to this PR.

@00-kat
Copy link
Copy Markdown
Contributor

00-kat commented Mar 19, 2026

Also, I'm not sure how it's done but I believe you need to update all the other translation files to have the untranslated strings placed in them; other PRs that added translations (e.g. #9976) have done so.

@EriksRemess
Copy link
Copy Markdown
Member Author

Ok, I'll remove Latvian translation for now. Should I also remove .pot? That is also generated by the same zig build update-translations.

@00-kat
Copy link
Copy Markdown
Contributor

00-kat commented Mar 19, 2026

Definitely keep the .pot changes, having empty strings for the translations is fine; reviewing the translated text themselves is what's problematic (since most maintainers can't review that, so we need to ping the respective localization team).

@00-kat
Copy link
Copy Markdown
Contributor

00-kat commented Mar 19, 2026

I believe you need to update all the other translation files to have the untranslated strings placed in them

zig build update-translations

It looks like update-translations itself should do that:

inline for (locales) |locale| {
const msgmerge = b.addSystemCommand(&.{ "msgmerge", "--quiet", "--no-fuzzy-matching" });
msgmerge.addFileArg(b.path("po/" ++ locale ++ ".po"));
msgmerge.addFileArg(xgettext_merge.captureStdOut());
usf.addCopyFileToSource(msgmerge.captureStdOut(), "po/" ++ locale ++ ".po");
}

If it changed every single translation file to add untranslated strings, you should probably git add that.

@EriksRemess
Copy link
Copy Markdown
Member Author

I guess, test should be retried https://github.com/ghostty-org/ghostty/actions/runs/23306874737/job/67784178019?pr=11641

@00-kat
Copy link
Copy Markdown
Contributor

00-kat commented Mar 19, 2026

Thanks!

test should be retried

Done.

@EriksRemess EriksRemess requested a review from mitchellh March 20, 2026 17:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

translations Translations of the Ghostty app

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants