Skip to content
Tcl Source Code History Of Ticket 525525ffffffffffffffffffffffffffffffffff
Login

History Of Ticket 525525ffffffffffffffffffffffffffffffffff

Artifacts Associated With Ticket 525525ffffffffffffffffffffffffffffffffff

  1. Ticket change [56ddee45b3] (rid 94400) by haible on 2002-03-04 14:35:11:

    1. assignee initialized to: "nobody"
    2. cmimetype initialized to: "text/plain"
    3. comment initialized to:
      When my locale name is "pt_BR.UTF-8", tcl looks for the
      catalog in
      "pt_br.utf-8.msg" and "pt.msg". I claim that the first
      one should
      better be "pt_br.msg". Because the .msg files are all
      in UTF-8 (or
      contain \unnnn escape sequences for non-ASCII
      characters), they don't
      depend on the locale's encoding. Brazilian users want
      Brazilian
      translations, not Portuguese translations. Regardless
      whether their
      locale is named pt_BR.ISO-8859-1 or pt_BR.UTF-8. The
      encoding that the
      translator used shouldn't matter.
      
      
    4. foundin initialized to: "None"
    5. priority initialized to: "5 Medium"
    6. resolution initialized to: "None"
    7. status initialized to: "Open"
    8. submitter initialized to: "haible"
    9. subsystem initialized to: "30. msgcat Package"
    10. title initialized to: "wrong file list in msgcat::mclocale"
    11. type initialized to: "Bug"
  2. Ticket change [782beeafc3] (rid 89912) by dgp on 2002-04-17 02:29:01:

    1. assignee changed to: "dgp"
  3. Ticket change [e56415eb1b] (rid 88119) by dgp on 2002-04-18 23:37:31:

    1. icomment:
      Logged In: YES 
      user_id=80530
      
      Would it be sufficient if msgcat looked for the
      catalogs:
      
      pt_br.utf-8.msg
      pt_br.msg
      pt.msg
      
      in that order?
      
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  4. Ticket change [4f05e20523] (rid 125751) by haible on 2002-04-18 23:57:39:

    1. icomment:
      Logged In: YES 
      user_id=5923
      
      Yes, that would be fine.
      
      .msg files that are written in a particular encoding could
      be
      stored as pt_br.utf-8.msg or pt_br.iso-8859-1.msg.
      
      Whereas .msg files that are encoding independent (because
      they use
      \unnnn syntax - such as the ones produced by GNU msgfmt
      0.11.1) could be stored as pt_br.msg.
      
      
      
    2. login: "haible"
    3. mimetype: "text/plain"
    4. username: "haible"
  5. Ticket change [e49654ea5d] (rid 87978) by dgp on 2002-04-20 05:22:28:

    1. icomment:
      Logged In: YES 
      user_id=80530
      
      
      Various man pages and online references suggest that the
      XPG4 canonical form for a locale (for example, a suitable
      value for $::env(LANG)) is
      
        language[_territroy][.codeset][@modifier]
      
      Systems can understand locales of other forms as well,
      but I believe that systems (C libraries) conforming to
      XPG4 all agree on what locales of the form above mean.
      
      The [::msgcat::mclocale] command doesn't deal with all
      of that, though.  It expects an argument that is
      a list of strings joined by "_", like en, en_US, or
      en_US_funky.
      
      So it seems that when pulling values out of environment
      variables, the msgcat package should pass the portion
      of the string before the first "." on to [mclocale].
      
      I think that change would take care of this bug.
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  6. Ticket change [74ec2027fe] (rid 105302) by dgp on 2002-04-20 05:27:35:

    1. icomment:
      Logged In: YES 
      user_id=80530
      
      Likewise, for consistency with C libraries, it
      would make sense for msgcat to get its default
      locale from ::env(LC_ALL), then ::env(LC_MESSAGES),
      then ::env(LANG).
      
      
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  7. Ticket change [847efbc0ec] (rid 117558) by haible on 2002-04-20 05:50:36:

    1. icomment:
      Logged In: YES 
      user_id=5923
      
      You are right. The most general locale name form is as you
      mentioned. The .msg files that should be attempted to open
      are
      
         [email protected]
         [email protected]
         language_territory.msg
         language.msg
      
      in that order. (Remove the codeset first because it is
      merely an
      implementation issue, thus it has lowest "priority". Remove
      the
      modifier next, because usually a modifier belongs to a
      particular
      language_territory - for example no_NO@nynorsk is a dialect
      of
      Norwegian, and no@nynorsk has not much sense.)
      
      About LC_ALL, LC_MESSAGES, LANG: you are right here again;
      this
      was mentioned in bug report 525522.
      
      
    2. login: "haible"
    3. mimetype: "text/plain"
    4. username: "haible"
  8. Ticket change [955e19a589] (rid 106146) by dgp on 2002-04-20 06:01:20:

    1. icomment:
      Logged In: YES 
      user_id=80530
      
      I don't plan to go that far.  The [::msgcat::mclocale]
      command is documented to accept an argument that is
      a list of strings joined by "_".  I don't plan to
      extend that.
      
      So, the only thing that needs fixing is the way msgcat
      uses the environment variable values to derive an argument
      to pass to [mclocale].  A [split] on "." and passing only
      the first element of the resulting list should take care
      of that.
      
      The message catalogs of interest are those packaged with
      Tcl packages and applications.  All of them are of the
      form foo_bar_baz.msg .  I don't see a compelling reason
      to extend that further.  The message catalog files
      themselves are always read in the UTF-8 encoding, and then
      evaluated as Tcl scripts.  The documentation of msgcat
      should probably be improved to make that clear.
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  9. Ticket change [b4ec1f7c80] (rid 125134) by haible on 2002-04-20 06:19:11:

    1. icomment:
      Logged In: YES 
      user_id=5923
      
      If you do this: "A [split] on "." and passing only the first
      element of the resulting list"
      the locales including a modifier and a codeset will not be
      treated correctly. IMO the right transformation would be
      (assuming that the codeset of the locale doesn't matter
      because all catalogs are in UTF-8 anyway):
      
      Convert
            language_territory.codeset@modifier
      to
            language_territory_modifier
      
      I.e. the algorithm is:
        - Search the first dot or @ sign. Take the substring
      preceding
           this character.
        - If it was a dot, search the next @ sign.
        - If an @ sign was found, append to the result an
      underscore
           and all that follows the @ sign.
      
      
      
    2. login: "haible"
    3. mimetype: "text/plain"
    4. username: "haible"
  10. Ticket change [54be2690ff] (rid 93998) by dgp on 2002-04-20 06:22:50:

    1. icomment:
      Logged In: YES 
      user_id=80530
      
      Can you provide any examples of the @modifier in use?
      What sort of things does it indicate?
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  11. Ticket change [35da401696] (rid 107009) by haible on 2002-04-20 06:55:17:

    1. icomment:
      Logged In: YES 
      user_id=5923
      
      In glibc the following are in use:
      
      @euro (for some European countries) means a variant of the
      locale where the currency is the EUR.
      
      @cyrillic (for Serbian) means a variant of the locale which
      uses cyrillic writing, latin writing being the default
      
      @nynorsk (for Norwegian) meant a variant of the language (=
      dialect), but now they use the language code nn.
      
      In German locales, you could easily use the modifier @old to
      denote the old (20th century) orthorgraphy.
      
      In OSF/1 or Solaris locales, I've the @UCS suffix to denote
      locales where the internal wchar_t representation has been
      changed to Unicode.
      
      In summary, you can see that some of these modifiers warrant
      the creation of separate .msg files (especially the
      @cyrillic and @old modifiers).
      
      
      
    2. login: "haible"
    3. mimetype: "text/plain"
    4. username: "haible"
  12. Ticket change [0213ce4e45] (rid 119583) by dgp on 2002-04-20 08:12:56:

    1. icomment:
      
      
      File Added - 21556: msgcat.patch
      
      Logged In: YES 
      user_id=80530
      
      Yes, it seems so.  Here's a patch as you described.
      Still needs the documentation changes added.  Please
      review.
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  13. Ticket change [d0dcce1a7e] (rid 113261) by dgp on 2002-04-20 08:15:22:

    1. icomment:
      Logged In: YES 
      user_id=80530
      
      Ah... I think that patch is wrong.  It will only
      recognize a codeset or modifier if it already
      recognized as territory, etc.  Feel free to offer
      a correction.  I may not get back to this right away.
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  14. Ticket change [4ed383219b] (rid 125708) by haible on 2002-04-20 09:01:27:

    1. icomment:
      Logged In: YES 
      user_id=5923
      
      I can see three problems in the patch.
      
      1) These question marks should be brackets.
      
           # Assume $value is of form:
      $language?_$territory??.$codeset??@modifier?
           # Convert to form: $language?_$territory??_$modifier?
      
      2) The function ConvertLocale gives an error when the
      argument string contains an @ sign. You can try these tests:
      
      echo [msgcat::ConvertLocale "de"]                   -> de
      echo [msgcat::ConvertLocale "de_DE"]                -> de_DE
      echo [msgcat::ConvertLocale "de.UTF-8"]             -> de
      echo [msgcat::ConvertLocale "de_DE.UTF-8"]          -> de_DE
      echo [msgcat::ConvertLocale "de@bayrisch"]          ->
      de_bayrisch
      echo [msgcat::ConvertLocale "de_DE@bayrisch"]       ->
      de_DE_bayrisch
      echo [msgcat::ConvertLocale "de.UTF-8@bayrisch"]    ->
      de_bayrisch
      echo [msgcat::ConvertLocale "de_DE.UTF-8@bayrisch"] ->
      de_DE_bayrisch
      
      3) [info exists ::env(...)] returns true for an empty
      environment value, right? But ::env("LANG") must be ignored
      if it is set to empty (see bug #525522). Similarly for
      LC_MESSAGES and LC_ALL.
      
      
      
    2. login: "haible"
    3. mimetype: "text/plain"
    4. username: "haible"
  15. Ticket change [35cd9ed5e6] (rid 107002) by dgp on 2002-06-08 06:12:37:

    1. icomment:
      Logged In: YES 
      user_id=80530
      
      Note that I read Bug 525522 as referring to
      facilities of TclX which are outside of my
      concern.  If that bug really refers to the
      msgcat *package* that is bundled with Tcl
      (*not* TclX), then please clarify that bug
      report.
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  16. Ticket change [dd38ed51ca] (rid 114627) by dgp on 2002-06-08 08:23:52:

    1. icomment:
      
      
      File Deleted - 21556: 
      
      
      
      File Added - 24663: msgcat.patch
      
      Logged In: YES 
      user_id=80530
      
      Here's an updated patch.  Please review that
      it takes care of the problem reported here.
      
      The bump to version 1.3 is because the interface
      is subtly changed by recognizing more environment
      variables.
      
      With updated docs/tests we can bundle this
      with Tcl 8.4.
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  17. Ticket change [d55047c176] (rid 123597) by dgp on 2002-06-13 06:54:03:

    1. icomment:
      
      
      File Deleted - 24663: 
      
      
      
      File Added - 24997: msgcat.patch
      
      Logged In: YES 
      user_id=80530
      
      Updated patch include documentation changes.
      Still need tests before acceptance.
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  18. Ticket change [8533580584] (rid 131276) by haible on 2002-06-15 03:40:14:

    1. icomment:
      Logged In: YES 
      user_id=5923
      
      The ConvertLocale function for Unix works as expected;
      thanks.
      
      For the locale determination on Woe32 systems, I've made up
      a longer list,
      using tables from unicode.org and microsoft.com. You find it
      appended.
      Please use it at the appropiate place of the patch.
      
      
      
    2. login: "haible"
    3. mimetype: "text/plain"
    4. username: "haible"
  19. Add attachment "msgcat.w32" [30becba891] (rid 93308) by haible on 2002-06-15 03:40:15.

  20. Ticket change [ac611bd682] (rid 101280) by haible on 2002-06-15 03:40:15:

    1. icomment:
      
      
      File Added - 25126: msgcat.w32
      
      
      
    2. login: "haible"
    3. mimetype: "text/plain"
    4. username: "haible"
  21. Ticket change [b2efdb8612] (rid 98424) by dgp on 2002-06-15 07:35:04:

    1. icomment:
      Logged In: YES 
      user_id=80530
      
      updated patch folds in additional data about locale values
      in the Windows Registry.  (Thanks!)  Also cleans up some
      style guide issues.
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  22. Ticket change [aedf1d954b] (rid 97716) by dgp on 2002-06-15 07:35:05:

    1. icomment:
      
      
      File Deleted - 24997: 
      
      
      
      File Added - 25140: msgcat.patch
      
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  23. Ticket change [81527de982] (rid 117013) by dgp on 2002-06-17 12:26:57:

    1. closedate changed to: "2002-06-17T05:26:57"
    2. closer changed to: "dgp"
    3. foundin changed to: "obsolete: 8.4a5"
    4. icomment:
      Logged In: YES 
      user_id=80530
      
      final version of patch
      committing to msgcat 1.3, bundled with Tcl 8.4a5/b1
      
      
    5. login: "dgp"
    6. mimetype: "text/plain"
    7. resolution changed to: "Fixed"
    8. status changed to: "Closed"
    9. username: "dgp"
  24. Ticket change [9cc79ba882] (rid 96202) by dgp on 2002-06-17 12:26:58:

    1. icomment:
      
      
      File Deleted - 25140: 
      
      
      
      File Added - 25220: msgcat.patch
      
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  25. Add attachment "msgcat.patch" [4e40ad4622] (rid 127193) by dgp on 2002-06-17 12:26:58.

  26. Add attachment "msgcat.w32a" [54b39fba2b] (rid 93990) by haible on 2002-06-17 22:59:27.

  27. Ticket change [41519c4631] (rid 116169) by haible on 2002-06-17 22:59:27:

    1. closedate changed to: "2002-06-17T15:59:27"
    2. closer changed to: "haible"
    3. icomment:
      
      
      File Added - 25257: msgcat.w32a
      
      Logged In: YES 
      user_id=5923
      
      Thanks. With the new table lookup that you added, it's now
      much easier to support country dependent variants of
      languages (like Brazilian Portuguese). Find attached a table
      which
      
      1. adds country information where possible (i.e. where the
      previous code looked up only pt.msg, the new code will look
      up pt_br.msg and pt.msg).
      
      2. Two fixes: 0809 is en_GB, not en_UK. 13 is nl, not da.
      
      
      
    4. login: "haible"
    5. mimetype: "text/plain"
    6. username: "haible"
  28. Ticket change [071bbf0bfb] (rid 89329) by dgp on 2002-06-17 23:36:41:

    1. closedate changed to: "2002-06-17T16:36:41"
    2. closer changed to: "dgp"
    3. icomment:
      Logged In: YES 
      user_id=80530
      
      
      That was the idea.  Thanks for the additional data.  Committed.
      
      Is there an en_UK locale?  If not, we should get it out
      of the examples in the msgcat documentation.
      
      
    4. login: "dgp"
    5. mimetype: "text/plain"
    6. status changed to: "Pending"
    7. username: "dgp"
  29. Ticket change [930d891671] (rid 105748) by haible on 2002-06-17 23:50:24:

    1. icomment:
      Logged In: YES 
      user_id=5923
      
      Yes, "UK" is not an ISO 3166 country code. The British
      English locale is called en_GB, not en_UK.
      
      
      
    2. login: "haible"
    3. mimetype: "text/plain"
    4. status changed to: "Open"
    5. username: "haible"
  30. Ticket change [68763798d6] (rid 103073) by dgp on 2002-06-18 04:07:43:

    1. closedate changed to: "2002-06-17T21:07:43"
    2. closer changed to: "dgp"
    3. icomment:
      Logged In: YES 
      user_id=80530
      
      corrected docs.
      
      
      
    4. login: "dgp"
    5. mimetype: "text/plain"
    6. status changed to: "Closed"
    7. username: "dgp"