I maintain a Thunderbird extension which uses the same i18n system as Firefox, so my source file is _locales/en/messages.json and my translations are the other _locales/*/messages.json files.
Most of the directories underneath _locales use the two-letter code as the directory name, but there are a couple that don’t, when there are multiple translations for the same language. For example, I’ve got both pt and pt_BR, and both zh and zh_TW underneath _locales.
I’m trying to figure out how to specify that appropriately in my crowdin.yml. Right now what I’ve got is this:
"files": [
{
"source" : "/_locales/en/messages.json",
"translation" : "/_locales/%two_letters_code%/messages.json"
}
]
I think if I use just this, then pt_BR
and zh_TW
won’t be translated. However, I think if I replace %two_letters_code%
with %locale_with_underscore%
, then all the other locales that only use the two-letter code won’t be translated.
Do I just list both, i.e., this?
"files": [
{
"source" : "/_locales/en/messages.json",
"translation" : "/_locales/%two_letters_code%/messages.json"
},
{
"source" : "/_locales/en/messages.json",
"translation" : "/_locales/%locale_with_underscore%/messages.json"
}
]
Will that work, or will that break something? If it won’t work, what’s the right way to do this?
Thanks.