airsdk / apm

AIR Package Manager
https://repository.airsdk.dev/
MIT License
59 stars 10 forks source link

Name tag with localization does not converted well to project.apm #136

Closed sjabberwocky closed 2 years ago

sjabberwocky commented 2 years ago

I converted descriptor by migration guide with latest version of apm and it does not work well at the moment.

Names from this list were converted to

<name>
  <text xml:lang="en">Ancient Planet</text>
  <text xml:lang="zh_Hans">古老星球</text>
  <text xml:lang="zh_Hant">古老星球</text>
  <text xml:lang="ja">古代の惑星</text>
  <text xml:lang="ko">고대 행성</text>
  <text xml:lang="in">Planet Arkais</text>
</name>

this list and do not looks well on device. Application name looked like <name xmlns....

<name>&lt;name xmlns="http://ns.adobe.com/air/application/33.1" xmlns:xml="http://www.w3.org/XML/1998/namespace"&gt;
&lt;text xml:lang="en"&gt;Ancient Planet&lt;/text&gt;
&lt;text xml:lang="zh_Hans"&gt;古老星球&lt;/text&gt;
&lt;text xml:lang="zh_Hant"&gt;古老星球&lt;/text&gt;
&lt;text xml:lang="ja"&gt;古代の惑星&lt;/text&gt;
&lt;text xml:lang="ko"&gt;고대 행성&lt;/text&gt;
&lt;text xml:lang="in"&gt;Planet Arkais&lt;/text&gt;
&lt;/name&gt;</name>

Happily I just removed name tag from project.apm and returned it to descriptor manually and it work fine.

sjabberwocky commented 2 years ago

It looks similar to https://github.com/airsdk/apm/issues/61.

marchbold commented 2 years ago

Thanks for reporting this one, we'll apply the same treatment here.

marchbold commented 2 years ago

Hi,

I've been able to isolate your issue. It's not directly related to #61, instead related to the init process. Seems if you have multiple languages and init your apm project from the app descriptor (ie. apm init app.xml) it inserts the entire raw xml string into your project.apm.

"name": "<name xmlns=\"http://ns.adobe.com/air/application/33.1\" xmlns:xml=\"http://www.w3.org/XML/1998/namespace\">\n  <text xml:lang=\"en\">Ancient Planet</text>\n  <text xml:lang=\"zh_Hans\">古老星球</text>\n  <text xml:lang=\"zh_Hant\">古老星球</text>\n  <text xml:lang=\"ja\">古代の惑星</text>\n  <text xml:lang=\"ko\">고대 행성</text>\n  <text xml:lang=\"in\">Planet Arkais</text>\n</name>",

As a temporary workaround, you can just open up your project.apm and change the "name" line to be:

"name" :"",

I'm looking into fixing this issue now.

marchbold commented 2 years ago

I've just pushed in an update that should resolve this issue. You will need to either run apm init app.xml or make the change I've listed above.