code
code copied to clipboard
Deduplicate common strings in translation
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
paymentMethodMessagesare now in thepayment-methodnamespace.paymentMethodCardDisplayhas also been moved fromcommonMessagestopaymentMethodMessages. - There is a lot of duplication within
common-messages.tsitself, particularly betweencommonMessagesandformFieldLabels, 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,publicLabelandrejectedLabelare currently skipped, since they would need adjustment for grammatical gender in some languages. Ideally these should be split intoprojectandcollectionlabels 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.