Open Gudahtt opened 4 months ago
Thanks for calling this out @Gudahtt! The linguists are often confused about this convention, especially because in some languages nouns are gendered and it's difficult for them to accurately translate for these numeric placeholders.
What is this about?
Our localized messages use numeric substitutions (e.g. in the message
Click $1 to see more
, the$1
is a substitution). These have a few problems:We should update our translation substitution system to use named, clearly delimited substations. We can use any alphanumeric string for the substitution name, and we can use
${ }
as a delimiter. For example, inClick ${seeMoreLink} to see more
, the substitution would be calledseeMoreLink
.This would also prevent errors caused by a lack of spaces after the substitution, because the `${} delimiter is totally unambiguous about where the substitution name ends.
This also makes our translations more similar to mobile (they use named substitutions as well, though without the curly bracket delimiters).
Scenario
No response
Design
No response
Technical Details
We could consider adding support for named parameters alongside positional parameters, so that we can gradually introduce them.
Threat Modeling Framework
No response
Acceptance Criteria
Stakeholder review needed before the work gets merged
References
No response