Skip to content

Commit 44d30e1

Browse files
author
Fehér Ákos
committed
Release v1.2.0: Add multi-language interface support (en, hu, es, pt-BR, fr, de, it) via embedded i18n catalogs, localized confirm mnemonics, per-language man page and README translations, and release version bumps.
1 parent 65a7566 commit 44d30e1

72 files changed

Lines changed: 9004 additions & 259 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.idea/nftui.iml

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

CHANGELOG.md

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,19 @@ All notable changes to nftui are documented in this file.
55
The format follows [Keep a Changelog 1.1.0](https://keepachangelog.com/en/1.1.0/),
66
and the project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8-
## [Unreleased]
8+
## [1.2.0] - 2026-07-18 — Internationalization & localization
9+
10+
### Added
11+
12+
- **Multi-language interface (internationalization / localization).** The whole interactive TUI can now render in a language other than English. A small internal `nftui/i18n` package resolves the interface language once at startup — `--lang <code>` wins, else the POSIX locale environment (`LC_ALL` → `LC_MESSAGES` → `LANG`, with `.codeset` / `@modifier` stripped and `C` / `POSIX` meaning English), else English — and looks strings up in per-language JSON catalogs embedded at build time (`i18n/locales/*.json`) via `//go:embed`, matched with `golang.org/x/text/language`. English is the **source** locale and the fallback for any missing key, so the catalog stays byte-identical to the previous inline strings and existing golden-render tests are unchanged. **Hungarian (`hu`)** is the first shipped translation. Everything user-facing in the TUI is localized: the tree and dashboards, the rule / chain / set views, the create / edit dialogs, the full rule editor (tab bar, section headers, field chrome, empty-states), all footers (~77 key descriptions routed through shared action keys), status/feedback lines, and the delete/quit confirmations (whose highlighted mnemonic gained an `i`/`I` "yes" alias so Hungarian `[I]gen / [N]em` actually works). **nftables' own vocabulary stays English in every language** — attribute names (`type` / `hook` / `priority` / `policy`, `ct state`, `ip saddr`, `limit rate`, …), verdicts, expression keywords, and any copy-pasteable rule syntax — so what you read still matches what `nft` accepts. The `--lang` flag is documented in `--help` and `nftui(1)`; a new README "Language / localization" section explains detection and scope. `--help` / `--version` and the man page themselves are English-only (consumed outside the TUI, and `--help` is handled before the language is resolved). Catalog key parity between languages is enforced by a unit test.
13+
- **Spanish and Brazilian Portuguese translations.** Two more interface languages ship alongside Hungarian: **Spanish (`es`)** and **Brazilian Portuguese (`pt-BR`)** — full 133-key catalogs covering the whole TUI. Any Spanish locale (`es_ES`, `es_MX`, …) selects the `es` catalog; any Portuguese locale (including `pt` and `pt_PT`) nearest-matches `pt-BR`. The delete/quit confirmations' "yes" mnemonic gained an `s`/`S` alias so the highlighted `[S]í / [N]o` and `[S]im / [N]ão` keys actually work, exactly as the Hungarian `i`/`I` alias does. Dialog label columns keep their alignment with the untranslated nft-keyword labels next to them. The language list is updated in `--help`, both `nftui(1)` man pages, and both READMEs; catalog parity and the new mnemonics are covered by unit tests.
14+
- **Spanish and Brazilian Portuguese documentation.** The `nftui(1)` man page and the README now ship in Spanish and Brazilian Portuguese as well, alongside the English originals and the Hungarian translations: `man/es/nftui.1` and `man/pt_BR/nftui.1` (fully translated section titles and prose; groff macros, flag names, `nft` syntax and file paths kept verbatim; install targets `/usr/share/man/es/man1/` and `/usr/share/man/pt_BR/man1/`, so a locale-aware `man` picks them from `$LANG` / `$LC_MESSAGES`), plus `README.es.md` and `README.pt-BR.md` (full translations with in-page anchors re-pointed to the translated headings; commands, flags and copy-pasteable syntax stay English). Every README now carries an English · Magyar · Español · Português (BR) language selector, and the man-page install instructions cover all four pages.
15+
- **French translation.** A fifth interface language: **French (`fr`)** — a full 133-key catalog covering the whole TUI, selected with `--lang fr` or any French locale (`fr_FR`, `fr_CA`, …). The delete/quit confirmations' "yes" mnemonic gained an `o`/`O` alias so the highlighted `[O]ui / [N]on` keys actually work, exactly like the Hungarian `i`/`I` and the Spanish/Portuguese `s`/`S` aliases. Dialog label columns keep their alignment with the untranslated nft-keyword labels next to them. The language list is updated in `--help`, all four `nftui(1)` man pages, and all four READMEs; catalog parity and the new mnemonic are covered by unit tests.
16+
- **French documentation.** The `nftui(1)` man page and the README also ship in French: `man/fr/nftui.1` (fully translated section titles and prose — NOM / SYNOPSIS / DESCRIPTION / OPTIONS / RACCOURCIS CLAVIER / …; groff macros, flag names, `nft` syntax and file paths kept verbatim; install target `/usr/share/man/fr/man1/`, so a locale-aware `man` picks it from `$LANG` / `$LC_MESSAGES`) and `README.fr.md` (a full translation with in-page anchors re-pointed to the translated headings; commands, flags and copy-pasteable syntax stay English). Every README's language selector now lists all five languages, and the man-page install instructions cover all five pages.
17+
- **German translation.** A sixth interface language: **German (`de`)** — a full 133-key catalog covering the whole TUI, selected with `--lang de` or any German locale (`de_DE`, `de_AT`, `de_CH`, …). The delete/quit confirmations' `[J]a / [N]ein` mnemonic works via a **language-gated** `j`/`J` alias: unlike the unconditional Hungarian `i`, Spanish/Portuguese `s` and French `o` aliases, `j` only confirms while German is the active language — in every other language a stray `j` (vim-down scroll muscle memory) inside a confirm dialog stays inert instead of confirming a delete. Dialog label columns keep their alignment with the untranslated nft-keyword labels next to them. The language list is updated in `--help`, all five `nftui(1)` man pages, and all five READMEs; catalog parity, the German mnemonic, and the non-German inertness of `j` are covered by unit tests.
18+
- **German documentation.** The `nftui(1)` man page and the README also ship in German: `man/de/nftui.1` (fully translated section titles and prose — BEZEICHNUNG / ÜBERSICHT / BESCHREIBUNG / OPTIONEN / TASTENKÜRZEL / …; groff macros, flag names, `nft` syntax and file paths kept verbatim; install target `/usr/share/man/de/man1/`, so a locale-aware `man` picks it from `$LANG` / `$LC_MESSAGES`) and `README.de.md` (a full translation with in-page anchors re-pointed to the translated headings; commands, flags and copy-pasteable syntax stay English). Every README's language selector now lists all six languages, and the man-page install instructions cover all six pages.
19+
- **Italian translation.** A seventh interface language: **Italian (`it`)** — a full 133-key catalog covering the whole TUI, selected with `--lang it` or any Italian locale (`it_IT`, `it_CH`, …). The delete/quit confirmations' `[S]ì / [N]o` mnemonic works through the already-shipped unconditional `s`/`S` alias (shared with Spanish `[S]í` and Portuguese `[S]im`), so no key-handling change was needed. Dialog label columns keep their alignment with the untranslated nft-keyword labels next to them. The language list is updated in `--help`, all six `nftui(1)` man pages, and all six READMEs; catalog parity and the Italian mnemonic are covered by unit tests.
20+
- **Italian documentation.** The `nftui(1)` man page and the README also ship in Italian: `man/it/nftui.1` (fully translated section titles and prose — NOME / SINOSSI / DESCRIZIONE / OPZIONI / SCORCIATOIE DA TASTIERA / …; groff macros, flag names, `nft` syntax and file paths kept verbatim; install target `/usr/share/man/it/man1/`, so a locale-aware `man` picks it from `$LANG` / `$LC_MESSAGES`) and `README.it.md` (a full translation with in-page anchors re-pointed to the translated headings; commands, flags and copy-pasteable syntax stay English). With this, every supported interface language ships its full documentation pair: the language selector in every README lists all seven languages, and the man-page install instructions cover all seven pages.
921

1022
## [1.1.0] - 2026-06-21 — Terminal-fit UX & security hardening
1123

@@ -256,7 +268,7 @@ IP6 Matches, TCP & UDP Transport Matches.
256268
- Footer help line always lists every available key binding in the current view — the "footer-completeness" invariant.
257269
- Custom UI components: `NumberInput` (numeric textinput with min/max bounds), `Select` (horizontal single-select), `MultiSelect` (horizontal checkboxes).
258270

259-
[Unreleased]: https://github.com/aafeher/nftui/compare/v1.1.0...HEAD
271+
[1.2.0]: https://github.com/aafeher/nftui/compare/v1.1.0...v1.2.0
260272
[1.1.0]: https://github.com/aafeher/nftui/compare/v1.0.0...v1.1.0
261273
[1.0.0]: https://github.com/aafeher/nftui/compare/v0.9.0...v1.0.0
262274
[0.9.0]: https://github.com/aafeher/nftui/compare/v0.8.0...v0.9.0

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
#
66
# Build:
77
# docker build -t nftui:local .
8-
# docker build -t nftui:1.1.0 --build-arg VERSION=1.1.0 .
8+
# docker build -t nftui:1.2.0 --build-arg VERSION=1.2.0 .
99
#
1010
# Run (manages the HOST ruleset — needs the host network namespace, the
1111
# NET_ADMIN capability, and an interactive TTY for the TUI):

0 commit comments

Comments
 (0)