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.
Thanks for this PR, I will take a look shortly! 😄
This is a good start, don't forget to run pnpm prepr:frontend:web in the root folder to fix the lint issues.
These cases require separate strings for the Russian translation:
-
Created {ago}andUpdated {ago}cannot be reused in Russian due to grammatical gender differences - Withdrawal
Detailsare translated as "Реквизиты", which refers to payment or document details and fits the context better than the generic "details"
Created {ago}andUpdated {ago}cannot be reused in Russian due to grammatical gender differences
got it! will roll it back for now and file it under the same grammatical gender woes as the project visibility labels. (in Polish this can be worked around with impersonal form (past tense) - "utworzono", "aktualizowano", but i should've figured other languages don't have an appropriate way of dealing with it...)
- Withdrawal Details are translated as "Реквизиты", which refers to payment or document details and fits the context better than the generic "details"
this one was an honest mistake, i wanted to keep it separate because it is a different context but i got distracted - thanks for catching that!