Description
There may already be a "standard" in some of the formats for this (e.g. XLIFF), or maybe it's a bad idea for some reason I don't see. Here's the situation:
Imagine you're using translation "keys" (e.g. ->trans('first_name')
instead of ->trans('First Name')
). When you do this, you may often get duplicate keys that should be translated to the same word, causing a translation resource that might look like this:
registration_first_name: First Name
profile_first_name: First Name
This is a DX issue, because it means you have duplicated keys that you need to manage. It also makes you want to stop using more descriptive keys to try to have less duplicates. Also, with a bundle like FOSUserBundle
where form labels are turned into keys, you can't avoid duplication (https://github.com/FriendsOfSymfony/FOSUserBundle/blob/master/Resources/translations/FOSUserBundle.en.yml).
I propose that we can "alias" a translation key to use the value of another:
registration_first_name: "@profile_first_name"
profile_first_name: First Name
Thoughts?