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:
co-authored by
Claude Opus 5.5
parent
4f11f939a0
commit
f1f9c6156c
+17
-2
@@ -408,8 +408,23 @@ The Docker image rebuilds the front end from source.
|
||||
|
||||
Handlers never contain user-facing text. They call `i18n.Bundle` with a
|
||||
message ID. `HTML` escapes arguments for Telegram's HTML parse mode, `T`
|
||||
returns plain text for buttons and callback answers. Sizes, durations and
|
||||
percentages are formatted per locale. Callback data contains IDs only.
|
||||
returns plain text for buttons and callback answers. Sizes, numbers,
|
||||
durations, percentages and dates are formatted per locale. Callback data
|
||||
contains IDs only.
|
||||
|
||||
Which language a message is in:
|
||||
|
||||
| Where | Language |
|
||||
| --- | --- |
|
||||
| Private chat, Mini App | the user's `/language` choice, else their Telegram language, else English |
|
||||
| Group | the group's `/grouplang`, else the requester's language |
|
||||
| Invoice memo, receipts | the language of the person who bought |
|
||||
| Command menu | Telegram picks it by the app's language; a user or group with its own choice gets a chat menu in that language |
|
||||
|
||||
The fallback chain for one message is the exact tag, its base language,
|
||||
then English, so a partial regional catalog (es-PY) only needs the lines
|
||||
that differ. `locales/catalog_test.go` keeps the catalogs and the code in
|
||||
step; see [TRANSLATING.md](TRANSLATING.md).
|
||||
|
||||
## Secrets
|
||||
|
||||
|
||||
Reference in New Issue
Block a user