Skip to content

Commit

Permalink
Add Portuguese translation (#480)
Browse files Browse the repository at this point in the history
* Add Portuguese translation

* 🔥 remove(i18n.py): remove pt_BR from SUPPORTED_LOCALES due to error in get_locale_display_name

* 🔥 remove(pt_BR): Remove Portuguese (Brazil) language support

This commit removes the Portuguese (Brazil) language support from the application. This includes the removal of translation files, momentjs, flatpickr, and admin.po files.

* 🌐 i18n(starlette_admin): Improve Portuguese translations and remove Brazilian Portuguese support

- Corrected spelling errors in 'pt.json' file
- Updated translation for 'New %(name)s' in 'admin.po' file
- Adjusted test case in 'test_i18n.py' to reflect changes in Portuguese translation
- Removed 'pt_BR' from SUPPORTED_LOCALES in 'i18n.py' as it's no longer needed

* feat: adicionado tradução de botão de busca no filtro

* Delete starlette-admin.code-workspace

* minor fixes

---------

Co-authored-by: Breno-de-Angelo <[email protected]>
Co-authored-by: GuilhermeAumo <[email protected]>
Co-authored-by: Jocelin Hounon <[email protected]>
  • Loading branch information
4 people authored Oct 25, 2024
1 parent 889ad5f commit e0d906e
Show file tree
Hide file tree
Showing 7 changed files with 388 additions and 0 deletions.
1 change: 1 addition & 0 deletions starlette_admin/i18n.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
"de", # German
"en", # English
"fr", # French
"pt", # Portuguese
"ru", # Russian
"tr", # Turkish
]
Expand Down
176 changes: 176 additions & 0 deletions starlette_admin/statics/i18n/dt/pt.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,176 @@
{
"aria": {
"sortAscending": ": Ordenar colunas de forma ascendente",
"sortDescending": ": Ordenar colunas de forma descendente"
},
"buttons": {
"collection": "Coleção",
"colvis": "Visibilidade de colunas",
"colvisRestore": "Restaurar visibilidade",
"copy": "Copiar",
"copyKeys": "Pressionar CTRL ou u2318 + C para copiar a informação para a área de transferência. Para cancelar, clique nesta mensagem ou pressione ESC.",
"copySuccess": {
"1": "Uma linha copiada para a área de transferência",
"_": "%ds linhas copiadas para a área de transferência"
},
"copyTitle": "Copiar para a área de transferência",
"createState": "Criar",
"csv": "CSV",
"excel": "Excel",
"pageLength": {
"-1": "Mostrar todas as linhas",
"_": "Mostrar %d linhas"
},
"pdf": "PDF",
"print": "Imprimir",
"removeAllStates": "Remover Todos",
"removeState": "Remover",
"renameState": "Renomear",
"savedStates": "Gravados",
"stateRestore": "Estado %d",
"updateState": "Atualizar"
},
"datetime": {
"amPm": [
"am",
"pm"
],
"hours": "horas",
"minutes": "minutos",
"months": [
"Janeiro",
"Fevereiro",
"Março",
"Abril",
"Maio",
"Junho",
"Julho",
"Agosto",
"Setembro",
"Outubro",
"Novembro",
"Dezembro"
],
"next": "próximo",
"previous": "anterior",
"seconds": "segundos",
"unknown": "desconhecido",
"weekdays": [
"Seg",
"Ter",
"Qua",
"Qui",
"Sex",
"Sáb",
"Dom"
]
},
"decimal": ",",
"emptyTable": "Não foi encontrado nenhum registo",
"info": "Mostrando os registos _START_ a _END_ num total de _TOTAL_",
"infoEmpty": "Mostrando 0 os registos num total de 0",
"infoFiltered": "(filtrado num total de _MAX_ registos)",
"infoThousands": ".",
"lengthMenu": "Mostrar _MENU_ registos",
"loadingRecords": "Carregando...",
"paginate": {
"first": "Primeiro",
"last": "Último",
"next": "Seguinte",
"previous": "Anterior"
},
"processing": "Processando...",
"search": "Procurar:",
"searchBuilder": {
"add": "Adicionar condição",
"search": "Buscar",
"button": {
"0": "<i class=\"fa-solid fa-filter\"></i> Construtor de pesquisa",
"_": "<i class=\"fa-solid fa-filter\"></i> Construtor de pesquisa (%d)"
},
"clearAll": "Limpar tudo",
"condition": "Condição",
"conditions": {
"array": {
"contains": "Contém",
"empty": "Vazio",
"equals": "Igual",
"not": "Diferente",
"notEmpty": "Não está vazio",
"without": "Sem"
},
"date": {
"after": "Depois",
"before": "Antes",
"between": "Entre",
"empty": "Vazio",
"equals": "Igual",
"not": "Diferente",
"notBetween": "Não está entre",
"notEmpty": "Não está vazio"
},
"number": {
"between": "Entre",
"empty": "Vazio",
"equals": "Igual",
"gt": "Maior que",
"gte": "Maior ou igual a",
"lt": "Menor que",
"lte": "Menor ou igual a",
"not": "Diferente",
"notBetween": "Não está entre",
"notEmpty": "Não está vazio"
},
"string": {
"contains": "Contém",
"empty": "Vazio",
"endsWith": "Termina em",
"equals": "Igual",
"not": "Diferente",
"notContains": "Não contém",
"notEmpty": "Não está vazio",
"notEndsWith": "Não termina com",
"notStartsWith": "Não começa com",
"startsWith": "Começa em"
}
},
"data": "Dados",
"deleteTitle": "Excluir condição de filtragem",
"leftTitle": "Excluir critério",
"logicAnd": "E",
"logicOr": "Ou",
"rightTitle": "Incluir critério",
"title": {
"0": "Construtor de pesquisa",
"_": "Construtor de pesquisa (%d)"
},
"value": "Valor"
},
"select": {
"cells": {
"1": "1 célula selecionada",
"_": "%d células selecionadas"
},
"columns": {
"1": "1 coluna selecionada",
"_": "%d colunas selecionadas"
},
"rows": {
"1": "%d linha selecionada",
"_": "%d linhas selecionadas"
}
},
"starlette-admin": {
"buttons": {
"export": "Exportar"
},
"conditions": {
"empty": "Vazia",
"false": "Falso",
"notEmpty": "Não está vazio",
"true": "Verdadeiro"
}
},
"thousands": ".",
"zeroRecords": "Não foram encontrados resultados"
}
7 changes: 7 additions & 0 deletions starlette_admin/statics/i18n/flatpickr/pt.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions starlette_admin/statics/i18n/momentjs/pt.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file not shown.
191 changes: 191 additions & 0 deletions starlette_admin/translations/pt/LC_MESSAGES/admin.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,191 @@
# Portuguese translations for starlette-admin.
# Copyright (C) 2023 ORGANIZATION
# This file is distributed under the same license as the starlette-admin
# project.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2023.
#
msgid ""
msgstr ""
"Project-Id-Version: starlette-admin VERSION\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
"POT-Creation-Date: 2023-10-28 16:32-0500\n"
"PO-Revision-Date: 2024-01-18 22:30-0300\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language: pt\n"
"Language-Team: pt <[email protected]>\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Generated-By: Babel 2.14.0\n"

#: starlette_admin/actions.py:11 starlette_admin/actions.py:107
#: starlette_admin/templates/modals/actions.html:12
msgid "Yes, Proceed"
msgstr "Sim, Prosseguir"

#: starlette_admin/auth.py:31
msgid "Administrator"
msgstr "Administrador"

#: starlette_admin/base.py:44 starlette_admin/contrib/odmantic/admin.py:17
#: starlette_admin/contrib/sqla/admin.py:28
#: starlette_admin/templates/create.html:7
#: starlette_admin/templates/detail.html:8
#: starlette_admin/templates/edit.html:7 starlette_admin/templates/list.html:7
msgid "Admin"
msgstr "Admin"

#: starlette_admin/base.py:254
#, python-format
msgid "Model with identity %(identity)s not found"
msgstr "Modelo com identidade %(identity)s não encontrado"

#: starlette_admin/templates/forms/_delete.html:8
#: starlette_admin/templates/modals/delete.html:25 starlette_admin/views.py:461
#: starlette_admin/views.py:498
msgid "Delete"
msgstr "Excluir"

#: starlette_admin/views.py:462
msgid "Are you sure you want to delete selected items?"
msgstr "Tem certeza de que deseja excluir os itens selecionados?"

#: starlette_admin/views.py:463
msgid "Yes, delete all"
msgstr "Sim, exclua tudo"

#: starlette_admin/views.py:468 starlette_admin/views.py:507
#, python-format
msgid "Item was successfully deleted"
msgid_plural "%(count)d items were successfully deleted"
msgstr[0] "O item foi excluído com sucesso"
msgstr[1] "%(count)d itens foram excluídos com sucesso"

#: starlette_admin/views.py:476
msgid "View"
msgstr "Visualizar"

#: starlette_admin/templates/edit.html:12 starlette_admin/views.py:488
msgid "Edit"
msgstr "Editar"

#: starlette_admin/templates/modals/delete.html:15 starlette_admin/views.py:499
msgid "Are you sure you want to delete this item?"
msgstr "Tem certeza de que deseja excluir este item?"

#: starlette_admin/views.py:818
msgid "All"
msgstr "Todos"

#: starlette_admin/templates/actions.html:6
msgid "With selected"
msgstr "Com selecionado(s)"

#: starlette_admin/templates/create.html:12
msgid "Create"
msgstr "Criar"

#: starlette_admin/templates/create.html:25
#: starlette_admin/templates/list.html:34
#, python-format
msgid "New %(name)s"
msgstr "Novo(a) %(name)s"

#: starlette_admin/templates/create.html:44
#: starlette_admin/templates/edit.html:46
#: starlette_admin/templates/modals/actions.html:10
#: starlette_admin/templates/modals/delete.html:21
msgid "Cancel"
msgstr "Cancelar"

#: starlette_admin/templates/create.html:46
#: starlette_admin/templates/edit.html:48
msgid "Save and add another"
msgstr "Salvar e adicione outro"

#: starlette_admin/templates/create.html:48
#: starlette_admin/templates/edit.html:50
msgid "Save and continue editing"
msgstr "Salvar e continue editando"

#: starlette_admin/templates/create.html:49
#: starlette_admin/templates/edit.html:51
msgid "Save"
msgstr "Salvar"

#: starlette_admin/templates/detail.html:13
msgid "Detail"
msgstr "Detalhe"

#: starlette_admin/templates/detail.html:47
msgid "Attribute"
msgstr "Atributo"

#: starlette_admin/templates/detail.html:48
msgid "Value"
msgstr "Valor"

#: starlette_admin/templates/edit.html:27
#, python-format
msgid "Edit %(name)s"
msgstr "Editar %(name)s"

#: starlette_admin/templates/error.html:7
msgid "Oops… You just found an error page"
msgstr "Ops… Você acabou de encontrar uma página de erro"

#: starlette_admin/templates/error.html:29
msgid "Take me home"
msgstr "Me leve ao início"

#: starlette_admin/templates/layout.html:95
#: starlette_admin/templates/layout.html:118
#: starlette_admin/templates/layout.html:204
msgid "Logout"
msgstr "Sair"

#: starlette_admin/templates/list.html:67
msgid "Search"
msgstr "Procurar"

#: starlette_admin/templates/login.html:16
msgid "Login to your account"
msgstr "Faça login na sua conta"

#: starlette_admin/templates/login.html:32
msgid "Username"
msgstr "Usuário"

#: starlette_admin/templates/login.html:43
msgid "Password"
msgstr "Senha"

#: starlette_admin/templates/login.html:56
msgid "Remember me"
msgstr "Lembre de mim"

#: starlette_admin/templates/login.html:60
msgid "Sign in"
msgstr "Entrar"

#: starlette_admin/templates/row-actions.html:38
msgid "Actions"
msgstr "Ações"

#: starlette_admin/templates/forms/_delete.html:13
msgid "Checked this to delete current content of this field"
msgstr "Marquei isto para excluir o conteúdo atual deste campo"

#: starlette_admin/templates/forms/enum.html:5
#, python-format
msgid "Select a %(label)s"
msgstr "Selecione um %(label)s"

#: starlette_admin/templates/forms/list.html:44
msgid "Add item"
msgstr "Adicionar Item"

#: starlette_admin/templates/modals/loading.html:7
msgid "Loading"
msgstr "Carregando"
Loading

0 comments on commit e0d906e

Please sign in to comment.