Harmony
  1. Harmony
  2. HARMONY-3026

[drlvm] Add Internationalization support to the drlvm.

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: DRLVM
    • Labels:
      None
    • Environment:
      All
    • Patch Info:
      Patch Available

      Description

      Internationalization support (disussed in the harmony-dev) should be added to the drlvm.

      1. i18n_patch_2007_02_12.zip
        28 kB
        Dmitry B. Yershov
      2. i18n_patch.zip
        28 kB
        Dmitry B. Yershov

        Issue Links

          Activity

          Hide
          Dmitry B. Yershov added a comment -

          Archive i18n_patch contains following files:
          logparams.h - This file should be copied into <drlvm_trunk>/vm/port/include/
          harmony.properties - This file should be copied into < drlvm_trunk>/vm/vmcore/src/init/
          classlib_portlib.patch - patch for CLASSLIB's portlib.
          drlvm.patch - patch for drlvm.

          Some implementation details:
          1. Work with message catalogues was reused (with little overpatching) from CLASSLIB's portlib module. Now, portlib can use 1-4 message catalogues simultaneously instead of 1, because at present we have 2 sets of message catalogues: one for CLASSLIB and second for the drlvm.
          2. I added encoding functionality to CLASSLIB's portlib - buf_write_text function. This function convert input buffer to the appropriate platform encoding and return another buffer with converted data. There is a question: Should portlib's version be increased?
          3. drlvm logging system (based on apache log4cxx) was adapted to use internationalization. LECHO, LDIE and LWARN macroses were introduced for these purposes.
          4. Initial refactoring was done. Almost all DIE, ECHO and WARN messages were replaced by their localized analogs.

          This patch was tested on Windows ia32 and Linux ia32.

          Further improvements:
          At present, drlvm has only one message catalogue (harmony.properties file). It is English message catalogue. We should translate this MC to other languages.

          Show
          Dmitry B. Yershov added a comment - Archive i18n_patch contains following files: logparams.h - This file should be copied into <drlvm_trunk>/vm/port/include/ harmony.properties - This file should be copied into < drlvm_trunk>/vm/vmcore/src/init/ classlib_portlib.patch - patch for CLASSLIB's portlib. drlvm.patch - patch for drlvm. Some implementation details: 1. Work with message catalogues was reused (with little overpatching) from CLASSLIB's portlib module. Now, portlib can use 1-4 message catalogues simultaneously instead of 1, because at present we have 2 sets of message catalogues: one for CLASSLIB and second for the drlvm. 2. I added encoding functionality to CLASSLIB's portlib - buf_write_text function. This function convert input buffer to the appropriate platform encoding and return another buffer with converted data. There is a question: Should portlib's version be increased? 3. drlvm logging system (based on apache log4cxx) was adapted to use internationalization. LECHO, LDIE and LWARN macroses were introduced for these purposes. 4. Initial refactoring was done. Almost all DIE, ECHO and WARN messages were replaced by their localized analogs. This patch was tested on Windows ia32 and Linux ia32. Further improvements: At present, drlvm has only one message catalogue (harmony.properties file). It is English message catalogue. We should translate this MC to other languages.
          Hide
          Gregory Shimansky added a comment -

          While trying to apply this patch I found that it is no longer possible. There are some changes in hyport.c and many places in drlvm which produce conflicts. Could you please update the patch to make applying it less painful?

          Show
          Gregory Shimansky added a comment - While trying to apply this patch I found that it is no longer possible. There are some changes in hyport.c and many places in drlvm which produce conflicts. Could you please update the patch to make applying it less painful?
          Hide
          Dmitry B. Yershov added a comment -

          i18n_patch_2007_02_12.zip is new version of the internationalization patch. All conflicts were resolved.

          Show
          Dmitry B. Yershov added a comment - i18n_patch_2007_02_12.zip is new version of the internationalization patch. All conflicts were resolved.
          Hide
          Gregory Shimansky added a comment -

          Patch applied at 506992. Please check that it was applied as expected.

          Show
          Gregory Shimansky added a comment - Patch applied at 506992. Please check that it was applied as expected.
          Hide
          Gregory Shimansky added a comment -

          No response, assuming ok.

          Show
          Gregory Shimansky added a comment - No response, assuming ok.

            People

            • Assignee:
              Gregory Shimansky
              Reporter:
              Dmitry B. Yershov
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development