- π¦πΊAustralia mstrelan
This was a daily triage target for bug smash. I'm not entirely sure this is the correct use of contexts, but if it is we need tests, steps to reproduce, a re-roll and an issue summary update. It would be good to see an example of how this is used for fr-ca or pt-br as mentioned in the issue summary.
- Status changed to Closed: won't fix
over 1 year ago 9:44am 1 March 2023 - π¬π§United Kingdom james.williams
The context option is not meant for indicating which language (or variant/locale/etc of a language) a string is in. See the Internationalization documentation. It's instead for words like 'view' or 'may' that can mean multiple things in different contexts and so might need translating to different words in different languages. (I think a technical term for these is 'homonyms'?) So, in answer to your question, "Shouldn't we translate whenever there is a context?" - no, context is not a determining factor in whether we should translate.
As far as Drupal is concerned, any country-specific variant of a language has to be treated as an entirely distinct language. Modules like Language Hierarchy exist to cover that use case, so that you can set up something like en-AU or pt-BR as a separate language, that 'inherits' translations from a 'parent' language, other than those that have been specifically customised for the 'child' language. (Ultimately, these modules are leveraging the
hook_language_fallback_candidates_alter()
hook in core.) Disclaimer: I'm a maintainer of Language Hierarchy, so of course I'd say this! But I'm primarily a maintainer because I see its usefulness, so I certainly empathise with your need to override strings for a particular 'variant' of a language.If there's a bug in allowing English strings to be translated via that translate_english setting in the locale.settings config, then sure, of course that can be looked at, but tests to prove it would indeed be needed.
- Status changed to Closed: works as designed
over 1 year ago 10:18am 1 March 2023 - π³πΏNew Zealand quietone New Zealand
After bring this up in #bugmsash, I also ask in #multilingual
@james.williams, thank you for responding.
For completeness, The reply given in #21 is the same as the bugsmash discussion by GΓ‘bor Hojtsy, Lendude and mstrelan in bugsmash. Although, the latter concluded this is working as designed. And that does look right to me. Changing status.