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

History Of Ticket 219105ffffffffffffffffffffffffffffffffff

Artifacts Associated With Ticket 219105ffffffffffffffffffffffffffffffffff

  1. Ticket change [5911675de0] (rid 117913) by nobody on 2000-10-26 01:10:52:

    1. assignee initialized to: "nobody"
    2. cmimetype initialized to: "text/plain"
    3. comment initialized to:
      OriginalBugID: 5984 Bug
      Version: 8.4a1
      SubmitDate: '2000-07-06'
      LastModified: '2000-07-06'
      Severity: MED
      Status: Released
      Submitter: techsupp
      ChangedBy: ericm
      OS: Linux-SuSE
      FixedDate: '2000-07-06'
      FixedInVersion: 8.4a2
      ClosedDate: '2000-10-25'
      
      
      Name:
      
      Christian Krone
      
      
      
      Comments:
      
      The comment in msgcat.tcl above the mcunknown command suggests, that
      
          users of the msgcat package
      
          can write their own mcunknown proc. So calling this function with
      
          additional arguments can
      
          generate errors, if someone really created an own version with the old
      
          interface.
      
          
      
          But I think, this should be no problem, since the additional arguments
      
          are only given to mcunknown
      
          if they are specified for mc. And only user who knows about the
      
          additional argument will do so.
      
      
      
      DesiredBehavior:
      
      It's great, that the msgcat::mc command has got an additional args argument.
      
      This way I don't need no longer do the format one layer above by myself.
      
      
      
      But it is essential for me, that the msgcat::mcunknown proc gets the
      
      additional argument, too. Otherwise I have to make a msgfile for the C locale,
      
      which contains only translations from the format strings into itself.
      
      
      
      Patch:
      
      *** msgcat.tcl.orgTue Apr 11 23:16:18 2000
      
      --- msgcat.tclWed Jul  5 17:57:46 2000
      
      ***************
      
      *** 67,73 ****
      
            }
      
            # we have not found the translation
      
            return [uplevel 1 [list [namespace origin mcunknown] \
      
      !     $::msgcat::locale $src]]
      
        }
      
        
      
        # msgcat::mclocale --
      
      --- 67,73 ----
      
            }
      
            # we have not found the translation
      
            return [uplevel 1 [list [namespace origin mcunknown] \
      
      !     $::msgcat::locale $src] $args]
      
        }
      
        
      
        # msgcat::mclocale --
      
      ***************
      
      *** 170,185 ****
      
        #be found for a string.  This routine is intended to be replaced
      
        #by an application specific routine for error reporting
      
        #purposes.  The default behavior is to return the source string.  
      
        #
      
        # Arguments:
      
        #localeThe current locale.
      
        #srcThe string to be translated.
      
        #
      
        # Results:
      
        #Returns the translated value.
      
        
      
      ! proc msgcat::mcunknown {locale src} {
      
      !     return $src
      
        }
      
        
      
        # Initialize the default locale
      
      --- 170,192 ----
      
        #be found for a string.  This routine is intended to be replaced
      
        #by an application specific routine for error reporting
      
        #purposes.  The default behavior is to return the source string.  
      
      + #If additional args are specified, the format command will be used
      
      + #to work them into the traslated string.
      
        #
      
        # Arguments:
      
        #localeThe current locale.
      
        #srcThe string to be translated.
      
      + #argsArgs to pass to the format command
      
        #
      
        # Results:
      
        #Returns the translated value.
      
        
      
      ! proc msgcat::mcunknown {locale src args} {
      
      !     if {[llength $args]} {
      
      ! return [eval {format $src} $args]
      
      !     } else {
      
      ! return $src
      
      !     }
      
        }
      
        
      
        # Initialize the default locale
      
      *** msgcat.test.orgWed Jul  5 18:11:21 2000
      
      --- msgcat.testWed Jul  5 12:58:43 2000
      
      ***************
      
      *** 401,406 ****
      
      --- 401,409 ----
      
        test msgcat-7.3 {::msgcat::mc, errors from format are propagated} {
      
            catch {::msgcat::mc format3 "good test"}
      
        } 1
      
      + test msgcat-7.4 {::msgcat::mc, extra args are given to unknown} {
      
      +     ::msgcat::mc "this is a %s" "good test"
      
      + } "this is a good test"
      
        
      
        # Reset the locale
      
        ::msgcat::mclocale $oldlocale
      
      
      
      PatchFiles:
      
      msgcat.tcl
      
          msgcat.test
      
      
      
      
      
      Thanks for the great patch; I've applied it to the sources in CVS, and this fix will go out with Tcl/Tk 8.4a2.
      
         Eric Melski                            The Other Tcl Guy
         ericm at ajubasolutions.com            Ajuba Solutions
      
      -- 07/06/2000 ericm
      
      
      
    4. foundin initialized to: "obsolete: 8.4a1"
    5. priority initialized to: "5 Medium"
    6. resolution initialized to: "None"
    7. status initialized to: "Open"
    8. submitter initialized to: "nobody"
    9. subsystem initialized to: "69. Other"
    10. title initialized to: "msgcat::unknown should have args, too"
    11. type initialized to: "RFE"
  2. Ticket change [a62c6b20c2] (rid 98552) by welch on 2000-10-26 08:34:56:

    1. closedate changed to: "2000-10-26T01:34:56"
    2. closer changed to: "welch"
    3. priority changed to: "2"
    4. resolution changed to: "Fixed"
    5. status changed to: "Closed"
  3. Ticket change [fc6f4e2090] (rid 108239) by dgp on 2001-04-20 02:48:59:

    1. foundin changed to: "None"
    2. status changed to: "Open"
    3. subsystem changed to: "None"
  4. Ticket change [3b2f1ac601] (rid 112690) by dgp on 2001-04-20 02:49:41:

    1. closedate changed to: "2001-04-19T19:49:41"
    2. closer changed to: "dgp"
    3. status changed to: "Closed"
    4. subsystem changed to: "30. msgcat Package"