social-app icon indicating copy to clipboard operation
social-app copied to clipboard

{labelTarget}, {els} won't work cross-linguistically

Open kscanne opened this issue 10 months ago • 0 comments

There are a couple of localizable strings that use the variable {labelTarget}. Browsing the code, it looks like this can only take the values which are the localized versions of "account" or "content". This won't work for Irish since the localizations of those words would need to change based on the wider context.

The general i18n principle is to avoid "sentence puzzles" like this where variables get plugged in from other localized strings, since they are sure to fail for some language. Better to just offer separate strings for localization:

"label has been placed on this account" "label has been placed on this content"

(NB this is in contrast with the need for more variables in the case of unlocalizable content like usernames, hashtags, URLs, etc.; cf Issue #3481)

Same issue with {els} in the string: "By creating an account you agree to the {els}." Especially so given that (if I understand correctly), the value plugged into {els} could be either singular (a Privacy Policy) or plural (the Terms of Service).

kscanne avatar Apr 23 '24 14:04 kscanne