Changeset 3335

Show
Ignore:
Timestamp:
08/26/07 06:51:02 (1 year ago)
Author:
ed
Message:

Running pygettext turned up lots of malformed localized strings. I've corrected them all here.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/dabo/db/dCursorMixin.py

    r3327 r3335  
    14971497            raise dException.FieldNotFoundException, _("No field specified for seek()") 
    14981498        if not self._records[0].has_key(fld) and not self.VirtualFields.has_key(fld): 
    1499             raise dException.FieldNotFoundException, _("Non-existent field '%s'" % fld) 
     1499            raise dException.FieldNotFoundException, _("Non-existent field '%s'") % fld 
    15001500 
    15011501        # Copy the specified field vals and their row numbers to a list, and 
  • trunk/dabo/lib/datanav/Form.py

    r3303 r3335  
    206206            for index in range(2, self.pageFrame.PageCount): 
    207207                if index == 2: 
    208                     title = "&%s\tAlt+3" % (_(self.pageFrame.Pages[index].Caption)
     208                    title = "&%s\tAlt+3" % (self.pageFrame.Pages[index].Caption
    209209                    onHit = self.onEditCurrentRecord 
    210210                    tag = self.pageFrame.Pages[index].DataSource 
    211211                    help = _("Edit the fields of the currently selected record.") 
    212212                else: 
    213                     title = "%s\tAlt+%d" % (_(self.pageFrame.Pages[index].Caption), index + 1) 
     213                    title = "%s\tAlt+%d" % (self.pageFrame.Pages[index].Caption, index + 1) 
    214214                    onHit = onActivatePage 
    215215                    tag = self.pageFrame.Pages[index] 
     
    354354        biz = self.getBizobj(ds) 
    355355        if biz: 
    356             title = _("Edit") + " " + _(biz.Caption) 
     356            title = _("Edit") + " " + biz.Caption 
    357357        else: 
    358358            title = _("Edit") 
  • trunk/dabo/lib/datanav/Page.py

    r3303 r3335  
    218218    def _orderByClause(self, infoOnly=False): 
    219219        sf = self.sortFields 
    220         if infoOnly: parts = lambda (k): (sf[k][2], _(sf[k][1])) 
    221         else:        parts = lambda (k): (k, sf[k][1].upper()) 
     220        if infoOnly: 
     221            parts = lambda (k): (sf[k][2], sf[k][1]) 
     222        else: 
     223            parts = lambda (k): (k, sf[k][1].upper()) 
    222224 
    223225        flds = [(self.sortFields[k][0], k, " ".join(parts(k))) 
     
    736738                    childBiz = self.Form.getBizobj(child) 
    737739                    grdLabel = self.addObject(dabo.ui.dLabel, "lblChild" + child) 
    738                     grdLabel.Caption = _(self.Form.getBizobj(child).Caption) 
     740                    grdLabel.Caption = self.Form.getBizobj(child).Caption 
    739741                    grdLabel.FontSize = 14 
    740742                    grdLabel.FontBold = True 
  • trunk/dabo/lib/datanav2/Form.py

    r3303 r3335  
    125125            for index in range(2, self.pageFrame.PageCount): 
    126126                if index == 2: 
    127                     title = "&%s\tAlt+3" % (_(self.pageFrame.Pages[index].Caption)
     127                    title = "&%s\tAlt+3" % (self.pageFrame.Pages[index].Caption
    128128                    onHit = self.onEditCurrentRecord 
    129129                    tag = self.pageFrame.Pages[index].DataSource 
    130130                    help = _("Edit the fields of the currently selected record.") 
    131131                else: 
    132                     title = "%s\tAlt+%d" % (_(self.pageFrame.Pages[index].Caption), index + 1) 
     132                    title = "%s\tAlt+%d" % (self.pageFrame.Pages[index].Caption, index + 1) 
    133133                    onHit = onActivatePage 
    134134                    tag = self.pageFrame.Pages[index] 
     
    273273        biz = self.getBizobj() 
    274274        if biz: 
    275             caption = _("Edit") + " " + _(biz.Caption) 
     275            caption = _("Edit") + " " + biz.Caption 
    276276        else: 
    277277            caption = _("Edit") 
  • trunk/dabo/lib/datanav2/Page.py

    r3303 r3335  
    214214    def _orderByClause(self, infoOnly=False): 
    215215        sf = self.sortFields 
    216         if infoOnly: parts = lambda (k): (sf[k][2], _(sf[k][1])) 
    217         else:        parts = lambda (k): (k, sf[k][1].upper()) 
     216        if infoOnly:  
     217            parts = lambda (k): (sf[k][2], sf[k][1]) 
     218        else: 
     219            parts = lambda (k): (k, sf[k][1].upper()) 
    218220 
    219221        flds = [(self.sortFields[k][0], k, " ".join(parts(k))) 
  • trunk/dabo/ui/__init__.py

    r3303 r3335  
    1010 
    1111    import dabo.ui 
    12     dabo.ui.loadUI('wx'
     12    dabo.ui.loadUI("wx"
    1313     
    1414""" 
    15 import os, traceback 
     15import os 
     16import traceback 
     17import inspect 
    1618import dabo 
    1719from dabo.dLocalize import _ 
     
    1921 
    2022def getUIType(): 
    21     """ Return the identifier of the currently loaded UI, or None. 
    22     """ 
     23    """ Return the identifier of the currently loaded UI, or None.""" 
    2324    try: 
    24         return uiType['shortName'
     25        return uiType["shortName"
    2526    except (AttributeError, NameError, KeyError): 
    2627        return None 
     
    2829         
    2930def loadUI(uiType): 
    30     """ Load the given UI into the global namespace. 
    31     """ 
     31    """ Load the given UI into the global namespace.""" 
    3232    retVal = False 
    3333    currType = getUIType() 
     
    4949            #dabo.errorLog.write("Error Loading UI: %s" % e) 
    5050            traceback.print_exc() 
    51                  
    5251    else: 
    5352        if currType == typ: 
     
    5554            pass 
    5655        else: 
    57             dabo.infoLog.write(_("Cannot change the uiType to '%s', because UI '%s' is already loaded." 
    58                 % (typ, currType))) 
    59              
     56            dabo.infoLog.write(_("Cannot change the uiType to '%s', because UI '%s' is already loaded.") 
     57                % (typ, currType)) 
    6058    return retVal 
    6159 
     
    6866# app, you should instead set the UI property of the dApp object. 
    6967try: 
    70     __defaultUI = os.environ['DABO_DEFAULT_UI'
     68    __defaultUI = os.environ["DABO_DEFAULT_UI"
    7169except KeyError: 
    7270    __defaultUI = None 
    7371 
    7472if __defaultUI: 
    75     dabo.infoLog.write(_("Automatically loading default ui '%s'..." % __defaultUI)
     73    dabo.infoLog.write(_("Automatically loading default ui '%s'...") % __defaultUI
    7674    # For now, don't do the tempting option: 
    7775    #loadUI(defaultUI) 
     
    7977    # for single-file installers, it needs to see the import statement. 
    8078    # Therefore, do it explicitly: 
    81     if __defaultUI in ('wx', 'wxPython', 'uiwx'): 
     79    if __defaultUI in ("wx", "wxPython", "uiwx"): 
    8280        from uiwx import * 
    83      
    8481else: 
    8582    pass 
     
    106103    DynamicCaption = makeDynamicProperty(Caption) 
    107104    """ 
    108     import inspect 
    109  
    110105    propName = None 
    111106    frame = inspect.currentframe(1) 
     
    135130%s property. If Dynamic%s is set to None (the default), %s  
    136131will not be dynamically evaluated. 
    137 """ % (propName, propName, propName, propName)
     132""") % (propName, propName, propName, propName
    138133 
    139134    if additionalDoc: 
  • trunk/dabo/ui/uiwx/dEditor.py

    r3309 r3335  
    19241924                    self._language = val.lower() 
    19251925                else: 
    1926                     dabo.errorLog.write(_("Currently only %s are supported" % ", ".join(LexerDic.keys()))) 
     1926                    dabo.errorLog.write(_("Currently only %s are supported") % ", ".join(LexerDic.keys())) 
    19271927                self.setDefaults() 
    19281928                self._defaultsSet = True 
  • trunk/dabo/ui/uiwx/dForm.py

    r3303 r3335  
    359359        except dException.BusinessRuleViolation, e: 
    360360            self.setStatusText(_("Save failed.")) 
    361             msg = "%s:\n\n%s" % (_("Save Failed"), _( str(e) )) 
     361            msg = "%s:\n\n%s" % (_("Save Failed"), str(e)) 
    362362            self.notifyUser(msg, severe=True, exception=e) 
    363363            return False 
     
    574574            bizobj.new() 
    575575        except dException.dException, e: 
    576             self.notifyUser(_("Add new record failed with response:\n\n%s" % str(e)),  
     576            self.notifyUser(_("Add new record failed with response:\n\n%s") % str(e),  
    577577                    severe=True, exception=e) 
    578578 
     
    710710                else: 
    711711                    rowNumber = 1 
    712         return _("Record %s/%s" % (rowNumber, rowCount)
     712        return _("Record %s/%s") % (rowNumber, rowCount
    713713 
    714714 
  • trunk/dabo/ui/uiwx/dToggleButton.py

    r3303 r3335  
    117117        else: 
    118118            state = ("up", "False") 
    119         self.Caption = _("State: %s (Boolean: %s)" % state) 
     119        self.Caption = _("State: %s (Boolean: %s)") % state 
    120120 
    121121