5 Replies Latest reply on Oct 13, 2016 9:59 AM by laurentsd

    I18N issues and gibberish characters problem on Fling4 SDK

    dhbtemp Novice

      Hi,

       

      I have already tested the latest html-client-sdk-6.5.0-4379154.zip SDK on local development environment, but there might be some gibberish characters problems with the sdk(please refer to gibberish_characters.png).

       


      By the way, I test I18N use html-client-sdk\samples\globalview-html sample, with the following steps:

       

      1. modify file globalview-html\build-war.xml
      ===========
            <!-- default US version -->
            <mxmlc-macro>
               <arg line="-locale=en_US" />
               <arg line="-source-path+=${SRC_DIR}/locale/{locale}"/>
               <arg line="-output=${WEBAPP_DIR}/locales/${PROJECT_NAME}-en_US.swf"/>
               <arg line="-include-resource-bundles ${BUNDLE_NAME}" />
            </mxmlc-macro>

       

            <mxmlc-macro>
               <arg line="-locale=ja_JP" />
               <arg line="-source-path+=${SRC_DIR}/locale/{locale}"/>
               <arg line="-output=${WEBAPP_DIR}/locales/${PROJECT_NAME}-ja_JP.swf"/>
               <arg line="-include-resource-bundles ${BUNDLE_NAME}" />
            </mxmlc-macro>

       

            <!-- Generate resource bundles for the other required locales
                 with a copy of the US version for now  -->

       

            <copy file="${WEBAPP_DIR}/locales/${PROJECT_NAME}-en_US.swf"
                tofile="${WEBAPP_DIR}/locales/${PROJECT_NAME}-de_DE.swf"/>
            <copy file="${WEBAPP_DIR}/locales/${PROJECT_NAME}-en_US.swf"
                tofile="${WEBAPP_DIR}/locales/${PROJECT_NAME}-fr_FR.swf"/>
            <copy file="${WEBAPP_DIR}/locales/${PROJECT_NAME}-en_US.swf"
                tofile="${WEBAPP_DIR}/locales/${PROJECT_NAME}-ko_KR.swf"/>
            <copy file="${WEBAPP_DIR}/locales/${PROJECT_NAME}-en_US.swf"
                tofile="${WEBAPP_DIR}/locales/${PROJECT_NAME}-zh_CN.swf"/>
            <copy file="${WEBAPP_DIR}/locales/${PROJECT_NAME}-en_US.swf"
                tofile="${WEBAPP_DIR}/locales/${PROJECT_NAME}-zh_TW.swf"/>
      ============

       

      2. create globalview-html\src\main\locale\ja_JP directory and edit  com_vmware_samples_h5_globalview.properties file:
      ===========
      app.name = 11111
      app.mainView = 22222
      app.settingView = 3333
      app.vcView = 44444

       

      mainView.clickToCall = I18N-Jajp Click to call the EchoService
      mainView.gotoSettings = I18N-Jajp Go to Settings View
      mainView.gotoVCenter = I18N-Jajp Go to vCenter View
      mainView.helloBtn = I18N-Jajp
      mainView.world = I18N-Jajp World!

       

      settingView.label1 = I18N-Jajp First setting:
      settingView.label2 = I18N-Jajp Second setting:
      settingView.label3 = I18N-Jajp Third setting:
      settingView.update = I18N-Jajp Update
      settingView.gotoMain = I18N-Jajp Go to Main View
      settingEnum.VAL1 = I18N-Jajp First enum value
      settingEnum.VAL2 = I18N-Jajp Second enum value
      settingEnum.VAL3 = I18N-Jajp Third enum value
      ============

       

       

      3. ant build globalview-html project, and the related I18N file is successfully generated on globalview-html\src\main\webapp\locales directory.

       

       

      4. set the browser languages to Japanese, then restart browser.

       

       

      5. run development environment with https://localhost:9443/ui/

       

      But the result seems that I18n on Flying4 still not work(refer to attachment i18n_not_work.png).

       

       

      I find that the Javascript API WEB_PLATFORM.getLocale() which defined in globalview-html\src\main\webapp\resources\js\web-platform.js is return null, please see web_platform_getLocale_value_is_null.png

       


      my test environment:

       

        • html-client-sdk :  html-client-sdk-6.5.0-4379154.zip

       

        • vCenter Server : 6.0 u2

       

        • OS: Windows7 sp1_64bit_ChineseSimple

       

        • browser: Google Chrome 49.0.2623.112

       

      Please let me know if you have any suggestions to resolve it.

       

      Regards

        • 1. Re: I18N issues and gibberish characters problem on Fling4 SDK
          laurentsd Master
          VMware Employees

          Thanks for the detailed bug report.  WEB_PLATFORM.getLocale() is not yet implemented indeed and will be added soon.  The fact that Unicode characters are not displayed correctly is also a known problem being fixed.  Stay tune for a future Fling!

          • 2. Re: I18N issues and gibberish characters problem on Fling4 SDK
            _vladi_ Hot Shot
            VMware EmployeesvExpert

            Hi,

            WEB_PLATFORM.getLocale() is now implemented as part of Fling 5. Please try it out and report any issues.

            Cheers,

            Vladimir

            • 3. Re: I18N issues and gibberish characters problem on Fling4 SDK
              dhbtemp Novice

              Hi,

              thank you for your reply.

              I tested the html-client-sdk-6.5.0-4450180, but I still have some problems here.

              For example, the content displayed in some places becomes question marks.

              There is a problem I am not sure. The interface content is based on the international language when browser change the language?

              I changed the browser language from Chinese to English, but the interface is still displayed in Chinese.

              And I found a new problem, the task bar to pull up wide after the drag, and then drag down to reduce the time there is a display problem.

              I will issue the screenshot posted below.

              Thanks again.

              ----------------------------------------------------------------------------------------------------------------------------------------------------------

              displayd_question_mark1.PNG

              ----------------------------------------------------------------------------------------------------------------------------------------------------------

              displayd_question_mark2.PNG

              ----------------------------------------------------------------------------------------------------------------------------------------------------------

              I18N.png

              ----------------------------------------------------------------------------------------------------------------------------------------------------------

              the_normal_taskbar.PNG

              ----------------------------------------------------------------------------------------------------------------------------------------------------------

              problematic_taskbar.PNG

              • 4. Re: I18N issues and gibberish characters problem on Fling4 SDK
                laurentsd Master
                VMware Employees

                For feedback on the HTML Client itself (and not an SDK issue) it's better to comment directly on in the comments section of the Fling page at vSphere HTML5 Web Client, it will receive immediate attention from other people.  AFAIK we don't have these issues in our later builds.

                • 5. Re: I18N issues and gibberish characters problem on Fling4 SDK
                  laurentsd Master
                  VMware Employees

                  Also, as far as switching the locale on the fly. You need to log out and log back in again after you change the Browser's locale.