commit-gnue
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

gnue/common/src/FormatMasks BaseMask.py DateMas...


From: Arturas Kriukovas
Subject: gnue/common/src/FormatMasks BaseMask.py DateMas...
Date: Mon, 06 May 2002 12:50:44 -0400

CVSROOT:        /cvsroot/gnue
Module name:    gnue
Changes by:     Arturas Kriukovas <address@hidden>      02/05/06 12:50:44

Modified files:
        common/src/FormatMasks: BaseMask.py DateMask.py NumberMask.py 
                                TextMask.py 

Log message:
        i18n string changes.

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue/common/src/FormatMasks/BaseMask.py.diff?tr1=1.14&tr2=1.15&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue/common/src/FormatMasks/DateMask.py.diff?tr1=1.19&tr2=1.20&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue/common/src/FormatMasks/NumberMask.py.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue/common/src/FormatMasks/TextMask.py.diff?tr1=1.2&tr2=1.3&r1=text&r2=text

Patches:
Index: gnue/common/src/FormatMasks/BaseMask.py
diff -c gnue/common/src/FormatMasks/BaseMask.py:1.14 
gnue/common/src/FormatMasks/BaseMask.py:1.15
*** gnue/common/src/FormatMasks/BaseMask.py:1.14        Sat May  4 12:45:07 2002
--- gnue/common/src/FormatMasks/BaseMask.py     Mon May  6 12:50:44 2002
***************
*** 108,114 ****
            mask = gConfig('%smask_%s' % (self.basetype, mask[1:]))
          except KeyError:
            raise PredefinedMaskNotFound, \
!               'The requested format mask "%s" is not defined for %s fields' \
                    % (mask[1:], self.basetype)
  
      # Process each character in mask at a time
--- 108,114 ----
            mask = gConfig('%smask_%s' % (self.basetype, mask[1:]))
          except KeyError:
            raise PredefinedMaskNotFound, \
!               _('The requested format mask "%s" is not defined for %s 
fields') \
                    % (mask[1:], self.basetype)
  
      # Process each character in mask at a time
***************
*** 122,128 ****
        elif self.maskMappings.has_key(ch):
          maskHandler.append(self.maskMappings[ch])
        else:
!         raise InvalidCharInMask, 'Unexpected character "%s" in %s mask.' \
              % (ch, self.basetype)
  
      return maskHandler
--- 122,128 ----
        elif self.maskMappings.has_key(ch):
          maskHandler.append(self.maskMappings[ch])
        else:
!         raise InvalidCharInMask, _('Unexpected character "%s" in %s mask.') \
              % (ch, self.basetype)
  
      return maskHandler
***************
*** 150,156 ****
      for size in self.inputDisplayLen:
        shift -= size
  
!     print "Starting cursor: %s; shift: %s" % (cursor, shift)
  
  
      value = self.processEdit(value, text, pos, replaces)
--- 150,156 ----
      for size in self.inputDisplayLen:
        shift -= size
  
!     print _("Starting cursor: %s; shift: %s") % (cursor, shift)
  
  
      value = self.processEdit(value, text, pos, replaces)
***************
*** 162,168 ****
      self.cursor = cursor + shift
      self.moveCursorRelative(0)
  
!     print "Ending cursor: %s; shift: %s" % (self.cursor, shift)
  
      return (value, formatted, self.cursor)
  
--- 162,168 ----
      self.cursor = cursor + shift
      self.moveCursorRelative(0)
  
!     print _("Ending cursor: %s; shift: %s") % (self.cursor, shift)
  
      return (value, formatted, self.cursor)
  
***************
*** 222,238 ****
    #
    def moveCursorRelative(self, relative):
  
!     print "*** moveCursorRelative(%s)"%relative
  
      # Direction = -1 (left) or 1 (right).
      direction = relative == 0 or int(relative/abs(relative))
  
!     print "relative=%s" % relative
!     print "direction=%s" % direction
  
      self.cursor = self.cursor + relative
  
!     print "cursor #1: %s" % self.cursor
  
      if self.cursor <= 0:
        self.cursor = 0
--- 222,238 ----
    #
    def moveCursorRelative(self, relative):
  
!     print _("*** moveCursorRelative(%s)")%relative
  
      # Direction = -1 (left) or 1 (right).
      direction = relative == 0 or int(relative/abs(relative))
  
!     print _("relative=%s") % relative
!     print _("direction=%s") % direction
  
      self.cursor = self.cursor + relative
  
!     print _("cursor #1: %s") % self.cursor
  
      if self.cursor <= 0:
        self.cursor = 0
***************
*** 241,247 ****
        self.cursor = len(self.display)
        self.direction = -1
  
!     print "cursor #2: %s" % self.cursor
  
      pos = 0
      section = 0
--- 241,247 ----
        self.cursor = len(self.display)
        self.direction = -1
  
!     print _("cursor #2: %s") % self.cursor
  
      pos = 0
      section = 0
***************
*** 253,282 ****
        section += 1
  
  
!     print "pos=%s" % pos
!     print "section=%s" % pos
  
      if pos + self.inputFormattedLen[section] == self.cursor:
!       print "cursor #2b: %s" % self.cursor
        section += direction
  
!     print "section=%s" % section
  
      if section == self.inputCount:
  #      self.cursor = pos + self.inputDisplayLen[-1]
!       print "cursor #3: %s" % self.cursor
        section -= 1
  
  
  
!     print "section=%s" % section
      if isinstance(self.inputHandlers[section], Literal):
        self.moveCursorRelative(direction)
!       print "cursor #4: %s" % self.cursor
  
      self.index = self.cursorToIndex(self.cursor)
  
!     print "New cursor position: %s" % self.cursor
  
      return self.cursor
  
--- 253,282 ----
        section += 1
  
  
!     print _("pos=%s") % pos
!     print _("section=%s") % pos
  
      if pos + self.inputFormattedLen[section] == self.cursor:
!       print _("cursor #2b: %s") % self.cursor
        section += direction
  
!     print _("section=%s") % section
  
      if section == self.inputCount:
  #      self.cursor = pos + self.inputDisplayLen[-1]
!       print _("cursor #3: %s") % self.cursor
        section -= 1
  
  
  
!     print _("section=%s") % section
      if isinstance(self.inputHandlers[section], Literal):
        self.moveCursorRelative(direction)
!       print _("cursor #4: %s") % self.cursor
  
      self.index = self.cursorToIndex(self.cursor)
  
!     print _("New cursor position: %s") % self.cursor
  
      return self.cursor
  
***************
*** 323,329 ****
  
      GDebug.printMesg(15,"inputMaskPos=%s" % self.inputMaskPos)
  
!     print "pos=%s"%pos
  
      section = 0
      while section < self.inputCount and \
--- 323,329 ----
  
      GDebug.printMesg(15,"inputMaskPos=%s" % self.inputMaskPos)
  
!     print _("pos=%s")%pos
  
      section = 0
      while section < self.inputCount and \
***************
*** 364,370 ****
  
      self.index = pos + len(value)
      self.cursor = self.indexToCursor(self.index)
!     print "after processEdit, index=%s;cursor=%s" % (self.index, self.cursor)
  
      GDebug.printMesg(15,"<< %s" % nv)
      return nv
--- 364,370 ----
  
      self.index = pos + len(value)
      self.cursor = self.indexToCursor(self.index)
!     print _("after processEdit, index=%s;cursor=%s") % (self.index, 
self.cursor)
  
      GDebug.printMesg(15,"<< %s" % nv)
      return nv
Index: gnue/common/src/FormatMasks/DateMask.py
diff -c gnue/common/src/FormatMasks/DateMask.py:1.19 
gnue/common/src/FormatMasks/DateMask.py:1.20
*** gnue/common/src/FormatMasks/DateMask.py:1.19        Tue Jan  8 12:05:56 2002
--- gnue/common/src/FormatMasks/DateMask.py     Mon May  6 12:50:44 2002
***************
*** 58,73 ****
  from FormatExceptions import *
  
  # TODO: This is obviously not Internationalized!
! monthNames = ['January','February','March','April','May','June',
!               'July','August','September','October','November','December']
! 
! monthAbbrevNames = ['Jan','Feb','Mar','Apr','May','Jun',
!                     'Jul','Aug','Sep','Oct','Nov','Dec']
! 
! weekdayNames = ['Sunday','Monday','Tuesday','Wednesday',
!                 'Thursday','Friday','Saturday']
! 
! weekdayAbbrevNames = ['Sun','Mon','Tue','Wed','Thu','Fri','Sat']
  
  
  predefinedDateLiterals = "-./: ,"
--- 58,105 ----
  from FormatExceptions import *
  
  # TODO: This is obviously not Internationalized!
! # TODO (after some time...): will have to check whether it works...
! monthNames = [_('January'),
!               _('February'),
!             _('March'),
!             _('April'),
!             _('May'),
!             _('June'),
!               _('July'),
!             _('August'),
!             _('September'),
!             _('October'),
!             _('November'),
!             _('December')]
! 
! monthAbbrevNames = [_('Jan'),
!                     _('Feb'),
!                   _('Mar'),
!                   _('Apr'),
!                   _('May'),
!                   _('Jun'),
!                     _('Jul'),
!                   _('Aug'),
!                   _('Sep'),
!                   _('Oct'),
!                   _('Nov'),
!                   _('Dec')]
! 
! weekdayNames = [_('Sunday'),
!                 _('Monday'),
!               _('Tuesday'),
!               _('Wednesday'),
!                 _('Thursday'),
!               _('Friday'),
!               _('Saturday')]
! 
! weekdayAbbrevNames = [_('Sun'),
!                       _('Mon'),
!                     _('Tue'),
!                     _('Wed'),
!                     _('Thu'),
!                     _('Fri'),
!                     _('Sat')]
  
  
  predefinedDateLiterals = "-./: ,"
***************
*** 134,141 ****
      self.lastInputPos = 0
      lastElement = self.inputCount - 1
  
!     print "inputMaskPos=%s" % self.inputMaskLen
!     print "inputMaskLen=%s" % self.inputMaskLen
  
  
      for i in range(self.inputCount):
--- 166,173 ----
      self.lastInputPos = 0
      lastElement = self.inputCount - 1
  
!     print _("inputMaskPos=%s") % self.inputMaskLen
!     print _("inputMaskLen=%s") % self.inputMaskLen
  
  
      for i in range(self.inputCount):
Index: gnue/common/src/FormatMasks/NumberMask.py
diff -c gnue/common/src/FormatMasks/NumberMask.py:1.1 
gnue/common/src/FormatMasks/NumberMask.py:1.2
*** gnue/common/src/FormatMasks/NumberMask.py:1.1       Wed Oct 10 19:24:50 2001
--- gnue/common/src/FormatMasks/NumberMask.py   Mon May  6 12:50:44 2002
***************
*** 57,72 ****
  from FormatExceptions import *
  
  # TODO: This is obviously not Internationalized!
! monthNames = ['January','February','March','April','May','June',
!               'July','August','September','October','November','December']
! 
! monthAbbrevNames = ['Jan','Feb','Mar','Apr','May','Jun',
!                     'Jul','Aug','Sep','Oct','Nov','Dec']
! 
! weekdayNames = ['Sunday','Monday','Tuesday','Wednesday',
!                 'Thursday','Friday','Saturday']
! 
! weekdayAbbrevNames = ['Sun','Mon','Tue','Wed','Thu','Fri','Sat']
  
  
  predefinedDateLiterals = "-./: ,"
--- 57,104 ----
  from FormatExceptions import *
  
  # TODO: This is obviously not Internationalized!
! # TODO (after some time):  this should go...
! monthNames = [_('January'),
!               _('February'),
!             _('March'),
!             _('April'),
!             _('May'),
!             _('June'),
!               _('July'),
!             _('August'),
!             _('September'),
!             _('October'),
!             _('November'),
!             _('December')]
! 
! monthAbbrevNames = [_('Jan'),
!                     _('Feb'),
!                   _('Mar'),
!                   _('Apr'),
!                   _('May'),
!                   _('Jun'),
!                     _('Jul'),
!                   _('Aug'),
!                   _('Sep'),
!                   _('Oct'),
!                   _('Nov'),
!                   _('Dec')]
! 
! weekdayNames = [_('Sunday'),
!                 _('Monday'),
!               _('Tuesday'),
!               _('Wednesday'),
!                 _('Thursday'),
!               _('Friday'),
!               _('Saturday')]
! 
! weekdayAbbrevNames = [_('Sun'),
!                       _('Mon'),
!                     _('Tue'),
!                     _('Wed'),
!                     _('Thu'),
!                     _('Fri'),
!                     _('Sat')]
  
  
  predefinedDateLiterals = "-./: ,"
***************
*** 217,223 ****
              value[ self.inputMaskPos[i]: \
                     self.inputMaskPos[i] + self.inputMaskLen[i]], date )
        elif mustValidate: 
!         raise InvalidEntry, "Invalid Entry"
  
      return date
      
--- 249,255 ----
              value[ self.inputMaskPos[i]: \
                     self.inputMaskPos[i] + self.inputMaskLen[i]], date )
        elif mustValidate: 
!         raise InvalidEntry, _("Invalid Entry")
  
      return date
      
Index: gnue/common/src/FormatMasks/TextMask.py
diff -c gnue/common/src/FormatMasks/TextMask.py:1.2 
gnue/common/src/FormatMasks/TextMask.py:1.3
*** gnue/common/src/FormatMasks/TextMask.py:1.2 Fri Feb 15 18:59:41 2002
--- gnue/common/src/FormatMasks/TextMask.py     Mon May  6 12:50:44 2002
***************
*** 46,61 ****
  from FormatExceptions import *
  
  # TODO: This is obviously not Internationalized!
! monthNames = ['January','February','March','April','May','June',
!               'July','August','September','October','November','December']
! 
! monthAbbrevNames = ['Jan','Feb','Mar','Apr','May','Jun',
!                     'Jul','Aug','Sep','Oct','Nov','Dec']
! 
! weekdayNames = ['Sunday','Monday','Tuesday','Wednesday',
!                 'Thursday','Friday','Saturday']
! 
! weekdayAbbrevNames = ['Sun','Mon','Tue','Wed','Thu','Fri','Sat']
  
  
  predefinedDateLiterals = "-./: ,"
--- 46,93 ----
  from FormatExceptions import *
  
  # TODO: This is obviously not Internationalized!
! # TODO (after some time):  ahhhh, again these....
! monthNames = [_('January'),
!               _('February'),
!             _('March'),
!             _('April'),
!             _('May'),
!             _('June'),
!               _('July'),
!             _('August'),
!             _('September'),
!             _('October'),
!             _('November'),
!             _('December')]
! 
! monthAbbrevNames = [_('Jan'),
!                     _('Feb'),
!                   _('Mar'),
!                   _('Apr'),
!                   _('May'),
!                   _('Jun'),
!                     _('Jul'),
!                   _('Aug'),
!                   _('Sep'),
!                   _('Oct'),
!                   _('Nov'),
!                   _('Dec')]
! 
! weekdayNames = [_('Sunday'),
!                 _('Monday'),
!               _('Tuesday'),
!               _('Wednesday'),
!                 _('Thursday'),
!               _('Friday'),
!               _('Saturday')]
! 
! weekdayAbbrevNames = [_('Sun'),
!                       _('Mon'),
!                     _('Tue'),
!                     _('Wed'),
!                     _('Thu'),
!                     _('Fri'),
!                     _('Sat')]
  
  
  predefinedDateLiterals = "-./: ,"
***************
*** 206,212 ****
              value[ self.inputMaskPos[i]: \
                     self.inputMaskPos[i] + self.inputMaskLen[i]], date )
        elif mustValidate: 
!         raise InvalidEntry, "Invalid Entry"
  
      return date
      
--- 238,244 ----
              value[ self.inputMaskPos[i]: \
                     self.inputMaskPos[i] + self.inputMaskLen[i]], date )
        elif mustValidate: 
!         raise InvalidEntry, _("Invalid Entry")
  
      return date
      



reply via email to

[Prev in Thread] Current Thread [Next in Thread]