Adobe-Runtime-Support
Adobe-Runtime-Support copied to clipboard
Missing language code for Chinese Simplified and Chinese Traditional in descriptor xsd on every AIR version
xsd schema is missing two Chinese language codes used in localized application names.
For Chinese languages zh_Hans
and zh_Hant
should be used instead of universal zh
or together with it.
IDEA validates descriptor by xsd schema and xsd schema should be fixed by adding these two language codes.
Documentation from Adobe is here.
Extract from RFC4646
Language subtag plus Script subtag: zh-Hant (Chinese written using the Traditional Chinese script) zh-Hans (Chinese written using the Simplified Chinese script)
The 'en' string is valid in the example below, but the zh_Hans' and
zh_Hant' strings are invalid.
<name>
<text xml:lang="en">App name</text>
<text xml:lang="zh_Hans">应用名称</text>
<text xml:lang="zh_Hant">應用程式名稱</text>
</name>
@ajwfrost I think it's very easy to add with new AIR update.
Hi
From my understanding, the correct values for <name>
should be:
<name>
<text xml:lang="en">App name</text>
<text xml:lang="zh-Hans">应用名称</text>
<text xml:lang="zh-Hant">應用程式名稱</text>
</name>
i.e. using hyphens instead, to make sure they conform to BCP47.
But, there is then some other logic happening within some of the AIR tools, and we also have a <supportedLanguages>
tag which uses zh_Hans
/zh_Hant
, primarily for iOS I believe (looking at their current documentation, they support both zh_Hans
and zh-Hans
although looking at the latest Xcode outputs, it uses a hyphen now - whereas AIR-generated IPAs still use the underscore...)
So actually the proper solution here is for AIR SDK to switch over to using the hyphenated form.. which is going to take a fair few changes!
If there's an interim way we can stop the IDEA validator from throwing an error with those strings, please let me know - we had a quick look at the way the XML schema works, and because it's using xml:lang
which is a reserved tag, it's not something we can change particularly easily.. I'm wondering though whether there's just some internal lookups we could do here - but again, we'd need to find out where this is being used, within all the codebase.. and then ensure that we can support both options (like Apple apparently now do) so as to not break lots of existing stuff...
thanks
Try to add in the <application/>
tag <supportedLanguages>en zh-Hans zh-Hant</supportedLanguages>
.