mirror of
https://github.com/ghostty-org/ghostty.git
synced 2026-07-27 11:06:31 +00:00
i18n: Localize Nautilus .py script
This commit is contained in:
@@ -62,8 +62,10 @@ pub fn addStepDependencies(
|
||||
|
||||
fn createUpdateStep(b: *std.Build) !*std.Build.Step {
|
||||
const xgettext = b.addSystemCommand(&.{
|
||||
// We do not specify specific language since we
|
||||
// currently need to support `blp` and `python`
|
||||
// for localization
|
||||
"xgettext",
|
||||
"--language=C", // Silence the "unknown extension" errors
|
||||
"--from-code=UTF-8",
|
||||
"--add-comments=Translators",
|
||||
"--keyword=_",
|
||||
@@ -74,6 +76,8 @@ fn createUpdateStep(b: *std.Build) !*std.Build.Step {
|
||||
"-o",
|
||||
"-",
|
||||
});
|
||||
// Silences the "unknown extension" errors
|
||||
_ = xgettext.captureStdErr();
|
||||
|
||||
// Not cacheable due to the gresource files
|
||||
xgettext.has_side_effects = true;
|
||||
@@ -92,6 +96,11 @@ fn createUpdateStep(b: *std.Build) !*std.Build.Step {
|
||||
xgettext.addFileInput(b.path(path));
|
||||
}
|
||||
|
||||
// Add suport for localizing our `nautilus` integration
|
||||
const nautilus_script_path = "dist/linux/ghostty_nautilus.py";
|
||||
xgettext.addArg(nautilus_script_path);
|
||||
xgettext.addFileInput(b.path(nautilus_script_path));
|
||||
|
||||
{
|
||||
// Iterate over all of the files underneath `src/apprt/gtk`. We store
|
||||
// them in an array so that they can be sorted into a determininistic
|
||||
|
||||
Reference in New Issue
Block a user