WICG / manifest-incubations

Before install prompt API for installing web applications
https://wicg.github.io/manifest-incubations/
Other
99 stars 29 forks source link

Web App Translations: Consider adding `start_url` as a supported member #45

Open aarongustafson opened 2 years ago

aarongustafson commented 2 years ago

Autoscrib uses this setup to indicate alternate translations of their app:

<link id="metaHrefFr" rel="alternate" hreflang="fr" href="https://autoscrib.com/home/fr/">
<link id="metaHrefIt" rel="alternate" hreflang="it" href="https://autoscrib.com/home/it/">
<link id="metaHrefEn" rel="alternate" hreflang="en" href="https://autoscrib.com/home/en/">
<link id="metaHrefDef" rel="alternate" hreflang="x-default" href="https://autoscrib.com/home/en/">

In each app, they link to a language-specific Manifest. With translations they should be able to have a single Manifest file for their app and if we enable start_url to be overridden per-language, they could roll these meta values into the Manifest and maintain them in a single place.

loubrett commented 2 years ago

Good point, that seems reasonable to add to translations.

start_url is currently used as the app_id, so we would need to ensure that translating the start_url doesn't change the app_id. We would also need to ensure all start_urls are on the same origin for security.

dmurph commented 2 years ago

To avoid the id issue, you could require that an id field is set in order to support the translations field.