You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Multiple strings from recent updates are re-used in different contexts. Despite their source translations match, this might lead to inconsistent and incorrect translations. The strings that are re-used:
Strings only should be used within their own context, DRY (Don't Repeat Yourself) approach does not work with translatable content, instead AHA (Avoid Hasty Abstractions) approach must be used that will reduce chances for this mistake by always introducing a new string in different contexts, even if there is a similar one in other context.
The strings in question are supposed to be used only within their appropriate contexts:
admin.accounts.moderation.active within ‘Accounts’ moderation view.
notifications.column_settings.filter_bar.show for filter bar toggle in notifications settings
Actual behaviour
The string were re-used within the different contexts:
admin.accounts.moderation.active
It is re-used within ‘following recommendations’ settings:
brawaru
changed the title
String re-used in different contexts: admin.accounts.moderation.active
Multiple strings are re-used in different contexts (don't DRY with the translatable content)
May 12, 2021
Multiple strings from recent updates are re-used in different contexts. Despite their source translations match, this might lead to inconsistent and incorrect translations. The strings that are re-used:
admin.accounts.moderation.active
notifications.column_settings.filter_bar.show
Expected behaviour
Strings only should be used within their own context, DRY (Don't Repeat Yourself) approach does not work with translatable content, instead AHA (Avoid Hasty Abstractions) approach must be used that will reduce chances for this mistake by always introducing a new string in different contexts, even if there is a similar one in other context.
The strings in question are supposed to be used only within their appropriate contexts:
admin.accounts.moderation.active
within ‘Accounts’ moderation view.notifications.column_settings.filter_bar.show
for filter bar toggle in notifications settingsActual behaviour
The string were re-used within the different contexts:
admin.accounts.moderation.active
It is re-used within ‘following recommendations’ settings:
https://github.com/tootsuite/mastodon/blob/480d7c9478a9be3ac668b21402a269db41b10b18/app/views/admin/follow_recommendations/show.html.haml#L21
This causes problems with Russian locale for example, as the string is adapted and declined by the original context.
notifications.column_settings.filter_bar.show
It is re-used for ‘unread markers’ toggle within notification settings:
https://github.com/tootsuite/mastodon/blob/c3aef491d66aec743a3a53e934a494f653745b61/app/javascript/mastodon/features/notifications/components/column_settings.js#L29
Steps to reproduce the problem
× not applicable.
Specifications
admin.accounts.moderation.active
Mistake introduced in commit f711764:
f711764#diff-92856dac4fae26e0f12a0c14c364928d16d4b0ec9b835d413110ebe79556b1aeR22
notifications.column_settings.filter_bar.show
Mistake introduced in commit 55ac2b9:
55ac2b9#diff-0b4b4ff412a8d0db0b4625619d3633b2cc295c4e7f21316e7941bb4728446d50R64
× os/browser not applicable.
The text was updated successfully, but these errors were encountered: