Skip to content

i18n(api): localize API and OpenAPI descriptions - #111

Draft
Dani6ca-T wants to merge 2 commits into
OpenstreamCo:masterfrom
Dani6ca-T:i18n/g4-api-openapi-locales
Draft

Dani6ca-T wants to merge 2 commits into
OpenstreamCo:masterfrom
Dani6ca-T:i18n/g4-api-openapi-locales

Conversation

@Dani6ca-T

@Dani6ca-T Dani6ca-T commented Nov 30, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Extracts the API/OpenAPI localization slice from i18n/full-program-22-locales (a73e18bf21ba504df590f17ef9aed03961f15b95) onto current upstream/master (5ed637347bd83d4ee1bec1c76fce5cbf8168cdca).

  • Adds request-scoped OpenAPI document/operation localization via LocalizedOpenApiSummary metadata.
  • Localizes 113 api.* keys across all 22 backend catalogs.
  • Localizes the two invalid-action responses (api.composites.invalidAction, api.hud.invalidPowerAction).
  • Keeps G1/G2/G3/G5/G6/G7 work out of this PR.

Scope

Changed files: 35 (12 C# files, 22 catalogs, 1 new metadata record).

  • Program.cs: document description lookup + operation transformer.
  • Services/Localization/LocalizedOpenApiSummary.cs: metadata record.
  • 11 Core/Api/*Endpoints.cs files: summaries/descriptions replaced with metadata; invalid-action responses localized.
  • Services/Localization/Locales/*.json: 113 API keys per catalog.

Catalog placement is after the initial power.* block (not top, not EOF) so this branch merges cleanly with #109 (EOF app.* block) and #110 (top general block).

Why all 22 catalogs

Base-master i18n tests assert raw key parity across all 22 catalogs. The source branch omitted 30 API keys in the four fallback catalogs (en_GB, en_US, pt_BR, zh_TW). To keep the branch standalone-testable, those four catalogs receive their parent values (en or pt/zh), preserving effective fallback output exactly.

One source string was adjusted: ru.api.sessions.start.description used literal {id} route braces, which base-master placeholder tests treat as a format placeholder. It now uses /api/sessions/:id; no other API value differs from source.

Validation

Exclusions

No G1, G2 (app.*), G3 general keys, G5 runtime/service logs, G6 installer, G7 CI/test changes, safe-maintenance-mode, or unrelated refactors. No changes to existing PR branches or the main working copy.

Draft only; not for merge yet.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant