mirror of
https://github.com/ghostty-org/ghostty.git
synced 2026-04-14 19:45:49 +00:00
i18n: Localize Nautilus .py script (#9976)
Closes #9266.
Big Note: I noticed that this worked properly under `NixOS`, but on my
`Ubuntu` VM it didnt.
The reason is in
[src/build/GhosttyI18n.zig](73a93abf7b/src/build/GhosttyI18n.zig (L24-L31))
because the locale is expected in the `<lang>_<region>` without the
encoding suffix. `<lang>_<region>_<encoding>`
```
// There is no encoding suffix in the LC_MESSAGES path on FreeBSD,
// so we need to remove it from `locale` to have a correct destination string.
// (/usr/local/share/locale/en_AU/LC_MESSAGES)
const target_locale = comptime if (builtin.target.os.tag == .freebsd)
std.mem.trimRight(u8, locale, ".UTF-8")
else
locale;
```
If i force it to always trim the encoding it works, but I am guessing
its there for a reason ,so maybe some of the maintainer can shed some
light in the best way forward, as I am not an expert in how other
systems deal with it. Here you see `Open in Ghostty` -> Abrir con
Ghostty
<img width="353" height="372" alt="image"
src="https://github.com/user-attachments/assets/2c0266f7-cfb3-49e3-aef1-9e98acb16ad8"
/>
- I wanted to format the `py` file with `ruff` but didnt want to drown
the changes, so maybe something that could be worth doing so that also
our `py` files have std formatting.
> [!NOTE]
> Used AI only for helping me debug where the locales could be and why
was it not detected, but no code help whatsoever
This commit is contained in:
7
dist/linux/ghostty_nautilus.py
vendored
7
dist/linux/ghostty_nautilus.py
vendored
@@ -17,8 +17,13 @@
|
||||
# with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
from pathlib import Path
|
||||
import gettext
|
||||
from gi.repository import Nautilus, GObject, Gio
|
||||
|
||||
DOMAIN = "com.mitchellh.ghostty"
|
||||
locale_dir = Path(__file__).absolute().parents[2] / "locale"
|
||||
_ = gettext.translation(DOMAIN, locale_dir, fallback=True).gettext
|
||||
|
||||
def open_in_ghostty_activated(_menu, paths):
|
||||
for path in paths:
|
||||
@@ -45,7 +50,7 @@ def get_paths_to_open(files):
|
||||
def get_items_for_files(name, files):
|
||||
paths = get_paths_to_open(files)
|
||||
if paths:
|
||||
item = Nautilus.MenuItem(name=name, label='Open in Ghostty',
|
||||
item = Nautilus.MenuItem(name=name, label=_('Open in Ghostty'),
|
||||
icon='com.mitchellh.ghostty')
|
||||
item.connect('activate', open_in_ghostty_activated, paths)
|
||||
return [item]
|
||||
|
||||
@@ -8,7 +8,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: com.mitchellh.ghostty\n"
|
||||
"Report-Msgid-Bugs-To: m@mitchellh.com\n"
|
||||
"POT-Creation-Date: 2026-02-16 23:06+0100\n"
|
||||
"POT-Creation-Date: 2026-02-17 23:16+0100\n"
|
||||
"PO-Revision-Date: 2026-02-09 22:07+0200\n"
|
||||
"Last-Translator: reo101 <pavel.atanasov2001@gmail.com>\n"
|
||||
"Language-Team: Bulgarian <dict@ludost.net>\n"
|
||||
@@ -18,6 +18,10 @@ msgstr ""
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||
|
||||
#: dist/linux/ghostty_nautilus.py:53
|
||||
msgid "Open in Ghostty"
|
||||
msgstr ""
|
||||
|
||||
#: src/apprt/gtk/ui/1.0/clipboard-confirmation-dialog.blp:12
|
||||
#: src/apprt/gtk/ui/1.4/clipboard-confirmation-dialog.blp:12
|
||||
#: src/apprt/gtk/class/clipboard_confirmation_dialog.zig:197
|
||||
|
||||
@@ -8,7 +8,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: com.mitchellh.ghostty\n"
|
||||
"Report-Msgid-Bugs-To: m@mitchellh.com\n"
|
||||
"POT-Creation-Date: 2026-02-16 23:06+0100\n"
|
||||
"POT-Creation-Date: 2026-02-17 23:16+0100\n"
|
||||
"PO-Revision-Date: 2025-08-24 19:22+0200\n"
|
||||
"Last-Translator: Kristofer Soler "
|
||||
"<31729650+KristoferSoler@users.noreply.github.com>\n"
|
||||
@@ -19,6 +19,10 @@ msgstr ""
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||
|
||||
#: dist/linux/ghostty_nautilus.py:53
|
||||
msgid "Open in Ghostty"
|
||||
msgstr ""
|
||||
|
||||
#: src/apprt/gtk/ui/1.0/clipboard-confirmation-dialog.blp:12
|
||||
#: src/apprt/gtk/ui/1.4/clipboard-confirmation-dialog.blp:12
|
||||
#: src/apprt/gtk/class/clipboard_confirmation_dialog.zig:197
|
||||
|
||||
@@ -8,7 +8,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: com.mitchellh.ghostty\n"
|
||||
"Report-Msgid-Bugs-To: m@mitchellh.com\n"
|
||||
"POT-Creation-Date: 2026-02-16 23:06+0100\n"
|
||||
"POT-Creation-Date: 2026-02-17 23:16+0100\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
@@ -17,6 +17,10 @@ msgstr ""
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
||||
#: dist/linux/ghostty_nautilus.py:53
|
||||
msgid "Open in Ghostty"
|
||||
msgstr ""
|
||||
|
||||
#: src/apprt/gtk/ui/1.0/clipboard-confirmation-dialog.blp:12
|
||||
#: src/apprt/gtk/ui/1.4/clipboard-confirmation-dialog.blp:12
|
||||
#: src/apprt/gtk/class/clipboard_confirmation_dialog.zig:197
|
||||
|
||||
@@ -10,7 +10,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: com.mitchellh.ghostty\n"
|
||||
"Report-Msgid-Bugs-To: m@mitchellh.com\n"
|
||||
"POT-Creation-Date: 2026-02-16 23:06+0100\n"
|
||||
"POT-Creation-Date: 2026-02-17 23:16+0100\n"
|
||||
"PO-Revision-Date: 2026-02-13 08:05+0100\n"
|
||||
"Last-Translator: Klaus Hipp <khipp@users.noreply.github.com>\n"
|
||||
"Language-Team: German <translation-team-de@lists.sourceforge.net>\n"
|
||||
@@ -20,6 +20,10 @@ msgstr ""
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||
|
||||
#: dist/linux/ghostty_nautilus.py:53
|
||||
msgid "Open in Ghostty"
|
||||
msgstr ""
|
||||
|
||||
#: src/apprt/gtk/ui/1.0/clipboard-confirmation-dialog.blp:12
|
||||
#: src/apprt/gtk/ui/1.4/clipboard-confirmation-dialog.blp:12
|
||||
#: src/apprt/gtk/class/clipboard_confirmation_dialog.zig:197
|
||||
|
||||
@@ -7,7 +7,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: com.mitchellh.ghostty\n"
|
||||
"Report-Msgid-Bugs-To: m@mitchellh.com\n"
|
||||
"POT-Creation-Date: 2026-02-16 23:06+0100\n"
|
||||
"POT-Creation-Date: 2026-02-17 23:16+0100\n"
|
||||
"PO-Revision-Date: 2026-02-09 17:50-0300\n"
|
||||
"Last-Translator: Alan Moyano <alanmoyano203@gmail.com>\n"
|
||||
"Language-Team: Argentinian <es@tp.org.es>\n"
|
||||
@@ -17,6 +17,10 @@ msgstr ""
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||
|
||||
#: dist/linux/ghostty_nautilus.py:53
|
||||
msgid "Open in Ghostty"
|
||||
msgstr ""
|
||||
|
||||
#: src/apprt/gtk/ui/1.0/clipboard-confirmation-dialog.blp:12
|
||||
#: src/apprt/gtk/ui/1.4/clipboard-confirmation-dialog.blp:12
|
||||
#: src/apprt/gtk/class/clipboard_confirmation_dialog.zig:197
|
||||
|
||||
@@ -7,7 +7,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: com.mitchellh.ghostty\n"
|
||||
"Report-Msgid-Bugs-To: m@mitchellh.com\n"
|
||||
"POT-Creation-Date: 2026-02-16 23:06+0100\n"
|
||||
"POT-Creation-Date: 2026-02-17 23:16+0100\n"
|
||||
"PO-Revision-Date: 2026-02-12 17:46+0200\n"
|
||||
"Last-Translator: Miguel Peredo <miguelp@quientienemail.com>\n"
|
||||
"Language-Team: Spanish <es@tp.org.es>\n"
|
||||
@@ -17,6 +17,10 @@ msgstr ""
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||
|
||||
#: dist/linux/ghostty_nautilus.py:53
|
||||
msgid "Open in Ghostty"
|
||||
msgstr ""
|
||||
|
||||
#: src/apprt/gtk/ui/1.0/clipboard-confirmation-dialog.blp:12
|
||||
#: src/apprt/gtk/ui/1.4/clipboard-confirmation-dialog.blp:12
|
||||
#: src/apprt/gtk/class/clipboard_confirmation_dialog.zig:197
|
||||
|
||||
@@ -7,7 +7,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: com.mitchellh.ghostty\n"
|
||||
"Report-Msgid-Bugs-To: m@mitchellh.com\n"
|
||||
"POT-Creation-Date: 2026-02-16 23:06+0100\n"
|
||||
"POT-Creation-Date: 2026-02-17 23:16+0100\n"
|
||||
"PO-Revision-Date: 2026-02-09 21:18+0200\n"
|
||||
"Last-Translator: Gerry Agbobada <gerry@gagbo.net>\n"
|
||||
"Language-Team: French <traduc@traduc.org>\n"
|
||||
@@ -17,6 +17,10 @@ msgstr ""
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
|
||||
|
||||
#: dist/linux/ghostty_nautilus.py:53
|
||||
msgid "Open in Ghostty"
|
||||
msgstr ""
|
||||
|
||||
#: src/apprt/gtk/ui/1.0/clipboard-confirmation-dialog.blp:12
|
||||
#: src/apprt/gtk/ui/1.4/clipboard-confirmation-dialog.blp:12
|
||||
#: src/apprt/gtk/class/clipboard_confirmation_dialog.zig:197
|
||||
|
||||
@@ -7,7 +7,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: com.mitchellh.ghostty\n"
|
||||
"Report-Msgid-Bugs-To: m@mitchellh.com\n"
|
||||
"POT-Creation-Date: 2026-02-16 23:06+0100\n"
|
||||
"POT-Creation-Date: 2026-02-17 23:16+0100\n"
|
||||
"PO-Revision-Date: 2025-08-26 15:46+0100\n"
|
||||
"Last-Translator: Aindriú Mac Giolla Eoin <aindriu80@gmail.com>\n"
|
||||
"Language-Team: Irish <gaeilge-gnulinux@lists.sourceforge.net>\n"
|
||||
@@ -18,6 +18,10 @@ msgstr ""
|
||||
"Plural-Forms: nplurals=3; plural=n==1 ? 0 : n==2 ? 1 : 2;\n"
|
||||
"X-Generator: Poedit 3.4.2\n"
|
||||
|
||||
#: dist/linux/ghostty_nautilus.py:53
|
||||
msgid "Open in Ghostty"
|
||||
msgstr ""
|
||||
|
||||
#: src/apprt/gtk/ui/1.0/clipboard-confirmation-dialog.blp:12
|
||||
#: src/apprt/gtk/ui/1.4/clipboard-confirmation-dialog.blp:12
|
||||
#: src/apprt/gtk/class/clipboard_confirmation_dialog.zig:197
|
||||
|
||||
@@ -9,7 +9,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: com.mitchellh.ghostty\n"
|
||||
"Report-Msgid-Bugs-To: m@mitchellh.com\n"
|
||||
"POT-Creation-Date: 2026-02-16 23:06+0100\n"
|
||||
"POT-Creation-Date: 2026-02-17 23:16+0100\n"
|
||||
"PO-Revision-Date: 2026-02-11 22:45+0300\n"
|
||||
"Last-Translator: Sl (Shahaf Levi), Sl's Repository Ltd "
|
||||
"<ghostty@slsrepo.com>\n"
|
||||
@@ -20,6 +20,10 @@ msgstr ""
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||
|
||||
#: dist/linux/ghostty_nautilus.py:53
|
||||
msgid "Open in Ghostty"
|
||||
msgstr ""
|
||||
|
||||
#: src/apprt/gtk/ui/1.0/clipboard-confirmation-dialog.blp:12
|
||||
#: src/apprt/gtk/ui/1.4/clipboard-confirmation-dialog.blp:12
|
||||
#: src/apprt/gtk/class/clipboard_confirmation_dialog.zig:197
|
||||
|
||||
@@ -8,7 +8,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: com.mitchellh.ghostty\n"
|
||||
"Report-Msgid-Bugs-To: m@mitchellh.com\n"
|
||||
"POT-Creation-Date: 2026-02-16 23:06+0100\n"
|
||||
"POT-Creation-Date: 2026-02-17 23:16+0100\n"
|
||||
"PO-Revision-Date: 2026-02-10 22:25+0200\n"
|
||||
"Last-Translator: Filip7 <filipm7@protonmail.com>\n"
|
||||
"Language-Team: Croatian <lokalizacija@linux.hr>\n"
|
||||
@@ -19,6 +19,10 @@ msgstr ""
|
||||
"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && "
|
||||
"n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
|
||||
|
||||
#: dist/linux/ghostty_nautilus.py:53
|
||||
msgid "Open in Ghostty"
|
||||
msgstr ""
|
||||
|
||||
#: src/apprt/gtk/ui/1.0/clipboard-confirmation-dialog.blp:12
|
||||
#: src/apprt/gtk/ui/1.4/clipboard-confirmation-dialog.blp:12
|
||||
#: src/apprt/gtk/class/clipboard_confirmation_dialog.zig:197
|
||||
|
||||
@@ -7,7 +7,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: com.mitchellh.ghostty\n"
|
||||
"Report-Msgid-Bugs-To: m@mitchellh.com\n"
|
||||
"POT-Creation-Date: 2026-02-16 23:06+0100\n"
|
||||
"POT-Creation-Date: 2026-02-17 23:16+0100\n"
|
||||
"PO-Revision-Date: 2026-02-10 18:32+0200\n"
|
||||
"Last-Translator: Balázs Szücs <bszucs1209@gmail.com>\n"
|
||||
"Language-Team: Hungarian <translation-team-hu@lists.sourceforge.net>\n"
|
||||
@@ -17,6 +17,10 @@ msgstr ""
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||
|
||||
#: dist/linux/ghostty_nautilus.py:53
|
||||
msgid "Open in Ghostty"
|
||||
msgstr ""
|
||||
|
||||
#: src/apprt/gtk/ui/1.0/clipboard-confirmation-dialog.blp:12
|
||||
#: src/apprt/gtk/ui/1.4/clipboard-confirmation-dialog.blp:12
|
||||
#: src/apprt/gtk/class/clipboard_confirmation_dialog.zig:197
|
||||
|
||||
@@ -8,7 +8,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: com.mitchellh.ghostty\n"
|
||||
"Report-Msgid-Bugs-To: m@mitchellh.com\n"
|
||||
"POT-Creation-Date: 2026-02-16 23:06+0100\n"
|
||||
"POT-Creation-Date: 2026-02-17 23:16+0100\n"
|
||||
"PO-Revision-Date: 2025-08-01 10:15+0700\n"
|
||||
"Last-Translator: Mikail Muzakki <mikailmmuzakki@gmail.com>\n"
|
||||
"Language-Team: Indonesian <translation-team-id@lists.sourceforge.net>\n"
|
||||
@@ -17,6 +17,10 @@ msgstr ""
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
||||
#: dist/linux/ghostty_nautilus.py:53
|
||||
msgid "Open in Ghostty"
|
||||
msgstr ""
|
||||
|
||||
#: src/apprt/gtk/ui/1.0/clipboard-confirmation-dialog.blp:12
|
||||
#: src/apprt/gtk/ui/1.4/clipboard-confirmation-dialog.blp:12
|
||||
#: src/apprt/gtk/class/clipboard_confirmation_dialog.zig:197
|
||||
|
||||
@@ -8,7 +8,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: com.mitchellh.ghostty\n"
|
||||
"Report-Msgid-Bugs-To: m@mitchellh.com\n"
|
||||
"POT-Creation-Date: 2026-02-16 23:06+0100\n"
|
||||
"POT-Creation-Date: 2026-02-17 23:16+0100\n"
|
||||
"PO-Revision-Date: 2025-09-06 19:40+0200\n"
|
||||
"Last-Translator: Giacomo Bettini <giaco.bettini@gmail.com>\n"
|
||||
"Language-Team: Italian <tp@lists.linux.it>\n"
|
||||
@@ -18,6 +18,10 @@ msgstr ""
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||
|
||||
#: dist/linux/ghostty_nautilus.py:53
|
||||
msgid "Open in Ghostty"
|
||||
msgstr ""
|
||||
|
||||
#: src/apprt/gtk/ui/1.0/clipboard-confirmation-dialog.blp:12
|
||||
#: src/apprt/gtk/ui/1.4/clipboard-confirmation-dialog.blp:12
|
||||
#: src/apprt/gtk/class/clipboard_confirmation_dialog.zig:197
|
||||
|
||||
@@ -8,7 +8,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: com.mitchellh.ghostty\n"
|
||||
"Report-Msgid-Bugs-To: m@mitchellh.com\n"
|
||||
"POT-Creation-Date: 2026-02-16 23:06+0100\n"
|
||||
"POT-Creation-Date: 2026-02-17 23:16+0100\n"
|
||||
"PO-Revision-Date: 2026-02-11 12:02+0900\n"
|
||||
"Last-Translator: Takayuki Nagatomi <tnagatomi@okweird.net>\n"
|
||||
"Language-Team: Japanese\n"
|
||||
@@ -18,6 +18,10 @@ msgstr ""
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=1; plural=0;\n"
|
||||
|
||||
#: dist/linux/ghostty_nautilus.py:53
|
||||
msgid "Open in Ghostty"
|
||||
msgstr ""
|
||||
|
||||
#: src/apprt/gtk/ui/1.0/clipboard-confirmation-dialog.blp:12
|
||||
#: src/apprt/gtk/ui/1.4/clipboard-confirmation-dialog.blp:12
|
||||
#: src/apprt/gtk/class/clipboard_confirmation_dialog.zig:197
|
||||
|
||||
@@ -7,7 +7,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: com.mitchellh.ghostty\n"
|
||||
"Report-Msgid-Bugs-To: m@mitchellh.com\n"
|
||||
"POT-Creation-Date: 2026-02-16 23:06+0100\n"
|
||||
"POT-Creation-Date: 2026-02-17 23:16+0100\n"
|
||||
"PO-Revision-Date: 2026-02-11 12:50+0900\n"
|
||||
"Last-Translator: GyuYong Jung <obliviscence@gmail.com>\n"
|
||||
"Language-Team: Korean <translation-team-ko@googlegroups.com>\n"
|
||||
@@ -17,6 +17,10 @@ msgstr ""
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=1; plural=0;\n"
|
||||
|
||||
#: dist/linux/ghostty_nautilus.py:53
|
||||
msgid "Open in Ghostty"
|
||||
msgstr ""
|
||||
|
||||
#: src/apprt/gtk/ui/1.0/clipboard-confirmation-dialog.blp:12
|
||||
#: src/apprt/gtk/ui/1.4/clipboard-confirmation-dialog.blp:12
|
||||
#: src/apprt/gtk/class/clipboard_confirmation_dialog.zig:197
|
||||
|
||||
@@ -7,7 +7,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: com.mitchellh.ghostty\n"
|
||||
"Report-Msgid-Bugs-To: m@mitchellh.com\n"
|
||||
"POT-Creation-Date: 2026-02-16 23:06+0100\n"
|
||||
"POT-Creation-Date: 2026-02-17 23:16+0100\n"
|
||||
"PO-Revision-Date: 2026-02-10 08:14+0100\n"
|
||||
"Last-Translator: Tadas Lotuzas <tdslot@gmail.com>\n"
|
||||
"Language-Team: Language LT\n"
|
||||
@@ -16,6 +16,10 @@ msgstr ""
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
||||
#: dist/linux/ghostty_nautilus.py:53
|
||||
msgid "Open in Ghostty"
|
||||
msgstr ""
|
||||
|
||||
#: src/apprt/gtk/ui/1.0/clipboard-confirmation-dialog.blp:12
|
||||
#: src/apprt/gtk/ui/1.4/clipboard-confirmation-dialog.blp:12
|
||||
#: src/apprt/gtk/class/clipboard_confirmation_dialog.zig:197
|
||||
|
||||
@@ -7,7 +7,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: com.mitchellh.ghostty\n"
|
||||
"Report-Msgid-Bugs-To: m@mitchellh.com\n"
|
||||
"POT-Creation-Date: 2026-02-16 23:06+0100\n"
|
||||
"POT-Creation-Date: 2026-02-17 23:16+0100\n"
|
||||
"PO-Revision-Date: 2026-02-09 03:24+0200\n"
|
||||
"Last-Translator: Ēriks Remess <eriks@remess.lv>\n"
|
||||
"Language-Team: Latvian\n"
|
||||
@@ -17,6 +17,10 @@ msgstr ""
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n!=0 ? 1 : 2);\n"
|
||||
|
||||
#: dist/linux/ghostty_nautilus.py:53
|
||||
msgid "Open in Ghostty"
|
||||
msgstr ""
|
||||
|
||||
#: src/apprt/gtk/ui/1.0/clipboard-confirmation-dialog.blp:12
|
||||
#: src/apprt/gtk/ui/1.4/clipboard-confirmation-dialog.blp:12
|
||||
#: src/apprt/gtk/class/clipboard_confirmation_dialog.zig:197
|
||||
|
||||
@@ -8,7 +8,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: com.mitchellh.ghostty\n"
|
||||
"Report-Msgid-Bugs-To: m@mitchellh.com\n"
|
||||
"POT-Creation-Date: 2026-02-16 23:06+0100\n"
|
||||
"POT-Creation-Date: 2026-02-17 23:16+0100\n"
|
||||
"PO-Revision-Date: 2026-02-12 17:00+0100\n"
|
||||
"Last-Translator: Andrej Daskalov <andrej.daskalov@gmail.com>\n"
|
||||
"Language-Team: Macedonian\n"
|
||||
@@ -17,6 +17,10 @@ msgstr ""
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
||||
#: dist/linux/ghostty_nautilus.py:53
|
||||
msgid "Open in Ghostty"
|
||||
msgstr ""
|
||||
|
||||
#: src/apprt/gtk/ui/1.0/clipboard-confirmation-dialog.blp:12
|
||||
#: src/apprt/gtk/ui/1.4/clipboard-confirmation-dialog.blp:12
|
||||
#: src/apprt/gtk/class/clipboard_confirmation_dialog.zig:197
|
||||
|
||||
@@ -10,7 +10,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: com.mitchellh.ghostty\n"
|
||||
"Report-Msgid-Bugs-To: m@mitchellh.com\n"
|
||||
"POT-Creation-Date: 2026-02-16 23:06+0100\n"
|
||||
"POT-Creation-Date: 2026-02-17 23:16+0100\n"
|
||||
"PO-Revision-Date: 2026-02-12 15:50+0000\n"
|
||||
"Last-Translator: Hanna Rose <me@hanna.lol>\n"
|
||||
"Language-Team: Norwegian Bokmal <l10n-no@lister.huftis.org>\n"
|
||||
@@ -20,6 +20,10 @@ msgstr ""
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||
|
||||
#: dist/linux/ghostty_nautilus.py:53
|
||||
msgid "Open in Ghostty"
|
||||
msgstr ""
|
||||
|
||||
#: src/apprt/gtk/ui/1.0/clipboard-confirmation-dialog.blp:12
|
||||
#: src/apprt/gtk/ui/1.4/clipboard-confirmation-dialog.blp:12
|
||||
#: src/apprt/gtk/class/clipboard_confirmation_dialog.zig:197
|
||||
|
||||
@@ -8,7 +8,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: com.mitchellh.ghostty\n"
|
||||
"Report-Msgid-Bugs-To: m@mitchellh.com\n"
|
||||
"POT-Creation-Date: 2026-02-16 23:06+0100\n"
|
||||
"POT-Creation-Date: 2026-02-17 23:16+0100\n"
|
||||
"PO-Revision-Date: 2026-02-09 20:39+0100\n"
|
||||
"Last-Translator: Nico Geesink <geesinknico@gmail.com>\n"
|
||||
"Language-Team: Dutch <vertaling@vrijschrift.org>\n"
|
||||
@@ -18,6 +18,10 @@ msgstr ""
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||
|
||||
#: dist/linux/ghostty_nautilus.py:53
|
||||
msgid "Open in Ghostty"
|
||||
msgstr ""
|
||||
|
||||
#: src/apprt/gtk/ui/1.0/clipboard-confirmation-dialog.blp:12
|
||||
#: src/apprt/gtk/ui/1.4/clipboard-confirmation-dialog.blp:12
|
||||
#: src/apprt/gtk/class/clipboard_confirmation_dialog.zig:197
|
||||
|
||||
@@ -9,7 +9,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: com.mitchellh.ghostty\n"
|
||||
"Report-Msgid-Bugs-To: m@mitchellh.com\n"
|
||||
"POT-Creation-Date: 2026-02-16 23:06+0100\n"
|
||||
"POT-Creation-Date: 2026-02-17 23:16+0100\n"
|
||||
"PO-Revision-Date: 2026-02-11 14:12+0100\n"
|
||||
"Last-Translator: trag1c <dev@jakubr.me>\n"
|
||||
"Language-Team: Polish <translation-team-pl@lists.sourceforge.net>\n"
|
||||
@@ -20,6 +20,10 @@ msgstr ""
|
||||
"Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 "
|
||||
"|| n%100>=20) ? 1 : 2);\n"
|
||||
|
||||
#: dist/linux/ghostty_nautilus.py:53
|
||||
msgid "Open in Ghostty"
|
||||
msgstr ""
|
||||
|
||||
#: src/apprt/gtk/ui/1.0/clipboard-confirmation-dialog.blp:12
|
||||
#: src/apprt/gtk/ui/1.4/clipboard-confirmation-dialog.blp:12
|
||||
#: src/apprt/gtk/class/clipboard_confirmation_dialog.zig:197
|
||||
|
||||
@@ -10,7 +10,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: com.mitchellh.ghostty\n"
|
||||
"Report-Msgid-Bugs-To: m@mitchellh.com\n"
|
||||
"POT-Creation-Date: 2026-02-16 23:06+0100\n"
|
||||
"POT-Creation-Date: 2026-02-17 23:16+0100\n"
|
||||
"PO-Revision-Date: 2025-09-15 13:57-0300\n"
|
||||
"Last-Translator: Nilton Perim Neto <niltonperimneto@gmail.com>\n"
|
||||
"Language-Team: Brazilian Portuguese <ldpbr-"
|
||||
@@ -21,6 +21,10 @@ msgstr ""
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
|
||||
|
||||
#: dist/linux/ghostty_nautilus.py:53
|
||||
msgid "Open in Ghostty"
|
||||
msgstr ""
|
||||
|
||||
#: src/apprt/gtk/ui/1.0/clipboard-confirmation-dialog.blp:12
|
||||
#: src/apprt/gtk/ui/1.4/clipboard-confirmation-dialog.blp:12
|
||||
#: src/apprt/gtk/class/clipboard_confirmation_dialog.zig:197
|
||||
|
||||
@@ -8,7 +8,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: com.mitchellh.ghostty\n"
|
||||
"Report-Msgid-Bugs-To: m@mitchellh.com\n"
|
||||
"POT-Creation-Date: 2026-02-16 23:06+0100\n"
|
||||
"POT-Creation-Date: 2026-02-17 23:16+0100\n"
|
||||
"PO-Revision-Date: 2025-09-03 01:50+0300\n"
|
||||
"Last-Translator: Ivan Bastrakov <bastaynav@proton.me>\n"
|
||||
"Language-Team: Russian <gnu@d07.ru>\n"
|
||||
@@ -19,6 +19,10 @@ msgstr ""
|
||||
"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && "
|
||||
"n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
|
||||
|
||||
#: dist/linux/ghostty_nautilus.py:53
|
||||
msgid "Open in Ghostty"
|
||||
msgstr ""
|
||||
|
||||
#: src/apprt/gtk/ui/1.0/clipboard-confirmation-dialog.blp:12
|
||||
#: src/apprt/gtk/ui/1.4/clipboard-confirmation-dialog.blp:12
|
||||
#: src/apprt/gtk/class/clipboard_confirmation_dialog.zig:197
|
||||
|
||||
@@ -7,7 +7,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: com.mitchellh.ghostty\n"
|
||||
"Report-Msgid-Bugs-To: m@mitchellh.com\n"
|
||||
"POT-Creation-Date: 2026-02-16 23:06+0100\n"
|
||||
"POT-Creation-Date: 2026-02-17 23:16+0100\n"
|
||||
"PO-Revision-Date: 2026-02-09 22:18+0300\n"
|
||||
"Last-Translator: Emir SARI <emir_sari@icloud.com>\n"
|
||||
"Language-Team: Turkish\n"
|
||||
@@ -17,6 +17,10 @@ msgstr ""
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||
|
||||
#: dist/linux/ghostty_nautilus.py:53
|
||||
msgid "Open in Ghostty"
|
||||
msgstr ""
|
||||
|
||||
#: src/apprt/gtk/ui/1.0/clipboard-confirmation-dialog.blp:12
|
||||
#: src/apprt/gtk/ui/1.4/clipboard-confirmation-dialog.blp:12
|
||||
#: src/apprt/gtk/class/clipboard_confirmation_dialog.zig:197
|
||||
|
||||
@@ -7,7 +7,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: com.mitchellh.ghostty\n"
|
||||
"Report-Msgid-Bugs-To: m@mitchellh.com\n"
|
||||
"POT-Creation-Date: 2026-02-16 23:06+0100\n"
|
||||
"POT-Creation-Date: 2026-02-17 23:16+0100\n"
|
||||
"PO-Revision-Date: 2026-02-09 21:03+0100\n"
|
||||
"Last-Translator: Volodymyr Chernetskyi "
|
||||
"<19735328+chernetskyi@users.noreply.github.com>\n"
|
||||
@@ -19,6 +19,10 @@ msgstr ""
|
||||
"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && "
|
||||
"n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
|
||||
|
||||
#: dist/linux/ghostty_nautilus.py:53
|
||||
msgid "Open in Ghostty"
|
||||
msgstr ""
|
||||
|
||||
#: src/apprt/gtk/ui/1.0/clipboard-confirmation-dialog.blp:12
|
||||
#: src/apprt/gtk/ui/1.4/clipboard-confirmation-dialog.blp:12
|
||||
#: src/apprt/gtk/class/clipboard_confirmation_dialog.zig:197
|
||||
|
||||
@@ -8,7 +8,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: com.mitchellh.ghostty\n"
|
||||
"Report-Msgid-Bugs-To: m@mitchellh.com\n"
|
||||
"POT-Creation-Date: 2026-02-16 23:06+0100\n"
|
||||
"POT-Creation-Date: 2026-02-17 23:16+0100\n"
|
||||
"PO-Revision-Date: 2026-02-12 01:56+0800\n"
|
||||
"Last-Translator: Leah <hi@pluie.me>\n"
|
||||
"Language-Team: Chinese (simplified) <i18n-zh@googlegroups.com>\n"
|
||||
@@ -17,6 +17,10 @@ msgstr ""
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
||||
#: dist/linux/ghostty_nautilus.py:53
|
||||
msgid "Open in Ghostty"
|
||||
msgstr ""
|
||||
|
||||
#: src/apprt/gtk/ui/1.0/clipboard-confirmation-dialog.blp:12
|
||||
#: src/apprt/gtk/ui/1.4/clipboard-confirmation-dialog.blp:12
|
||||
#: src/apprt/gtk/class/clipboard_confirmation_dialog.zig:197
|
||||
|
||||
@@ -7,7 +7,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: com.mitchellh.ghostty\n"
|
||||
"Report-Msgid-Bugs-To: m@mitchellh.com\n"
|
||||
"POT-Creation-Date: 2026-02-16 23:06+0100\n"
|
||||
"POT-Creation-Date: 2026-02-17 23:16+0100\n"
|
||||
"PO-Revision-Date: 2026-02-10 15:32+0800\n"
|
||||
"Last-Translator: Yi-Jyun Pan <me@pan93.com>\n"
|
||||
"Language-Team: Chinese (traditional)\n"
|
||||
@@ -16,6 +16,10 @@ msgstr ""
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
||||
#: dist/linux/ghostty_nautilus.py:53
|
||||
msgid "Open in Ghostty"
|
||||
msgstr ""
|
||||
|
||||
#: src/apprt/gtk/ui/1.0/clipboard-confirmation-dialog.blp:12
|
||||
#: src/apprt/gtk/ui/1.4/clipboard-confirmation-dialog.blp:12
|
||||
#: src/apprt/gtk/class/clipboard_confirmation_dialog.zig:197
|
||||
|
||||
@@ -65,16 +65,14 @@ fn createUpdateStep(b: *std.Build) !*std.Build.Step {
|
||||
"xgettext",
|
||||
"--language=C", // Silence the "unknown extension" errors
|
||||
"--from-code=UTF-8",
|
||||
"--add-comments=Translators",
|
||||
"--keyword=_",
|
||||
"--keyword=C_:1c,2",
|
||||
"--package-name=" ++ domain,
|
||||
"--msgid-bugs-address=m@mitchellh.com",
|
||||
"--copyright-holder=\"Mitchell Hashimoto, Ghostty contributors\"",
|
||||
"-o",
|
||||
"-",
|
||||
});
|
||||
|
||||
// Collect to intermediate .pot file
|
||||
xgettext.addArg("-o");
|
||||
const gtk_pot = xgettext.addOutputFileArg("gtk.pot");
|
||||
|
||||
// Not cacheable due to the gresource files
|
||||
xgettext.has_side_effects = true;
|
||||
|
||||
@@ -149,16 +147,45 @@ fn createUpdateStep(b: *std.Build) !*std.Build.Step {
|
||||
}
|
||||
}
|
||||
|
||||
// Add support for localizing our `nautilus` integration
|
||||
const xgettext_py = b.addSystemCommand(&.{
|
||||
"xgettext",
|
||||
"--language=Python",
|
||||
"--from-code=UTF-8",
|
||||
});
|
||||
|
||||
// Collect to intermediate .pot file
|
||||
xgettext_py.addArg("-o");
|
||||
const py_pot = xgettext_py.addOutputFileArg("py.pot");
|
||||
|
||||
const nautilus_script_path = "dist/linux/ghostty_nautilus.py";
|
||||
xgettext_py.addArg(nautilus_script_path);
|
||||
xgettext_py.addFileInput(b.path(nautilus_script_path));
|
||||
|
||||
// Merge pot files
|
||||
const xgettext_merge = b.addSystemCommand(&.{
|
||||
"xgettext",
|
||||
"--add-comments=Translators",
|
||||
"--package-name=" ++ domain,
|
||||
"--msgid-bugs-address=m@mitchellh.com",
|
||||
"--copyright-holder=\"Mitchell Hashimoto, Ghostty contributors\"",
|
||||
"-o",
|
||||
"-",
|
||||
});
|
||||
// py_pot needs to be first on merge order because of `xgettext` behavior around
|
||||
// charset when merging the two `.pot` files
|
||||
xgettext_merge.addFileArg(py_pot);
|
||||
xgettext_merge.addFileArg(gtk_pot);
|
||||
const usf = b.addUpdateSourceFiles();
|
||||
usf.addCopyFileToSource(
|
||||
xgettext.captureStdOut(),
|
||||
xgettext_merge.captureStdOut(),
|
||||
"po/" ++ domain ++ ".pot",
|
||||
);
|
||||
|
||||
inline for (locales) |locale| {
|
||||
const msgmerge = b.addSystemCommand(&.{ "msgmerge", "--quiet", "--no-fuzzy-matching" });
|
||||
msgmerge.addFileArg(b.path("po/" ++ locale ++ ".po"));
|
||||
msgmerge.addFileArg(xgettext.captureStdOut());
|
||||
msgmerge.addFileArg(xgettext_merge.captureStdOut());
|
||||
usf.addCopyFileToSource(msgmerge.captureStdOut(), "po/" ++ locale ++ ".po");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user