Mercurial > pyarq-presupuestos
changeset 17:a7b9f7e7dfa4
Improvements importing FIEBDC files
author | Miguel Ángel Bárcena Rodríguez <miguelangel@obraencurso.es> |
---|---|
date | Sat, 02 Nov 2013 19:26:09 +0100 |
parents | 60bc5117926c |
children | 878159a13494 |
files | Generic/base.py Generic/fiebdc.py Generic/globalVars.py Generic/openwith.py Generic/utils.py mo/es/LC_MESSAGES/pyArq-Presupuestos.mo mo/pyArq-Presupuestos.es.po mo/pyArq-Presupuestos.pot |
diffstat | 8 files changed, 1107 insertions(+), 1019 deletions(-) [+] |
line wrap: on
line diff
--- a/Generic/base.py Fri Apr 19 00:04:20 2013 +0200 +++ b/Generic/base.py Sat Nov 02 19:26:09 2013 +0100 @@ -3,7 +3,7 @@ ## File base.py ## This file is part of pyArq-Presupuestos. ## -## Copyright (C) 2010 Miguel Ángel Bárcena Rodríguez +## Copyright (C) 2010-2013 Miguel Ángel Bárcena Rodríguez ## <miguelangel@obraencurso.es> ## ## pyArq-Presupuestos is free software: you can redistribute it and/or modify @@ -303,6 +303,7 @@ addFile {get/set}Labels addLabel + getChildPositions: """ __slots__ = ["_Record__code", "_Record__synonyms", "_Record__recordType", "_Record__unit", @@ -332,10 +333,10 @@ self.__labels = tuple[11] def __init__(self, decimals, code, synonyms, hierarchy, unit, summary, - prices, type, subtype, parents=[], text=""): + prices, type_, subtype, parents=[], text=""): self.code = code self.synonyms = synonyms - self.recordType = (hierarchy, type, subtype) + self.recordType = (hierarchy, type_, subtype) self.unit = unit self.summary = summary self.setPrices(prices, decimals) @@ -542,9 +543,9 @@ self.__children = children def appendChild(self, child_code, decimals, factor=0.0, yield_=0.0, - measure=0.0, measure_list=[], type ="", label=""): + measure=0.0, measure_list=[], type_ ="", label=""): """appendChildren(self, child_code, factor=0.0, yield_=0.0, - measure=0.0, measure_list=[], type ="", label="")) + measure=0.0, measure_list=[], type_ ="", label="")) position: child_code: @@ -552,7 +553,7 @@ yield_: measure: measure_list: - type: + type_: label: Append a child to the list of children @@ -560,7 +561,7 @@ _measure = Measure(decimals, self.recordType, measure, [], label, factor, yield_) if len(measure_list) > 0: - measure.buildMeasure(_measure, measure_list, type, decimals, + _measure.buildMeasure( measure_list, type_, decimals, self.recordType) _position = len(self.__children) _child = Decomposition(_position, child_code, [_measure]) @@ -615,7 +616,7 @@ _description = file[2] if not os.path.exists(file[0]): raise ValueError, _("Incorrect path") - _file = File(file_path, type, description) + _file = File(file_path, type_, description) _files.append(_file) else: raise ValueError, utils.mapping(_( @@ -623,8 +624,8 @@ self.__files = _files - def addFile(self, file_path, type, description): - """addFile(self, file_path, type, description) + def addFile(self, file_path, type_, description): + """addFile(self, file_path, type_, description) Add a file to a record instance """ @@ -636,7 +637,7 @@ if _ofile.name == _name: _isin = True if not _isin: - _file = File(_name, type, description) + _file = File(_name, type_, description) self.__files.append(_file) def getLabels(self): @@ -667,6 +668,18 @@ if not label in self.__labels: self.__labels.append(label) + def getChildPositions(self, child_code): + """getChildPath(self, child_code): + + Try to return positions of a childcode + """ + children = self.children + positions = [] + for child in children: + if child.code == child_code: + positions.append(child.position) + return positions + recordType = property(getRecordType, setRecordType, None, """Record Type object """) @@ -707,7 +720,7 @@ Parametric Record object Constructor: base.ParametricRecord(code, synonyms, hierarchy, unit, summary, prices, - type, subtype, text="") + type_, subtype, text="") Ancestry: +-- object +-- Record @@ -763,9 +776,9 @@ self.__parametric_text = tuple[19] def __init__(self, budget, code, synonyms, hierarchy, unit, summary, - prices, type, subtype, parents=[], text=""): + prices, type_, subtype, parents=[], text=""): Record.__init__(self, budget, code, synonyms, hierarchy, unit, summary, - prices, type, subtype, parents=[], text="") + prices, type_, subtype, parents=[], text="") self.__parameters = {} self.__select_comment = "" self.__vars = {} @@ -1091,8 +1104,8 @@ """If fixed is True the yield is not calculated from measure """) - def buildMeasure(self, list_lines, type, decimals, recordType): - """setMeasure(self, list_lines, type, decimals) + def buildMeasure(self, list_lines, type_, decimals, recordType): + """setMeasure(self, list_lines, type_, decimals) list_lines: list of measure lines [ [linetype, comment, units, length, width, height, formula], ... ] @@ -1129,13 +1142,14 @@ _measure_line = MeasureLine(decimals, _type, _comment, _units, _length, _width, _height, _formula) _lines.append(_measure_line) - if type == "M": + + if type_ == "M": self.lines = _lines - elif type == "A": + elif type_ == "A": self.lines.extend(_lines) else: raise ValueError, utils.mapping(_("Type must be M or A. Type: $1"), - (type,)) + (type_,)) self.calculateMeasure(decimals, recordType) def calculateMeasure(self, decimals, recordType): @@ -1165,7 +1179,7 @@ Description: MeasureLine object Constructor: - base.MeasureLine(budget, type, comment, units, length, width, height, + base.MeasureLine(budget, type_, comment, units, length, width, height, formula) Ancestry: +-- object @@ -1191,7 +1205,7 @@ Methods: __getstate__(self) __setstate__(self, tuple) - __init__(self, decimals, type, comment, units, length, width, height, + __init__(self, decimals, type_, comment, units, length, width, height, formula) {get/set}LineType {get/set}Comment @@ -1231,12 +1245,12 @@ self.__formula = tuple[6] self.__parcial = tuple[7] #self.calculateParcial() - def __init__(self, decimals, type, comment, units, length, width, height, + def __init__(self, decimals, type_, comment, units, length, width, height, formula): self.__parcial = 0.0 self.__parcial_subtotal = 0.0 self.__acumulated_subtotal = 0.0 - self.lineType = type + self.lineType = type_ self.comment = comment self.setUnits(units, decimals) self.setLength(length, decimals) @@ -1306,11 +1320,11 @@ _parcial = round(_parcial, _DS) self.__parcial = _parcial - def setLineType(self, type): - if not type in [0, 1, 2, 3]: + def setLineType(self, type_): + if not type_ in [0, 1, 2, 3]: raise ValueError, utils.mapping(_("Invalid measure line type ($1)"), - (str(type),)) - self.__lineType = type + (str(type_),)) + self.__lineType = type_ def setComment(self, comment): if not isinstance(comment, str): raise ValueError, utils.mapping(_("Measure Comment must be a "\ @@ -2005,7 +2019,7 @@ datetime.date(*date) self.__date = date else: - raise TypeError, _("Invalid Date: %s" % str(date)) + raise TypeError, utils.mapping(_("Invalid Date: $1"),(str(date),)) def setComment(self, comment): """setOwner(self, comment) @@ -2256,9 +2270,9 @@ return _factor def setTree(self, code, child_code, position, factor, yield_, total, - list_lines, label, type): + list_lines, label, type_): """setTree(self, code, child_code, position, factor,yield_, total, - list_lines, label, type) + list_lines, label, type_) code: the parent record code child_code: child record code @@ -2282,17 +2296,25 @@ width: Width (c) height: Height (d) label: Record Identifiers that are used by some measure programs. - type: type of action + type_: type of action M: Set measure A: Add measure Sets the decomposition of a record in a child record """ + if code is None: # No-estructured measures + code = self.getRoot() + if code == None: # No root + print "No-estructured measures. Adding root record", + self.setRecord("root", [], 0, "", "", [0.0,], [(1,1,1970)], + 0, "") + code = self.getRoot() + if not utils.is_valid_code(code)[0]: raise ValueError, utils.mapping(_("Invalid parent code: $1"), (code,)) if not utils.is_valid_code(child_code)[0]: - raise ValueError, utils.mapping(_("Invalid child code: $1"), - (code,)) + raise ValueError, utils.mapping(_("Invalid child code: $1 $2"), + (code,child_code)) if not isinstance(position, int): raise ValueError, utils.mapping(_("Invalid position in measure "\ "$1, in code $2"), (parent_code, position)) @@ -2306,6 +2328,7 @@ "$1, child code: $2, repeated code: $3"), (code, child_code, _parent_code)) return + # Creating reference to parent code in child record if child_code in self.__records: _child_record = self.__records[child_code] @@ -2320,8 +2343,21 @@ # if the code exits retake previous values. _record = self.__records[code] _child_number = len(_record.children) - if position == -1: + if position == -1: # New child position = _child_number + if position == -2: # No-estructured measures or empty position (error in FIEBDC file) + positions = _record.getChildPositions(child_code) + if len(positions) == 1: + position = positions[0] + print utils.mapping(_("No-estructured measure or empty position. Parent Code: "\ + "$1, Child code: $2, Position: $3"),(code, child_code, position)) + else: + position = _child_number + print utils.mapping(_("No-estructured measure or empty position. "\ + "Repeated child in unspecified position. "\ + "It is impossible to determine the position. "\ + "New child is added in the decomposition. "\ + "Parent code: $1, Child code: $2, Position: $3"),(code, child_code, position)) if position == _child_number: # The record do not have the child if not isinstance(factor, float): factor = 1.0 @@ -2329,7 +2365,7 @@ if not isinstance(total, float): total = 0.0 if not isinstance(list_lines, list): list_lines = [] _child = _record.appendChild(child_code, self.getDecimals(), - factor, yield_, total, list_lines, type, label) + factor, yield_, total, list_lines, type_, label) elif position < _child_number: # The record have the child _child = _record.children[position] @@ -2351,7 +2387,7 @@ yield_ = 0.0 _measure.setMeasure(total, self.getDecimals()) if isinstance(list_lines, list) and len(list_lines) > 0: - _measure.buildMeasure(list_lines, type, self.getDecimals(), + _measure.buildMeasure(list_lines, type_, self.getDecimals(), _record.recordType) if isinstance(label, str) and label != "" : _measure.label = label @@ -2374,14 +2410,15 @@ "Position: $3"), (code, child_code, position)) return if not isinstance(factor, float): - factor == 1.0 + factor = 1.0 if not isinstance(yield_, float): yield_ = 1.0 + if not isinstance(total, float): + total = 1.0 _record = self.setRecord(code, [], "", "", "", [], [], "", "") _child = _record.appendChild(child_code, self.getDecimals(), - factor, yield_, total, list_lines, type, label) - _child.budgetMeasures[0] = measure + factor, yield_, total, list_lines, type_, label) def eval_formula(self, formula, a, b, c, d): """eval_formula(self, formula, a, b, c, d) @@ -2474,9 +2511,9 @@ _record.text = text def setRecord(self, code, synonyms, hierarchy, unit, summary, price, date, - type, subtype): + type_, subtype): """setRecord(self, code, synonyms, hierarchy, unit, summary, price, - date, type, subtype) + date, type_, subtype) code: Code string synonyms: List of synonym codes of the record @@ -2488,7 +2525,7 @@ summary: Short description of a record price: List of prices date: List of dates - "type" and "subtype": + "type_" and "subtype": 0 Without classifying EA Auxiliary element EU Unitary element @@ -2529,6 +2566,8 @@ else: print _("Only can be one root record") return + # TODO: If the root is created in settree. No-estructured measures + # TODO Rewrite root values # retake previous values. # TODO: test synonyms _budget = self @@ -2536,12 +2575,12 @@ if code[-1] == "$": _record = ParametricRecord(_budget.getDecimals(), code, synonyms, hierarchy, - unit, summary, [], type, subtype, + unit, summary, [], type_, subtype, [], "") else: _record = Record(_budget.getDecimals(), code, synonyms, hierarchy, unit, - summary, [], type, subtype,[], "") + summary, [], type_, subtype,[], "") self.__records[code] = _record _prices = [[price[i], date[i]] for i in range(len(price))] _record.setPrices(_prices, self.getDecimals()) @@ -2559,14 +2598,14 @@ _prices = _record.prices else: _prices = [ [price[i], date[i]] for i in range(len(price))] - if type == "": - type = _record.recordType.type + if type_ == "": + type_ = _record.recordType.type _record.synonyms = synonyms _record.unit = unit _record.summary = summary _record.setPrices(_prices, self.getDecimals()) _record.recordType.hierarchy = hierarchy - _record.recordType.type = type + _record.recordType.type = type_ _record.recordType.subtype = subtype return _record @@ -2747,7 +2786,7 @@ self.setSheetSection(section, "") _sheet = self.getRecord(record_code).getSheet() _sheet.addSection(field, section, paragraph) - def addFile(self, record_code, filepath, type, description): + def addFile(self, record_code, filepath, type_, description): if not isinstance(record_code, str): raise ValueError, _("The record_code code must be a string") if not isinstance(filepath, str): @@ -2761,7 +2800,7 @@ return #-# _record = self.getRecord(record_code) - _record.addFile(filepath, type, description) + _record.addFile(filepath, type_, description) def setCompany(self, company_code, sumamary, name, offices, cif, web, email): if not isinstance(company_code, str): @@ -3018,9 +3057,9 @@ self.__fax = tuple[8] self.__contact_person = tuple[9] - def __init__(self, type, subname, address, postal_code, town, province, + def __init__(self, type_, subname, address, postal_code, town, province, country, phone, fax, contact_person): - self.officeType = type + self.officeType = type_ self.subname = subname self.address = address self.postal_code = postal_code @@ -3032,8 +3071,8 @@ self.contact_person = contact_person def getOfficeType(self): return self.__officeType - def setOfficeType(self, type): - self.__officeType = type + def setOfficeType(self, type_): + self.__officeType = type_ def getSubname(self): return self.__subname def setSubname(self, subname): @@ -3249,7 +3288,7 @@ Description: File object Constructor: - base.File(name, type, description) + base.File(name, type_, description) Ancestry: +-- object +-- File @@ -3260,7 +3299,7 @@ Methods: __getstate__(self) __setstate__(self, tuple) - __init__(self, path,type, description) + __init__(self, path,type_, description) {get/set}Name {get/set}FileType {get/set}Description @@ -3280,9 +3319,9 @@ self.__name = tuple[0] self.__fileType = tuple[1] self.__description = tuple[2] - def __init__(self, name, type, description): + def __init__(self, name, type_, description): self.name = name - self.fileType = type + self.fileType = type_ self.description = description def getName(self): return self.__name @@ -3290,8 +3329,8 @@ self.__name = name def getFileType(self): return self.__fileType - def setFileType(self, type): - self.__fileType = type + def setFileType(self, type_): + self.__fileType = type_ def getDescription(self): return self.__description def setDescription(self, description): @@ -3356,7 +3395,7 @@ 2 -> None,Q,% 3 -> None,MC,MCr,MM,MS,ME,MCu,Mal,ML,M Constructor: - base.File(hierarchy,type,subtype) + base.File(hierarchy,type_,subtype) Ancestry: +-- object +-- RecordType @@ -3385,24 +3424,27 @@ self.__hierarchy = tuple[0] self.__type = tuple[1] self.__subtype = tuple[2] - def __init__(self, hierarchy, type, subtype): + def __init__(self, hierarchy, type_, subtype): self.hierarchy = hierarchy - self.type = type + self.type = type_ self.subtype = subtype def getHierarchy(self): return self.__hierarchy def setHierarchy(self, hierarchy): - if not hierarchy in [-1, 0 , 1 ,2]: + if not hierarchy in [-1, 0 , 1 ,2, ""]: raise ValueError, utils.mapping(_("Invalid Hierarchy ($1) "\ - "The hierarchy must be -1, 0, 1 or 2"), (str(hierarchy))) + "The hierarchy must be -1, 0, 1, 2"), (str(hierarchy),)) + elif hierarchy == "": + print "Hierarchy temporarily set to an empty string" + #TODO Check empty Hierarchy in Generic.fiebdc.Read._testBudget self.__hierarchy = hierarchy def getType(self): return self.__type - def setType(self, type): - if not type in ["", 0, 1, 2, 3] : + def setType(self, type_): + if not type_ in ["", 0, 1, 2, 3] : raise ValueError, utils.mapping(_("Invalid type ($1),"\ - "the type must be (empty string,0,1,2,3)"),(str(type))) - self.__type = type + "the type must be (empty string,0,1,2,3)"),(str(type_)),) + self.__type = type_ def getSubtype(self): return self.__subtype def setSubtype(self, subtype): @@ -3412,7 +3454,7 @@ raise ValueError, utils.mapping(_("Invalid subtype ($1), The "\ "subtype must one in (empty string, EA, "\ "EU, EC, EF, OB, PA, PU, H, Q, %, MC, MCr, "\ - "MM, MS, ME, MCu, MAl, ML, M)"), (str(subtype))) + "MM, MS, ME, MCu, MAl, ML, M)"), (str(subtype),)) self.__subtype = subtype hierarchy = property(getHierarchy, setHierarchy, None, """Record Hierarchy
--- a/Generic/fiebdc.py Fri Apr 19 00:04:20 2013 +0200 +++ b/Generic/fiebdc.py Sat Nov 02 19:26:09 2013 +0100 @@ -3,7 +3,7 @@ ## File fiebdc.py ## This file is part of pyArq-Presupuestos. ## -## Copyright (C) 2010 Miguel Ángel Bárcena Rodríguez +## Copyright (C) 2010-2013 Miguel Ángel Bárcena Rodríguez ## <miguelangel@obraencurso.es> ## ## pyArq-Presupuestos is free software: you can redistribute it and/or modify @@ -26,7 +26,8 @@ import re import calendar import os.path - +import unicodedata +import hashlib # pyArq-Presupuestos modules import base from Generic import utils @@ -97,24 +98,24 @@ self.__generator = globalVars.version self.__character_set = "850" self.__pattern = { - "control_tilde" : re.compile("((\r\n)| |\t)+~"), - "control_vbar" : re.compile("((\r\n)| |\t)+\|"), - "control_backslash" : re.compile(r"((\r\n)| |\t)+\\"), - "valid_code" : re.compile("[^A-Za-z0-9ñÑ.$#%&_]"), - "special_char": re.compile("[#%&]"), - "no_float": re.compile("[^0-9.]"), - "formula" : re.compile(".*[^0123456789\.()\+\-\*/\^abcdp ].*"), - "comment": re.compile("#.*\r\n"), - "empty_line": re.compile(r"(\r\n) *\r\n"), - "space_before_backslash" : re.compile(r"( )+\\"), - "space_after_backslash" : re.compile(r"\\( )+"), - "start_noend_backslash" : re.compile("(\r\n\\\.*[^\\\])\r\n"), - "end_oper": re.compile("(\+|-|\*|/|/^|@|&|<|>|<=|>=|=|!) *\r\n"), - "matricial_var" : re.compile("(\r\n *[%|\$][A-ZÑ].*=.*,) *\r\n"), - "descomposition" : re.compile("^([^:]+):(.*)$"), - "var" : re.compile("^([$%][A-ZÑ][()0-9, ]*)=(.*)$"), - "after_first_tilde" : re.compile("^[^~]*~"), - "end_control" : re.compile("((\r\n)| |\t)+$"), + "control_tilde" : re.compile(u"((\r\n)| |\t)+~"), + "control_vbar" : re.compile(u"((\r\n)| |\t)+\|"), + "control_backslash" : re.compile(ur"((\r\n)| |\t)+\\"), + "valid_code" : re.compile(u"[^A-Za-z0-9ñÑ.$#%&_]"), + "special_char": re.compile(u"[#%&]"), + "no_float": re.compile(u"[^0-9.]"), + "formula" : re.compile(u".*[^0123456789\.()\+\-\*/\^abcdp ].*"), + "comment": re.compile(u"#.*\r\n"), + "empty_line": re.compile(ur"(\r\n) *\r\n"), + "space_before_backslash" : re.compile(ur"( )+\\"), + "space_after_backslash" : re.compile(ur"\\( )+"), + "start_noend_backslash" : re.compile(u"(\r\n\\\.*[^\\\])\r\n"), + "end_oper": re.compile(u"(\+|-|\*|/|/^|@|&|<|>|<=|>=|=|!) *\r\n"), + "matricial_var" : re.compile(u"(\r\n *[%|\$][A-ZÑ].*=.*,) *\r\n"), + "descomposition" : re.compile(u"^([^:]+):(.*)$"), + "var" : re.compile(u"^([$%][A-ZÑ][()0-9, ]*)=(.*)$"), + "after_first_tilde" : re.compile(u"^[^~]*~"), + "end_control" : re.compile(u"((\r\n)| |\t)+$"), } def cancel(self): @@ -134,9 +135,9 @@ record ~P """ # "control_tilde" : "((\r\n)| |\t)+~" - string = self.__pattern["control_tilde"].sub("~",string) + string = self.__pattern["control_tilde"].sub(u"~",string) # "control_vbar" : "((\r\n)| |\t)+\|" - string = self.__pattern["control_vbar"].sub("|",string) + string = self.__pattern["control_vbar"].sub(u"|",string) # "control_backslash" : r"((\r\n)| |\t)+\\" #string = self.__pattern["control_backslash"].sub(r"\\",string) return string @@ -147,31 +148,44 @@ Test if the code have invalid characters and try to erase it, if it is posible return a valid code else return a empty string. """ - if not isinstance(code, str): - print _("Invalid code, it must be a string") - return "" - # Valid chararcter: A-Z a-z 0-9 ñ Ñ . $ # % & _ + if not isinstance(code, unicode): + print _("Invalid code, it must be a unicode string") + return u"" + # Valid chararcter: A-Z a-z 0-9 ñ Ñ . $ # % & _ # "valid_code" : "[^A-Za-z0-9ñÑ.$#%&_]" - _code = self.__pattern["valid_code"].sub("", code) - if _code != code: - print utils.mapping(_("The code '$1' have invalid characters."), - (code,)) - code = _code + _ucode = self.__pattern["valid_code"].sub(u"", code) + if _ucode != code: + try: + print utils.mapping(_("The code '$1' have invalid characters."), + (code.encode("utf8"),)) + except: + print utils.mapping(_("The code '$1' have invalid characters and can not be encoded in utf8."), (code,)) + + if len(_ucode) == 0: + _normalize_code = ''.join((c for c in unicodedata.normalize('NFD', _ucode) if unicodedata.category(c) != 'Mn')) + # from http://www.leccionespracticas.com/uncategorized/eliminar-tildes-con-python-solucionado/ + _ucode = self.__pattern["valid_code"].sub(u"", _normalize_code) + if len(_ucode) == 0: + _hash_code = hashlib.sha256() + _hash_code.update(code.encode('utf-8')) + _hexdigest_code = _hash_code.hexdigest() + _ucode = self.__pattern["valid_code"].sub(u"", _hexdigest_code) + code = _ucode # the lasts characters can not be <#> or <##> # <##> -> root record in FIEFDC-3 # <#> -> chapter record in FIEFDC-3 if len(code) > 0: - while code[-1] == "#": + while code[-1] == u"#": code = code[:-1] if len(code) > 20: code = code[:20] # only one charecter # % or & - if sum([code.count(c) for c in '#%&']) > 1: + if sum([code.count(c) for c in u'#%&']) > 1: print utils.mapping(_("The code '$1' contains special "\ - "characters repeated."),(code,)) - _i = min([code.find(c) for c in '#%&']) + "characters repeated."),(code.encode("utf8"),)) + _i = min([code.find(c) for c in u'#%&']) code = code[:_i+1] + \ - self.__pattern["special_char"].sub("", code[_i+1:]) + self.__pattern["special_char"].sub(u"", code[_i+1:]) return code def parseDate(self, date): @@ -187,11 +201,11 @@ or None if the date format is invalid """ # All characters must be numbers, len <= 8 and not empty string - if not date.isdigit() or len(date) > 8 or date == "": + if not date.isdigit() or len(date) > 8 or date == u"": return None else: if len(date)%2 == 1: # uneven len: add a leading 0 - date = "0" + date + date = u"0" + date if len(date) == 8: _d = int(date[:2]) _m = int(date[2:4]) @@ -307,66 +321,66 @@ # TODO: ~P. Registro tipo Descripción Paramétrica. # TODO: ~O. Registro tipo Relación Comercial. # TODO: test records - _field_list = record.split("|") + _field_list = record.split(u"|") self._record_number = self._record_number +1 _budget = self.__budget - if _field_list[0] == "V": + if _field_list[0] == u"V": self._record_V_number += 1 self._parseV(_field_list) - elif _field_list[0] == "C": + elif _field_list[0] == u"C": self._record_C_number += 1 self._parseC(_field_list) - elif _field_list[0] == "D": + elif _field_list[0] == u"D": self._record_D_number += 1 self._parseDY(_field_list) - elif _field_list[0] == "Y": + elif _field_list[0] == u"Y": self._record_Y_number += 1 self._parseDY(_field_list) - elif _field_list[0] == "M": + elif _field_list[0] == u"M": self._record_M_number += 1 self._parseMN(_field_list) - elif _field_list[0] == "N": + elif _field_list[0] == u"N": self._record_N_number += 1 self._parseMN(_field_list) - elif _field_list[0] == "T": + elif _field_list[0] == u"T": self._record_T_number += 1 self._parseT(_field_list) - elif _field_list[0] == "K": + elif _field_list[0] == u"K": self._record_K_number += 1 self._parseK(_field_list) - elif _field_list[0] == "W": + elif _field_list[0] == u"W": self._record_W_number += 1 self._parseW(_field_list) - elif _field_list[0] == "L": + elif _field_list[0] == u"L": self._record_L_number += 1 self._parseL(_field_list) - elif _field_list[0] == "Q": + elif _field_list[0] == u"Q": self._record_Q_number += 1 self._parseQ(_field_list) - elif _field_list[0] == "J": + elif _field_list[0] == u"J": self._record_J_number += 1 self._parseJ(_field_list) - elif _field_list[0] == "G": + elif _field_list[0] == u"G": self._record_G_number += 1 self._parseG(_field_list) - elif _field_list[0] == "E": + elif _field_list[0] == u"E": self._record_E_number += 1 self._parseE(_field_list) elif _field_list[0] == "O": self._record_O_number += 1 - elif _field_list[0] == "P": + elif _field_list[0] == u"P": self._record_P_number += 1 self._parseP(_field_list) - elif _field_list[0] == "X": + elif _field_list[0] == u"X": self._record_X_number += 1 self._parseX(_field_list) - elif _field_list[0] == "B": + elif _field_list[0] == u"B": self._record_B_number += 1 self._parseB(_field_list) - elif _field_list[0] == "F": + elif _field_list[0] == u"F": self._record_F_number += 1 self._parseF(_field_list) - elif _field_list[0] == "A": + elif _field_list[0] == u"A": self._record_A_number += 1 self._parseA(_field_list) else: @@ -401,7 +415,7 @@ # If there are no sufficient fields, the fields are added # with empty value:"" else: - field_list = field_list + [""]*(10-len(field_list)) + field_list = field_list + [u""]*(10-len(field_list)) # control character are erased: end of line, tab, space # only leading and trailing whitespace in owner, generator, comment # _____Fields_____ @@ -414,42 +428,45 @@ _header_title = field_list[4].strip() _header_title = self.delete_control(_header_title) _character_set = self.delete_control_space(field_list[5]) - _comment = field_list[6].strip("\t \n\r") + _comment = field_list[6].strip(u"\t \n\r") _data_type = self.delete_control_space(field_list[7]) _number_certificate = self.delete_control_space(field_list[8]) __date_certificate = self.delete_control_space(field_list[9]) # _____Owner_____ self.__budget.setOwner(_owner) # _____Version-Date_____ - _version_date = _version_date.split("\\") + _version_date = _version_date.split(u"\\") _file_format = _version_date[0] if _file_format in self.__format_list: self.__file_format = _file_format - print _("FIEBDC format: %s" % _file_format) + print utils.mapping(_("FIEBDC format: $1"),(_file_format,)) + if len(_version_date) > 1: _date = _version_date[1] - if _date != "": + if _date != u"": _parsed_date = self.parseDate(_date) if _parsed_date is not None: self.__budget.setDate(_parsed_date) # _____Generator_____ # ignored field - print _("FIEBDC file generated by %s" % _generator) + print utils.mapping(_("FIEBDC file generated by $1"),(_generator,)) # _____Header_Title_____ - _header_title = _header_title.split("\\") + _header_title = _header_title.split(u"\\") _header_title = [_title.strip() for _title in _header_title] _header = _header_title.pop(0) + _header = [_item.encode("utf8") for _item in _header] _title = [ ] for _title_index in _header_title: - if _title_index != "": + if _title_index != u"": _title.append(_title_index) - if _header != "": - self.__budget.setTitleList([ _header, _title ]) + _title = [_item.encode("utf8") for _item in _title] + if _header != u"": + self.__budget.setTitleList([ _header, _title]) # _____Characters_set_____ # field parsed in readFile method # _____Comment_____ - if _comment != "": - self.__budget.setComment(_comment) + if _comment != u"": + self.__budget.setComment(_comment.encode("utf8")) # _____Data type_____ # 1 -> Base data. # 2 -> Budget. @@ -508,16 +525,16 @@ _field1 = self.delete_control_space(field_list[1]) _field2 = self.delete_control_space(field_list[2]) # _____Field 1_____ - if len(_field1) > 0 and _field1[-1] == "\\": + if len(_field1) > 0 and _field1[-1] == u"\\": _field1 = _field1[:-1] # if there are a \ character at the end it must be erased - _percentages = _field1.split("\\") + _percentages = _field1.split(u"\\") if len(_percentages) > 5: _percentages = _percentages[:5] # If there are no sufficient subfields, the subfields are added # with empty value:"" else: - _percentages = _percentages + [""]*(5-len(_percentages)) + _percentages = _percentages + [u""]*(5-len(_percentages)) _percentage_titles = [ "CI", "GG", "BI", "BAJA", "IVA" ] _percentage_dict = {} for _percentage_index in range(len(_percentages)): @@ -534,12 +551,12 @@ _title_num = len(self.__budget.getTitleList()[1]) if _title_num == 0: _title_num = 1 # If the field 2 is empty, the field 0 is readed - if _field2 == "": + if _field2 == u"": # _____Field 0_____ - if _field0[-1] == "\\": + if _field0[-1] == u"\\": _field0 = _field0[:-1] # if there are a \ character at the end it must be erased - _decimal_list = _field0.split("\\") + _decimal_list = _field0.split(u"\\") _decimal_index = 0 if len(_decimal_list)%9 != 0: # if it is not multiple of 9, empty subfield are added @@ -740,7 +757,7 @@ # If there are no sufficient fields, the fields are added # with empty value:"" else: - field_list = field_list + [""]*(7-len(field_list)) + field_list = field_list + [u""]*(7-len(field_list)) # control character are erased: en of line, tab, space # _____Fields_____ _record_type = field_list[0] @@ -751,13 +768,13 @@ _dates = self.delete_control_space(field_list[5]) _type = self.delete_control_space(field_list[6]) # _____Code_____ - _codes = _codes.split("\\") + _codes = _codes.split(u"\\") if len(_codes) > 0: # parse the hierarchy of the first code # hierarchy: 0->root, 1->Chapter/subchapter, 2->other - if len(_codes[0]) > 2 and _codes[0][-2:] == "##": + if len(_codes[0]) > 2 and _codes[0][-2:] == u"##": _hierarchy = 0 - elif len(_codes[0]) > 1 and _codes[0][-1:] == "#": + elif len(_codes[0]) > 1 and _codes[0][-1:] == u"#": _hierarchy = 1 else: _hierarchy = 2 @@ -766,12 +783,12 @@ # maximun len 20 characters _codes = [self.validateCode(_code) for _code in _codes] # empty codes are ignored - while "" in _codes: - _codes.remove("") + while u"" in _codes: + _codes.remove(u"") if len(_codes) > 0: #TODO: test this _code = _codes[0] - _synonyms = _codes + _synonyms = [synonym.encode("utf8") for synonym in _codes] else: print _("Record C without a valid code") return @@ -781,12 +798,12 @@ # nothing to do # _____Price_____ and _____Dates_____ # last \ is erased - if len(_dates) > 0 and _dates[-1] == "\\": + if len(_dates) > 0 and _dates[-1] == u"\\": _dates = _dates[:-1] - if len(_prices) > 0 and _prices[-1] == "\\": + if len(_prices) > 0 and _prices[-1] == u"\\": _prices = _prices[:-1] - _dates = _dates.split("\\") - _prices = _prices.split("\\") + _dates = _dates.split(u"\\") + _prices = _prices.split(u"\\") # number of prices = number of titles in "V" line # if there are no sufficient prices it takes the last price defined _title_num = len(self.__budget.getTitleList()[1]) @@ -842,59 +859,60 @@ # 2 -> None,Q,% # 3 -> None,MC,MCr,MM,MS,ME,MCu,Mal,ML,M if _hierarchy == 0: - if _type == "OB": + if _type == u"OB": _subtype = _type _type = 0 - elif _type == "0" or _type == "": - _subtype = "" + elif _type == u"0" or _type == u"": + _subtype = u"" _type = 0 else: print utils.mapping(_("Incorrect type ($1) in the code $2"), - (str(_type), _code)) + (_type.encode("utf8"), _code.encode("utf8"))) _type = 0 - _subtype = "" + _subtype = u"" elif _hierarchy == 1: - if _type == "PU": + if _type == u"PU": _subtype = _type _type = 0 - elif _type == "0" or _type == "": - _subtype = "" + elif _type == u"0" or _type == u"": + _subtype = u"" _type = 0 else: print utils.mapping(_("Incorrect type ($1) in the code $2"), - (str(_type), _code)) + (_type.encode("utf8"), _code.encode("utf8"))) _type = 0 - _subtype = "" + _subtype = u"" else: - if _type == "EA" or _type == "EU" or _type == "EC" or \ - _type == "EF" or _type == "PA": + if _type == u"EA" or _type == u"EU" or _type == u"EC" or \ + _type == u"EF" or _type == u"PA": _subtype = _type _type = 0 - elif _type == "H": + elif _type == u"H": _subtype = _type _type = 1 - elif _type == "Q" or _type == "%": + elif _type == u"Q" or _type == u"%": _subtype = _type _type = 2 - elif _type == "MC" or _type == "MCr" or _type == "MM" or \ - _type == "MS" or _type == "ME" or _type == "MCu" or \ - _type == "Mal" or _type == "ML" or _type == "M": + elif _type == u"MC" or _type == u"MCr" or _type == u"MM" or \ + _type == u"MS" or _type == u"ME" or _type == u"MCu" or \ + _type == u"Mal" or _type == u"ML" or _type == u"M": _subtype = _type _type = 3 - elif _type == "0" or _type == "1" or _type == "2" or \ - _type == "3": - _subtype = "" + elif _type == u"0" or _type == u"1" or _type == u"2" or \ + _type == u"3": + _subtype = u"" _type = int(_type) - elif _type == "": - _subtype = "" + elif _type == u"": + _subtype = u"" _type = 0 else: print utils.mapping(_("Incorrect type ($1) in the code $2"), - (str(_type), _code)) + (_type.encode("utf8"), _code.encode("utf8"))) _type = 0 - _subtype = "" - self.__budget.setRecord(_code, _synonyms, _hierarchy, - _unit, _summary, _prices, _dates, _type, _subtype) + _subtype = u"" + self.__budget.setRecord(_code.encode("utf8"), _synonyms, _hierarchy, + _unit.encode("utf8"), _summary.encode("utf8"), + _prices, _dates, _type, _subtype.encode("utf8")) self.num_valid_record = self.num_valid_record + 1 def _parseDY(self, field_list): @@ -913,7 +931,7 @@ # If there are no sufficient fields, the fields are added # with empty value:"" else: - field_list = field_list + [""]*(3-len(field_list)) + field_list = field_list + [u""]*(3-len(field_list)) # control character are erased: end of line, tab, space # _____Fields_____ _record_type = field_list[0] @@ -922,10 +940,10 @@ # _____Code_____ # "#" and "##" characters at the end of the code are erased # invalid characters are also erased - _code = self.validateCode(_code) + _code = self.validateCode(_code) # _____children_____ # TODO: test the number of decimals in factor an yield values - _children = _children.split( "\\" ) + _children = _children.split(u"\\") _children_list = [ ] _child_index = 0 while _child_index < len(_children)-3: @@ -936,7 +954,7 @@ # _____child_code_____ _child_code = self.validateCode(_child_code) # _____factor_____ - if _factor != "": + if _factor != u"": try: _factor = float(_factor) except ValueError: @@ -944,10 +962,10 @@ "descomposition of the record $1, the factor "\ "of the child $2 must be a float number and "\ "can not be $3, seted default value 1.0"), - (_code, _child_code, _factor)) + (_code.encode("utf8"), _child_code.encode("utf8"), _factor.encode("utf8"))) _factor = 1.0 #____yield___ - if _yield != "": + if _yield != u"": try: _yield = float(_yield) except ValueError: @@ -955,15 +973,15 @@ "descomposition of the record $1, the yield of "\ "the child $2, must be a float number and can"\ "not be $3, seted default value 1.0"), - (_code, _child_code, _factor)) + (_code.encode("utf8"), _child_code.encode("utf8"), _factor.encode("utf8"))) _yield = 1.0 - if _child_code != "" and _code != "": + if _child_code != u"" and _code != u"": _children_list.append([_child_code, _factor, _yield ]) - if _record_type == "D": + if _record_type == u"D": _position = _child_index / 3 else: #_record_type == "Y" _position = -1 - self.__budget.setTree(_code, _child_code, _position, _factor, + self.__budget.setTree(_code.encode("utf8"), _child_code.encode("utf8"), _position, _factor, _yield, "", "", "", "") _child_index = _child_index + 3 self.num_valid_record = self.num_valid_record +1 @@ -993,7 +1011,7 @@ # invalid characters are also erased _code = self.validateCode(_code) # _____Text_____ - self.__budget.setText(_code, _text) + self.__budget.setText(_code.encode("utf8"), _text.encode("utf8")) self.num_valid_record = self.num_valid_record + 1 def _parseMN(self, field_list): @@ -1007,7 +1025,6 @@ 4- {Type\Comment\Unit\Length\Width\Height\} 5- [Label] """ - # _____Number of fields_____ # Any INFORMATION after last field separator is ignored # The record must have 6 fields @@ -1016,7 +1033,7 @@ # If there are no sufficient fields, the fields are added # with empty value:"" else: - field_list = field_list + [""]*(6-len(field_list)) + field_list = field_list + [u""]*(6-len(field_list)) # control character are erased: end of line, tab, space # _____Fields_____ _record_type = field_list[0] @@ -1026,59 +1043,69 @@ _lines = self.delete_control(field_list[4]) _label = self.delete_control_space(field_list[5]) # _____Codes_____ - _code_list = _codes.split( "\\" ) + _code_list = _codes.split(u"\\") # "#" and "##" characters at the end of the code are erased # invalid characters are also erased if len(_code_list) == 2: _parent_code = self.validateCode(_code_list[0]) - if _parent_code == "": + if _parent_code == u"": _parent_code = None + else: + _parent_code = _parent_code.encode("utf8") _child_code = self.validateCode(_code_list[1]) elif len(_code_list) == 1: _child_code = self.validateCode(_code_list[0]) _parent_code = None else: print utils.mapping(_("Invalid codes in $1 record, codes $2"), - (_record_type, _codes)) + (_record_type.encode("utf8"), _codes.encode("utf8"))) return - if _child_code == "": + if _child_code == u"": print utils.mapping(_("Empty child code in $1 record, codes: "\ - "$2"), (_record_type, _codes)) + "$2"), (_record_type.encode("utf8"), _codes.encode("utf8"))) return + if _parent_code == None: + # Empty parent code. No-estructured measures. + pass + # _____Path_____ - # TODO: path=0, no-estructured measures - _path_list = _path.split( "\\" ) + _path_list = _path.split( u"\\" ) if len(_path_list) > 0: - while _path_list[-1] == "": + while len(_path_list) > 0 and _path_list[-1] == u"": _path_list = _path_list[:-1] - _path = _path_list[-1] + if len(_path_list) == 0: + # Empty path. No-estructured measures. Path fixed to -2 + _path = -2 + else: + _path = _path_list[-1] try: _path = int(_path) except ValueError: print utils.mapping(_("Invalid path in $1 record, "\ - "codes $2"), (_record_type, _codes)) + "codes $2"), (_record_type.encode("utf8"), _codes.encode("utf8"))) return if _path > 0: _path -= 1 else: - _path = 0 + _path = -2 # _____Total_____ try: _total = float(_total) except ValueError: print utils.mapping(_("Invalid Total Measure value in $1 "\ - "record, codes $2"), (_record_type, _codes)) - return + "record, codes $2. Total fixed to 0."), + (_record_type.encode("utf8"), _codes.encode("utf8"))) + _total = 0 # _____Measure lines_____ - _lines = _lines.split( "\\" ) + _lines = _lines.split(u"\\") _line_index = 0 _line_list = [ ] while _line_index < len(_lines)-6: _linetype = _lines[_line_index] - if _linetype == "": + if _linetype == u"": _linetype = 0 - elif _linetype == "1" or _linetype == "2" or \ - _linetype == "3": + elif _linetype == u"1" or _linetype == u"2" or \ + _linetype == u"3": _linetype = int(_linetype) else: _linetype = 0 @@ -1088,31 +1115,38 @@ if self.__pattern["formula"].match(_comment): print utils.mapping(_("The comment is not a formula or "\ "its have invalid characters, in the $1 record, "\ - "codes $2"), (_record_type, _codes)) + "codes $2"), (_record_type.encode("utf8"), _codes.encode("utf8"))) return else: - _formula = _comment + _formula = _comment.encode("utf8") _comment = "" else: _formula = "" + _comment = _comment.encode("utf8") _units = _lines[_line_index + 2] + _units = self.__pattern["no_float"].sub(u"", _units) _length = _lines[_line_index + 3] + _length = self.__pattern["no_float"].sub(u"", _length) _width = _lines[_line_index + 4] + _width = self.__pattern["no_float"].sub(u"", _width) _height = _lines[_line_index + 5] + _height = self.__pattern["no_float"].sub(u"", _height) + try: - if _units != "": _units = float(_units) - if _length != "": _length = float(_length) - if _width != "": _width = float(_width) - if _height != "": _height = float(_height) + if _units != u"": + _units = float(_units) + if _length != u"": _length = float(_length) + if _width != u"": _width = float(_width) + if _height != u"": _height = float(_height) except ValueError: - print utils.mapping("The measure values are not float "\ - "numbers, code $1", (_codes,)) + print utils.mapping(_("The measure values are not float "\ + "numbers, code $1"), (_codes.encode("utf8"),)) return _line_list.append([_linetype, _comment, _units, _length, _width, _height, _formula]) _line_index = _line_index + 6 - self.__budget.setTree(_parent_code, _child_code, _path, "", "", - _total, _line_list, _label, _record_type) + self.__budget.setTree(_parent_code, _child_code.encode("utf8"), _path, "", "", + _total, _line_list, _label.encode("utf8"), _record_type.encode("utf8")) self.num_valid_record = self.num_valid_record + 1 def _parseW(self, field_list): @@ -1134,9 +1168,9 @@ # _____Fields_____ _code_fields = field_list[0] # last \ is erased - if len(_code_fields) and _code_fields[-1] == "\\": + if len(_code_fields) and _code_fields[-1] == u"\\": _code_fields = _code_fields[:-1] - _code_fields = _code_fields.split("\\") + _code_fields = _code_fields.split(u"\\") _field_dict = {} _field_index = 0 while _field_index < len(_code_fields)-1: @@ -1148,8 +1182,8 @@ #"control": "[\t \n\r]" _field_code = self.delete_control_space(_field_code) # _____section_title_____ - if _field_code != "": - _field_dict[_field_code] = _field_title + if _field_code != u"": + _field_dict[_field_code.encode("utf8")] = _field_title.encode("utf8") _field_index = _field_index + 2 self.__budget.setSheetFields(_field_dict) self.num_valid_record = self.num_valid_record +1 @@ -1173,7 +1207,7 @@ if len(field_list) < 3: return _code = field_list[1] - if _code == "": + if _code == u"": # A: Section Titles # Any INFORMATION after last field separator is ignored # The record must have 3 fields @@ -1183,9 +1217,9 @@ # _____Fields_____ _section_codes = field_list[1] # last \ is erased - if len(_section_codes) and _section_codes[-1] == "\\": + if len(_section_codes) and _section_codes[-1] == u"\\": _section_codes = _section_codes[:-1] - _section_codes = _section_codes.split("\\") + _section_codes = _section_codes.split(u"\\") _section_dict = {} _section_index = 0 while _section_index < len(_section_codes)-1: @@ -1198,8 +1232,8 @@ _section_code = self.delete_control_space(_section_code) # _____section_title_____ _section_title = self.delete_control_space(_section_title) - if _section_code != "": - _section_dict[_section_code] = _section_title + if _section_code != u"": + _section_dict[_section_code.encode("utf8")] = _section_title.encode("utf8") _section_index = _section_index + 2 self.__budget.setSheetSections(_section_dict) self.num_valid_record = self.num_valid_record +1 @@ -1217,15 +1251,15 @@ # invalid characters are also erased _record_code = self.validateCode(_record_code) _scodes_text = field_list[1] - if _scodes_text == "": + if _scodes_text == u"": # TODO: rtf and html files - print "Html and rtf files not implemented in ~L record" + print "Html and rtf files not yet implemented in ~L record" else: # _____Section-code_Section-text_____ # last \ is erased - if len(_scodes_text) and _scodes_text[-1] == "\\": + if len(_scodes_text) and _scodes_text[-1] == u"\\": _scodes_text = _scodes_text[:-1] - _scodes_text = _scodes_text.split("\\") + _scodes_text = _scodes_text.split(u"\\") _paragraph_dict = {} _section_dict = {} _section_index = 0 @@ -1237,14 +1271,14 @@ # _____section_code_____ _section_code = self.delete_control_space(_section_code) # _____section_text_____ - if _section_code != "" and _section_text != "": + if _section_code != u"" and _section_text != u"": #-# paragraph #-# - _paragraph_code = _record_code + _section_code + "*" - _paragraph_dict[ _paragraph_code ] = _section_text - _section_dict[_section_code] = _paragraph_code + _paragraph_code = _record_code + _section_code + u"*" + _paragraph_dict[ _paragraph_code.encode("utf8") ] = _section_text.encode("utf8") + _section_dict[_section_code.encode("utf8")] = _paragraph_code.encode("utf8") _section_index = _section_index + 2 self.__budget.setSheetParagraphs(_paragraph_dict) - self.__budget.setSheetRecord(_record_code, "*", _section_dict) + self.__budget.setSheetRecord(_record_code.encode("utf8"), "*", _section_dict) self.num_valid_record = self.num_valid_record +1 def _parseQ(self, field_list): @@ -1273,9 +1307,9 @@ _record_code = self.validateCode(_record_code) _scodes_pkey = field_list[1] # last \ is erased - if len(_scodes_pkey) and _scodes_pkey[-1] == "\\": + if len(_scodes_pkey) and _scodes_pkey[-1] == u"\\": _scodes_pkey = _scodes_pkey[:-1] - _scodes_pkey = _scodes_pkey.split("\\") + _scodes_pkey = _scodes_pkey.split(u"\\") _field_dict = {} _section_index = 0 while _section_index < len(_scodes_pkey) -1: @@ -1291,21 +1325,21 @@ # _____Fields keys_____ _field_keys = self.delete_control_space(_field_keys) # last ; is erased - if len(_field_keys) and _field_keys[-1] == ";": + if len(_field_keys) and _field_keys[-1] == u";": _field_keys = _field_keys[:-1] - _field_keys_list = _scodes_pkey.split(";") + _field_keys_list = _scodes_pkey.split(u";") for _field_key in _field_keys_list: - if _field_key != "" and _section_code != "" and \ - _paragraph_key != "": + if _field_key != u"" and _section_code != u"" and \ + _paragraph_key != u"": if _field_key in _field_dict: _section_dict = _field_dict[_field_key] else: _section_dict = {} _field_dict[_field_key] = _section_dict - _section_dict[_section_code] = _paragraph_code + _section_dict[_section_code.encode("utf8")] = _paragraph_code.encode("utf8") _section_index = _section_index + 3 for _field, _section_dict in _field_dict.iteritems(): - self.__budget.setSheetRecord(_record_code, _field, _section_dict) + self.__budget.setSheetRecord(_record_code.encode("utf8"), _field.encode("utf8"), _section_dict) self.num_valid_record = self.num_valid_record +1 def _parseJ(self, field_list): @@ -1332,11 +1366,11 @@ _paragraph_code = self.delete_control_space(field_list[0]) # _____Paragraph text_____ _paragraph_text = field_list[1] - if _paragraph_text == "": + if _paragraph_text == u"": # TODO: rtf and html files - print "Html and rtf files not implemented in ~J record" + print "Html and rtf files not yet implemented in ~J record" else: - self.__budget.setSheetParagraph(paragraph_code, paragraph_text) + self.__budget.setSheetParagraph(paragraph_code.encode("utf8"), paragraph_text.encode("utf8")) self.num_valid_record = self.num_valid_record +1 def _parseG(self, field_list): @@ -1366,17 +1400,18 @@ _grafic_files = self.delete_control(field_list[1]) # _____subfields_____ # last \ is erased - if len(_grafic_files) and _grafic_files[-1] == "\\": + if len(_grafic_files) and _grafic_files[-1] == u"\\": _grafic_files = _grafic_files[:-1] - _grafic_file_list = _grafic_files.split("\\") + _grafic_file_list = _grafic_files.split(u"\\") _tested_grafic_file_list = [] for _grafic_file in _grafic_file_list: + _str_grafic_file = _grafic_file.encode("utf8") _path = os.path.dirname(self.__filename) - _grafic_file_path = os.path.join(_path, _grafic_file) + _grafic_file_path = os.path.join(_path, _str_grafic_file) if os.path.exists(_grafic_file_path): _tested_grafic_file_list.append(_grafic_file_path) else: - _name_ext = os.path.splitext(_grafic_file) + _name_ext = os.path.splitext(_str_grafic_file) _grafic_file_name = _name_ext[0] _grafic_file_ext = _name_ext[1] _grafic_file_name_u = _grafic_file_name.upper() @@ -1404,7 +1439,7 @@ (_grafic_file_path,)) if len(_grafic_file_list) > 0: for _grafic_file in _tested_grafic_file_list: - self.__budget.addFile(_record_code, _grafic_file, "img", "") + self.__budget.addFile(_record_code.encode("utf8"), _grafic_file, "img", "") self.num_valid_record = self.num_valid_record +1 def _parseE(self, field_list): @@ -1429,11 +1464,11 @@ # If there are no sufficient fields, the fields are added # with empty value:"" else: - field_list = field_list[1:] + [""]*(6-len(field_list)) + field_list = field_list[1:] + [u""]*(6-len(field_list)) # _____Fields_____ # _____company Code_____ _company_code = self.delete_control_space(field_list[0]) - if _company_code == "": + if _company_code == u"": return # _____Summary_____ @@ -1444,15 +1479,15 @@ _local_offices = self.delete_control(field_list[3]) # _____subfields of local_offices_____ # last \ is erased - if len(_local_offices) and _local_offices[-1] == "\\": + if len(_local_offices) and _local_offices[-1] == u"\\": _local_offices = _local_offices[:-1] - _local_offices_list = _local_offices.split("\\") + _local_offices_list = _local_offices.split(u"\\") # If there are no sufficent subfields, the subfields are added # whith empty value _nsub = len(_local_offices_list) % 10 if _nsub != 0: _local_offices_list = _local_offices_list + \ - [""]*(10-len(field_list)) + [u""]*(10-len(field_list)) _local_offices = [] _local_offices_index = 0 while _local_offices_index < len(_local_offices_list)-9: @@ -1466,39 +1501,44 @@ _country = _local_offices_list[_local_offices_index+6] _phone = _local_offices_list[_local_offices_index+7] # last ; is erased - if len(_phone) and _phone[-1] == ";": + if len(_phone) and _phone[-1] == u";": _phone = _phone[:-1] - _phone_list = _phone.split(";") + _phone_list = _phone.split(u";") + _phone_list = [_phone.encode("utf8") for _phone in _phone_list] _fax = _local_offices_list[_local_offices_index+8] # last ; is erased - if len(_fax) and _fax[-1] == ";": + if len(_fax) and _fax[-1] == u";": _fax = _fax[:-1] - _fax_list = _fax.split(";") + _fax_list = _fax.split(u";") + _fax_list = [_fax.encode("utf8") for _fax in _fax_list] _contact_person = _local_offices_list[_local_offices_index+9] - if _type != "" or _subname != "" or _address != "" or \ - _postal_code != "" or _town != "" or _province != "" or \ - _country != "" or _phone != "" or _fax != "" or \ - _contact_person != "": - _local_offices.append([_type, _subname, _address, - _postal_code, _town, _province, - _country, _phone_list, _fax_list, - _contact_person]) + if _type != u"" or _subname != u"" or _address != u"" or \ + _postal_code != u"" or _town != u"" or _province != u"" or \ + _country != u"" or _phone != u"" or _fax != u"" or \ + _contact_person != u"": + _local_offices.append([_type.encode("utf8"), _subname.encode("utf8"), + _address.encode("utf8"), _postal_code.encode("utf8"), + _town.encode("utf8"), _province.encode("utf8"), + _country.encode("utf8"), _phone_list, + _fax_list, _contact_person.encode("utf8")]) _local_offices_index = _local_offices_index + 10 # _____cif web email_____ _c_w_e = self.delete_control_space(field_list[4]) # last \ is erased - if len(_c_w_e) and _c_w_e[-1] == "\\": + if len(_c_w_e) and _c_w_e[-1] == u"\\": _c_w_e = _c_w_e[:-1] - _c_w_e_list = _c_w_e.split("\\") + _c_w_e_list = _c_w_e.split(u"\\") # _____subfields_____ # If there are no sufficient fields, the fields are added # with empty value:"" - _c_w_e_list = _c_w_e_list + [""]*(3-len(_c_w_e_list)) + _c_w_e_list = _c_w_e_list + [u""]*(3-len(_c_w_e_list)) _cif = _c_w_e_list[0] _web = _c_w_e_list[1] _email = _c_w_e_list[2] - self.__budget.setCompany(_company_code, _sumamary, _name, - _local_offices, _cif, _web, _email) + self.__budget.setCompany(_company_code.encode("utf8"), + _sumamary.encode("utf8"), _name.encode("utf8"), + _local_offices, _cif.encode("utf8"), + _web.encode("utf8"), _email.encode("utf8")) self.num_valid_record = self.num_valid_record +1 def _parseX(self, field_list): @@ -1527,33 +1567,33 @@ # "control": "[\t \n\r]" _field_1 = self.delete_control_space(field_list[0]) _field_2 = self.delete_control_space(field_list[1]) - if _field_1 == "": + if _field_1 == u"": # A) - _field_2_list = _field_2.split("\\") + _field_2_list = _field_2.split(u"\\") _ti_index = 0 while _ti_index < len(_field_2_list)-3: _ti_code = _field_2_list[_ti_index] _ti_description = _field_2_list[_ti_index+1] _ti_unit = _field_2_list[_ti_index+2] if _ti_code != "": - self.__budget.addTecInfo(_ti_code, _ti_description, - _ti_unit) + self.__budget.addTecInfo(_ti_code.encode("utf8"), _ti_description.encode("utf8"), + _ti_unit.encode("utf8")) _ti_index = _ti_index + 3 else: # B) # "#" and "##" characters at the end of the code are erased # invalid characters are also erased _record_code = self.validateCode(_field_1) - _field_2_list = _field_2.split("\\") + _field_2_list = _field_2.split(u"\\") _ti_index = 0 _ti_dict = {} while _ti_index < len(_field_2_list)-2: _ti_code = _field_2_list[_ti_index] _ti_value = _field_2_list[_ti_index+1] - if _ti_code != "" and _ty_value != "": - _ti_dict[_ti_code] = _ty_value + if _ti_code != u"" and _ty_value != u"": + _ti_dict[_ti_code.encode("utf8")] = _ty_value.encode("utf8") _ti_index = _ti_index + 2 - self.__budget.setTecnicalInformation(_record_code, _ti_dict) + self.__budget.setTecnicalInformation(_record_code.encode("utf8"), _ti_dict) self.num_valid_record = self.num_valid_record +1 def _parseF(self, field_list): @@ -1584,16 +1624,16 @@ _files = self.delete_control(field_list[1]) # _____subfields_____ # last \ is erased - if len(_files) and _files[-1] == "\\": + if len(_files) and _files[-1] == u"\\": _files = _files[:-1] - _files_list = _files.split("\\") + _files_list = _files.split(u"\\") # adding empty subfiels if necesary if len(_files_list)%3 > 0: - _files_list.extend[""]*(3 - len(_files_list)%3) + _files_list.extend[u""]*(3 - len(_files_list)%3) _file_index = 0 _tested_files_list = [] while _file_index < len(_files_list)-3: - _type = _files_list[_file_index].replace(" ","") + _type = _files_list[_file_index].replace(u" ",u"") ## _types = { ## "0": _("others"), ## "1": _("características técnicas y de fabricación"), @@ -1609,22 +1649,22 @@ ## "empresa"), ## "11": _("certificado/s de empresa"), ## "12": _("obras realizadas")} - _types = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", - "11", "12"] + _types = [u"0", u"1", u"2", u"3", u"4", u"5", u"6", u"7", u"8", u"9", u"10", + u"11", u"12"] if not _type in _types: - _type = "0" + _type = u"0" _filenames = _files_list[_file_index + 1] _description = _files_list[_file_index + 2] _file_index += 3 - if len(_filenames) and _filenames[-1] == ";": + if len(_filenames) and _filenames[-1] == u";": _files = _files[:-1] - _filenames_list = _files.split(";") + _filenames_list = _files.split(u";") _path = os.path.dirname(self.__filename) for _filename in filenames_list: - _file_path = os.path.join(_path, _filename) + _file_path = os.path.join(_path, _filename.encode("utf8")) if os.path.exists(_file_path): - _tested_files_list.append([_file_path, _type, - _description]) + _tested_files_list.append([_file_path, _type.encode("utf8"), + _description.encode("utf8")]) else: _name_ext = os.path.splitext(_filename) _file_name = _name_ext[0] @@ -1642,23 +1682,23 @@ _file_path_lu = os.path.join(_path, _lu) _file_path_ll = os.path.join(_path, _ll) if os.path.exists(_file_path_uu): - _tested_files_list.append([_file_path_uu, _type, - _description]) + _tested_files_list.append([_file_path_uu, _type.encode("utf8"), + _description.encode("utf8")]) elif os.path.exists(_grafic_file_path_ul): - _tested_files_list.append([_file_path_ul, _type, - _description]) + _tested_files_list.append([_file_path_ul, _type.encode("utf8"), + _description.encode("utf8")]) elif os.path.exists(_grafic_file_path_lu): - _tested_files_list.append([_file_path_lu, _type, - _description]) + _tested_files_list.append([_file_path_lu, _type.encode("utf8"), + _description.encode("utf8")]) elif os.path.exists(_grafic_file_path_ll): - _tested_files_list.append([_file_path_ll, _type, - _description]) + _tested_files_list.append([_file_path_ll, _type.encode("utf8"), + _description.encode("utf8")]) else: print utils.mapping(_("The file $1 do not exist"), (_file_path,)) if len(_tested_files_list) > 0: for _file in _tested_file_list: - self.__budget.addFile(_record_code, _file[0], file[1], file[2]) + self.__budget.addFile(_record_code.encode("utf8"), _file[0], file[1], file[2]) self.num_valid_record = self.num_valid_record +1 def _parseB(self, field_list): @@ -1718,13 +1758,13 @@ # _____Labels_____ # last \ is erased # TODO: change the others parsers to this: - while len(_labels) > 0 and _labels[-1] == "\\": + while len(_labels) > 0 and _labels[-1] == u"\\": _labels = _labels[:-1] # replace "_" to " " - _labels = _labels.replace("_"," ") - _label_list = _labels.split("\\") + _labels = _labels.replace(u"_",u" ") + _label_list = _labels.split(u"\\") for _label in _label_list: - self.__budget.addLabel(_code, _label) + self.__budget.addLabel(_code.encode("utf8"), _label.encode("utf8")) self.num_valid_record = self.num_valid_record + 1 def _parseP(self, field_list): @@ -1745,13 +1785,13 @@ if len(field_list) > 2: # delete control caracters and spaces _family_code = self.delete_control_space(field_list[1]) - if _family_code == "": # A)Global paremetric record + if _family_code == u"": # A)Global paremetric record # The record must have 3 or 4 fields if len(field_list) > 4: field_list = field_list[0:4] field_list = field_list[1:] if len(field_list) == 2: - field_list.append("") + field_list.append(u"") if len(field_list) != 3: return else: # B)Family Parametric record @@ -1766,16 +1806,16 @@ return # _____Description_____ _description = field_list[1] - if _description == "": + if _description == u"": print _("PyArq hates parametric DLLs") return # Adding last end of line - _description = _description + "\r\n" + _description = _description + u"\r\n" # Delete comments # "comment" : "#.*\r\n" - _description = self.__pattern["comment"].sub("\r\n",_description) + _description = self.__pattern["comment"].sub(u"\r\n",_description) # Tabs to spaces - _description = _description.replace("\t"," ") + _description = _description.replace(u"\t",u" ") # Delete empty lines # "empty_line": r"(\r\n) *\r\n" while self.__pattern["empty_line"].search(_description): @@ -1784,12 +1824,12 @@ # Delete spaces before and after / # "space_before_backslash" : r"( )+\\" _description = self.__pattern["space_before_backslash"].sub( - r"\\",_description) + ur"\\",_description) # "space_after_backslash" : r"\\( )+" _description = self.__pattern["space_after_backslash"].sub( - r"\\",_description) + ur"\\",_description) # Join lines that start but not end with / - _description = "\r\n" + _description # add leading end of line + _description = u"\r\n" + _description # add leading end of line # "start_noend_backslash": "(\r\n\\\.*[^\\\])\r\n" while self.__pattern["start_noend_backslash"].search(_description): _description = self.__pattern["start_noend_backslash"].sub( @@ -1805,8 +1845,8 @@ lambda x: x.groups()[0], _description) _description = _description[2:] # remove leading end of line #_description = re.sub(r"\\( )+",r"\\",_description) - _lines = _description.split("\r\n") - _final_description = "" + _lines = _description.split(u"\r\n") + _final_description = u"" _pass_line = 0 for index in range(len(_lines)): _line = _lines[index] @@ -1814,44 +1854,44 @@ if len(_line) != 0: # Delete empty lines if _pass_line > 0: _pass_line = _pass_line -1 - _line = "" + _line = u"" elif _line.isspace(): - _line = "" - elif _line[0] != "\\": + _line = u"" + elif _line[0] != u"\\": # Delete spaces out "" delimiter - _list = _line.split('"') - _final_line = "" + _list = _line.split(u'"') + _final_line = u"" for index1 in range(len(_list)): if index1 % 2 != 0: - _parcial_line = '"' + _list[index1] + _parcial_line = u'"' + _list[index1] else: - _parcial_line = '"' + _list[index1].replace(" ","") + _parcial_line = u'"' + _list[index1].replace(u" ",u"") _final_line = _final_line + _parcial_line _line = _final_line[1:] _lines[index] = _line # parse data - if len(_line) > 2 and _line[:2] == "::": + if len(_line) > 2 and _line[:2] == u"::": # Delete spaces out " delimiter #print "__PRECIO__" + _line[2:] pass - elif len(_line) > 2 and _line[:2] == "%:": + elif len(_line) > 2 and _line[:2] == u"%:": # Delete spaces out " delimiter #print "__%AUX__" + _line[2:] pass - elif len(_line) > 3 and _line[:2] == "%%:": + elif len(_line) > 3 and _line[:2] == u"%%:": # Delete spaces out " delimiter #print "__%%AUX__" + _line[2:] pass elif self.__pattern["var"].search(_line): # Delete spaces out " delimiter #print "line =", _line - while _line.count('"') % 2 == 1 and \ + while _line.count(u'"') % 2 == 1 and \ index + _pass_line + 1 < len(_lines) -1: _line = _line + _lines[index + _pass_line + 1] _pass_line = _pass_line + 1 _search = self.__pattern["var"].search(_line) if _search is not None: - _var = _search.groups()[0] + " = " + _search.groups()[1] + _var = _search.groups()[0] + u" = " + _search.groups()[1] #print "__VAR__" + str(_var) pass else: @@ -1862,67 +1902,67 @@ #_patern = "(^[^:]*):(.*)$" _search = self.__pattern["descomposition"].search(_line) if _search is not None: - _var = _search.groups()[0] + ":" + _search.groups()[1] + _var = _search.groups()[0] + u":" + _search.groups()[1] #print "__Descomposición__" + str(_var) pass else: #print "no __Descomposición__", _line pass else: - print "Parametric: code: " + _family_code + print "Parametric: code: " + _family_code.encode("utf8") print "******* Desconocido *** : " + _line - if index-10 > 0: print "-11 :", _lines[index-11] - if index-10 > 0: print "-10 :", _lines[index-10] - if index-9 > 0: print "-9 :", _lines[index-9] - if index-8 > 0: print "-8 :", _lines[index-8] - if index-7 > 0: print "-7 :", _lines[index-7] - if index-6 > 0: print "-6 :", _lines[index-6] - if index-5 > 0: print "-5 :", _lines[index-5] - if index-4 > 0: print "-4 :", _lines[index-4] - if index-3 > 0: print "-3 :", _lines[index-3] - if index-2 > 0: print "-2 :", _lines[index-2] - if index-1 > 0: print "-1 :", _lines[index-1] + if index-10 > 0: print "-11 :", _lines[index-11].encode("utf8") + if index-10 > 0: print "-10 :", _lines[index-10].encode("utf8") + if index-9 > 0: print "-9 :", _lines[index-9].encode("utf8") + if index-8 > 0: print "-8 :", _lines[index-8].encode("utf8") + if index-7 > 0: print "-7 :", _lines[index-7].encode("utf8") + if index-6 > 0: print "-6 :", _lines[index-6].encode("utf8") + if index-5 > 0: print "-5 :", _lines[index-5].encode("utf8") + if index-4 > 0: print "-4 :", _lines[index-4].encode("utf8") + if index-3 > 0: print "-3 :", _lines[index-3].encode("utf8") + if index-2 > 0: print "-2 :", _lines[index-2].encode("utf8") + if index-1 > 0: print "-1 :", _lines[index-1].encode("utf8") print "-0 :", _lines[index-0] pass else: - _parameter_list = _line.split("\\")[1:-1] + _parameter_list = _line.split(u"\\")[1:-1] if len(_parameter_list) >= 2: - if _parameter_list[0] == "C" or \ - _parameter_list[0] == "COMENTARIO": + if _parameter_list[0] == u"C" or \ + _parameter_list[0] == u"COMENTARIO": #print "__COMENTARIO__" + _parameter_list[1] self.__budget.setParametricSelectComment( - _family_code, _parameter_list[1]) - elif _parameter_list[0] == "R" or \ - _parameter_list[0] == "RESUMEN": + _family_code.encode("utf8"), _parameter_list[1].encode("utf8")) + elif _parameter_list[0] == u"R" or \ + _parameter_list[0] == u"RESUMEN": #print "__RESUMEN__" + _parameter_list[1] - self.__budget.setParametricSummary(_family_code, - _parameter_list[1]) - elif _parameter_list[0] == "T" or \ - _parameter_list[0] == "TEXTO": + self.__budget.setParametricSummary(_family_code.encode("utf8"), + _parameter_list[1].encode("utf8")) + elif _parameter_list[0] == u"T" or \ + _parameter_list[0] == u"TEXTO": #print "__TEXTO__" + _parameter_list[1] - self.__budget.setParametricText(_family_code, - _parameter_list[1]) - elif _parameter_list[0] == "P" or \ - _parameter_list[0] == "PLIEGO": + self.__budget.setParametricText(_family_code.encode("utf8"), + _parameter_list[1].encode("utf8")) + elif _parameter_list[0] == u"P" or \ + _parameter_list[0] == u"PLIEGO": #print "__PLIEGO__" + str(_parameter_list[1:]) pass - elif _parameter_list[0] == "K" or \ - _parameter_list[0] == "CLAVES": + elif _parameter_list[0] == u"K" or \ + _parameter_list[0] == u"CLAVES": #print "__CLAVES__" + str(_parameter_list[1:]) pass - elif _parameter_list[0] == "F" or \ - _parameter_list[0] == "COMERCIAL": + elif _parameter_list[0] == u"F" or \ + _parameter_list[0] == u"COMERCIAL": #print "__COMERCIAL__" + str(_parameter_list[1:]) pass else: #print "==PARAMETRO==" + str(_parameter_list[:]) pass - _final_description = _final_description + _line + "\r\n" + _final_description = _final_description + _line + u"\r\n" #print _line # Delete last empty line _description = _final_description[:-2] - _lines = _description.split("\r\n") + _lines = _description.split(u"\r\n") for _line in _lines: pass #print _line @@ -1995,31 +2035,30 @@ # remove leading spaces if _version in self.__character_sets_dict: self.__character_set = self.__character_sets_dict[_version] + print utils.mapping(_("FIEBDC character encoding: $1"),(self.__character_set,)) else: - print utils.mapping(_("This codepage do not exist in "\ - "FIEBDC3! Default codepage: $1"), + print utils.mapping(_("This Character encoding do not exist in "\ + "FIEBDC3! Default Character encoding: $1"), (self.__character_set,)) else: - print utils.mapping(_("This V record dot have a codepage! "\ - "Default codepage: $1"), + print utils.mapping(_("This V record dot have a character encoding! "\ + "Default character encoding: $1"), (self.__character_set,)) else: - print utils.mapping(_("Not 'V' record in File! Default codepage: "\ + print utils.mapping(_("Not 'V' record in File! Default character encoding: "\ "$1"), (self.__character_set,)) - if self.__character_set != "utf8": - _buffer = unicode(_buffer, self.__character_set) - _buffer = _buffer.encode("utf8") + _buffer = unicode(_buffer, self.__character_set) # Any INFORMATION between the beginning of the file and the # beginning of the first registry “~” is ignored #"after_first_tilde" : "^[^~]*~" _buffer = self.__pattern["after_first_tilde"].sub("",_buffer) - while _buffer != "" and not self.__cancel: + while _buffer != u"" and not self.__cancel: #-# the blank characters (32), tabs (9) and end of line (13 and 10) # before the separators '~', '|' are erased. # Before separator \ not deleted because it affects the reading of # the record ~P _buffer = self.eraseControlCharacters(_buffer) - _record_list = _buffer.split("~") + _record_list = _buffer.split(u"~") # The last record can be incomplete unless it is the last one of # the file if len(_record_list) > 1: @@ -2030,18 +2069,16 @@ # The blank characters (32), tabs (9) and end of line # (13 and 10) at the end of the file are ignored. #"end_control" : "((\r\n)| |\t)+$" - _record_list[-1] = self.__pattern["end_control"].sub("", + _record_list[-1] = self.__pattern["end_control"].sub(u"", _record_list[-1]) - _last_record = "" + _last_record = u"" for record in _record_list: if self.__cancel: break self.parseRecord(record) interface.progress(_file.tell() / _filesize) _buffer2 = _file.read(100000) - if self.__character_set != "utf8": - _buffer2 = unicode(_buffer2, self.__character_set) - _buffer2 = _buffer2.encode("utf8") + _buffer2 = unicode(_buffer2, self.__character_set) _buffer = _last_record + _buffer2 _file.close() if self.__cancel: @@ -2115,11 +2152,11 @@ def delete_control_space(self, text): text = self.delete_control(text) - text = text.replace(" ", "") + text = text.replace(u" ", u"") return text def delete_control(self, text): - text = text.replace("\t", "") - text = text.replace("\r", "") - text = text.replace("\n", "") + text = text.replace(u"\t", u"") + text = text.replace(u"\r", u"") + text = text.replace(u"\n", u"") return text
--- a/Generic/globalVars.py Fri Apr 19 00:04:20 2013 +0200 +++ b/Generic/globalVars.py Sat Nov 02 19:26:09 2013 +0100 @@ -3,7 +3,7 @@ ## File globalVars.py ## This file is part of pyArq-Presupuestos. ## -## Copyright (C) 2010 Miguel Ángel Bárcena Rodríguez +## Copyright (C) 2010-2013 Miguel Ángel Bárcena Rodríguez ## <miguelangel@obraencurso.es> ## ## pyArq-Presupuestos is free software: you can redistribute it and/or modify @@ -24,7 +24,7 @@ import sys version = "pyArq Presupuestos v0.0.0" -changeset = 11 +changeset = 17 baseversion = 0 # path: Paths where find the program files needed
--- a/Generic/openwith.py Fri Apr 19 00:04:20 2013 +0200 +++ b/Generic/openwith.py Sat Nov 02 19:26:09 2013 +0100 @@ -3,7 +3,7 @@ ## File openwith.py ## This file is part of pyArq-Presupuestos. ## -## Copyright (C) 2010 Miguel Ángel Bárcena Rodríguez +## Copyright (C) 2010-2013 Miguel Ángel Bárcena Rodríguez ## <miguelangel@obraencurso.es> ## ## This file is based in gtkgui_helpers.py and common/helpers.py from gajim @@ -52,6 +52,16 @@ globalVars.desktop["desktop"] = "kde" elif 'startxfce4' in _processes or 'xfce4-session' in _processes: globalVars.desktop["desktop"] = "xfce" + elif 'startlxde' in _processes or 'lxsession' in _processes: + globalVars.desktop["desktop"] = "lxde" + elif 'awesome' in _processes: + globalVars.desktop["desktop"] = "awesome" + elif 'dwm' in _processes: + globalVars.desktop["desktop"] = "dwm" + elif 'startfluxbox' in _processes: + globalVars.desktop["desktop"] = "fluxbox" + elif 'fvwm2' in _processes: + globalVars.desktop["desktop"] = "fvwm" else: globalVars.desktop["desktop"] = ""
--- a/Generic/utils.py Fri Apr 19 00:04:20 2013 +0200 +++ b/Generic/utils.py Sat Nov 02 19:26:09 2013 +0100 @@ -3,7 +3,7 @@ ## File utils.py ## This file is part of pyArq-Presupuestos. ## -## Copyright (C) 2010 Miguel Ángel Bárcena Rodríguez +## Copyright (C) 2010-2013 Miguel Ángel Bárcena Rodríguez ## <miguelangel@obraencurso.es> ## ## pyArq-Presupuestos is free software: you can redistribute it and/or modify @@ -111,32 +111,40 @@ """ _is_valid = True if not isinstance(code, str): + print "Not a string, code:", code, type(code) return False, False if code == "": + return False, False try: - _unicode_code = unicode(code, "utf8") - _code_cp850 = _unicode_code.encode("cp850") - _unicode_code = unicode(_code_cp850, "cp850") - _code_utf8 = _unicode_code.encode("utf8") + _unicode_code = unicode(code, "utf8",'replace') + _code_utf8 = _unicode_code.encode("utf8",'replace') + _code_cp850 = _unicode_code.encode("cp850",'replace') + _unicode_code = unicode(_code_cp850, "cp850",'replace') + except UnicodeError: + print "Unicode Error, code:", code return False, False if _code_utf8 != code: + print "Not in cp950, code:", code _is_valid = False if _code_utf8 == "": return False, False code = _code_utf8 _code2 = re.sub("[\t \n\r~|\\\]","",code) if _code2 != code: + print "Control characters in code:", code if _code2 == "": return False, False _is_valid = False code = _code2 if code[-1] == "#": + print "# in code:", code _is_valid = False while code[-1] == "#": code = code[:-1] if code == "": + print "Empty code" return False, False return _is_valid, code
--- a/mo/pyArq-Presupuestos.es.po Fri Apr 19 00:04:20 2013 +0200 +++ b/mo/pyArq-Presupuestos.es.po Sat Nov 02 19:26:09 2013 +0100 @@ -4,16 +4,16 @@ # package. # Changes: # - Initial translation: -# Miguel Ángel Bárcena Rodríguez <miguelangel@obraencurso.es>, 2010 +# Miguel Ángel Bárcena Rodríguez <miguelangel@obraencurso.es>, 2010-2013 # # msgid "" msgstr "" "Project-Id-Version: pyArq-Presupuestos 0.0.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2010-11-24 22:27+0100\n" -"PO-Revision-Date: 2010-01-11 12:24+0100\n" -"Last-Translator: Miguel Ángel Bárcena Rodríguez <miguelangel@obraencurso." +"POT-Creation-Date: 2013-11-02 18:58+0100\n" +"PO-Revision-Date: 2013-11-02 18:58+0100\n" +"Last-Translator: Miguel Ángel Bárcena Rodríguez <miguelangel@obraencurso.es" "es>\n" "Language-Team: Spanish\n" "Language: Spannish\n" @@ -21,292 +21,309 @@ "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -#: ../Generic/base.py:358 +#: ../Generic/base.py:359 msgid "Invalid code: $1" msgstr "Código no válido: $1" -#: ../Generic/base.py:373 +#: ../Generic/base.py:374 msgid "Synonyms ($1) must be a list, code: $2" msgstr "«Synonyms» ($1) debe ser una lista, código: $2" -#: ../Generic/base.py:377 +#: ../Generic/base.py:378 msgid "Invalid Code in synomyms list ($1) code: $2" msgstr "Código no válido es la lista de sinónimos ($1) código: $2" -#: ../Generic/base.py:408 +#: ../Generic/base.py:409 msgid "Unit ($1) must be a string: $2" msgstr "«Unit» ($1) debe ser una cadena: $2" -#: ../Generic/base.py:422 +#: ../Generic/base.py:423 msgid "Summary ($1) must be a string: $1" msgstr "«Summary» ($1) debe ser una cadena: $1" -#: ../Generic/base.py:439 +#: ../Generic/base.py:440 msgid "Prices ($1) must be a list: $2" msgstr "«Prices» ($1) debe ser una lista: $2" -#: ../Generic/base.py:460 +#: ../Generic/base.py:461 msgid "Price ($1) must be a list with two items: $2" msgstr "«Price» ($1) debe ser una lista con dos elementos: $2" -#: ../Generic/base.py:465 +#: ../Generic/base.py:466 msgid "Price must be a float number: $1" msgstr "Precio debe ser un número de coma flotante: $1" -#: ../Generic/base.py:475 +#: ../Generic/base.py:476 #, python-format msgid "The record do not have this Price. Code: %s" msgstr "El registro no tiene ese precio. Código: %s" -#: ../Generic/base.py:481 +#: ../Generic/base.py:482 msgid "The record do not have this Price" msgstr "El registro no tiene ese precio" -#: ../Generic/base.py:496 +#: ../Generic/base.py:497 msgid "Parents ($1) must be a list: $2" msgstr "«Parents» ($1) debe ser una lista: $2" -#: ../Generic/base.py:500 ../Generic/base.py:512 +#: ../Generic/base.py:501 ../Generic/base.py:513 msgid "Invalid parent code ($1) in the record: $2" msgstr "Código padre no válido ($1) en el registro: $2" -#: ../Generic/base.py:528 +#: ../Generic/base.py:529 msgid "children ($1) must be a list, record: $2" msgstr "«children» ($1) debe ser una lista, registro: $2" -#: ../Generic/base.py:532 +#: ../Generic/base.py:533 msgid "child ($1) must be a Decomposition object, record: $2" msgstr "«child» ($1) debe ser una objeto «Decomposition», registro $2" -#: ../Generic/base.py:580 +#: ../Generic/base.py:581 msgid "Text ($1) must be a string, record: $2" msgstr "«Text» ($1) debe ser una cadena, registro: $2" -#: ../Generic/base.py:593 +#: ../Generic/base.py:594 msgid "sheet must be a Sheet instance" msgstr "«sheet» debe ser una instancia de Sheet" -#: ../Generic/base.py:606 +#: ../Generic/base.py:607 msgid "files must be a list: $1" msgstr "«files» debe ser una lista: $1" -#: ../Generic/base.py:617 ../Generic/base.py:632 +#: ../Generic/base.py:618 ../Generic/base.py:633 msgid "Incorrect path" msgstr "Ruta incorrecta" -#: ../Generic/base.py:622 +#: ../Generic/base.py:623 msgid "file must be a list or a File object: $1" msgstr "«file» debe ser una lista o un objeto «File: $1" -#: ../Generic/base.py:651 +#: ../Generic/base.py:652 msgid "labels must be a list" msgstr "«labels» debe ser una lista" -#: ../Generic/base.py:657 +#: ../Generic/base.py:658 msgid "label must be a string" msgstr "«label» debe ser una cadena de texto." -#: ../Generic/base.py:666 +#: ../Generic/base.py:667 msgid "Label must be a string" msgstr "«Label» debe ser una cadena de texto." -#: ../Generic/base.py:894 +#: ../Generic/base.py:907 msgid "Position must be a integer" msgstr "«Position» debe ser un número entero" -#: ../Generic/base.py:904 +#: ../Generic/base.py:917 msgid "BudgetMeasures atribute must be a list" msgstr "El atributo «BudgetMeasures» debe ser una lista" -#: ../Generic/base.py:907 +#: ../Generic/base.py:920 msgid "BudgetMeasures item must be a Measure " msgstr "El atributo «BudgetMeasures» debe ser un objeto «Measure»" -#: ../Generic/base.py:914 +#: ../Generic/base.py:927 msgid "Certification atribute must be a list or None" msgstr "El atributo «Certification» debe ser una lista o «None»" -#: ../Generic/base.py:920 +#: ../Generic/base.py:933 msgid "Real cost atribute must be a list or None" msgstr "El atributo «Real cost» debe ser una lista o «None»" -#: ../Generic/base.py:926 +#: ../Generic/base.py:939 msgid "Cost goals atribute must be a list or None" msgstr "El atributo «Cost goals» debe ser una lista o «None»" -#: ../Generic/base.py:932 +#: ../Generic/base.py:945 msgid "Cost Planned atribute must be a list or None" msgstr "El atributo «Cost Planned» debe ser una lista o «None»" -#: ../Generic/base.py:1023 +#: ../Generic/base.py:1036 msgid "Measure must be a float number. Type: $1" msgstr "«Measure» debe ser un número de coma flotante. Tipo: $1" -#: ../Generic/base.py:1034 +#: ../Generic/base.py:1047 msgid "Lines must be a list" msgstr "«Lines» debe ser una lista" -#: ../Generic/base.py:1037 +#: ../Generic/base.py:1050 msgid "Line must be a MeasureLine objetc" msgstr "«Line» debe ser un objeto «MeasureLine»" -#: ../Generic/base.py:1045 +#: ../Generic/base.py:1058 msgid "Factor must be a float number |$1|" msgstr "«Factor» debe ser un número de coma flotante |$1|" -#: ../Generic/base.py:1057 +#: ../Generic/base.py:1070 msgid "Yield must be a float number" msgstr "«Yield» debe ser un número de coma flotante" -#: ../Generic/base.py:1068 +#: ../Generic/base.py:1081 msgid "Fixed must be boolean object" msgstr "«Fixed» debe ser un objeto booleano" -#: ../Generic/base.py:1137 +#: ../Generic/base.py:1151 msgid "Type must be M or A. Type: $1" msgstr "«Type» debe ser M o A. Type: $1" -#: ../Generic/base.py:1269 +#: ../Generic/base.py:1283 msgid " Parcial Subtotal must be a float number. Parcial: $1" msgstr "«Parcial Subtotal» debe ser un número de coma flotante. Parcial: $1" -#: ../Generic/base.py:1276 +#: ../Generic/base.py:1290 msgid " Acumulated Subtotal must be a float number. Parcial: $1" msgstr " «Acumulate Subtotal» debe ser un número de coma flotante. Parcial: $1" -#: ../Generic/base.py:1311 +#: ../Generic/base.py:1325 msgid "Invalid measure line type ($1)" msgstr "Tipo de línea de medición no válido ($1)" -#: ../Generic/base.py:1316 +#: ../Generic/base.py:1330 msgid "Measure Comment must be a string ($1)" msgstr "El comentario de la medición debe ser una cadena ($1)" -#: ../Generic/base.py:1322 +#: ../Generic/base.py:1336 msgid "Invalid Measure Units ($1)" msgstr "Unidades de medición no válidas ($1)" -#: ../Generic/base.py:1334 +#: ../Generic/base.py:1348 msgid "Invalid Measure length ($1)" msgstr "Longitud de medición no válida ($1)" -#: ../Generic/base.py:1346 +#: ../Generic/base.py:1360 msgid "Invalid Measure Width ($1)" msgstr "Anchura de medición no válida ($1)" -#: ../Generic/base.py:1358 +#: ../Generic/base.py:1372 msgid "Invalid Measure Height ($1)" msgstr "Altura de medición no válida ($1)" -#: ../Generic/base.py:1369 +#: ../Generic/base.py:1383 msgid "Formula must be a string ($1)" msgstr "«Formula» debe ser una cadena de texto ($1)" -#: ../Generic/base.py:1372 +#: ../Generic/base.py:1386 msgid "There is invalid charactersin formula ($1)" msgstr "Hay caracteres no válidos en la fórmula ($1)" -#: ../Generic/base.py:1437 ../Generic/base.py:2406 +#: ../Generic/base.py:1451 ../Generic/base.py:2443 msgid "'a' value must be a float number" msgstr "El valor «a» debe ser un número de coma flotante" -#: ../Generic/base.py:1441 ../Generic/base.py:2410 +#: ../Generic/base.py:1455 ../Generic/base.py:2447 msgid "'b' value must be a float number" msgstr "El valor «b» debe ser un número de coma flotante" -#: ../Generic/base.py:1445 ../Generic/base.py:2414 +#: ../Generic/base.py:1459 ../Generic/base.py:2451 msgid "'c' value must be a float number" msgstr "El valor «c» debe ser un número de coma flotante" -#: ../Generic/base.py:1449 ../Generic/base.py:2418 +#: ../Generic/base.py:1463 ../Generic/base.py:2455 msgid "'d' value must be a float number" msgstr "El valor «d» debe ser un número de coma flotante" -#: ../Generic/base.py:1477 ../Generic/base.py:2446 +#: ../Generic/base.py:1491 ../Generic/base.py:2483 msgid "Invalid formula" msgstr "Fórmula no válida" -#: ../Generic/base.py:1727 +#: ../Generic/base.py:1741 msgid "sheet_dict must be a dictionay" msgstr "«sheet_dict» debe ser un diccionario." -#: ../Generic/base.py:1744 ../Generic/base.py:1750 +#: ../Generic/base.py:1758 ../Generic/base.py:1764 msgid "sheet field must be a string" msgstr "«sheet field» debe ser una cadena de texto" -#: ../Generic/base.py:1746 +#: ../Generic/base.py:1760 msgid "section_dict must be a dictionary" msgstr "«section_dict» debe ser un dicionario" -#: ../Generic/base.py:1752 +#: ../Generic/base.py:1766 msgid "sheet section must be a string" msgstr "La seccion del pliego debe ser una cadena de texto" -#: ../Generic/base.py:1754 +#: ../Generic/base.py:1768 msgid "sheet paragraph must be a string" msgstr "«sheet paragraph» debe ser una cadena de texto" -#: ../Generic/base.py:1992 +#: ../Generic/base.py:2006 msgid "Owner must be a string" msgstr "«Owner» debe ser una cadena de texto." -#: ../Generic/base.py:2008 -#, python-format -msgid "Invalid Date: %s" -msgstr "Fecha no válida: %s" +#: ../Generic/base.py:2022 +msgid "Invalid Date: $1" +msgstr "Fecha no válida: $1" -#: ../Generic/base.py:2019 +#: ../Generic/base.py:2033 msgid "Comment must be a string" msgstr "«Comment» debe ser una cadena" -#: ../Generic/base.py:2035 +#: ../Generic/base.py:2049 msgid "Budget type must be 1, 2, 3 or 4." msgstr "El tipo de presupuesto debe ser 1, 2, 3 o 4" -#: ../Generic/base.py:2047 +#: ../Generic/base.py:2061 msgid "Certificate order must be a integer." msgstr "«Certificate order» debe ser un número entero" -#: ../Generic/base.py:2062 +#: ../Generic/base.py:2076 msgid "Budget certificate Date must be a valid Date." msgstr "«Budget certificate Date» debe ser una fecha válida" -#: ../Generic/base.py:2076 +#: ../Generic/base.py:2090 msgid "Invalid title list format" msgstr "Formato de lista de rótulos no válida" -#: ../Generic/base.py:2105 +#: ../Generic/base.py:2119 msgid "Invalid Index Title" msgstr "Índice de rótulo no válido" -#: ../Generic/base.py:2140 +#: ../Generic/base.py:2154 msgid "Decimal Key error" msgstr "Clave de decimales errónea" -#: ../Generic/base.py:2176 +#: ../Generic/base.py:2190 msgid "Invalid Percentage key" msgstr "Clave de porcentajes no válida" -#: ../Generic/base.py:2291 +#: ../Generic/base.py:2313 msgid "Invalid parent code: $1" msgstr "Código del padre inválido: $1" -#: ../Generic/base.py:2294 -msgid "Invalid child code: $1" -msgstr "Código de hijo inválido: $1" +#: ../Generic/base.py:2316 +msgid "Invalid child code: $1 $2" +msgstr "Código de hijo inválido: $1 $2" -#: ../Generic/base.py:2297 +#: ../Generic/base.py:2319 msgid "Invalid position in measure $1, in code $2" msgstr "Posición no válida en medición $1, en código $2" -#: ../Generic/base.py:2305 +#: ../Generic/base.py:2327 msgid "" "Circular Decomposition, parent code: $1, child code: $2, repeated code: $3" msgstr "" "Descomposición circular, código padre: $1, código hijo: $2, código repetido: " "$3" -#: ../Generic/base.py:2360 ../Generic/base.py:2372 +#: ../Generic/base.py:2352 +msgid "" +"No-estructured measure or empty position. Parent Code: $1, Child code: $2, " +"Position: $3" +msgstr "" +"Mediciones no estructuradas o posicion vácia. Código padre: $1, Código hijo: $2, " +"Posición: $3" + +#: ../Generic/base.py:2356 +msgid "" +"No-estructured measure or empty position. Repeated child in unspecified " +"position. It is impossible to determine the position. New child is added in " +"the decomposition. Parent code: $1, Child code: $2, Position: $3" +msgstr "" +"Mediciones no estructuradas o posicion vácia. Hijo repetido sin especificar " +"posición. Es imposible determinar la posición. Se añade un nuevo hijo en " +"la descomposicón. Código padre: $1, Código hijo: $2, Posición: $3" + +#: ../Generic/base.py:2396 ../Generic/base.py:2408 msgid "" "Error: Invalid child position in decomposition. Parent code: $1 Child code: " "$2 Position: $3" @@ -314,84 +331,84 @@ "Error: Posición del hijo no válida en descomposición. Código padre: $1 " "Código hijo: $2 Posición: $3" -#: ../Generic/base.py:2366 +#: ../Generic/base.py:2402 msgid "Error: Empty child code. Parent code: $1 Position: $2" msgstr "Error: Código hijo vacío. Código padre: $1 Posición: $2" -#: ../Generic/base.py:2457 +#: ../Generic/base.py:2494 msgid "Invalid code" msgstr "Código no válido" -#: ../Generic/base.py:2467 +#: ../Generic/base.py:2504 msgid "Invalid record: $1" msgstr "Registro no válido: $1" -#: ../Generic/base.py:2530 +#: ../Generic/base.py:2567 msgid "Only can be one root record" msgstr "Sólo puede haber un registro raíz" -#: ../Generic/base.py:2624 ../Generic/base.py:2630 +#: ../Generic/base.py:2663 ../Generic/base.py:2669 msgid "This record does not exits" msgstr "Este registro no existe" -#: ../Generic/base.py:2627 +#: ../Generic/base.py:2666 msgid "Path item must be a integer" msgstr "El elemento de la ruta debe ser un número entero" -#: ../Generic/base.py:2632 +#: ../Generic/base.py:2671 msgid "Path must be a not empty tuple: $1" msgstr "«Path» debe ser una tupla no vacía: $1" -#: ../Generic/base.py:2683 +#: ../Generic/base.py:2722 msgid "The sheet code must be a string" msgstr "El código del pliego debe ser una cadena de texto" -#: ../Generic/base.py:2685 +#: ../Generic/base.py:2724 msgid "The sheet title must be a string" msgstr "El título del pliego debe ser una cadena de texto." -#: ../Generic/base.py:2693 +#: ../Generic/base.py:2732 msgid "The sheet sections must be a dictionary" msgstr "La sección del pliego debe ser un dicionario" -#: ../Generic/base.py:2698 +#: ../Generic/base.py:2737 msgid "The field code must be a string" msgstr "El código del ámbito debe ser una cadena de texto" -#: ../Generic/base.py:2700 +#: ../Generic/base.py:2739 msgid "The field title must be a string" msgstr "El título del ámbito debe ser una cadena de texto." -#: ../Generic/base.py:2708 +#: ../Generic/base.py:2747 msgid "The sheet field must be a dictionary" msgstr "El ámbito del pliego debe ser un dicionario." -#: ../Generic/base.py:2713 +#: ../Generic/base.py:2752 msgid "The paragraph code must be a string" msgstr "El código del parrafo debe ser una cadena de texto." -#: ../Generic/base.py:2715 +#: ../Generic/base.py:2754 msgid "The paragraph text must be a string" msgstr "El texto del parrafo debe ser una cadena de texto" -#: ../Generic/base.py:2723 +#: ../Generic/base.py:2762 msgid "The paragraph dict must be a dictionary" msgstr "El dicionario del parrafo debe ser un diccionario" -#: ../Generic/base.py:2728 ../Generic/base.py:2752 ../Generic/base.py:2882 -#: ../Generic/base.py:2906 ../Generic/base.py:2928 +#: ../Generic/base.py:2767 ../Generic/base.py:2791 ../Generic/base.py:2921 +#: ../Generic/base.py:2945 ../Generic/base.py:2967 msgid "The record_code code must be a string" msgstr "«record_code» debe ser una cadena de texto" -#: ../Generic/base.py:2730 +#: ../Generic/base.py:2769 msgid "The field must be a string" msgstr "El ámbito debe ser una cadena de texto." -#: ../Generic/base.py:2732 +#: ../Generic/base.py:2771 msgid "The section dict must be a dictionary" msgstr "El dicionario de la seccion debe ser un dicionario." -#: ../Generic/base.py:2736 +#: ../Generic/base.py:2775 msgid "" "Error: The budget do not have this record code and can not be added the " "sheet text in the field $1. Record Code: $2" @@ -399,11 +416,11 @@ "Error: El presupuesto no tiene ese código de registro y no puede añadirse el " "texto del pliego en el ámbito $1. Código del registro: $2" -#: ../Generic/base.py:2754 +#: ../Generic/base.py:2793 msgid "The filename must be a string" msgstr "El nombre del fichero debe ser una cadena de texto." -#: ../Generic/base.py:2758 +#: ../Generic/base.py:2797 msgid "" "Error: The budget do not have the record code $1 and can not be added the " "file: $2" @@ -411,67 +428,67 @@ "Error: El presupuesto no tiene el código de registro $1 y no puede añadirse " "el fichero: $2" -#: ../Generic/base.py:2768 +#: ../Generic/base.py:2807 msgid "The company code must be a string" msgstr "El código de la entidad debe ser una cadena de texto." -#: ../Generic/base.py:2770 +#: ../Generic/base.py:2809 msgid "The summary must be a string" msgstr "El resumen debe ser una cadena de texto" -#: ../Generic/base.py:2772 ../Generic/base.py:2800 +#: ../Generic/base.py:2811 ../Generic/base.py:2839 msgid "The name must be a string" msgstr "El nombre debe ser una cadena de texto." -#: ../Generic/base.py:2774 +#: ../Generic/base.py:2813 msgid "The name must be a list" msgstr "El nombre debe ser una lista" -#: ../Generic/base.py:2778 +#: ../Generic/base.py:2817 msgid "The office must be a list" msgstr "«The office» debe ser una lista" -#: ../Generic/base.py:2780 +#: ../Generic/base.py:2819 msgid "The office must be a 10 items list" msgstr "«The office» debe ser una lista de 10 elementos" -#: ../Generic/base.py:2783 +#: ../Generic/base.py:2822 msgid "This office item must be a string" msgstr "El elemento de la oficina debe ser una cadena de texto." -#: ../Generic/base.py:2787 +#: ../Generic/base.py:2826 msgid "This office item must be a list" msgstr "Este elemento de la oficina debe ser una lista" -#: ../Generic/base.py:2802 +#: ../Generic/base.py:2841 msgid "The web must be a string" msgstr "La web debe ser una cadena de texto." -#: ../Generic/base.py:2804 +#: ../Generic/base.py:2843 msgid "The email must be a string" msgstr "El email debe ser una cadena de texto." -#: ../Generic/base.py:2814 +#: ../Generic/base.py:2853 msgid "The tecnical info code must be a string" msgstr "La información técnica debe ser una cadena de texto." -#: ../Generic/base.py:2816 +#: ../Generic/base.py:2855 msgid "The tecnical info description must be a string" msgstr "La descripción de la información técnica debe ser una cadena de texto" -#: ../Generic/base.py:2819 +#: ../Generic/base.py:2858 msgid "The tecnical info unit must be a string" msgstr "La unidad de la información técnica debe ser una cadena de texto." -#: ../Generic/base.py:2866 +#: ../Generic/base.py:2905 msgid "The label must be a string" msgstr "La etiqueta debe ser una cadena de texto." -#: ../Generic/base.py:2884 +#: ../Generic/base.py:2923 msgid "The parametric select comment must be a string" msgstr "El comentario de selección paramétrico debe ser una cadena de texto" -#: ../Generic/base.py:2887 +#: ../Generic/base.py:2926 msgid "" "Error: The budget do not have the record code $1 and can not be added the " "Parametric select comment: $2" @@ -479,7 +496,7 @@ "Error: El presupuesto no tiene el código de registro $1 y no puede añadirse " "el comentario de selección paramétrico: $2" -#: ../Generic/base.py:2894 +#: ../Generic/base.py:2933 msgid "" "Error: The Record $1 is not a Parametric Record and can not have Parametric " "comment" @@ -487,11 +504,11 @@ "Error: El registro $1 no es un registro paramétrico y no puede tener " "comentario paramétrico." -#: ../Generic/base.py:2908 +#: ../Generic/base.py:2947 msgid "The summary record must be a string" msgstr "El resumen del registro debe ser una cadena de texto" -#: ../Generic/base.py:2910 +#: ../Generic/base.py:2949 msgid "" "Error: The budget do not have the record code $1 and can not be seted the " "summary: $2" @@ -499,7 +516,7 @@ "Error: El presupuesto no tiene el codigo de registro $1 y no puede fijarse " "el resumen: $2" -#: ../Generic/base.py:2916 +#: ../Generic/base.py:2955 msgid "" "Error: The Record $1 is not a Parametric Record and can not have Parametric " "summary" @@ -507,11 +524,11 @@ "Error: El registro $1 no es un registro paramétrico y no puede tener resumen " "paramétrico." -#: ../Generic/base.py:2930 +#: ../Generic/base.py:2969 msgid "The text record must be a string" msgstr "El texto del registro debe ser una cadena de texto" -#: ../Generic/base.py:2932 +#: ../Generic/base.py:2971 msgid "" "Error: The budget do not have the record code $1 and can not be seted the " "text: $2" @@ -519,7 +536,7 @@ "Error: El presupuesto no tiene el codigo de registro $1 y no puede fijarse " "el texto: $2" -#: ../Generic/base.py:2938 +#: ../Generic/base.py:2977 msgid "" "Error: The Record $1 is not a Parametric Record and can not have Parametric " "text" @@ -527,15 +544,15 @@ "Error: El registro $1 no es un registro paramétrico y no puede tener texto " "paramétrico." -#: ../Generic/base.py:3396 -msgid "Invalid Hierarchy ($1) The hierarchy must be -1, 0, 1 or 2" +#: ../Generic/base.py:3435 +msgid "Invalid Hierarchy ($1) The hierarchy must be -1, 0, 1, 2" msgstr "Categoría no válida ($1) La categoria debe ser -1, 0, 1 or 2" -#: ../Generic/base.py:3403 +#: ../Generic/base.py:3445 msgid "Invalid type ($1),the type must be (empty string,0,1,2,3)" msgstr "Tipo no válido ($1), el tipo debe ser (cadena vacía, 0, 1, 2, 3)" -#: ../Generic/base.py:3412 +#: ../Generic/base.py:3454 msgid "" "Invalid subtype ($1), The subtype must one in (empty string, EA, EU, EC, EF, " "OB, PA, PU, H, Q, %, MC, MCr, MM, MS, ME, MCu, MAl, ML, M)" @@ -555,19 +572,23 @@ msgid "Loadig time: $1 seconds" msgstr "Tiempo de carga: $1 segundos" -#: ../Generic/fiebdc.py:151 -msgid "Invalid code, it must be a string" -msgstr "Código no válido, debe ser una cadena" +#: ../Generic/fiebdc.py:152 +msgid "Invalid code, it must be a unicode string" +msgstr "Código no válido, debe ser una cadena unicode" -#: ../Generic/fiebdc.py:157 +#: ../Generic/fiebdc.py:159 msgid "The code '$1' have invalid characters." msgstr "El código «$1» tiene caracteres inválidos." -#: ../Generic/fiebdc.py:170 +#: ../Generic/fiebdc.py:162 +msgid "The code '$1' have invalid characters and can not be encoded in utf8." +msgstr "El código «$1» tiene caracteres inválidos y no puede ser codificado en utf8." + +#: ../Generic/fiebdc.py:184 msgid "The code '$1' contains special characters repeated." msgstr "El código «$1» contiene caractectes especiales repetidos." -#: ../Generic/fiebdc.py:391 +#: ../Generic/fiebdc.py:405 msgid "" "The 'V' record (Property and Version) must be the first record in the file " "but it is the number: $1" @@ -575,29 +596,27 @@ "El registro «V» (Propiedad y versión) debe ser el primer registro en el " "archivo pero es el número: $1" -#: ../Generic/fiebdc.py:394 +#: ../Generic/fiebdc.py:408 msgid "The default values were taken and this V record is ignored" msgstr "El valor por amisión ha sido tomado y el registro V es ignorado" -#: ../Generic/fiebdc.py:428 -#, python-format -msgid "FIEBDC format: %s" -msgstr "Formato FIEBDC: %s" +#: ../Generic/fiebdc.py:442 +msgid "FIEBDC format: $1" +msgstr "Formato FIEBDC: $1" -#: ../Generic/fiebdc.py:437 -#, python-format -msgid "FIEBDC file generated by %s" -msgstr "Fichero FIEBDC generado por %s" +#: ../Generic/fiebdc.py:452 +msgid "FIEBDC file generated by $1" +msgstr "Fichero FIEBDC generado por $1" -#: ../Generic/fiebdc.py:776 +#: ../Generic/fiebdc.py:793 msgid "Record C without a valid code" msgstr "Registro C sin un código válido" -#: ../Generic/fiebdc.py:852 ../Generic/fiebdc.py:864 ../Generic/fiebdc.py:892 +#: ../Generic/fiebdc.py:869 ../Generic/fiebdc.py:881 ../Generic/fiebdc.py:909 msgid "Incorrect type ($1) in the code $2" msgstr "Tipo incorrecto ($1) en el código $2" -#: ../Generic/fiebdc.py:943 +#: ../Generic/fiebdc.py:961 msgid "" "ValueError loadig the descomposition of the record $1, the factor of the " "child $2 must be a float number and can not be $3, seted default value 1.0" @@ -606,7 +625,7 @@ "hijo $2 debe ser un número de coma flotante y no puede ser $3, fijado el " "valor por omisión 1.0" -#: ../Generic/fiebdc.py:954 +#: ../Generic/fiebdc.py:972 msgid "" "ValueError loading the descomposition of the record $1, the yield of the " "child $2, must be a float number and cannot be $3, seted default value 1.0" @@ -615,23 +634,23 @@ "del hijo $2, debe ser un número de coma flotante y no puede ser $3, fijado " "el valor por omisión 1.0" -#: ../Generic/fiebdc.py:1041 +#: ../Generic/fiebdc.py:1060 msgid "Invalid codes in $1 record, codes $2" msgstr "Códigos no válidos en registro $1, códigos $2" -#: ../Generic/fiebdc.py:1045 +#: ../Generic/fiebdc.py:1064 msgid "Empty child code in $1 record, codes: $2" msgstr "Código de hijo vacío en el registro $1, códigos: $2" -#: ../Generic/fiebdc.py:1058 +#: ../Generic/fiebdc.py:1084 msgid "Invalid path in $1 record, codes $2" msgstr "Camino no válido en el registro $1, códigos $2" -#: ../Generic/fiebdc.py:1069 -msgid "Invalid Total Measure value in $1 record, codes $2" -msgstr "Total de medición no válido en el registro $1, códigos $2" +#: ../Generic/fiebdc.py:1095 +msgid "Invalid Total Measure value in $1 record, codes $2. Total fixed to 0." +msgstr "El Total de la medición no es válido en el registro $1, códigos $2. Total fijado a 0." -#: ../Generic/fiebdc.py:1089 +#: ../Generic/fiebdc.py:1116 msgid "" "The comment is not a formula or its have invalid characters, in the $1 " "record, codes $2" @@ -639,55 +658,66 @@ "El comentario no es una fórmula o tiene caracteres inválidos, en el registro " "$1, códigos $2" -#: ../Generic/fiebdc.py:1403 ../Generic/fiebdc.py:1657 +#: ../Generic/fiebdc.py:1142 +msgid "The measure values are not float numbers, code $1" +msgstr "«Measure» debe ser un número de coma flotante. Tipo: $1" + +#: ../Generic/fiebdc.py:1438 ../Generic/fiebdc.py:1697 msgid "The file $1 do not exist" msgstr "El archivo $1 no existe" -#: ../Generic/fiebdc.py:1763 ../Generic/fiebdc.py:1770 +#: ../Generic/fiebdc.py:1803 ../Generic/fiebdc.py:1810 msgid "PyArq hates parametric DLLs" msgstr "PyArq odia las DLLs paramétricas" -#: ../Generic/fiebdc.py:1979 +#: ../Generic/fiebdc.py:2019 msgid "Loading file $1" msgstr "Cargando archivo $1" -#: ../Generic/fiebdc.py:1999 -msgid "This codepage do not exist in FIEBDC3! Default codepage: $1" +#: ../Generic/fiebdc.py:2038 +msgid "FIEBDC character encoding: $1" +msgstr "FIEBDC codificación de caracteres: $1" + +#: ../Generic/fiebdc.py:2040 +msgid "" +"This Character encoding do not exist in FIEBDC3! Default Character encoding: " +"$1" msgstr "¡Esta codificación no existe en FIEBDC3! Codificación por omisión: $1" -#: ../Generic/fiebdc.py:2003 -msgid "This V record dot have a codepage! Default codepage: $1" +#: ../Generic/fiebdc.py:2044 +msgid "" +"This V record dot have a character encoding! Default character encoding: $1" msgstr "¡Este registro V no define codificación! Codificación por omisión: $1" -#: ../Generic/fiebdc.py:2007 -msgid "Not 'V' record in File! Default codepage: $1" +#: ../Generic/fiebdc.py:2048 +msgid "Not 'V' record in File! Default character encoding: $1" msgstr "¡No hay registro «V» en el archivo! Codificación por omisión: $1" -#: ../Generic/fiebdc.py:2048 +#: ../Generic/fiebdc.py:2085 msgid "Process terminated" msgstr "Proceso cancelado" -#: ../Generic/fiebdc.py:2051 +#: ../Generic/fiebdc.py:2088 msgid "Time to load: $1 seconds" msgstr "Tiempo de carga: $1 segundos" -#: ../Generic/fiebdc.py:2053 +#: ../Generic/fiebdc.py:2090 msgid "Records/Valid Records: $1/$2" msgstr "Registro/Registros válidos: $1/$2" -#: ../Generic/fiebdc.py:2056 +#: ../Generic/fiebdc.py:2093 msgid "$1 unsuported record type O: Comercial Relationship" msgstr "$1 tipo de registro no soportado O: Releción comercial" -#: ../Generic/fiebdc.py:2059 +#: ../Generic/fiebdc.py:2096 msgid "This file is not a valid FIBDC3 file" msgstr "El archivo no es un archivo FIEBDC3 válido" -#: ../Generic/fiebdc.py:2096 +#: ../Generic/fiebdc.py:2133 msgid "Testing budget ..." msgstr "Comprobando presupuesto ..." -#: ../Generic/fiebdc.py:2114 +#: ../Generic/fiebdc.py:2151 msgid "End Test" msgstr "Comprobación finalizada" @@ -699,220 +729,199 @@ msgid "pyArq-Presupuestos running on $1" msgstr "pyArq-Presupuestos ejecutandose en $1" -#: ../Gtk/gui.py:168 +#: ../Gtk/gui.py:169 msgid "_File" msgstr "_Archivo" -#: ../Gtk/gui.py:169 +#: ../Gtk/gui.py:170 msgid "_Import Fiebdc" msgstr "_Importar Fiebdc" -#: ../Gtk/gui.py:170 +#: ../Gtk/gui.py:171 msgid "Import FIEBDC" msgstr "Importar FIEBDC" -#: ../Gtk/gui.py:171 +#: ../Gtk/gui.py:172 msgid "_Close" msgstr "_Cerrar" -#: ../Gtk/gui.py:171 +#: ../Gtk/gui.py:172 msgid "Close" msgstr "Cerrar" -#: ../Gtk/gui.py:173 +#: ../Gtk/gui.py:174 msgid "_View" msgstr "_Ver" -#: ../Gtk/gui.py:174 ../Gtk/gui.py:184 +#: ../Gtk/gui.py:175 ../Gtk/gui.py:185 msgid "_Go" msgstr "_Ir" -#: ../Gtk/gui.py:175 +#: ../Gtk/gui.py:176 msgid "_Test" msgstr "_Pruebas" -#: ../Gtk/gui.py:177 -msgid "Import Fiebdc _price database" -msgstr "Importar base de _precios Fiebdc" - -#: ../Gtk/gui.py:177 -msgid "Import database" -msgstr "Importar base de datos" - -#: ../Gtk/gui.py:179 -msgid "_Open price database" -msgstr "_Abrir base de precios" - -#: ../Gtk/gui.py:180 -msgid "Open Database" -msgstr "Abrir base de datos" - -#: ../Gtk/gui.py:185 +#: ../Gtk/gui.py:186 msgid "_Back" msgstr "A_tras" -#: ../Gtk/gui.py:186 ../Gtk/gui.py:197 +#: ../Gtk/gui.py:187 ../Gtk/gui.py:198 msgid "Go to the previous visited item" msgstr "Ir al concepto anterior" -#: ../Gtk/gui.py:188 +#: ../Gtk/gui.py:189 msgid "_Forward" msgstr "A_delante" -#: ../Gtk/gui.py:189 ../Gtk/gui.py:201 +#: ../Gtk/gui.py:190 ../Gtk/gui.py:202 msgid "Go to the next visited item" msgstr "Ir al concepto siguiente" -#: ../Gtk/gui.py:190 +#: ../Gtk/gui.py:191 msgid "_Up Item" msgstr "Concepto _Superior" -#: ../Gtk/gui.py:191 +#: ../Gtk/gui.py:192 msgid "Go up item" msgstr "Ir al concepto superior" -#: ../Gtk/gui.py:192 +#: ../Gtk/gui.py:193 msgid "_Root" msgstr "_Raiz" -#: ../Gtk/gui.py:193 +#: ../Gtk/gui.py:194 msgid "Go to root" msgstr "Ir a la raiz" -#: ../Gtk/gui.py:220 +#: ../Gtk/gui.py:221 msgid "Back history" msgstr "Retroceder histórico" -#: ../Gtk/gui.py:225 +#: ../Gtk/gui.py:226 msgid "Forward history" msgstr "Adelantar histórico" -#: ../Gtk/gui.py:422 -msgid "Cancel reading Durus database has not been implemented." -msgstr "" -"La interrupción de la lectura de bases de datos Durus no ha sido implementada" - -#: ../Gtk/gui.py:443 +#: ../Gtk/gui.py:444 msgid "The page is not in the page list" msgstr "La pestaña no está en la lista de pestañas" -#: ../Gtk/gui.py:672 ../Gtk/importFiebdc.py:220 +#: ../Gtk/gui.py:673 ../Gtk/importFiebdc.py:220 msgid "Time: 0s" msgstr "Tiempo: 0s" -#: ../Gtk/gui.py:749 ../Gtk/importFiebdc.py:299 +#: ../Gtk/gui.py:750 ../Gtk/importFiebdc.py:299 msgid "Time: $1" msgstr "Tiempo: $1" -#: ../Gtk/gui.py:1075 +#: ../Gtk/gui.py:1076 msgid "The value must be a list" msgstr "El valor debe ser una lista" -#: ../Gtk/gui.py:1078 +#: ../Gtk/gui.py:1079 msgid "Incorrect len" msgstr "Longuitud incorrecta" -#: ../Gtk/gui.py:1106 +#: ../Gtk/gui.py:1107 msgid "Incorrect item $1" msgstr "Elemento incorrecto $1" -#: ../Gtk/gui.py:1122 +#: ../Gtk/gui.py:1123 msgid "The budget does not have the path record: $1" msgstr "El presupuesto no tiene el registro con camino: $1" -#: ../Gtk/gui.py:1478 +#: ../Gtk/gui.py:1479 msgid "Decomposition" msgstr "Descomposición" -#: ../Gtk/gui.py:1479 ../Gtk/gui.py:2485 +#: ../Gtk/gui.py:1480 ../Gtk/gui.py:2486 msgid "Description" msgstr "Descripción" -#: ../Gtk/gui.py:1480 ../Gtk/gui.py:2487 +#: ../Gtk/gui.py:1481 ../Gtk/gui.py:2488 msgid "Measure" msgstr "Medición" -#: ../Gtk/gui.py:1481 +#: ../Gtk/gui.py:1482 msgid "Sheet of Conditions" msgstr "Pliego de condicones" -#: ../Gtk/gui.py:1482 +#: ../Gtk/gui.py:1483 msgid "Files" msgstr "Archivos" -#: ../Gtk/gui.py:1483 +#: ../Gtk/gui.py:1484 msgid "Companies" msgstr "Entidades" -#: ../Gtk/gui.py:1660 +#: ../Gtk/gui.py:1661 msgid "Split View Left/Right" msgstr "Partir vista Izquierda/Derecha" -#: ../Gtk/gui.py:1664 +#: ../Gtk/gui.py:1665 msgid "Split View Top/Bottom" msgstr "Partir vista Arriba/Abajo" -#: ../Gtk/gui.py:1668 +#: ../Gtk/gui.py:1669 msgid "Close view" msgstr "Cerrar vista" -#: ../Gtk/gui.py:1836 +#: ../Gtk/gui.py:1837 msgid "The item must be a widget object." msgstr "El elemento debe ser un objeto «widget»." -#: ../Gtk/gui.py:1842 +#: ../Gtk/gui.py:1843 msgid "Invalid orientation." msgstr "Orientación no válida" -#: ../Gtk/gui.py:2214 ../Gtk/gui.py:2841 ../Gtk/gui.py:4171 +#: ../Gtk/gui.py:2215 ../Gtk/gui.py:2842 ../Gtk/gui.py:4172 msgid "Argument must be a Budget object" msgstr "El argumento debe ser un objeto «Budget»" -#: ../Gtk/gui.py:2223 +#: ../Gtk/gui.py:2224 msgid "Record path can not be None" msgstr "La ruta del registrio no puede ser None" -#: ../Gtk/gui.py:2254 +#: ../Gtk/gui.py:2255 msgid "a" msgstr "a" -#: ../Gtk/gui.py:2482 ../Gtk/gui.py:4234 +#: ../Gtk/gui.py:2483 ../Gtk/gui.py:4235 msgid "Code" msgstr "Código" -#: ../Gtk/gui.py:2483 +#: ../Gtk/gui.py:2484 msgid "Unit" msgstr "Unidad" -#: ../Gtk/gui.py:2489 +#: ../Gtk/gui.py:2490 msgid "Price" msgstr "Precio" -#: ../Gtk/gui.py:2491 +#: ../Gtk/gui.py:2492 msgid "Amount" msgstr "Importe" -#: ../Gtk/gui.py:2502 ../Gtk/gui.py:2981 +#: ../Gtk/gui.py:2503 ../Gtk/gui.py:2982 msgid "Invalid path" msgstr "Ruta no válida" -#: ../Gtk/gui.py:2846 +#: ../Gtk/gui.py:2847 msgid "Record path must be a tuple" msgstr "La posición del registro debe ser una tupla" -#: ../Gtk/gui.py:2990 +#: ../Gtk/gui.py:2991 msgid "measure must be a Measure object. Type: $1" msgstr "«measure» debe ser un objeto «Measure». Tipo: $1" -#: ../Gtk/gui.py:3002 ../Gtk/gui.py:4249 ../Gtk/gui.py:4562 +#: ../Gtk/gui.py:3003 ../Gtk/gui.py:4250 ../Gtk/gui.py:4563 msgid "Type" msgstr "Tipo" -#: ../Gtk/gui.py:3003 +#: ../Gtk/gui.py:3004 msgid "Comment" msgstr "Comentario" -#: ../Gtk/gui.py:3004 +#: ../Gtk/gui.py:3005 msgid "" "N\n" "(a)" @@ -920,7 +929,7 @@ "N\n" "(a)" -#: ../Gtk/gui.py:3005 +#: ../Gtk/gui.py:3006 msgid "" "Length\n" "(b)" @@ -928,7 +937,7 @@ "Longitud\n" "(b)" -#: ../Gtk/gui.py:3006 +#: ../Gtk/gui.py:3007 msgid "" "Width\n" "(c)" @@ -936,7 +945,7 @@ "Anchura\n" "(c)" -#: ../Gtk/gui.py:3007 +#: ../Gtk/gui.py:3008 msgid "" "Height\n" "(d)" @@ -944,11 +953,11 @@ "Altura\n" "(d)" -#: ../Gtk/gui.py:3008 +#: ../Gtk/gui.py:3009 msgid "Formula" msgstr "Fórmula" -#: ../Gtk/gui.py:3009 +#: ../Gtk/gui.py:3010 #, python-format msgid "" "Parcial\n" @@ -957,75 +966,75 @@ "Parcial\n" "[%s]" -#: ../Gtk/gui.py:3010 +#: ../Gtk/gui.py:3011 msgid "Subtotal" msgstr "Subtotal" -#: ../Gtk/gui.py:3418 ../Gtk/gui.py:3440 +#: ../Gtk/gui.py:3419 ../Gtk/gui.py:3441 msgid "Description text of the record $1" msgstr "Texto descriptivo del registro $1" -#: ../Gtk/gui.py:3591 +#: ../Gtk/gui.py:3592 msgid "Sheet of Conditions of the record $1" msgstr "Pliego de condiciones del registro $1" -#: ../Gtk/gui.py:3609 +#: ../Gtk/gui.py:3610 msgid "Field" msgstr "Ámbito" -#: ../Gtk/gui.py:3630 +#: ../Gtk/gui.py:3631 msgid "Section" msgstr "Sección" -#: ../Gtk/gui.py:3778 +#: ../Gtk/gui.py:3779 msgid "Sheet2 of Conditions of the record $1" msgstr "Pliego2 de condiciones del registro $1" -#: ../Gtk/gui.py:4235 +#: ../Gtk/gui.py:4236 msgid "Code that define the company" msgstr "Código que define la entidad" -#: ../Gtk/gui.py:4236 +#: ../Gtk/gui.py:4237 msgid "Summary" msgstr "Resumen" -#: ../Gtk/gui.py:4237 +#: ../Gtk/gui.py:4238 msgid "Summary of the company name" msgstr "Resumen del nombre de la entidad" -#: ../Gtk/gui.py:4238 ../Gtk/gui.py:4254 +#: ../Gtk/gui.py:4239 ../Gtk/gui.py:4255 msgid "Name" msgstr "Nombre" -#: ../Gtk/gui.py:4239 +#: ../Gtk/gui.py:4240 msgid "Complete name" msgstr "Nombre completo" -#: ../Gtk/gui.py:4240 +#: ../Gtk/gui.py:4241 msgid "CIF" msgstr "CIF" -#: ../Gtk/gui.py:4241 +#: ../Gtk/gui.py:4242 msgid "Fiscal identifier number" msgstr "Número de identificación fiscal" -#: ../Gtk/gui.py:4242 +#: ../Gtk/gui.py:4243 msgid "Web" msgstr "Web" -#: ../Gtk/gui.py:4243 +#: ../Gtk/gui.py:4244 msgid "Company web page" msgstr "Página web de la entidad" -#: ../Gtk/gui.py:4244 +#: ../Gtk/gui.py:4245 msgid "Email" msgstr "Email" -#: ../Gtk/gui.py:4245 +#: ../Gtk/gui.py:4246 msgid "Company email" msgstr "Correo electrónico de la entidad" -#: ../Gtk/gui.py:4250 +#: ../Gtk/gui.py:4251 msgid "" "Type of Office:\n" " C: Central office\n" @@ -1037,131 +1046,131 @@ " D: Delegación\n" " R: Representante" -#: ../Gtk/gui.py:4255 +#: ../Gtk/gui.py:4256 msgid "Office name" msgstr "Nombre de la oficina" -#: ../Gtk/gui.py:4256 +#: ../Gtk/gui.py:4257 msgid "Address" msgstr "Dirección" -#: ../Gtk/gui.py:4257 +#: ../Gtk/gui.py:4258 msgid "Postal code" msgstr "Código postal" -#: ../Gtk/gui.py:4258 +#: ../Gtk/gui.py:4259 msgid "Town" msgstr "Ciudad" -#: ../Gtk/gui.py:4259 +#: ../Gtk/gui.py:4260 msgid "Province" msgstr "Provincia" -#: ../Gtk/gui.py:4260 +#: ../Gtk/gui.py:4261 msgid "Country" msgstr "Ciudad" -#: ../Gtk/gui.py:4261 +#: ../Gtk/gui.py:4262 msgid "Phone" msgstr "Teléfono" -#: ../Gtk/gui.py:4262 +#: ../Gtk/gui.py:4263 msgid "Phone numbers of the office" msgstr "Teléfono de la officina" -#: ../Gtk/gui.py:4263 +#: ../Gtk/gui.py:4264 msgid "Fax" msgstr "Fax" -#: ../Gtk/gui.py:4264 +#: ../Gtk/gui.py:4265 msgid "Fax numbers of the office" msgstr "Fax de la oficina" -#: ../Gtk/gui.py:4265 +#: ../Gtk/gui.py:4266 msgid "Contact person" msgstr "Persona de contacto" -#: ../Gtk/gui.py:4266 +#: ../Gtk/gui.py:4267 msgid "Contact persons in the office" msgstr "Persona de contacto en la oficina" -#: ../Gtk/gui.py:4270 +#: ../Gtk/gui.py:4271 msgid "Unknow Option Type" msgstr "Tipo de opcion desconocida" -#: ../Gtk/gui.py:4500 +#: ../Gtk/gui.py:4501 msgid "Boolean" msgstr "Booleano" -#: ../Gtk/gui.py:4501 +#: ../Gtk/gui.py:4502 msgid "Integer" msgstr "Entero" -#: ../Gtk/gui.py:4502 +#: ../Gtk/gui.py:4503 msgid "Text" msgstr "Texto" -#: ../Gtk/gui.py:4503 +#: ../Gtk/gui.py:4504 msgid "Color" msgstr "Color" -#: ../Gtk/gui.py:4504 +#: ../Gtk/gui.py:4505 msgid "List" msgstr "Lista" -#: ../Gtk/gui.py:4536 +#: ../Gtk/gui.py:4537 msgid "Option name" msgstr "Nombre de Opción" -#: ../Gtk/gui.py:4549 +#: ../Gtk/gui.py:4550 msgid "Value" msgstr "Valor" -#: ../Gtk/gui.py:4588 +#: ../Gtk/gui.py:4589 msgid "Description:" msgstr "Descripción:" -#: ../Gtk/gui.py:4749 +#: ../Gtk/gui.py:4750 msgid "Option values must be strings" msgstr "Los valores de la opción deben ser cadenas" -#: ../Gtk/gui.py:4751 +#: ../Gtk/gui.py:4752 msgid "Option must be a tuple with 4 items" msgstr "La opcion debe ser una tupla de 4 elementos" -#: ../Gtk/gui.py:4753 +#: ../Gtk/gui.py:4754 msgid "Option list must be a list" msgstr "La lista de opciones debe ser una lista lista" -#: ../Gtk/gui.py:4773 +#: ../Gtk/gui.py:4774 msgid "Icorrect type, must be boolean" msgstr "Tipo erroneo, debe ser booleano" -#: ../Gtk/gui.py:4778 +#: ../Gtk/gui.py:4779 msgid "Icorrect type, must be integer" msgstr "Tipo erroneo, debe ser un número entero" -#: ../Gtk/gui.py:4791 +#: ../Gtk/gui.py:4792 msgid "Icorrect type, must be string" msgstr "Tipo erroneo, debe ser una cadena de texto" -#: ../Gtk/gui.py:4804 +#: ../Gtk/gui.py:4805 msgid "Icorrect type, must be list" msgstr "Tipo erroneo, debe ser una lista" -#: ../Gtk/gui.py:4810 +#: ../Gtk/gui.py:4811 msgid "Icorrect type, must be a parseable color" msgstr "Tipo erroneo, debe ser un color parseable" -#: ../Gtk/gui.py:4818 +#: ../Gtk/gui.py:4819 msgid "Type must be boolean, integer, string or color" msgstr "El tipo debe ser booleano, entero, cadena de texto o color" -#: ../Gtk/gui.py:4821 +#: ../Gtk/gui.py:4822 msgid "Value must be in the option dict" msgstr "El valor debe estar en el diccionario de opciones" -#: ../Gtk/gui.py:4823 +#: ../Gtk/gui.py:4824 msgid "Values must be a dict" msgstr "El valor debe ser un dicionario" @@ -1173,10 +1182,6 @@ msgid "The file must have 'bc3' extension" msgstr "El archivo debe tener extensión «bc3»" -#: ../Gtk/importFiebdc.py:137 -msgid "The file must have 'durus' extension" -msgstr "El nombre del archivo debe tener extensión «durus»" - #: ../Gtk/importFiebdc.py:208 msgid "Loading file ..." msgstr "Cargando archivo ..." @@ -1185,10 +1190,3 @@ msgid "Cancel" msgstr "Cancelar" -#: ../Gtk/importFiebdc.py:436 -msgid "Saving file: $1" -msgstr "Guardando archivo: $1" - -#: ../Gtk/importFiebdc.py:441 -msgid "Saving time: $1 seconds" -msgstr "Tiempo de guardado: $1 segundos"
--- a/mo/pyArq-Presupuestos.pot Fri Apr 19 00:04:20 2013 +0200 +++ b/mo/pyArq-Presupuestos.pot Sat Nov 02 19:26:09 2013 +0100 @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2010-11-24 22:27+0100\n" +"POT-Creation-Date: 2013-11-02 18:58+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <LL@li.org>\n" @@ -17,501 +17,513 @@ "Content-Type: text/plain; charset=CHARSET\n" "Content-Transfer-Encoding: 8bit\n" -#: ../Generic/base.py:358 +#: ../Generic/base.py:359 msgid "Invalid code: $1" msgstr "" -#: ../Generic/base.py:373 +#: ../Generic/base.py:374 msgid "Synonyms ($1) must be a list, code: $2" msgstr "" -#: ../Generic/base.py:377 +#: ../Generic/base.py:378 msgid "Invalid Code in synomyms list ($1) code: $2" msgstr "" -#: ../Generic/base.py:408 +#: ../Generic/base.py:409 msgid "Unit ($1) must be a string: $2" msgstr "" -#: ../Generic/base.py:422 +#: ../Generic/base.py:423 msgid "Summary ($1) must be a string: $1" msgstr "" -#: ../Generic/base.py:439 +#: ../Generic/base.py:440 msgid "Prices ($1) must be a list: $2" msgstr "" -#: ../Generic/base.py:460 +#: ../Generic/base.py:461 msgid "Price ($1) must be a list with two items: $2" msgstr "" -#: ../Generic/base.py:465 +#: ../Generic/base.py:466 msgid "Price must be a float number: $1" msgstr "" -#: ../Generic/base.py:475 +#: ../Generic/base.py:476 #, python-format msgid "The record do not have this Price. Code: %s" msgstr "" -#: ../Generic/base.py:481 +#: ../Generic/base.py:482 msgid "The record do not have this Price" msgstr "" -#: ../Generic/base.py:496 +#: ../Generic/base.py:497 msgid "Parents ($1) must be a list: $2" msgstr "" -#: ../Generic/base.py:500 ../Generic/base.py:512 +#: ../Generic/base.py:501 ../Generic/base.py:513 msgid "Invalid parent code ($1) in the record: $2" msgstr "" -#: ../Generic/base.py:528 +#: ../Generic/base.py:529 msgid "children ($1) must be a list, record: $2" msgstr "" -#: ../Generic/base.py:532 +#: ../Generic/base.py:533 msgid "child ($1) must be a Decomposition object, record: $2" msgstr "" -#: ../Generic/base.py:580 +#: ../Generic/base.py:581 msgid "Text ($1) must be a string, record: $2" msgstr "" -#: ../Generic/base.py:593 +#: ../Generic/base.py:594 msgid "sheet must be a Sheet instance" msgstr "" -#: ../Generic/base.py:606 +#: ../Generic/base.py:607 msgid "files must be a list: $1" msgstr "" -#: ../Generic/base.py:617 ../Generic/base.py:632 +#: ../Generic/base.py:618 ../Generic/base.py:633 msgid "Incorrect path" msgstr "" -#: ../Generic/base.py:622 +#: ../Generic/base.py:623 msgid "file must be a list or a File object: $1" msgstr "" -#: ../Generic/base.py:651 +#: ../Generic/base.py:652 msgid "labels must be a list" msgstr "" -#: ../Generic/base.py:657 +#: ../Generic/base.py:658 msgid "label must be a string" msgstr "" -#: ../Generic/base.py:666 +#: ../Generic/base.py:667 msgid "Label must be a string" msgstr "" -#: ../Generic/base.py:894 +#: ../Generic/base.py:907 msgid "Position must be a integer" msgstr "" -#: ../Generic/base.py:904 +#: ../Generic/base.py:917 msgid "BudgetMeasures atribute must be a list" msgstr "" -#: ../Generic/base.py:907 -msgid "BudgetMeasures item must be a Measure " -msgstr "" - -#: ../Generic/base.py:914 -msgid "Certification atribute must be a list or None" -msgstr "" - #: ../Generic/base.py:920 +msgid "BudgetMeasures item must be a Measure " +msgstr "" + +#: ../Generic/base.py:927 +msgid "Certification atribute must be a list or None" +msgstr "" + +#: ../Generic/base.py:933 msgid "Real cost atribute must be a list or None" msgstr "" -#: ../Generic/base.py:926 +#: ../Generic/base.py:939 msgid "Cost goals atribute must be a list or None" msgstr "" -#: ../Generic/base.py:932 +#: ../Generic/base.py:945 msgid "Cost Planned atribute must be a list or None" msgstr "" -#: ../Generic/base.py:1023 +#: ../Generic/base.py:1036 msgid "Measure must be a float number. Type: $1" msgstr "" -#: ../Generic/base.py:1034 +#: ../Generic/base.py:1047 msgid "Lines must be a list" msgstr "" -#: ../Generic/base.py:1037 +#: ../Generic/base.py:1050 msgid "Line must be a MeasureLine objetc" msgstr "" -#: ../Generic/base.py:1045 +#: ../Generic/base.py:1058 msgid "Factor must be a float number |$1|" msgstr "" -#: ../Generic/base.py:1057 +#: ../Generic/base.py:1070 msgid "Yield must be a float number" msgstr "" -#: ../Generic/base.py:1068 +#: ../Generic/base.py:1081 msgid "Fixed must be boolean object" msgstr "" -#: ../Generic/base.py:1137 +#: ../Generic/base.py:1151 msgid "Type must be M or A. Type: $1" msgstr "" -#: ../Generic/base.py:1269 +#: ../Generic/base.py:1283 msgid " Parcial Subtotal must be a float number. Parcial: $1" msgstr "" -#: ../Generic/base.py:1276 +#: ../Generic/base.py:1290 msgid " Acumulated Subtotal must be a float number. Parcial: $1" msgstr "" -#: ../Generic/base.py:1311 +#: ../Generic/base.py:1325 msgid "Invalid measure line type ($1)" msgstr "" -#: ../Generic/base.py:1316 +#: ../Generic/base.py:1330 msgid "Measure Comment must be a string ($1)" msgstr "" -#: ../Generic/base.py:1322 +#: ../Generic/base.py:1336 msgid "Invalid Measure Units ($1)" msgstr "" -#: ../Generic/base.py:1334 +#: ../Generic/base.py:1348 msgid "Invalid Measure length ($1)" msgstr "" -#: ../Generic/base.py:1346 +#: ../Generic/base.py:1360 msgid "Invalid Measure Width ($1)" msgstr "" -#: ../Generic/base.py:1358 +#: ../Generic/base.py:1372 msgid "Invalid Measure Height ($1)" msgstr "" -#: ../Generic/base.py:1369 +#: ../Generic/base.py:1383 msgid "Formula must be a string ($1)" msgstr "" -#: ../Generic/base.py:1372 +#: ../Generic/base.py:1386 msgid "There is invalid charactersin formula ($1)" msgstr "" -#: ../Generic/base.py:1437 ../Generic/base.py:2406 +#: ../Generic/base.py:1451 ../Generic/base.py:2443 msgid "'a' value must be a float number" msgstr "" -#: ../Generic/base.py:1441 ../Generic/base.py:2410 +#: ../Generic/base.py:1455 ../Generic/base.py:2447 msgid "'b' value must be a float number" msgstr "" -#: ../Generic/base.py:1445 ../Generic/base.py:2414 +#: ../Generic/base.py:1459 ../Generic/base.py:2451 msgid "'c' value must be a float number" msgstr "" -#: ../Generic/base.py:1449 ../Generic/base.py:2418 +#: ../Generic/base.py:1463 ../Generic/base.py:2455 msgid "'d' value must be a float number" msgstr "" -#: ../Generic/base.py:1477 ../Generic/base.py:2446 +#: ../Generic/base.py:1491 ../Generic/base.py:2483 msgid "Invalid formula" msgstr "" -#: ../Generic/base.py:1727 +#: ../Generic/base.py:1741 msgid "sheet_dict must be a dictionay" msgstr "" -#: ../Generic/base.py:1744 ../Generic/base.py:1750 +#: ../Generic/base.py:1758 ../Generic/base.py:1764 msgid "sheet field must be a string" msgstr "" -#: ../Generic/base.py:1746 +#: ../Generic/base.py:1760 msgid "section_dict must be a dictionary" msgstr "" -#: ../Generic/base.py:1752 +#: ../Generic/base.py:1766 msgid "sheet section must be a string" msgstr "" -#: ../Generic/base.py:1754 +#: ../Generic/base.py:1768 msgid "sheet paragraph must be a string" msgstr "" -#: ../Generic/base.py:1992 +#: ../Generic/base.py:2006 msgid "Owner must be a string" msgstr "" -#: ../Generic/base.py:2008 -#, python-format -msgid "Invalid Date: %s" +#: ../Generic/base.py:2022 +msgid "Invalid Date: $1" msgstr "" -#: ../Generic/base.py:2019 +#: ../Generic/base.py:2033 msgid "Comment must be a string" msgstr "" -#: ../Generic/base.py:2035 +#: ../Generic/base.py:2049 msgid "Budget type must be 1, 2, 3 or 4." msgstr "" -#: ../Generic/base.py:2047 +#: ../Generic/base.py:2061 msgid "Certificate order must be a integer." msgstr "" -#: ../Generic/base.py:2062 +#: ../Generic/base.py:2076 msgid "Budget certificate Date must be a valid Date." msgstr "" -#: ../Generic/base.py:2076 +#: ../Generic/base.py:2090 msgid "Invalid title list format" msgstr "" -#: ../Generic/base.py:2105 +#: ../Generic/base.py:2119 msgid "Invalid Index Title" msgstr "" -#: ../Generic/base.py:2140 +#: ../Generic/base.py:2154 msgid "Decimal Key error" msgstr "" -#: ../Generic/base.py:2176 +#: ../Generic/base.py:2190 msgid "Invalid Percentage key" msgstr "" -#: ../Generic/base.py:2291 +#: ../Generic/base.py:2313 msgid "Invalid parent code: $1" msgstr "" -#: ../Generic/base.py:2294 -msgid "Invalid child code: $1" +#: ../Generic/base.py:2316 +msgid "Invalid child code: $1 $2" msgstr "" -#: ../Generic/base.py:2297 +#: ../Generic/base.py:2319 msgid "Invalid position in measure $1, in code $2" msgstr "" -#: ../Generic/base.py:2305 +#: ../Generic/base.py:2327 msgid "" "Circular Decomposition, parent code: $1, child code: $2, repeated code: $3" msgstr "" -#: ../Generic/base.py:2360 ../Generic/base.py:2372 +#: ../Generic/base.py:2352 +msgid "" +"No-estructured measure or empty position. Parent Code: $1, Child code: $2, " +"Position: $3" +msgstr "" + +#: ../Generic/base.py:2356 +msgid "" +"No-estructured measure or empty position. Repeated child in unspecified " +"position. It is impossible to determine the position. New child is added in " +"the decomposition. Parent code: $1, Child code: $2, Position: $3" +msgstr "" + +#: ../Generic/base.py:2396 ../Generic/base.py:2408 msgid "" "Error: Invalid child position in decomposition. Parent code: $1 Child code: " "$2 Position: $3" msgstr "" -#: ../Generic/base.py:2366 +#: ../Generic/base.py:2402 msgid "Error: Empty child code. Parent code: $1 Position: $2" msgstr "" -#: ../Generic/base.py:2457 +#: ../Generic/base.py:2494 msgid "Invalid code" msgstr "" -#: ../Generic/base.py:2467 +#: ../Generic/base.py:2504 msgid "Invalid record: $1" msgstr "" -#: ../Generic/base.py:2530 +#: ../Generic/base.py:2567 msgid "Only can be one root record" msgstr "" -#: ../Generic/base.py:2624 ../Generic/base.py:2630 +#: ../Generic/base.py:2663 ../Generic/base.py:2669 msgid "This record does not exits" msgstr "" -#: ../Generic/base.py:2627 +#: ../Generic/base.py:2666 msgid "Path item must be a integer" msgstr "" -#: ../Generic/base.py:2632 +#: ../Generic/base.py:2671 msgid "Path must be a not empty tuple: $1" msgstr "" -#: ../Generic/base.py:2683 +#: ../Generic/base.py:2722 msgid "The sheet code must be a string" msgstr "" -#: ../Generic/base.py:2685 +#: ../Generic/base.py:2724 msgid "The sheet title must be a string" msgstr "" -#: ../Generic/base.py:2693 +#: ../Generic/base.py:2732 msgid "The sheet sections must be a dictionary" msgstr "" -#: ../Generic/base.py:2698 +#: ../Generic/base.py:2737 msgid "The field code must be a string" msgstr "" -#: ../Generic/base.py:2700 +#: ../Generic/base.py:2739 msgid "The field title must be a string" msgstr "" -#: ../Generic/base.py:2708 +#: ../Generic/base.py:2747 msgid "The sheet field must be a dictionary" msgstr "" -#: ../Generic/base.py:2713 +#: ../Generic/base.py:2752 msgid "The paragraph code must be a string" msgstr "" -#: ../Generic/base.py:2715 +#: ../Generic/base.py:2754 msgid "The paragraph text must be a string" msgstr "" -#: ../Generic/base.py:2723 +#: ../Generic/base.py:2762 msgid "The paragraph dict must be a dictionary" msgstr "" -#: ../Generic/base.py:2728 ../Generic/base.py:2752 ../Generic/base.py:2882 -#: ../Generic/base.py:2906 ../Generic/base.py:2928 +#: ../Generic/base.py:2767 ../Generic/base.py:2791 ../Generic/base.py:2921 +#: ../Generic/base.py:2945 ../Generic/base.py:2967 msgid "The record_code code must be a string" msgstr "" -#: ../Generic/base.py:2730 +#: ../Generic/base.py:2769 msgid "The field must be a string" msgstr "" -#: ../Generic/base.py:2732 +#: ../Generic/base.py:2771 msgid "The section dict must be a dictionary" msgstr "" -#: ../Generic/base.py:2736 +#: ../Generic/base.py:2775 msgid "" "Error: The budget do not have this record code and can not be added the " "sheet text in the field $1. Record Code: $2" msgstr "" -#: ../Generic/base.py:2754 +#: ../Generic/base.py:2793 msgid "The filename must be a string" msgstr "" -#: ../Generic/base.py:2758 +#: ../Generic/base.py:2797 msgid "" "Error: The budget do not have the record code $1 and can not be added the " "file: $2" msgstr "" -#: ../Generic/base.py:2768 +#: ../Generic/base.py:2807 msgid "The company code must be a string" msgstr "" -#: ../Generic/base.py:2770 +#: ../Generic/base.py:2809 msgid "The summary must be a string" msgstr "" -#: ../Generic/base.py:2772 ../Generic/base.py:2800 +#: ../Generic/base.py:2811 ../Generic/base.py:2839 msgid "The name must be a string" msgstr "" -#: ../Generic/base.py:2774 +#: ../Generic/base.py:2813 msgid "The name must be a list" msgstr "" -#: ../Generic/base.py:2778 +#: ../Generic/base.py:2817 msgid "The office must be a list" msgstr "" -#: ../Generic/base.py:2780 +#: ../Generic/base.py:2819 msgid "The office must be a 10 items list" msgstr "" -#: ../Generic/base.py:2783 +#: ../Generic/base.py:2822 msgid "This office item must be a string" msgstr "" -#: ../Generic/base.py:2787 +#: ../Generic/base.py:2826 msgid "This office item must be a list" msgstr "" -#: ../Generic/base.py:2802 +#: ../Generic/base.py:2841 msgid "The web must be a string" msgstr "" -#: ../Generic/base.py:2804 +#: ../Generic/base.py:2843 msgid "The email must be a string" msgstr "" -#: ../Generic/base.py:2814 +#: ../Generic/base.py:2853 msgid "The tecnical info code must be a string" msgstr "" -#: ../Generic/base.py:2816 +#: ../Generic/base.py:2855 msgid "The tecnical info description must be a string" msgstr "" -#: ../Generic/base.py:2819 +#: ../Generic/base.py:2858 msgid "The tecnical info unit must be a string" msgstr "" -#: ../Generic/base.py:2866 +#: ../Generic/base.py:2905 msgid "The label must be a string" msgstr "" -#: ../Generic/base.py:2884 +#: ../Generic/base.py:2923 msgid "The parametric select comment must be a string" msgstr "" -#: ../Generic/base.py:2887 +#: ../Generic/base.py:2926 msgid "" "Error: The budget do not have the record code $1 and can not be added the " "Parametric select comment: $2" msgstr "" -#: ../Generic/base.py:2894 +#: ../Generic/base.py:2933 msgid "" "Error: The Record $1 is not a Parametric Record and can not have Parametric " "comment" msgstr "" -#: ../Generic/base.py:2908 +#: ../Generic/base.py:2947 msgid "The summary record must be a string" msgstr "" -#: ../Generic/base.py:2910 +#: ../Generic/base.py:2949 msgid "" "Error: The budget do not have the record code $1 and can not be seted the " "summary: $2" msgstr "" -#: ../Generic/base.py:2916 +#: ../Generic/base.py:2955 msgid "" "Error: The Record $1 is not a Parametric Record and can not have Parametric " "summary" msgstr "" -#: ../Generic/base.py:2930 +#: ../Generic/base.py:2969 msgid "The text record must be a string" msgstr "" -#: ../Generic/base.py:2932 +#: ../Generic/base.py:2971 msgid "" "Error: The budget do not have the record code $1 and can not be seted the " "text: $2" msgstr "" -#: ../Generic/base.py:2938 +#: ../Generic/base.py:2977 msgid "" "Error: The Record $1 is not a Parametric Record and can not have Parametric " "text" msgstr "" -#: ../Generic/base.py:3396 -msgid "Invalid Hierarchy ($1) The hierarchy must be -1, 0, 1 or 2" +#: ../Generic/base.py:3435 +msgid "Invalid Hierarchy ($1) The hierarchy must be -1, 0, 1, 2" msgstr "" -#: ../Generic/base.py:3403 +#: ../Generic/base.py:3445 msgid "Invalid type ($1),the type must be (empty string,0,1,2,3)" msgstr "" -#: ../Generic/base.py:3412 +#: ../Generic/base.py:3454 msgid "" "Invalid subtype ($1), The subtype must one in (empty string, EA, EU, EC, EF, " "OB, PA, PU, H, Q, %, MC, MCr, MM, MS, ME, MCu, MAl, ML, M)" @@ -529,129 +541,142 @@ msgid "Loadig time: $1 seconds" msgstr "" -#: ../Generic/fiebdc.py:151 -msgid "Invalid code, it must be a string" +#: ../Generic/fiebdc.py:152 +msgid "Invalid code, it must be a unicode string" msgstr "" -#: ../Generic/fiebdc.py:157 +#: ../Generic/fiebdc.py:159 msgid "The code '$1' have invalid characters." msgstr "" -#: ../Generic/fiebdc.py:170 +#: ../Generic/fiebdc.py:162 +msgid "The code '$1' have invalid characters and can not be encoded in utf8." +msgstr "" + +#: ../Generic/fiebdc.py:184 msgid "The code '$1' contains special characters repeated." msgstr "" -#: ../Generic/fiebdc.py:391 +#: ../Generic/fiebdc.py:405 msgid "" "The 'V' record (Property and Version) must be the first record in the file " "but it is the number: $1" msgstr "" -#: ../Generic/fiebdc.py:394 +#: ../Generic/fiebdc.py:408 msgid "The default values were taken and this V record is ignored" msgstr "" -#: ../Generic/fiebdc.py:428 -#, python-format -msgid "FIEBDC format: %s" +#: ../Generic/fiebdc.py:442 +msgid "FIEBDC format: $1" msgstr "" -#: ../Generic/fiebdc.py:437 -#, python-format -msgid "FIEBDC file generated by %s" +#: ../Generic/fiebdc.py:452 +msgid "FIEBDC file generated by $1" msgstr "" -#: ../Generic/fiebdc.py:776 +#: ../Generic/fiebdc.py:793 msgid "Record C without a valid code" msgstr "" -#: ../Generic/fiebdc.py:852 ../Generic/fiebdc.py:864 ../Generic/fiebdc.py:892 +#: ../Generic/fiebdc.py:869 ../Generic/fiebdc.py:881 ../Generic/fiebdc.py:909 msgid "Incorrect type ($1) in the code $2" msgstr "" -#: ../Generic/fiebdc.py:943 +#: ../Generic/fiebdc.py:961 msgid "" "ValueError loadig the descomposition of the record $1, the factor of the " "child $2 must be a float number and can not be $3, seted default value 1.0" msgstr "" -#: ../Generic/fiebdc.py:954 +#: ../Generic/fiebdc.py:972 msgid "" "ValueError loading the descomposition of the record $1, the yield of the " "child $2, must be a float number and cannot be $3, seted default value 1.0" msgstr "" -#: ../Generic/fiebdc.py:1041 +#: ../Generic/fiebdc.py:1060 msgid "Invalid codes in $1 record, codes $2" msgstr "" -#: ../Generic/fiebdc.py:1045 +#: ../Generic/fiebdc.py:1064 msgid "Empty child code in $1 record, codes: $2" msgstr "" -#: ../Generic/fiebdc.py:1058 +#: ../Generic/fiebdc.py:1084 msgid "Invalid path in $1 record, codes $2" msgstr "" -#: ../Generic/fiebdc.py:1069 -msgid "Invalid Total Measure value in $1 record, codes $2" +#: ../Generic/fiebdc.py:1095 +msgid "Invalid Total Measure value in $1 record, codes $2. Total fixed to 0." msgstr "" -#: ../Generic/fiebdc.py:1089 +#: ../Generic/fiebdc.py:1116 msgid "" "The comment is not a formula or its have invalid characters, in the $1 " "record, codes $2" msgstr "" -#: ../Generic/fiebdc.py:1403 ../Generic/fiebdc.py:1657 +#: ../Generic/fiebdc.py:1142 +msgid "The measure values are not float numbers, code $1" +msgstr "" + +#: ../Generic/fiebdc.py:1438 ../Generic/fiebdc.py:1697 msgid "The file $1 do not exist" msgstr "" -#: ../Generic/fiebdc.py:1763 ../Generic/fiebdc.py:1770 +#: ../Generic/fiebdc.py:1803 ../Generic/fiebdc.py:1810 msgid "PyArq hates parametric DLLs" msgstr "" -#: ../Generic/fiebdc.py:1979 +#: ../Generic/fiebdc.py:2019 msgid "Loading file $1" msgstr "" -#: ../Generic/fiebdc.py:1999 -msgid "This codepage do not exist in FIEBDC3! Default codepage: $1" +#: ../Generic/fiebdc.py:2038 +msgid "FIEBDC character encoding: $1" msgstr "" -#: ../Generic/fiebdc.py:2003 -msgid "This V record dot have a codepage! Default codepage: $1" +#: ../Generic/fiebdc.py:2040 +msgid "" +"This Character encoding do not exist in FIEBDC3! Default Character encoding: " +"$1" msgstr "" -#: ../Generic/fiebdc.py:2007 -msgid "Not 'V' record in File! Default codepage: $1" +#: ../Generic/fiebdc.py:2044 +msgid "" +"This V record dot have a character encoding! Default character encoding: $1" msgstr "" #: ../Generic/fiebdc.py:2048 +msgid "Not 'V' record in File! Default character encoding: $1" +msgstr "" + +#: ../Generic/fiebdc.py:2085 msgid "Process terminated" msgstr "" -#: ../Generic/fiebdc.py:2051 +#: ../Generic/fiebdc.py:2088 msgid "Time to load: $1 seconds" msgstr "" -#: ../Generic/fiebdc.py:2053 +#: ../Generic/fiebdc.py:2090 msgid "Records/Valid Records: $1/$2" msgstr "" -#: ../Generic/fiebdc.py:2056 +#: ../Generic/fiebdc.py:2093 msgid "$1 unsuported record type O: Comercial Relationship" msgstr "" -#: ../Generic/fiebdc.py:2059 +#: ../Generic/fiebdc.py:2096 msgid "This file is not a valid FIBDC3 file" msgstr "" -#: ../Generic/fiebdc.py:2096 +#: ../Generic/fiebdc.py:2133 msgid "Testing budget ..." msgstr "" -#: ../Generic/fiebdc.py:2114 +#: ../Generic/fiebdc.py:2151 msgid "End Test" msgstr "" @@ -663,322 +688,302 @@ msgid "pyArq-Presupuestos running on $1" msgstr "" -#: ../Gtk/gui.py:168 +#: ../Gtk/gui.py:169 msgid "_File" msgstr "" -#: ../Gtk/gui.py:169 +#: ../Gtk/gui.py:170 msgid "_Import Fiebdc" msgstr "" -#: ../Gtk/gui.py:170 -msgid "Import FIEBDC" -msgstr "" - #: ../Gtk/gui.py:171 +msgid "Import FIEBDC" +msgstr "" + +#: ../Gtk/gui.py:172 msgid "_Close" msgstr "" -#: ../Gtk/gui.py:171 +#: ../Gtk/gui.py:172 msgid "Close" msgstr "" -#: ../Gtk/gui.py:173 +#: ../Gtk/gui.py:174 msgid "_View" msgstr "" -#: ../Gtk/gui.py:174 ../Gtk/gui.py:184 +#: ../Gtk/gui.py:175 ../Gtk/gui.py:185 msgid "_Go" msgstr "" -#: ../Gtk/gui.py:175 +#: ../Gtk/gui.py:176 msgid "_Test" msgstr "" -#: ../Gtk/gui.py:177 -msgid "Import Fiebdc _price database" -msgstr "" - -#: ../Gtk/gui.py:177 -msgid "Import database" -msgstr "" - -#: ../Gtk/gui.py:179 -msgid "_Open price database" -msgstr "" - -#: ../Gtk/gui.py:180 -msgid "Open Database" -msgstr "" - -#: ../Gtk/gui.py:185 +#: ../Gtk/gui.py:186 msgid "_Back" msgstr "" -#: ../Gtk/gui.py:186 ../Gtk/gui.py:197 +#: ../Gtk/gui.py:187 ../Gtk/gui.py:198 msgid "Go to the previous visited item" msgstr "" -#: ../Gtk/gui.py:188 +#: ../Gtk/gui.py:189 msgid "_Forward" msgstr "" -#: ../Gtk/gui.py:189 ../Gtk/gui.py:201 +#: ../Gtk/gui.py:190 ../Gtk/gui.py:202 msgid "Go to the next visited item" msgstr "" -#: ../Gtk/gui.py:190 +#: ../Gtk/gui.py:191 msgid "_Up Item" msgstr "" -#: ../Gtk/gui.py:191 +#: ../Gtk/gui.py:192 msgid "Go up item" msgstr "" -#: ../Gtk/gui.py:192 +#: ../Gtk/gui.py:193 msgid "_Root" msgstr "" -#: ../Gtk/gui.py:193 +#: ../Gtk/gui.py:194 msgid "Go to root" msgstr "" -#: ../Gtk/gui.py:220 +#: ../Gtk/gui.py:221 msgid "Back history" msgstr "" -#: ../Gtk/gui.py:225 +#: ../Gtk/gui.py:226 msgid "Forward history" msgstr "" -#: ../Gtk/gui.py:422 -msgid "Cancel reading Durus database has not been implemented." -msgstr "" - -#: ../Gtk/gui.py:443 +#: ../Gtk/gui.py:444 msgid "The page is not in the page list" msgstr "" -#: ../Gtk/gui.py:672 ../Gtk/importFiebdc.py:220 +#: ../Gtk/gui.py:673 ../Gtk/importFiebdc.py:220 msgid "Time: 0s" msgstr "" -#: ../Gtk/gui.py:749 ../Gtk/importFiebdc.py:299 +#: ../Gtk/gui.py:750 ../Gtk/importFiebdc.py:299 msgid "Time: $1" msgstr "" -#: ../Gtk/gui.py:1075 +#: ../Gtk/gui.py:1076 msgid "The value must be a list" msgstr "" -#: ../Gtk/gui.py:1078 +#: ../Gtk/gui.py:1079 msgid "Incorrect len" msgstr "" -#: ../Gtk/gui.py:1106 +#: ../Gtk/gui.py:1107 msgid "Incorrect item $1" msgstr "" -#: ../Gtk/gui.py:1122 +#: ../Gtk/gui.py:1123 msgid "The budget does not have the path record: $1" msgstr "" -#: ../Gtk/gui.py:1478 +#: ../Gtk/gui.py:1479 msgid "Decomposition" msgstr "" -#: ../Gtk/gui.py:1479 ../Gtk/gui.py:2485 +#: ../Gtk/gui.py:1480 ../Gtk/gui.py:2486 msgid "Description" msgstr "" -#: ../Gtk/gui.py:1480 ../Gtk/gui.py:2487 +#: ../Gtk/gui.py:1481 ../Gtk/gui.py:2488 msgid "Measure" msgstr "" -#: ../Gtk/gui.py:1481 +#: ../Gtk/gui.py:1482 msgid "Sheet of Conditions" msgstr "" -#: ../Gtk/gui.py:1482 -msgid "Files" -msgstr "" - #: ../Gtk/gui.py:1483 +msgid "Files" +msgstr "" + +#: ../Gtk/gui.py:1484 msgid "Companies" msgstr "" -#: ../Gtk/gui.py:1660 +#: ../Gtk/gui.py:1661 msgid "Split View Left/Right" msgstr "" -#: ../Gtk/gui.py:1664 +#: ../Gtk/gui.py:1665 msgid "Split View Top/Bottom" msgstr "" -#: ../Gtk/gui.py:1668 +#: ../Gtk/gui.py:1669 msgid "Close view" msgstr "" -#: ../Gtk/gui.py:1836 +#: ../Gtk/gui.py:1837 msgid "The item must be a widget object." msgstr "" -#: ../Gtk/gui.py:1842 +#: ../Gtk/gui.py:1843 msgid "Invalid orientation." msgstr "" -#: ../Gtk/gui.py:2214 ../Gtk/gui.py:2841 ../Gtk/gui.py:4171 +#: ../Gtk/gui.py:2215 ../Gtk/gui.py:2842 ../Gtk/gui.py:4172 msgid "Argument must be a Budget object" msgstr "" -#: ../Gtk/gui.py:2223 +#: ../Gtk/gui.py:2224 msgid "Record path can not be None" msgstr "" -#: ../Gtk/gui.py:2254 +#: ../Gtk/gui.py:2255 msgid "a" msgstr "" -#: ../Gtk/gui.py:2482 ../Gtk/gui.py:4234 +#: ../Gtk/gui.py:2483 ../Gtk/gui.py:4235 msgid "Code" msgstr "" -#: ../Gtk/gui.py:2483 +#: ../Gtk/gui.py:2484 msgid "Unit" msgstr "" -#: ../Gtk/gui.py:2489 +#: ../Gtk/gui.py:2490 msgid "Price" msgstr "" -#: ../Gtk/gui.py:2491 +#: ../Gtk/gui.py:2492 msgid "Amount" msgstr "" -#: ../Gtk/gui.py:2502 ../Gtk/gui.py:2981 +#: ../Gtk/gui.py:2503 ../Gtk/gui.py:2982 msgid "Invalid path" msgstr "" -#: ../Gtk/gui.py:2846 +#: ../Gtk/gui.py:2847 msgid "Record path must be a tuple" msgstr "" -#: ../Gtk/gui.py:2990 +#: ../Gtk/gui.py:2991 msgid "measure must be a Measure object. Type: $1" msgstr "" -#: ../Gtk/gui.py:3002 ../Gtk/gui.py:4249 ../Gtk/gui.py:4562 +#: ../Gtk/gui.py:3003 ../Gtk/gui.py:4250 ../Gtk/gui.py:4563 msgid "Type" msgstr "" -#: ../Gtk/gui.py:3003 +#: ../Gtk/gui.py:3004 msgid "Comment" msgstr "" -#: ../Gtk/gui.py:3004 +#: ../Gtk/gui.py:3005 msgid "" "N\n" "(a)" msgstr "" -#: ../Gtk/gui.py:3005 +#: ../Gtk/gui.py:3006 msgid "" "Length\n" "(b)" msgstr "" -#: ../Gtk/gui.py:3006 +#: ../Gtk/gui.py:3007 msgid "" "Width\n" "(c)" msgstr "" -#: ../Gtk/gui.py:3007 +#: ../Gtk/gui.py:3008 msgid "" "Height\n" "(d)" msgstr "" -#: ../Gtk/gui.py:3008 +#: ../Gtk/gui.py:3009 msgid "Formula" msgstr "" -#: ../Gtk/gui.py:3009 +#: ../Gtk/gui.py:3010 #, python-format msgid "" "Parcial\n" "[%s]" msgstr "" -#: ../Gtk/gui.py:3010 +#: ../Gtk/gui.py:3011 msgid "Subtotal" msgstr "" -#: ../Gtk/gui.py:3418 ../Gtk/gui.py:3440 +#: ../Gtk/gui.py:3419 ../Gtk/gui.py:3441 msgid "Description text of the record $1" msgstr "" -#: ../Gtk/gui.py:3591 +#: ../Gtk/gui.py:3592 msgid "Sheet of Conditions of the record $1" msgstr "" -#: ../Gtk/gui.py:3609 +#: ../Gtk/gui.py:3610 msgid "Field" msgstr "" -#: ../Gtk/gui.py:3630 +#: ../Gtk/gui.py:3631 msgid "Section" msgstr "" -#: ../Gtk/gui.py:3778 +#: ../Gtk/gui.py:3779 msgid "Sheet2 of Conditions of the record $1" msgstr "" -#: ../Gtk/gui.py:4235 +#: ../Gtk/gui.py:4236 msgid "Code that define the company" msgstr "" -#: ../Gtk/gui.py:4236 -msgid "Summary" -msgstr "" - #: ../Gtk/gui.py:4237 +msgid "Summary" +msgstr "" + +#: ../Gtk/gui.py:4238 msgid "Summary of the company name" msgstr "" -#: ../Gtk/gui.py:4238 ../Gtk/gui.py:4254 +#: ../Gtk/gui.py:4239 ../Gtk/gui.py:4255 msgid "Name" msgstr "" -#: ../Gtk/gui.py:4239 +#: ../Gtk/gui.py:4240 msgid "Complete name" msgstr "" -#: ../Gtk/gui.py:4240 -msgid "CIF" -msgstr "" - #: ../Gtk/gui.py:4241 -msgid "Fiscal identifier number" +msgid "CIF" msgstr "" #: ../Gtk/gui.py:4242 -msgid "Web" +msgid "Fiscal identifier number" msgstr "" #: ../Gtk/gui.py:4243 -msgid "Company web page" +msgid "Web" msgstr "" #: ../Gtk/gui.py:4244 -msgid "Email" +msgid "Company web page" msgstr "" #: ../Gtk/gui.py:4245 +msgid "Email" +msgstr "" + +#: ../Gtk/gui.py:4246 msgid "Company email" msgstr "" -#: ../Gtk/gui.py:4250 +#: ../Gtk/gui.py:4251 msgid "" "Type of Office:\n" " C: Central office\n" @@ -986,131 +991,131 @@ " R: Performer" msgstr "" -#: ../Gtk/gui.py:4255 +#: ../Gtk/gui.py:4256 msgid "Office name" msgstr "" -#: ../Gtk/gui.py:4256 +#: ../Gtk/gui.py:4257 msgid "Address" msgstr "" -#: ../Gtk/gui.py:4257 -msgid "Postal code" -msgstr "" - #: ../Gtk/gui.py:4258 +msgid "Postal code" +msgstr "" + +#: ../Gtk/gui.py:4259 msgid "Town" msgstr "" -#: ../Gtk/gui.py:4259 +#: ../Gtk/gui.py:4260 msgid "Province" msgstr "" -#: ../Gtk/gui.py:4260 +#: ../Gtk/gui.py:4261 msgid "Country" msgstr "" -#: ../Gtk/gui.py:4261 -msgid "Phone" -msgstr "" - #: ../Gtk/gui.py:4262 -msgid "Phone numbers of the office" +msgid "Phone" msgstr "" #: ../Gtk/gui.py:4263 -msgid "Fax" +msgid "Phone numbers of the office" msgstr "" #: ../Gtk/gui.py:4264 +msgid "Fax" +msgstr "" + +#: ../Gtk/gui.py:4265 msgid "Fax numbers of the office" msgstr "" -#: ../Gtk/gui.py:4265 +#: ../Gtk/gui.py:4266 msgid "Contact person" msgstr "" -#: ../Gtk/gui.py:4266 +#: ../Gtk/gui.py:4267 msgid "Contact persons in the office" msgstr "" -#: ../Gtk/gui.py:4270 +#: ../Gtk/gui.py:4271 msgid "Unknow Option Type" msgstr "" -#: ../Gtk/gui.py:4500 +#: ../Gtk/gui.py:4501 msgid "Boolean" msgstr "" -#: ../Gtk/gui.py:4501 -msgid "Integer" -msgstr "" - #: ../Gtk/gui.py:4502 -msgid "Text" +msgid "Integer" msgstr "" #: ../Gtk/gui.py:4503 +msgid "Text" +msgstr "" + +#: ../Gtk/gui.py:4504 msgid "Color" msgstr "" -#: ../Gtk/gui.py:4504 +#: ../Gtk/gui.py:4505 msgid "List" msgstr "" -#: ../Gtk/gui.py:4536 +#: ../Gtk/gui.py:4537 msgid "Option name" msgstr "" -#: ../Gtk/gui.py:4549 +#: ../Gtk/gui.py:4550 msgid "Value" msgstr "" -#: ../Gtk/gui.py:4588 +#: ../Gtk/gui.py:4589 msgid "Description:" msgstr "" -#: ../Gtk/gui.py:4749 +#: ../Gtk/gui.py:4750 msgid "Option values must be strings" msgstr "" -#: ../Gtk/gui.py:4751 +#: ../Gtk/gui.py:4752 msgid "Option must be a tuple with 4 items" msgstr "" -#: ../Gtk/gui.py:4753 +#: ../Gtk/gui.py:4754 msgid "Option list must be a list" msgstr "" -#: ../Gtk/gui.py:4773 +#: ../Gtk/gui.py:4774 msgid "Icorrect type, must be boolean" msgstr "" -#: ../Gtk/gui.py:4778 +#: ../Gtk/gui.py:4779 msgid "Icorrect type, must be integer" msgstr "" -#: ../Gtk/gui.py:4791 +#: ../Gtk/gui.py:4792 msgid "Icorrect type, must be string" msgstr "" -#: ../Gtk/gui.py:4804 +#: ../Gtk/gui.py:4805 msgid "Icorrect type, must be list" msgstr "" -#: ../Gtk/gui.py:4810 +#: ../Gtk/gui.py:4811 msgid "Icorrect type, must be a parseable color" msgstr "" -#: ../Gtk/gui.py:4818 +#: ../Gtk/gui.py:4819 msgid "Type must be boolean, integer, string or color" msgstr "" -#: ../Gtk/gui.py:4821 +#: ../Gtk/gui.py:4822 msgid "Value must be in the option dict" msgstr "" -#: ../Gtk/gui.py:4823 +#: ../Gtk/gui.py:4824 msgid "Values must be a dict" msgstr "" @@ -1122,10 +1127,6 @@ msgid "The file must have 'bc3' extension" msgstr "" -#: ../Gtk/importFiebdc.py:137 -msgid "The file must have 'durus' extension" -msgstr "" - #: ../Gtk/importFiebdc.py:208 msgid "Loading file ..." msgstr "" @@ -1133,11 +1134,3 @@ #: ../Gtk/importFiebdc.py:232 msgid "Cancel" msgstr "" - -#: ../Gtk/importFiebdc.py:436 -msgid "Saving file: $1" -msgstr "" - -#: ../Gtk/importFiebdc.py:441 -msgid "Saving time: $1 seconds" -msgstr ""