From 4cf878c9f7a19241de22121447336666aac2b6be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonel=20C=C3=A2mara?= Date: Tue, 7 Oct 2014 15:15:08 +0100 Subject: [PATCH] Change reset_password to send the password as GET query var instead of as an argument. Added some more Portuguese Translations to the Admin application. --- applications/admin/languages/pt.py | 76 +++++++++++++++++++++++++----- gluon/tools.py | 6 +-- 2 files changed, 66 insertions(+), 16 deletions(-) diff --git a/applications/admin/languages/pt.py b/applications/admin/languages/pt.py index da379dc4..3f850c3c 100644 --- a/applications/admin/languages/pt.py +++ b/applications/admin/languages/pt.py @@ -7,8 +7,10 @@ '%s %%{row} updated': '%s registros atualizados', '%Y-%m-%d': '%d/%m/%Y', '%Y-%m-%d %H:%M:%S': '%d/%m/%Y %H:%M:%S', -'(requires internet access)': '(requer acesso a internet)', +'(requires internet access)': '(requer acesso à internet)', +'(requires internet access, experimental)': '(requer acesso à internet, experimental)', '(something like "it-it")': '(algo como "it-it")', +'@markmin\x01(file **gluon/contrib/plural_rules/%s.py** is not found)': '(file **gluon/contrib/plural_rules/%s.py** is not found)', '@markmin\x01An error occured, please [[reload %s]] the page': 'An error occured, please [[reload %s]] the page', '@markmin\x01Searching: **%s** %%{file}': 'Searching: **%s** files', 'A new version of web2py is available': 'Está disponível uma nova versão do web2py', @@ -16,7 +18,7 @@ 'About': 'sobre', 'About application': 'Sobre a aplicação', 'additional code for your application': 'código adicional para sua aplicação', -'Additional code for your application': 'Additional code for your application', +'Additional code for your application': 'Código adicional para a sua aplicação', 'admin disabled because no admin password': ' admin desabilitado por falta de senha definida', 'admin disabled because not supported on google app engine': 'admin dehabilitado, não é soportado no GAE', 'admin disabled because unable to access password file': 'admin desabilitado, não foi possível ler o arquivo de senha', @@ -33,6 +35,8 @@ 'application compiled': 'aplicação compilada', 'application is compiled and cannot be designed': 'A aplicação está compilada e não pode ser modificada', 'Application name:': 'Nome da aplicação:', +'are not used': 'não usadas', +'are not used yet': 'ainda não usadas', 'Are you sure you want to delete file "%s"?': 'Tem certeza que deseja apagar o arquivo "%s"?', 'Are you sure you want to delete plugin "%s"?': 'Tem certeza que deseja apagar o plugin "%s"?', 'Are you sure you want to delete this object?': 'Are you sure you want to delete this object?', @@ -43,17 +47,20 @@ 'ATTENTION: Login requires a secure (HTTPS) connection or running on localhost.': 'ATENÇÃO o login requer uma conexão segura (HTTPS) ou executar de localhost.', 'ATTENTION: TESTING IS NOT THREAD SAFE SO DO NOT PERFORM MULTIPLE TESTS CONCURRENTLY.': 'ATENÇÃO OS TESTES NÃO THREAD SAFE, NÃO EFETUE MÚLTIPLOS TESTES AO MESMO TEMPO.', 'ATTENTION: you cannot edit the running application!': 'ATENÇÃO: Não pode modificar a aplicação em execução!', +'Autocomplete Python Code': 'Autocompletar Código Python', 'Available databases and tables': 'Bancos de dados e tabelas disponíveis', 'back': 'voltar', 'browse': 'buscar', 'cache': 'cache', 'cache, errors and sessions cleaned': 'cache, erros e sessões eliminadas', +'can be a git repo': 'can be a git repo', 'Cannot be empty': 'Não pode ser vazio', 'Cannot compile: there are errors in your app. Debug it, correct errors and try again.': 'Não é possível compilar: Existem erros em sua aplicação. Depure, corrija os errros e tente novamente', 'Cannot compile: there are errors in your app:': 'Não é possível compilar: Existem erros em sua aplicação', 'cannot create file': 'Não é possível criar o arquivo', 'cannot upload file "%(filename)s"': 'não é possível fazer upload do arquivo "%(filename)s"', 'Change admin password': 'mudar senha de administrador', +'change editor settings': 'mudar definições do editor', 'Change Password': 'Trocar Senha', 'check all': 'marcar todos', 'Check for upgrades': 'checar por atualizações', @@ -67,7 +74,7 @@ 'click to open': 'clique para abrir', 'Client IP': 'IP do cliente', 'code': 'código', -'collapse/expand all': 'collapse/expand all', +'collapse/expand all': 'colapsar/expandir tudo', 'commit (mercurial)': 'commit (mercurial)', 'Compile': 'compilar', 'compiled application removed': 'aplicação compilada removida', @@ -79,6 +86,7 @@ 'Create new application using the Wizard': 'Criar nova aplicação utilizando o assistente', 'create new application:': 'nome da nova aplicação:', 'Create new simple application': 'Crie uma nova aplicação', +'Create/Upload': 'Create/Upload', 'created by': 'criado por', 'crontab': 'crontab', 'Current request': 'Requisição atual', @@ -99,18 +107,24 @@ 'delete': 'apagar', 'delete all checked': 'apagar marcados', 'delete plugin': 'apagar plugin', +'Delete this file (you will be asked to confirm deletion)': 'Delete this file (you will be asked to confirm deletion)', 'Delete:': 'Apague:', 'Deploy': 'publicar', 'Deploy on Google App Engine': 'Publicar no Google App Engine', +'Deploy to OpenShift': 'Deploy to OpenShift', 'Description': 'Descrição', -'DESIGN': 'Projeto', 'design': 'modificar', +'DESIGN': 'Projeto', 'Design for': 'Projeto de', 'Detailed traceback description': 'Detailed traceback description', 'direction: ltr': 'direção: ltr', +'Disable': 'Disable', +'docs': 'docs', 'done!': 'feito!', 'download layouts': 'download layouts', +'Download layouts from repository': 'Download layouts from repository', 'download plugins': 'download plugins', +'Download plugins from repository': 'Download plugins from repository', 'E-mail': 'E-mail', 'EDIT': 'EDITAR', 'Edit': 'editar', @@ -119,6 +133,7 @@ 'Edit current record': 'Editar o registro atual', 'Edit Profile': 'Editar Perfil', 'edit views:': 'editar visões:', +'Editing %s': 'A Editar %s', 'Editing file': 'Editando arquivo', 'Editing file "%s"': 'Editando arquivo "%s"', 'Editing Language file': 'Editando arquivo de linguagem', @@ -129,6 +144,8 @@ 'Error ticket': 'Error ticket', 'Errors': 'erros', 'Exception instance attributes': 'Atributos da instancia de excessão', +'Exit Fullscreen': 'Sair de Ecrã Inteiro', +'Expand Abbreviation (html files only)': 'Expandir Abreviação (só para ficheiros html)', 'export as csv file': 'exportar como arquivo CSV', 'exposes': 'expõe', 'extends': 'estende', @@ -144,20 +161,24 @@ 'file does not exist': 'arquivo não existe', 'file saved on %(time)s': 'arquivo salvo em %(time)s', 'file saved on %s': 'arquivo salvo em %s', -'filter': 'filter', +'filter': 'filtro', +'Find Next': 'Localizar Seguinte', +'Find Previous': 'Localizar Anterior', 'First name': 'Nome', 'Frames': 'Frames', 'Functions with no doctests will result in [passed] tests.': 'Funções sem doctests resultarão em testes [aceitos].', +'graph model': 'graph model', 'Group ID': 'ID do Grupo', 'Hello World': 'Olá Mundo', 'Help': 'ajuda', +'Hide/Show Translated strings': '', 'htmledit': 'htmledit', -'If the report above contains a ticket number it indicates a failure in executing the controller, before any attempt to execute the doctests. This is usually due to an indentation error or an error outside function code.\nA green title indicates that all tests (if defined) passed. In this case test results are not shown.': 'Se o relatório acima contém um número de ticket, isso indica uma falha no controlador em execução, antes de tantar executar os doctests. Isto acontece geralmente por erro de endentação ou erro fora do código da função.\nO titulo em verde indica que os testes (se definidos) passaram. Neste caso os testes não são mostrados.', +'If the report above contains a ticket number it indicates a failure in executing the controller, before any attempt to execute the doctests. This is usually due to an indentation error or an error outside function code.\nA green title indicates that all tests (if defined) passed. In this case test results are not shown.': 'Se o relatório acima contém um número de ticket, isso indica uma falha no controlador em execução, antes de tantar executar os doctests. Isto acontece geralmente por erro de endentação ou erro fora do código da função.\r\nO titulo em verde indica que os testes (se definidos) passaram. Neste caso os testes não são mostrados.', 'Import/Export': 'Importar/Exportar', 'includes': 'inclui', 'insert new': 'inserir novo', 'insert new %s': 'inserir novo %s', -'inspect attributes': 'inspect attributes', +'inspect attributes': 'inspecionar atributos', 'Install': 'instalar', 'Installed applications': 'Aplicações instaladas', 'internal error': 'erro interno', @@ -168,6 +189,7 @@ 'Invalid Query': 'Consulta inválida', 'invalid request': 'solicitação inválida', 'invalid ticket': 'ticket inválido', +'Keyboard shortcuts': 'Atalhos de teclado', 'language file "%(filename)s" created/updated': 'arquivo de linguagem "%(filename)s" criado/atualizado', 'Language files (static strings) updated': 'Arquivos de linguagem (textos estáticos) atualizados', 'languages': 'linguagens', @@ -178,11 +200,12 @@ 'License for': 'Licença para', 'loading...': 'carregando...', 'locals': 'locals', -'login': 'inicio de sessão', 'Login': 'Entrar', +'login': 'inicio de sessão', 'Login to the Administrative Interface': 'Entrar na interface adminitrativa', 'Logout': 'finalizar sessão', 'Lost Password': 'Senha perdida', +'Manage': 'Manage', 'manage': 'gerenciar', 'merge': 'juntar', 'Models': 'Modelos', @@ -200,7 +223,10 @@ 'NO': 'NÃO', 'No databases in this application': 'Não existem bancos de dados nesta aplicação', 'no match': 'não encontrado', -'no package selected': 'no package selected', +'no package selected': 'nenhum pacote selecionado', +'online designer': 'online designer', +'or alternatively': 'or alternatively', +'Or Get from URL:': 'Ou Obtenha do URL:', 'or import from csv file': 'ou importar de um arquivo CSV', 'or provide app url:': 'ou forneça a url de uma aplicação:', 'or provide application url:': 'ou forneça a url de uma aplicação:', @@ -209,6 +235,7 @@ 'Overwrite installed app': 'sobrescrever aplicação instalada', 'Pack all': 'criar pacote', 'Pack compiled': 'criar pacote compilado', +'Pack custom': 'Pack custom', 'pack plugin': 'empacotar plugin', 'PAM authenticated user, cannot change password here': 'usuario autenticado por PAM, não pode alterar a senha por aqui', 'Password': 'Senha', @@ -218,16 +245,23 @@ 'Plugin "%s" in application': 'Plugin "%s" na aplicação', 'plugins': 'plugins', 'Plugins': 'Plugins', +'Plural-Forms:': 'Plural-Forms:', 'Powered by': 'Este site utiliza', 'previous 100 rows': '100 registros anteriores', +'Private files': 'Private files', +'private files': 'private files', 'Query:': 'Consulta:', +'Rapid Search': 'Rapid Search', 'record': 'registro', 'record does not exist': 'o registro não existe', 'record id': 'id do registro', 'Record ID': 'ID do Registro', 'Register': 'Registrar-se', 'Registration key': 'Chave de registro', +'Reload routes': 'Reload routes', 'Remove compiled': 'eliminar compilados', +'Replace': 'Substituir', +'Replace All': 'Substituir Tudo', 'request': 'request', 'Resolve Conflict file': 'Arquivo de resolução de conflito', 'response': 'response', @@ -236,7 +270,14 @@ 'Role': 'Papel', 'Rows in table': 'Registros na tabela', 'Rows selected': 'Registros selecionados', +'rules are not defined': 'rules are not defined', +"Run tests in this file (to run all files, you may also use the button labelled 'test')": "Run tests in this file (to run all files, you may also use the button labelled 'test')", +'Running on %s': 'A correr em %s', +'Save': 'Save', 'save': 'salvar', +'Save file:': 'Gravar ficheiro:', +'Save file: %s': 'Gravar ficheiro: %s', +'Save via Ajax': 'Gravar via Ajax', 'Saved file hash:': 'Hash do arquivo salvo:', 'selected': 'selecionado(s)', 'session': 'session', @@ -244,10 +285,13 @@ 'shell': 'Terminal', 'Site': 'site', 'some files could not be removed': 'alguns arquicos não puderam ser removidos', +'Start searching': 'Start searching', 'Start wizard': 'iniciar assistente', 'state': 'estado', +'Static': 'Static', 'static': 'estáticos', 'Static files': 'Arquivos estáticos', +'Submit': 'Submit', 'submit': 'enviar', 'Sure you want to delete this object?': 'Tem certeza que deseja apaagr este objeto?', 'table': 'tabela', @@ -255,21 +299,23 @@ 'test': 'testar', 'Testing application': 'Testando a aplicação', 'The "query" is a condition like "db.table1.field1==\'value\'". Something like "db.table1.field1==db.table2.field2" results in a SQL JOIN.': 'A "consulta" é uma condição como "db.tabela.campo1==\'valor\'". Algo como "db.tabela1.campo1==db.tabela2.campo2" resulta em um JOIN SQL.', -'The application logic, each URL path is mapped in one exposed function in the controller': 'The application logic, each URL path is mapped in one exposed function in the controller', 'the application logic, each URL path is mapped in one exposed function in the controller': 'A lógica da aplicação, cada URL é mapeada para uma função exposta pelo controlador', -'The data representation, define database tables and sets': 'The data representation, define database tables and sets', +'The application logic, each URL path is mapped in one exposed function in the controller': 'The application logic, each URL path is mapped in one exposed function in the controller', 'the data representation, define database tables and sets': 'A representação dos dadps, define tabelas e estruturas de dados', +'The data representation, define database tables and sets': 'The data representation, define database tables and sets', 'The presentations layer, views are also known as templates': 'The presentations layer, views are also known as templates', 'the presentations layer, views are also known as templates': 'A camada de apresentação, As visões também são chamadas de templates', 'There are no controllers': 'Não existem controllers', 'There are no models': 'Não existem modelos', 'There are no modules': 'Não existem módulos', 'There are no plugins': 'There are no plugins', +'There are no private files': '', 'There are no static files': 'Não existem arquicos estáticos', 'There are no translators, only default language is supported': 'Não há traduções, somente a linguagem padrão é suportada', 'There are no views': 'Não existem visões', -'these files are served without processing, your images go here': 'Estes arquivos são servidos sem processamento, suas imagens ficam aqui', +'These files are not served, they are only available from within your app': 'These files are not served, they are only available from within your app', 'These files are served without processing, your images go here': 'These files are served without processing, your images go here', +'these files are served without processing, your images go here': 'Estes arquivos são servidos sem processamento, suas imagens ficam aqui', 'This is the %(filename)s template': 'Este é o template %(filename)s', 'Ticket': 'Ticket', 'Ticket ID': 'Ticket ID', @@ -277,11 +323,15 @@ 'TM': 'MR', 'to previous version.': 'para a versão anterior.', 'To create a plugin, name a file/folder plugin_[name]': 'Para criar um plugin, nomeio um arquivo/pasta como plugin_[nome]', +'toggle breakpoint': 'toggle breakpoint', +'Toggle comment': 'Toggle comment', +'Toggle Fullscreen': 'Toggle Fullscreen', 'Traceback': 'Traceback', 'translation strings for the application': 'textos traduzidos para a aplicação', 'Translation strings for the application': 'Translation strings for the application', 'try': 'tente', 'try something like': 'tente algo como', +'Try the mobile interface': 'Try the mobile interface', 'Unable to check for upgrades': 'Não é possível checar as atualizações', 'unable to create application "%s"': 'não é possível criar a aplicação "%s"', 'unable to delete file "%(filename)s"': 'não é possível criar o arquico "%(filename)s"', @@ -300,8 +350,10 @@ 'Update:': 'Atualizar:', 'upgrade web2py now': 'atualize o web2py agora', 'upload': 'upload', +'Upload': 'Upload', 'Upload & install packed application': 'Faça upload e instale uma aplicação empacotada', 'Upload a package:': 'Faça upload de um pacote:', +'Upload and install packed application': 'Upload and install packed application', 'upload application:': 'Fazer upload de uma aplicação:', 'Upload existing application': 'Faça upload de uma aplicação existente', 'upload file:': 'Enviar arquivo:', diff --git a/gluon/tools.py b/gluon/tools.py index a5ec6ed7..5d44d015 100644 --- a/gluon/tools.py +++ b/gluon/tools.py @@ -3011,15 +3011,13 @@ class Auth(object): if self.settings.prevent_password_reset_attacks: key = request.vars.key - if not key and len(request.args)>1: - key = request.args[-1] if key: session._reset_password_key = key redirect(self.url(args='reset_password')) else: key = session._reset_password_key else: - key = request.vars.key or getarg(-1) + key = request.vars.key try: t0 = int(key.split('-')[0]) if time.time() - t0 > 60 * 60 * 24: @@ -3138,7 +3136,7 @@ class Auth(object): def email_reset_password(self, user): reset_password_key = str(int(time.time())) + '-' + web2py_uuid() link = self.url(self.settings.function, - args=('reset_password', reset_password_key), + args=('reset_password',), vars={'key': reset_password_key}, scheme=True) d = dict(user) d.update(dict(key=reset_password_key, link=link))