summaryrefslogtreecommitdiffstats
path: root/library/msgcat/msgcat.tcl
diff options
context:
space:
mode:
Diffstat (limited to 'library/msgcat/msgcat.tcl')
-rw-r--r--library/msgcat/msgcat.tcl26
1 files changed, 13 insertions, 13 deletions
diff --git a/library/msgcat/msgcat.tcl b/library/msgcat/msgcat.tcl
index ccf4054..660d435 100644
--- a/library/msgcat/msgcat.tcl
+++ b/library/msgcat/msgcat.tcl
@@ -9,8 +9,8 @@
#
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
-#
-# RCS: @(#) $Id: msgcat.tcl,v 1.26 2006/11/03 00:34:52 hobbs Exp $
+#
+# RCS: @(#) $Id: msgcat.tcl,v 1.27 2009/11/18 21:45:36 nijtmans Exp $
package require Tcl 8.5
# When the version number changes, be sure to update the pkgIndex.tcl file,
@@ -177,7 +177,7 @@ namespace eval msgcat {
# args Args to pass to the format command
#
# Results:
-# Returns the translated string. Propagates errors thrown by the
+# Returns the translated string. Propagates errors thrown by the
# format command.
proc msgcat::mc {src args} {
@@ -189,7 +189,7 @@ proc msgcat::mc {src args} {
variable Locale
set ns [uplevel 1 [list ::namespace current]]
-
+
while {$ns != ""} {
foreach loc $Loclist {
if {[dict exists $Msgs $loc $ns $src]} {
@@ -312,12 +312,12 @@ proc msgcat::mcset {locale src {dest ""}} {
}
set ns [uplevel 1 [list ::namespace current]]
-
+
set locale [string tolower $locale]
-
+
# create nested dictionaries if they do not exist
if {![dict exists $Msgs $locale]} {
- dict set Msgs $locale [dict create]
+ dict set Msgs $locale [dict create]
}
if {![dict exists $Msgs $locale $ns]} {
dict set Msgs $locale $ns [dict create]
@@ -345,17 +345,17 @@ proc msgcat::mcmset {locale pairs } {
return -code error "bad translation list:\
should be \"[lindex [info level 0] 0] locale {src dest ...}\""
}
-
+
set locale [string tolower $locale]
set ns [uplevel 1 [list ::namespace current]]
# create nested dictionaries if they do not exist
if {![dict exists $Msgs $locale]} {
- dict set Msgs $locale [dict create]
+ dict set Msgs $locale [dict create]
}
if {![dict exists $Msgs $locale $ns]} {
dict set Msgs $locale $ns [dict create]
- }
+ }
foreach {src dest} $pairs {
dict set Msgs $locale $ns $src $dest
}
@@ -368,7 +368,7 @@ proc msgcat::mcmset {locale pairs } {
# This routine is called by msgcat::mc if a translation cannot
# 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.
+# 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.
#
@@ -390,7 +390,7 @@ proc msgcat::mcunknown {locale src args} {
# msgcat::mcmax --
#
-# Calculates the maximum length of the translated strings of the given
+# Calculates the maximum length of the translated strings of the given
# list.
#
# Arguments:
@@ -475,7 +475,7 @@ proc msgcat::Init {} {
}
#
# On Windows, try to set locale depending on registry settings,
- # or fall back on locale of "C".
+ # or fall back on locale of "C".
#
set key {HKEY_CURRENT_USER\Control Panel\International}
if {[catch {package require registry}] \