Phase 7: languages

- Complete Spanish (neutral Latin American, Paraguay friendly, no
  inverted marks) and Dutch catalogs, including the Mini App and owner texts
- Command menus per language in three scopes (private, group members,
  group admins); per-chat menus follow a user's /language and a group's
  /grouplang, from chat and from the Mini App
- Bot name, description and short description per language, sent only
  when the catalog text changes (TELEGRAM_SET_PROFILE)
- Dates from the catalog, numbers, sizes and durations per locale
- Pseudo-locale en-XA generated from English (I18N_PSEUDO), owners only
- Catalog checks: completeness, placeholders, tags, commands, plurals,
  Telegram length limits, untranslated text, unused and missing IDs
- CI workflow; make i18n-check; docs/TRANSLATING.md
- Test fix: the queued-download helper could match another chat's status

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Michilis
2026-11-18 17:42:31 +00:00
co-authored by Claude Opus 5.5
parent 4f11f939a0
commit f1f9c6156c
27 changed files with 3217 additions and 71 deletions
+8
View File
@@ -83,6 +83,9 @@ type Config struct {
// directory instead of the ones built into the binary, and makes
// "/reload i18n" pick up edits without a restart.
LocalesDir string `toml:"locales_dir" env:"LOCALES_DIR"`
// Pseudo adds the pseudo-locale en-XA, for checking that every text
// comes from the catalog. Owners can pick it with /language.
Pseudo bool `toml:"i18n_pseudo" env:"I18N_PSEUDO"`
// PublicURL is the HTTPS base URL this server is reachable at from the
// internet, without a trailing slash. It is used for payment webhooks,
@@ -108,6 +111,10 @@ type Telegram struct {
MaxUploadMB int64 `toml:"max_upload_mb" env:"TELEGRAM_MAX_UPLOAD_MB"`
// UpdateWorkers is the number of goroutines that handle updates.
UpdateWorkers int `toml:"update_workers" env:"TELEGRAM_UPDATE_WORKERS"`
// SetProfile lets the bot set its name, description and short
// description in every language from the catalogs (profile.*). Turn it
// off to keep what was set in @BotFather.
SetProfile bool `toml:"set_profile" env:"TELEGRAM_SET_PROFILE"`
}
// HTTP holds the settings of the embedded HTTP server.
@@ -291,6 +298,7 @@ func Default() Config {
Mode: "polling",
MaxUploadMB: 50,
UpdateWorkers: 8,
SetProfile: true,
},
ProbeMode: "auto",
HTTP: HTTP{Listen: ":8080"},