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
@@ -0,0 +1,75 @@
|
||||
# Checks for every push and pull request. The same steps run locally with
|
||||
# "make check", "make test-postgres" and "make miniapp".
|
||||
name: ci
|
||||
|
||||
on:
|
||||
push:
|
||||
pull_request:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
go:
|
||||
name: Go (SQLite, race detector)
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v7
|
||||
- uses: actions/setup-go@v7
|
||||
with:
|
||||
go-version-file: go.mod
|
||||
- name: gofmt
|
||||
run: make fmt
|
||||
- name: go vet
|
||||
run: go vet ./...
|
||||
# Every catalog has every message of the source, with the same
|
||||
# placeholders, tags and commands; no message is unused and no used
|
||||
# message is missing. This is the translation completeness check.
|
||||
- name: Translations
|
||||
run: go test -count=1 ./locales/ ./internal/i18n/
|
||||
- name: Tests
|
||||
run: go test -race -count=1 ./...
|
||||
|
||||
postgres:
|
||||
name: Go (Postgres)
|
||||
runs-on: ubuntu-latest
|
||||
services:
|
||||
postgres:
|
||||
image: postgres:16
|
||||
env:
|
||||
POSTGRES_USER: dlbot
|
||||
POSTGRES_PASSWORD: dlbot
|
||||
POSTGRES_DB: dlbot_test
|
||||
ports: ["5432:5432"]
|
||||
options: >-
|
||||
--health-cmd "pg_isready -U dlbot" --health-interval 5s --health-timeout 5s --health-retries 10
|
||||
steps:
|
||||
- uses: actions/checkout@v7
|
||||
- uses: actions/setup-go@v7
|
||||
with:
|
||||
go-version-file: go.mod
|
||||
- name: Tests
|
||||
run: make test-postgres PG_DSN='postgres://dlbot:dlbot@127.0.0.1:5432/dlbot_test?sslmode=disable'
|
||||
|
||||
miniapp:
|
||||
name: Mini App
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v7
|
||||
- uses: actions/setup-node@v7
|
||||
with:
|
||||
node-version: 24
|
||||
cache: npm
|
||||
cache-dependency-path: web/miniapp/package-lock.json
|
||||
- uses: actions/setup-go@v7
|
||||
with:
|
||||
go-version-file: go.mod
|
||||
- name: Build
|
||||
run: make miniapp
|
||||
# The committed build must be what the sources produce.
|
||||
- name: Build is committed
|
||||
run: git diff --exit-code -- web/miniapp/dist
|
||||
- name: Browser test
|
||||
run: |
|
||||
npx --prefix web/miniapp playwright-core install --with-deps chromium
|
||||
web/miniapp/e2e/run.sh
|
||||
Reference in New Issue
Block a user