diff mercurial/dirstate.py @ 1402:9d2c2e6b32b5

i18n part2: use '_' for all strings who are part of the user interface
author Benoit Boissinot <benoit.boissinot@ens-lyon.org>
date Tue, 18 Oct 2005 18:38:39 -0700
parents cf9a1233738a
children f56f38a1a85f
line wrap: on
line diff
--- a/mercurial/dirstate.py
+++ b/mercurial/dirstate.py
@@ -68,7 +68,7 @@ class dirstate:
                     try:
                         syntax = syntaxes[s]
                     except KeyError:
-                        self.ui.warn("ignoring invalid syntax '%s'\n" % s)
+                        self.ui.warn(_("ignoring invalid syntax '%s'\n") % s)
                     continue
                 pat = syntax + line
                 for s in syntaxes.values():
@@ -190,7 +190,7 @@ class dirstate:
             try:
                 del self.map[f]
             except KeyError:
-                self.ui.warn("not in dirstate: %s!\n" % f)
+                self.ui.warn(_("not in dirstate: %s!\n") % f)
                 pass
 
     def clear(self):
@@ -276,13 +276,13 @@ class dirstate:
                 return True
             else:
                 kind = 'unknown'
-                if stat.S_ISCHR(st.st_mode): kind = 'character device'
-                elif stat.S_ISBLK(st.st_mode): kind = 'block device'
-                elif stat.S_ISFIFO(st.st_mode): kind = 'fifo'
-                elif stat.S_ISLNK(st.st_mode): kind = 'symbolic link'
-                elif stat.S_ISSOCK(st.st_mode): kind = 'socket'
-                elif stat.S_ISDIR(st.st_mode): kind = 'directory'
-                self.ui.warn('%s: unsupported file type (type is %s)\n' % (
+                if stat.S_ISCHR(st.st_mode): kind = _('character device')
+                elif stat.S_ISBLK(st.st_mode): kind = _('block device')
+                elif stat.S_ISFIFO(st.st_mode): kind = _('fifo')
+                elif stat.S_ISLNK(st.st_mode): kind = _('symbolic link')
+                elif stat.S_ISSOCK(st.st_mode): kind = _('socket')
+                elif stat.S_ISDIR(st.st_mode): kind = _('directory')
+                self.ui.warn(_('%s: unsupported file type (type is %s)\n') % (
                     util.pathto(self.getcwd(), f),
                     kind))
                 return False