You can search ' - 'in the repository history to see if that path ' - 'existed but was later removed.
', e.message, + raise TracError(Markup(unicode('%sTu puedes buscar ' + 'en el historial del repositorio para ver si la ruta ' + 'existía pero fué posteriormente eliminada.
', 'utf-8'), e.message, req.href.log(path, rev=rev, mode='path_history'))) Index: trac/versioncontrol/web_ui/changeset.py =================================================================== --- trac/versioncontrol/web_ui/changeset.py (revision 5935) +++ trac/versioncontrol/web_ui/changeset.py (working copy) @@ -259,9 +259,9 @@ 'new': new, 'old_path': old_path, 'old': old}) - add_link(req, 'alternate', '?format=diff&'+diff_params, 'Unified Diff', + add_link(req, 'alternate', '?format=diff&'+diff_params, 'Diff Unificado', 'text/plain', 'diff') - add_link(req, 'alternate', '?format=zip&'+diff_params, 'Zip Archive', + add_link(req, 'alternate', '?format=zip&'+diff_params, 'Archivo Zip', 'application/zip', 'zip') add_stylesheet(req, 'common/css/changeset.css') add_stylesheet(req, 'common/css/diff.css') @@ -304,9 +304,9 @@ def _changeset_title(rev): if restricted: - return 'Changeset %s for %s' % (rev, path) + return 'Conjunto de cambios %s para %s' % (rev, path) else: - return 'Changeset %s' % rev + return 'Conjunto de cambios %s' % rev title = _changeset_title(rev) properties = [] @@ -335,7 +335,7 @@ prev_path = prev_rev = None else: add_link(req, 'first', req.href.changeset(oldest_rev), - 'Changeset %s' % oldest_rev) + 'Conjunto de cambios %s' % oldest_rev) prev_path = diff.old_path prev_rev = repos.previous_rev(chgset.rev) if prev_rev: @@ -353,7 +353,7 @@ next_href = req.href.changeset(next_rev) else: add_link(req, 'last', req.href.changeset(youngest_rev), - 'Changeset %s' % youngest_rev) + 'Conjunto de cambios %s' % youngest_rev) next_rev = repos.next_rev(chgset.rev) if next_rev: next_href = req.href.changeset(next_rev) @@ -626,7 +626,7 @@ def get_timeline_filters(self, req): if req.perm.has_permission('CHANGESET_VIEW'): - yield ('changeset', 'Repository checkins') + yield ('changeset', 'Cambios en el repositorio') def get_timeline_events(self, req, start, stop, filters): if 'changeset' in filters: @@ -644,7 +644,7 @@ shortlog = shorten_line(message) if format == 'rss': - title = Markup('Changeset [%s]: %s', chgset.rev, shortlog) + title = Markup('Conjunto de cambios [%s]: %s', chgset.rev, shortlog) href = req.abs_href.changeset(chgset.rev) if wiki_format: message = wiki_to_html(message, self.env, req, db, @@ -652,7 +652,7 @@ else: message = html.PRE(message) else: - title = Markup('Changeset [%s] by %s', chgset.rev, + title = Markup('Conjunto de cambios [%s] por %s', chgset.rev, chgset.author) href = req.href.changeset(chgset.rev) @@ -750,7 +750,7 @@ def get_search_filters(self, req): if req.perm.has_permission('CHANGESET_VIEW'): - yield ('changeset', 'Changesets') + yield ('changeset', 'Conjuntos de cambios') def get_search_results(self, req, terms, filters): if not 'changeset' in filters: Index: trac/versioncontrol/web_ui/log.py =================================================================== --- trac/versioncontrol/web_ui/log.py (revision 5935) +++ trac/versioncontrol/web_ui/log.py (working copy) @@ -94,7 +94,7 @@ path_links = get_path_links(req.href, path, rev) req.hdf['log.path'] = path_links if path_links: - add_link(req, 'up', path_links[-1]['href'], 'Parent directory') + add_link(req, 'up', path_links[-1]['href'], 'Directorio superior') # The `history()` method depends on the mode: # * for ''stop on copy'' and ''follow copies'', it's `Node.history()` @@ -134,9 +134,9 @@ previous_path = old_path if info == []: # FIXME: we should send a 404 error here - raise TracError("The file or directory '%s' doesn't exist " - "at revision %s or at any previous revision." - % (path, rev), 'Nonexistent path') + raise TracError(unicode("El archivo o directorio '%s' no existe " + "en la revisión %s o ni en ninguna revisión previa.", 'utf-8') + % (path, rev), 'Ruta inexistente') def make_log_href(path, **args): link_rev = rev @@ -152,7 +152,7 @@ next_rev = info[-1]['rev'] next_path = info[-1]['path'] add_link(req, 'next', make_log_href(next_path, rev=next_rev), - 'Revision Log (restarting at %s, rev. %s)' + unicode('Bitácora de Revisiones (reiniciando en %s, rev. %s)', 'utf-8') % (next_path, next_rev)) # now, only show 'limit' results del info[-1] @@ -202,11 +202,11 @@ add_stylesheet(req, 'common/css/diff.css') rss_href = make_log_href(path, format='rss', stop_rev=stop_rev) - add_link(req, 'alternate', rss_href, 'RSS Feed', 'application/rss+xml', + add_link(req, 'alternate', rss_href, 'Fuente en formato RSS', 'application/rss+xml', 'rss') changelog_href = make_log_href(path, format='changelog', stop_rev=stop_rev) - add_link(req, 'alternate', changelog_href, 'ChangeLog', 'text/plain') + add_link(req, 'alternate', changelog_href, unicode('Bitácora de cambios', 'utf-8'), 'text/plain') return 'log.cs', None Index: trac/versioncontrol/web_ui/browser.py =================================================================== --- trac/versioncontrol/web_ui/browser.py (revision 5935) +++ trac/versioncontrol/web_ui/browser.py (working copy) @@ -78,7 +78,7 @@ if not req.perm.has_permission('BROWSER_VIEW'): return yield ('mainnav', 'browser', - html.A('Browse Source', href=req.href.browser())) + html.A('Explorar repositorio', href=req.href.browser())) # IPermissionRequestor methods @@ -140,7 +140,7 @@ path_links = get_path_links(req.href, path, rev) if len(path_links) > 1: - add_link(req, 'up', path_links[-2]['href'], 'Parent directory') + add_link(req, 'up', path_links[-2]['href'], 'Directorio superior') req.hdf['browser.path'] = path_links if node.isdir: @@ -205,7 +205,7 @@ filter(None, [fnmatchcase(node.path, p) for p in patterns]): zip_href = req.href.changeset(rev or repos.youngest_rev, node.path, old=rev, old_path='/', format='zip') - add_link(req, 'alternate', zip_href, 'Zip Archive', + add_link(req, 'alternate', zip_href, 'Archivo Zip', 'application/zip', 'zip') req.hdf['browser'] = {'order': order, 'desc': desc and 1 or 0, @@ -270,12 +270,12 @@ # add ''Plain Text'' alternate link if needed if not is_binary(chunk) and mime_type != 'text/plain': plain_href = req.href.browser(node.path, rev=rev, format='txt') - add_link(req, 'alternate', plain_href, 'Plain Text', + add_link(req, 'alternate', plain_href, 'Texto Plano', 'text/plain') # add ''Original Format'' alternate link (always) raw_href = req.href.export(rev or repos.youngest_rev, node.path) - add_link(req, 'alternate', raw_href, 'Original Format', mime_type) + add_link(req, 'alternate', raw_href, 'Formato Original', mime_type) self.log.debug("Rendering preview of node %s@%s with mime-type %s" % (node.name, str(rev), mime_type)) Index: trac/versioncontrol/cache.py =================================================================== --- trac/versioncontrol/cache.py (revision 5935) +++ trac/versioncontrol/cache.py (working copy) @@ -81,8 +81,8 @@ if repository_dir != self.name: self.log.info("'repository_dir' has changed from %r to %r" % (repository_dir, self.name)) - raise TracError("The 'repository_dir' has changed, " - "a 'trac-admin resync' operation is needed.") + raise TracError(unicode("La entrada 'repository_dir' ha cambiado, " + "es necesario realizar la operación 'trac-admin resync'.", 'utf-8')) elif repository_dir is None: # self.log.info('Storing initial "repository_dir": %s' % self.name) cursor.execute("INSERT INTO system (name,value) VALUES (%s,%s)", @@ -100,7 +100,7 @@ # -- retrieve the youngest revision cached so far if CACHE_YOUNGEST_REV not in metadata: - raise TracError('Missing "youngest_rev" in cache metadata') + raise TracError(unicode('No existe "youngest_rev" en el caché de meta-datos', 'utf-8')) self.youngest = metadata[CACHE_YOUNGEST_REV] Index: trac/Settings.py =================================================================== --- trac/Settings.py (revision 5935) +++ trac/Settings.py (working copy) @@ -33,7 +33,7 @@ def get_navigation_items(self, req): yield ('metanav', 'settings', - html.A('Settings', href=req.href.settings())) + html.A(unicode('Configuración', 'utf-8'), href=req.href.settings())) # IRequestHandler methods @@ -49,7 +49,7 @@ elif action == 'load': self._do_load(req) - req.hdf['title'] = 'Settings' + req.hdf['title'] = unicode('Configuración', 'utf-8') req.hdf['settings'] = req.session if req.authname == 'anonymous': req.hdf['settings.session_id'] = req.session.sid Index: trac/perm.py =================================================================== --- trac/perm.py (revision 5935) +++ trac/perm.py (working copy) @@ -32,7 +32,7 @@ self.action = action def __str__ (self): - return '%s privileges are required to perform this operation' % self.action + return unicode('Se requiere el privilegio %s para realizar esta operación', 'utf-8') % self.action class IPermissionRequestor(Interface): @@ -185,7 +185,7 @@ """Grant the user with the given name permission to perform to specified action.""" if action.isupper() and action not in self.get_actions(): - raise TracError, '%s is not a valid action.' % action + raise TracError, unicode('%s no es una acción válida.', 'utf-8') % action self.store.grant_permission(username, action) Index: trac/Search.py =================================================================== --- trac/Search.py (revision 5935) +++ trac/Search.py (working copy) @@ -74,7 +74,7 @@ parameters. The result is returned as a (string, params) tuple. """ if len(columns) < 1 or len(terms) < 1: - raise TracError('Empty search attempt, this should really not happen.') + raise TracError(unicode('Intento de búsqueda con criterio vacío, esto no debería pasar realmente.', 'utf-8')) likes = ['%s %s' % (i, db.like()) for i in columns] c = ' OR '.join(likes) @@ -132,7 +132,7 @@ if not req.perm.has_permission('SEARCH_VIEW'): return yield ('mainnav', 'search', - html.A('Search', href=req.href.search(), accesskey=4)) + html.A('Buscar', href=req.href.search(), accesskey=4)) # IPermissionRequestor methods @@ -162,7 +162,7 @@ 'active': filter[0] in filters } for filter in available_filters] - req.hdf['title'] = 'Search' + req.hdf['title'] = 'Buscar' query = req.args.get('q') if query: @@ -173,9 +173,9 @@ terms = search_terms(query) # Refuse queries that obviously would result in a huge result set if len(terms) == 1 and len(terms[0]) < self.min_query_length: - raise TracError('Search query too short. ' - 'Query must be at least %d characters long.' % \ - self.min_query_length, 'Search Error') + raise TracError(unicode('El criterio de búsqueda es demasiado corto. ' + 'El criterio de búsqueda debe tener al menos %d caracteres de longitud.', 'utf-8') % \ + self.min_query_length, unicode('Error en la Búsqueda', 'utf-8')) results = [] for source in self.search_sources: results += list(source.get_search_results(req, terms, filters)) @@ -185,7 +185,7 @@ n_pages = (n-1) / page_size + 1 results = results[(page-1) * page_size: page * page_size] - req.hdf['title'] = 'Search Results' + req.hdf['title'] = unicode('Resultados de la Búsqueda', 'utf-8') req.hdf['search.q'] = req.args.get('q') req.hdf['search.page'] = page req.hdf['search.n_hits'] = n @@ -195,12 +195,12 @@ next_href = req.href.search(zip(filters, ['on'] * len(filters)), q=req.args.get('q'), page=page + 1, noquickjump=1) - add_link(req, 'next', next_href, 'Next Page') + add_link(req, 'next', next_href, unicode('Siguiente página', 'utf-8')) if page > 1: prev_href = req.href.search(zip(filters, ['on'] * len(filters)), q=req.args.get('q'), page=page - 1, noquickjump=1) - add_link(req, 'prev', prev_href, 'Previous Page') + add_link(req, 'prev', prev_href, unicode('Página anterior', 'utf-8')) req.hdf['search.page_href'] = req.href.search( zip(filters, ['on'] * len(filters)), q=req.args.get('q'), noquickjump=1) @@ -222,7 +222,7 @@ if kwd[0] == '/': quickjump_href = req.href.browser(kwd) name = kwd - description = 'Browse repository path ' + kwd + description = 'Buscar ruta en el repositorio ' + kwd else: link = wiki_to_link(kwd, self.env, req) if isinstance(link, Element): Index: trac/config.py =================================================================== --- trac/config.py (revision 5935) +++ trac/config.py (working copy) @@ -220,7 +220,7 @@ yield option def __repr__(self): - return 'You may want to see the other kind of events from the ' - 'Timeline
', + 'Tal vez quiera ver los otros tipos de eventos de la ' + 'Cronología
', 'utf-8'), ", ".join(guilty_kinds), ep_name, exc_name, to_unicode(exc), href)) Index: trac/About.py =================================================================== --- trac/About.py (revision 5935) +++ trac/About.py (working copy) @@ -38,7 +38,7 @@ def get_navigation_items(self, req): yield ('metanav', 'about', - html.a('About Trac', href=req.href.about())) + html.a('Acerca de Trac', href=req.href.about())) # IPermissionRequestor methods @@ -56,7 +56,7 @@ def process_request(self, req): page = req.args.get('page', 'default') - req.hdf['title'] = 'About Trac' + req.hdf['title'] = 'Acerca de Trac' if req.perm.has_permission('CONFIG_VIEW'): req.hdf['about.config_href'] = req.href.about('config') req.hdf['about.plugins_href'] = req.href.about('plugins') Index: trac/wiki/web_ui.py =================================================================== --- trac/wiki/web_ui.py (revision 5935) +++ trac/wiki/web_ui.py (working copy) @@ -51,7 +51,7 @@ # IContentConverter methods def get_supported_conversions(self): - yield ('txt', 'Plain Text', 'txt', 'text/x-trac-wiki', 'text/plain', 9) + yield ('txt', 'Texto Plano', 'txt', 'text/x-trac-wiki', 'text/plain', 9) def convert_content(self, req, mimetype, content, key): return (content, 'text/plain;charset=utf-8') @@ -67,7 +67,7 @@ yield ('mainnav', 'wiki', html.A('Wiki', href=req.href.wiki(), accesskey=1)) yield ('metanav', 'help', - html.A('Help/Guide', href=req.href.wiki('TracGuide'), + html.A(unicode('Ayuda/Guía', 'utf-8'), href=req.href.wiki('TracGuide'), accesskey=6)) # IPermissionRequestor methods @@ -142,7 +142,7 @@ def get_timeline_filters(self, req): if req.perm.has_permission('WIKI_VIEW'): - yield ('wiki', 'Wiki changes') + yield ('wiki', 'Cambios en el Wiki') def get_timeline_events(self, req, start, stop, filters): if 'wiki' in filters: @@ -155,7 +155,7 @@ "FROM wiki WHERE time>=%s AND time<=%s", (start, stop)) for t,name,comment,author,version in cursor: - title = Markup('%s edited by %s', + title = Markup('%s editado por %s', wiki.format_page_name(name), author) diff_link = html.A('diff', href=href.wiki(name, action='diff', version=version)) @@ -230,10 +230,10 @@ for manipulator in self.page_manipulators: for field, message in manipulator.validate_wiki_page(req, page): if field: - raise InvalidWikiPage("The Wiki page field %s is invalid: %s" + raise InvalidWikiPage(unicode("El campo %s de la página del wiki es inválido: %s", 'utf-8') % (field, message)) else: - raise InvalidWikiPage("Invalid Wiki page: %s" % message) + raise InvalidWikiPage(unicode("Página del wiki inválida: %s", 'utf-8') % message) page.save(get_reporter_id(req, 'author'), req.args.get('comment'), req.remote_addr) @@ -265,7 +265,7 @@ req.perm.assert_permission('WIKI_VIEW') if not page.exists: - raise TracError("Version %s of page %s does not exist" % + raise TracError(unicode("La versión %s de la página %s no existe", 'utf-8') % (req.args.get('version'), page.name)) add_stylesheet(req, 'common/css/diff.css') @@ -322,11 +322,11 @@ if prev_version: add_link(req, 'prev', req.href.wiki(page.name, action='diff', version=prev_version), - 'Version %d' % prev_version) + unicode('Versión %d', 'utf-8') % prev_version) if next_version: add_link(req, 'next', req.href.wiki(page.name, action='diff', version=next_version), - 'Version %d' % next_version) + unicode('Versión %d', 'utf-8') % next_version) # -- text diffs diff_style, diff_options = get_diff_options(req) @@ -396,7 +396,7 @@ req.perm.assert_permission('WIKI_VIEW') if not page.exists: - raise TracError, "Page %s does not exist" % page.name + raise TracError, unicode("La página %s no existe", 'utf-8') % page.name self._set_title(req, page, 'history') @@ -454,8 +454,8 @@ } else: if not req.perm.has_permission('WIKI_CREATE'): - raise HTTPNotFound('Page %s not found', page.name) - req.hdf['wiki.page_html'] = html.P('Describe "%s" here' % page_name) + raise HTTPNotFound(unicode('No se encontró la página %s', 'utf-8'), page.name) + req.hdf['wiki.page_html'] = html.P(unicode('Describa aquí "%s"', 'utf-8') % page_name) # Show attachments req.hdf['wiki.attachments'] = attachments_to_hdf(self.env, req, db, Index: trac/wiki/intertrac.py =================================================================== --- trac/wiki/intertrac.py (revision 5935) +++ trac/wiki/intertrac.py (working copy) @@ -41,13 +41,13 @@ def process_request(self, req): link = req.args.get('link', '') if not link: - raise TracError('No TracLinks given') + raise TracError(unicode('No se pasó un TracLink', 'utf-8')) link_elt = wiki_to_link(link, self.env, req) if isinstance(link_elt, Element): href = link_elt.attr['href'] if href: req.redirect(href) - raise TracError('"%s" is not a TracLinks' % link) + raise TracError('"%s" no es un TracLink' % link) # IWikiMacroProvider methods @@ -56,7 +56,7 @@ yield 'InterTrac' def get_macro_description(self, name): - return "Provide a list of known InterTrac prefixes." + return "Proveer una lista de prefijos conocidos InterTrac." def render_macro(self, req, name, content): intertracs = {} @@ -73,7 +73,7 @@ intertrac = intertracs[prefix] if isinstance(intertrac, basestring): yield html.TR(html.TD(html.B(prefix)), - html.TD('Alias for ', html.B(intertrac))) + html.TD('Alias para ', html.B(intertrac))) else: url = intertrac.get('url', '') if url: @@ -83,5 +83,5 @@ html.TD(html.A(title, href=url))) return html.TABLE(class_="wiki intertrac")( - html.TR(html.TH(html.EM('Prefix')), html.TH(html.EM('Trac Site'))), + html.TR(html.TH(html.EM('Prefijo')), html.TH(html.EM('Sitio Trac'))), [generate_prefix(p) for p in sorted(intertracs.keys())]) Index: trac/wiki/model.py =================================================================== --- trac/wiki/model.py (revision 5935) +++ trac/wiki/model.py (working copy) @@ -68,7 +68,7 @@ exists = property(fget=lambda self: self.version > 0) def delete(self, version=None, db=None): - assert self.exists, 'Cannot delete non-existent page' + assert self.exists, unicode('No se puede eliminar una página no existente', 'utf-8') if not db: db = self.env.get_db_cnx() handle_ta = True @@ -131,7 +131,7 @@ cursor.execute("UPDATE wiki SET readonly=%s WHERE name=%s", (self.readonly, self.name)) else: - raise TracError('Page not modified') + raise TracError(unicode('La página no se modificó', 'utf-8')) if handle_ta: db.commit() Index: trac/wiki/formatter.py =================================================================== --- trac/wiki/formatter.py (revision 5935) +++ trac/wiki/formatter.py (working copy) @@ -72,7 +72,7 @@ self.processor = self._mimeview_processor else: self.processor = self._default_processor - self.error = "No macro or processor named '%s' found" % name + self.error = unicode("No se encontró un macro ó procesador (processor) denominado '%s'", 'utf-8') % name # builtin processors @@ -107,8 +107,8 @@ def process(self, req, text, in_paragraph=False): if self.error: - text = system_message(Markup('Error: Failed to load processor ' - '%s', self.name),
+ text = system_message(Markup(unicode('Error: Falló la carga del procesador '
+ '%s', 'utf-8'), self.name),
self.error)
else:
text = self.processor(req, text)
@@ -380,7 +380,7 @@
intertrac_config = self.env.config['intertrac']
url = intertrac_config.get(ns+'.url')
if url:
- name = intertrac_config.get(ns+'.title', 'Trac project %s' % ns)
+ name = intertrac_config.get(ns+'.title', 'Proyecto Trac %s' % ns)
compat = intertrac_config.getbool(ns+'.compat', 'true')
# TODO: set `compat` default to False once 0.10 gets widely used
# and remove compatibility code altogether once 0.[89] disappear...
@@ -442,7 +442,7 @@
except Exception, e:
self.env.log.error('Macro %s(%s) failed' % (name, args),
exc_info=True)
- return system_message('Error: Macro %s(%s) failed' % (name, args),
+ return system_message(unicode('Error: Falló el macro %s(%s)', 'utf-8') % (name, args),
e)
# Headings
Index: trac/wiki/macros.py
===================================================================
--- trac/wiki/macros.py (revision 5935)
+++ trac/wiki/macros.py (working copy)
@@ -252,7 +252,7 @@
# we expect the 1st argument to be a filename (filespec)
args = content.split(',')
if len(args) == 0:
- raise Exception("No argument.")
+ raise Exception("Faltan argumentos.")
filespec = args[0]
size_re = re.compile('[0-9]+%?$')
attr_re = re.compile('(align|border|width|height|alt'
@@ -293,7 +293,7 @@
if parts[0] in ['wiki', 'ticket']:
module, id, file = parts
else:
- raise Exception("%s module can't have attachments" % parts[0])
+ raise Exception(unicode("El módulo %s no puede tener adjuntos", 'utf-8') % parts[0])
elif len(parts) == 2:
from trac.versioncontrol.web_ui import BrowserModule
try:
@@ -334,9 +334,9 @@
if len(path_info) > 2:
id = path_info[2]
if module not in ['wiki', 'ticket']:
- raise Exception('Cannot reference local attachment from here')
+ raise Exception(unicode('No se puede referenciar a un adjunto local desde aquí', 'utf-8'))
else:
- raise Exception('No filespec given')
+ raise Exception(unicode('No se pasó el argumento "filespec"', 'utf-8'))
if not url: # this is an attachment
from trac.attachment import Attachment
attachment = Attachment(self.env, module, id, file)
@@ -380,7 +380,7 @@
descr = wiki_to_html(descr or '', self.env, req)
except Exception, e:
descr = Markup(system_message(
- "Error: Can't get description for macro %s" \
+ unicode("Error: No se puede obtener la descripción para el macro %s", 'utf-8') \
% macro_name, e))
yield (macro_name, descr)
@@ -466,4 +466,4 @@
macro_file = os.path.join(path, name + '.py')
if os.path.isfile(macro_file):
return imp.load_source(name, macro_file)
- raise TracError, 'Macro %s not found' % name
+ raise TracError, unicode('No se encontró el macro %s', 'utf-8') % name
Index: trac/wiki/interwiki.py
===================================================================
--- trac/wiki/interwiki.py (revision 5935)
+++ trac/wiki/interwiki.py (working copy)
@@ -131,7 +131,7 @@
yield 'InterWiki'
def get_macro_description(self, name):
- return "Provide a description list for the known InterWiki prefixes."
+ return "Proveer una lista descriptiva de los prefijos InterWiki conocidos."
def render_macro(self, req, name, content):
from trac.util import sorted
@@ -144,7 +144,7 @@
'rc_url': self._expand_or_append(url, ['RecentChanges']),
'description': title == prefix and url or title})
- return _.TABLE(_.TR(_.TH(_.EM("Prefix")), _.TH(_.EM("Site"))),
+ return _.TABLE(_.TR(_.TH(_.EM("Prefijo")), _.TH(_.EM("Sitio"))),
[ _.TR(_.TD(_.A(w['prefix'], href=w['rc_url'])),
_.TD(_.A(w['description'], href=w['url'])))
for w in interwikis ],
Index: trac/upgrades/db10.py
===================================================================
--- trac/upgrades/db10.py (revision 5935)
+++ trac/upgrades/db10.py (working copy)
@@ -22,4 +22,4 @@
def do_upgrade(env, ver, cursor):
for s in sql:
cursor.execute(s)
- print 'Please perform a "resync" after this upgrade.'
+ print unicode('Por favor realice un "resync" después de esta actualización.', 'utf-8').encode('utf-8')
Index: trac/web/standalone.py
===================================================================
--- trac/web/standalone.py (revision 5935)
+++ trac/web/standalone.py (working copy)
@@ -106,26 +106,26 @@
def main():
from optparse import OptionParser, OptionValueError
- parser = OptionParser(usage='usage: %prog [options] [projenv] ...',
+ parser = OptionParser(usage='uso: %prog [opciones] [proyecto] ...',
version='%%prog %s' % VERSION)
auths = {}
def _auth_callback(option, opt_str, value, parser, cls):
info = value.split(',', 3)
if len(info) != 3:
- raise OptionValueError("Incorrect number of parameters for %s"
+ raise OptionValueError(unicode("Número incorrecto de parámetros para %s", 'utf-8')
% option)
env_name, filename, realm = info
if env_name in auths:
- print >>sys.stderr, 'Ignoring duplicate authentication option for ' \
- 'project: %s' % env_name
+ print >>sys.stderr, unicode('Ignorando opción de autenticación duplicada para ' \
+ 'el proyecto: %s', 'utf-8').encode('utf-8') % env_name
else:
auths[env_name] = cls(os.path.abspath(filename), realm)
def _validate_callback(option, opt_str, value, parser, valid_values):
if value not in valid_values:
- raise OptionValueError('%s must be one of: %s, not %s'
+ raise OptionValueError('%s debe ser uno de: %s, no %s'
% (opt_str, '|'.join(valid_values), value))
setattr(parser.values, option.dest, value)
@@ -174,15 +174,15 @@
options, args = parser.parse_args()
if not args and not options.env_parent_dir:
- parser.error('either the --env-parent-dir option or at least one '
- 'environment must be specified')
+ parser.error(unicode('ya sea la opción --env-parent-dir ó al menos un '
+ 'entorno deben ser especificados', 'utf-8').encode('utf-8'))
if options.single_env:
if options.env_parent_dir:
- parser.error('the --single-env option cannot be used with '
- '--env-parent-dir')
+ parser.error(unicode('la opción --single-env no puede ser utilizada en conjunto a '
+ '--env-parent-dir', 'utf-8').encode('utf-8'))
elif len(args) > 1:
- parser.error('the --single-env option cannot be used with '
- 'more than one enviroment')
+ parser.error(unicode('la opción --single-env no puede ser utilizada con '
+ 'más de un entorno', 'utf-8').encode('utf-8'))
if options.port is None:
options.port = {
@@ -196,9 +196,9 @@
if options.daemonize and options.autoreload:
for path in args + [options.env_parent_dir, options.pidfile]:
if path and not os.path.isabs(path):
- parser.error('"%s" is not an absolute path.\n\n'
- 'when using both --auto-reload and --daemonize '
- 'all path arguments must be absolute'
+ parser.error('"%s" no es una ruta absoluta.\n\n'
+ 'cuando se utiliza en conjunto --auto-reload y --daemonize '
+ 'todos los argumentos referentes a rutas deben ser absolutos'
% path)
# relative paths don't work when daemonized
@@ -251,7 +251,7 @@
if e.errno != errno.ESRCH:
raise
else:
- sys.exit("tracd is already running with pid %s" % pid)
+ sys.exit(unicode("tracd ya está corriendo con el pid %s", 'utf-8').encode('utf-8') % pid)
realserve = serve
def serve():
try:
@@ -270,7 +270,7 @@
if options.autoreload:
def modification_callback(file):
- print>>sys.stderr, 'Detected modification of %s, restarting.' \
+ print>>sys.stderr, unicode('Se detectó la modificación de %s, reiniciando.', 'utf-8').encode('utf-8') \
% file
autoreload.main(serve, modification_callback)
else:
Index: trac/web/auth.py
===================================================================
--- trac/web/auth.py (revision 5935)
+++ trac/web/auth.py (working copy)
@@ -83,12 +83,13 @@
def get_navigation_items(self, req):
if req.authname and req.authname != 'anonymous':
- yield ('metanav', 'login', 'logged in as %s' % req.authname)
+ yield ('metanav', 'login', unicode('sesión iniciada como %s', 'utf-8') % req.authname)
yield ('metanav', 'logout',
- html.A('Logout', href=req.href.logout()))
+ html.A(unicode('Cerrar Sesión', 'utf-8'), href=req.href.logout(),
+ onclick="clearAuthenticationCache(\'%s\')" % req.href.logout()))
else:
yield ('metanav', 'login',
- html.A('Login', href=req.href.login()))
+ html.A(unicode('Iniciar Sesión', 'utf-8'), href=req.href.login()))
# IRequestHandler methods
@@ -119,10 +120,10 @@
case sensitive regarding user names and domain names
"""
if not req.remote_user:
- raise TracError(html("Authentication information not available. "
- "Please refer to the ",
- html.a('installation documentation',
- title="Configuring Authentication",
+ raise TracError(html(unicode("La información de autenticación no está disponible. "
+ "Por favor, refiérase a la ", 'utf-8'),
+ html.a(unicode('documentación de instalación', 'utf-8'),
+ title=unicode("Configurando Autenticación", 'utf-8'),
href=req.href.wiki('TracInstall') +
"#ConfiguringAuthentication"), "."))
remote_user = req.remote_user
@@ -130,7 +131,7 @@
remote_user = remote_user.lower()
assert req.authname in ('anonymous', remote_user), \
- 'Already logged in as %s.' % req.authname
+ unicode('Ya ha iniciado sesión como %s.', 'utf-8') % req.authname
cookie = hex_entropy()
db = self.env.get_db_cnx()
@@ -242,17 +243,17 @@
try:
u, h = line.split(':')
except ValueError:
- print >>sys.stderr, 'Warning: invalid password line in %s: %s' \
+ print >>sys.stderr, unicode('Advertencia: contraseña inválida en %s: %s', 'utf-8').encode('utf-8') \
% (filename, line)
continue
if '$' in h or self.crypt:
self.hash[u] = h
else:
- print >>sys.stderr, 'Warning: cannot parse password for ' \
- 'user "%s" without the "crypt" module' % u
+ print >>sys.stderr, unicode('Advertencia: no se puede verificar la contraseña del ' \
+ 'usuario "%s" sin el módulo "crypt"', 'utf-8').encode('utf-8') % u
if self.hash == {}:
- print >> sys.stderr, "Warning: found no users in file:", filename
+ print >> sys.stderr, "Advertencia: no existen usuarios en el archivo:", filename
def test(self, user, password):
self.check_reload()
@@ -304,13 +305,13 @@
try:
u, r, a1 = line.split(':')
except ValueError:
- print >>sys.stderr, 'Warning: invalid digest line in %s: %s' \
+ print >>sys.stderr, unicode('Advertencia: entrada "digest" inválida en %s: %s', 'utf-8').encode('utf-8') \
% (filename, line)
continue
if r == self.realm:
self.hash[u] = a1
if self.hash == {}:
- print >> sys.stderr, "Warning: found no users in realm:", self.realm
+ print >> sys.stderr, "Advertencia: no existen usuarios en el dominio:", self.realm
def parse_auth_header(self, authorization):
values = {}
Index: trac/web/api.py
===================================================================
--- trac/web/api.py (revision 5935)
+++ trac/web/api.py (working copy)
@@ -44,7 +44,7 @@
self.message = message
if args:
self.message = self.message % args
- Exception.__init__(self, '%s %s (%s)' % (self.code, self.reason,
+ Exception.__init__(self, unicode('%s %s (%s)', 'utf-8') % (self.code, self.reason,
self.message))
return self
@@ -408,7 +408,7 @@
"304 Not Modified" response if it matches.
"""
if not os.path.isfile(path):
- raise HTTPNotFound("File %s not found" % path)
+ raise HTTPNotFound(unicode("No se encontró el archivo %s", 'utf-8') % path)
stat = os.stat(path)
last_modified = http_date(stat.st_mtime)
Index: trac/web/clearsilver.py
===================================================================
--- trac/web/clearsilver.py (revision 5935)
+++ trac/web/clearsilver.py (working copy)
@@ -132,7 +132,7 @@
import neo_util
self.hdf = neo_util.HDF()
except ImportError, e:
- raise TracError, "ClearSilver not installed (%s)" % e
+ raise TracError, unicode("ClearSilver no está instalado (%s)", 'utf-8') % e
self['hdf.loadpaths'] = loadpaths
Index: trac/web/session.py
===================================================================
--- trac/web/session.py (revision 5935)
+++ trac/web/session.py (working copy)
@@ -99,9 +99,9 @@
cursor = db.cursor()
cursor.execute("SELECT sid FROM session WHERE sid=%s", (new_sid,))
if cursor.fetchone():
- raise TracError(Markup('Session "%s" already exists.Neither notification.from ' - 'nor notification.reply_to are ' - 'specified in the configuration.
'), - 'SMTP Notification Error') + raise TracError(Markup(unicode('No se pudo enviar correo electrónico debido a una crisis ' + 'de identidad.Ni notification.from ' + 'ni notification.reply_to han sido' + 'especificados en la configuración.
', 'utf-8')), + unicode('Error de Notificación SMTP', 'utf-8')) # Authentication info (optional) self.user_name = self.config['notification'].get('smtp_user') @@ -220,7 +220,7 @@ maxlength = MAXHEADERLEN-(len(key)+2) # Do not sent ridiculous short headers if maxlength < 10: - raise TracError, "Header length is too short" + raise TracError, "La longitud del encabezado es demasiado corta" try: tmp = name.encode('ascii') header = Header(tmp, 'ascii', maxlinelen=maxlength) @@ -280,7 +280,7 @@ if self._use_tls: self.server.ehlo() if not self.server.esmtp_features.has_key('starttls'): - raise TracError, "TLS enabled but server does not support TLS" + raise TracError, unicode("TLS está habilitado pero el servidor no soporta TLS", 'utf-8') self.server.starttls() self.server.ehlo() if self.user_name: @@ -349,8 +349,8 @@ try: dummy = body.encode('ascii') except UnicodeDecodeError: - raise TracError, "Ticket contains non-Ascii chars. " \ - "Please change encoding setting" + raise TracError, unicode("El ticket contiene caracteres no-Ascii. " \ + "Por favor modifique la configuración de codificación", 'utf-8') msg = MIMEText(body, 'plain') # Message class computes the wrong type from MIMEText constructor, # which does not take a Charset object as initializer. Reset the