-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Order-matching is a bad idea #71
Comments
That explainer is quite out of date sorry. The latest proposal (w3c/manifest#1045) doesn't rely on order matching - it has translation blocks for each localisable member within a complex object. Example from the proposal: {
"shortcuts": [
{
"name": "Play Later",
"localized_names": [{ "value": "Jugar Mas Tarde", "lang": "es" }],
"url": "/play-later",
}
]
} |
@loubrett Thanks. Note that {
"defaultLocale": "en",
"shortcuts": [
{
"url": "/play-later",
"name": [
{"lang": "en", "Play Later"},
{"lang": "es", "Jugar Mas Tarde"},
{"lang": "ar", "ألعب لاحقا", "dir":"rtl"}
]
}
]
} |
Apps could put all translations in the localised_names field (including repeating whichever language is in the |
Actually, I18N has a WG Note track document that discusses the design choices and implications called Localizable Manifests. It is mercifully short 😉 but addresses a number of considerations found in our issues list. |
Complex translations example
https://github.com/WICG/manifest-incubations/blob/gh-pages/translations-explainer.md#complex-translations-example
For values that can be repeated/are arrays (e.g.
icons
,shortcuts
,screenshots
, andshortcuts/icons
), the design relies and depends on matching the order and number of items to be localized in the core manifest to the items in thetranslations
block. This is brittle and inconsistent with how translations are actually done (as well as with sparse population that is sometimes used with locale fallback). It means, among other things, that a manifest cannot be released unless and until every string is localized (or a placeholder provided).It's not clear to me why the complex items don't just contain
translations
blocks, e.g.:The text was updated successfully, but these errors were encountered: