Skip to content

Serve ApiApp.category per locale — app page titles are mixed-language in ten locales #285

Description

@v0l

ApiApp.category (added in #241) is the class of software — "Nostr relay", "Blossom media server". LNVPS/web#35 templates the /apps/:id <title> and meta description from it:

{name} Hosting — Managed {category}

The sentence around it is translated through react-intl, but category arrives over the wire and is never extracted, so in the ten non-English locales the title comes out mixed: Strfry Hosting – Verwaltetes Nostr relay, Strfry Хостинг — управляемый Nostr relay.

The front end cannot fix this: a slug-to-translation map in the client is the exact thing #241 and web#35 removed, and it would be wrong for the next app added.

Ask: serve category per locale — either a locale-keyed map on ApiApp, or honour Accept-Language on GET /api/v1/apps and /apps/:id and return the translated string. Either shape works for the web client; the second is less payload.

Raised by Goran reviewing LNVPS/web#74. Low priority — the English category in a German sentence is understandable, just not good.

Metadata

Metadata

Assignees

No one assigned

    Labels

    apiUser-facing or admin API changesbugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions