code icon indicating copy to clipboard operation
code copied to clipboard

Deduplicate common strings in translation

Open lumiscosity opened this issue 1 week ago • 4 comments

This should lighten the cost of the i18n infra a little. Some notes apply:

  • There are a few new entries in commonMessages - some are to address existing duplicate use cases, while some simply contain common strings that could be reused elsewhere in the future (or are used in other places which aren't translatable at the moment).
  • All entries in paymentMethodMessages are now in the payment-method namespace. paymentMethodCardDisplay has also been moved from commonMessages to paymentMethodMessages.
  • There is a lot of duplication within common-messages.ts itself, particularly between commonMessages and formFieldLabels, that this PR does not currently address.
  • The landing page has some duplicates in the Modrinth UI mockups. I'm not sure how to best deal with exposing the translation keys from the proper source for these so I'm considering this out of scope for this PR. Other duplicates of common messages on the landing page are adressed.
  • privateLabel, publicLabel and rejectedLabel are currently skipped, since they would need adjustment for grammatical gender in some languages. Ideally these should be split into project and collection labels at the very least; going deeper into project types would create a lot of duplication but technically be more proper for some languages... The same goes for the timestamps (updated/published/played/etc.).
  • There's a lot of very definition intertangled reuse of "Server", independently or in relation to "Client" ("Server and client" appears multiple times!). I'll adress this in a separate PR when unifying the translation keys for sidedness strings sitewide. This also affects singleplayerLabel.

lumiscosity avatar Jan 10 '26 21:01 lumiscosity