From 384a63f76f955638e21c67a0f0692f3ca5aea05d Mon Sep 17 00:00:00 2001 From: leandromsd Date: Thu, 20 Jan 2022 09:39:38 -0300 Subject: [PATCH 1/7] Added portuguese brazil localization. #149 * add portuguese brazil language * replace empty translations with the original text Co-authored-by: Leandro Caixeta --- .../locale/pt_BR/LC_MESSAGES/django.mo | Bin 0 -> 2874 bytes .../locale/pt_BR/LC_MESSAGES/django.po | 235 ++++++++++++++++++ 2 files changed, 235 insertions(+) create mode 100644 admin_interface/locale/pt_BR/LC_MESSAGES/django.mo create mode 100644 admin_interface/locale/pt_BR/LC_MESSAGES/django.po diff --git a/admin_interface/locale/pt_BR/LC_MESSAGES/django.mo b/admin_interface/locale/pt_BR/LC_MESSAGES/django.mo new file mode 100644 index 0000000000000000000000000000000000000000..bf7c4a24f1a2f991f7e60c3a5c058eeb18de5d81 GIT binary patch literal 2874 zcmZvdO^g&p6vs*-9K4f-xmR*_I-R#bis2EezT{BZ`chy)` zGwdc@FeV<1;R4~{2~8v%NHj#fnUG0L)WpP##+Z2VU`#x5GM@aunjUsgD%1Vzs;;j0 zf3IG>`EBcl3k+=x*WrLnVxxBvw z()uUCN5Bl+3cd&K055_MfuDmg#l8XYW8dSp3H%Wxd%u7~;2$8ZcLRJ7To0o(z74z^ z+zHY;dqIlJesBv|%=?QVtrvsz-8&$bVrM||=UtHOo&z5PFM`j2*T5q7;AfEh*l`zQ zkAnL^>K_NmUJcw1S`a_>LEb+PlJ2V@+5H+MUEhK)gTI3G{Z=?Z@z@DcoL&LxyVpRP z|0YQLl7Zys8Ibg!1xfe&dH)eFu{6-$DBBACOXO9mJ8ojkwYK zEgW(kjdWcH$?gvz>G}yo2-u(C zli&?-7~BHm2s_(}YZMpR*oBLH4tWUDJo0G_7oCZ{xHzuoaQ(N9U|?H5Nc&4UNOt>; zv{T!Si}oF1VS8{<45&TZ1A77_|4DnlQT&h|;T%2Jn=&@z6GnS$Qpb)- zEv<@qS?OiRro*DFj5XS#A$i<1#!1V{QgkG*r9v-rZ+P2D?wgV)vM$=G=eg0;Gz=@l zDxV4-v02ekji7*!3(MwBtKH&pYMj!I(a}-1AY&-v#h64obW`DFLLQ2gEt1K;Th*q_ zBnx-PsuUoFAyFF&4+>iSjof+wox^jp3&oJmG~yp z0*(fMf*OnMam;xYFR${JXeiy=(f$Zx8Fo1DyLK&8o_V?Ab0s0G80}bMO)D{{HS0T+ zlOx&c*s0iPKAZ`=EbT~t4!!GTTK^Rnh%|{DVe{6ULe!#}Bsu|=*uw&!FHRgU9xL$^ zrG>?rx!Iuw*)rBg71vNnG~RBwsA>v)XnrnQkYwNJXcC)V;IEg83sGe*nk@3^xk6=T z&l_{IrJ=HLKB`)w9a6*C0-stcm-%e5QsRe7mEuhKXmN6Kp|rSo1XFuS8&##q3cOsL zJ+?$j4wcJCQ#ERAV{Hx;RAwrrHQD<|_YKjRKsrX%)fV(n2*!zK*8B+HKXP!0aRlc! z1>ok<=gHtvPLO#Mq9(hSMcOnD$B$>-Yp4c>jT_(nLOLF*0ghTIA$0z`m%E=BTBdhK zSuv|AI4N0P0q_l$A+7DSd&w#~z^DWqb)kC&g~7N1lWdWS4J6|el_--5lpnPsxy*PC z(TELF)C$xGVY%T{54>v8U}A5TK?TA>m*go_3WoB4@6bibkPQ)3Q@w~#FzOQV*NLHu zQN$ba(}v0+9SgOBQ{{+}OCnhd#iB?%h(uLFCEZXrx>r2~3n!>!aFT-`bySX9I~1+D zi46;NB0-rYVYitVj&raoSPdJ1KnJasN=El;N2V;s{wP#M7-Mop)l|^x8i%h?yNc?HQBejx;$AmLsn9su)b{T&uZSLBxCABkDHF|#cAGpQ} c1GOcF>0WgS^XPSaGowR^2{X9F8!9pX0*%wq_W%F@ literal 0 HcmV?d00001 diff --git a/admin_interface/locale/pt_BR/LC_MESSAGES/django.po b/admin_interface/locale/pt_BR/LC_MESSAGES/django.po new file mode 100644 index 0000000..f35be22 --- /dev/null +++ b/admin_interface/locale/pt_BR/LC_MESSAGES/django.po @@ -0,0 +1,235 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-01-19 22:45-0300\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n > 1);\n" + +#: admin.py:21 +msgid "Environment" +msgstr "Ambiente" + +#: admin.py:30 +msgid "Language chooser" +msgstr "Seletor de idioma" + +#: admin.py:37 +msgid "Logo" +msgstr "Logo" + +#: admin.py:47 +msgid "Favicon" +msgstr "Favicon" + +#: admin.py:51 +msgid "Title" +msgstr "Título" + +#: admin.py:59 +msgid "Header" +msgstr "Cabeçalho" + +#: admin.py:68 +msgid "Breadcrumbs / Module headers" +msgstr "Cabeçalhos de módulo" + +#: admin.py:80 +msgid "Generic Links" +msgstr "Links Genéricos" + +#: admin.py:87 +msgid "Save Buttons" +msgstr "Botões Salvar" + +#: admin.py:95 +msgid "Delete Buttons" +msgstr "Botões Deletar" + +#: admin.py:103 +msgid "Navigation Bar" +msgstr "Barra de Navegação" + +#: admin.py:109 +msgid "Related Modal" +msgstr "Modal Relacionado" + +#: admin.py:119 +msgid "Form Controls" +msgstr "Controles de Formulário" + +#: admin.py:126 +msgid "List Filter" +msgstr "Filtro de lista" + +#: admin.py:133 +msgid "Recent Actions" +msgstr "Ações recentes" + +#: apps.py:12 +msgid "Admin Interface" +msgstr "Interface do administrador" + +#: models.py:73 models.py:129 models.py:148 +msgid "name" +msgstr "nome" + +#: models.py:76 models.py:145 models.py:274 +msgid "active" +msgstr "ativo" + +#: models.py:80 templates/admin/base_site.html:6 +#: templates/admin/base_site.html:78 +msgid "Django administration" +msgstr "Administrção do Django" + +#: models.py:82 +msgid "title" +msgstr "título" + +#: models.py:88 models.py:105 models.py:135 +msgid "color" +msgstr "cor" + +#: models.py:91 models.py:116 models.py:318 +msgid "visible" +msgstr "visível" + +#: models.py:98 +msgid "Leave blank to use the default Django logo" +msgstr "Deixe em branco para usar o logotipo padrão do Django" + +#: models.py:99 +msgid "logo" +msgstr "logo" + +#: models.py:109 +msgid "max width" +msgstr "largura máxima" + +#: models.py:113 +msgid "max height" +msgstr "altura máxima" + +#: models.py:123 +msgid "(.ico|.png|.gif - 16x16|32x32 px)" +msgstr "(.ico|.png|.gif - 16x16|32x32 px)" + +#: models.py:124 +msgid "favicon" +msgid "favicon" +msgstr "" + +#: models.py:133 +msgid "" +"(red: #E74C3C, orange: #E67E22, yellow: #F1C40F, green: #2ECC71, blue: " +"#3498DB)" +msgstr "" +"(vermelho: #E74C3C, laranja: #E67E22, amarelo: #F1C40F, verde: #2ECC71, azul: " +"#3498DB)" + +#: models.py:138 +msgid "visible in header (marker and name)" +msgstr "visível no cabeçalho (marcador e nome)" + +#: models.py:141 +msgid "visible in favicon (marker)" +msgstr "visível no favicon (marcador)" + +#: models.py:147 +msgid "code" +msgstr "código" + +#: models.py:154 +msgid "display" +msgstr "exibição" + +#: models.py:161 models.py:186 models.py:239 models.py:258 models.py:280 +msgid "background color" +msgstr "cor de fundo" + +#: models.py:167 models.py:198 models.py:251 models.py:270 +msgid "text color" +msgstr "cor do texto" + +#: models.py:173 models.py:204 models.py:226 +msgid "link color" +msgstr "cor do link" + +#: models.py:179 models.py:216 models.py:232 +msgid "link hover color" +msgstr "cor de foco do link" + +#: models.py:192 +msgid "background selected color" +msgstr "cor de fundo selecionada" + +#: models.py:210 +msgid "link selected color" +msgstr "link cor selecionada" + +#: models.py:219 models.py:300 +msgid "rounded corners" +msgstr "cantos arredondados" + +#: models.py:245 models.py:264 +msgid "background hover color" +msgstr "cor de fundo do foco" + +#: models.py:297 +msgid "background opacity" +msgstr "opacidade de fundo" + +#: models.py:303 +msgid "close button visible" +msgstr "botão fechar visível" + +#: models.py:307 +msgid "use dropdown" +msgstr "usar menu suspenso" + +#: models.py:310 +msgid "sticky position" +msgstr "sticky position" + +#: models.py:314 +msgid "foldable apps" +msgstr "aplicativos dobráveis" + +#: models.py:322 +msgid "sticky submit" +msgstr "envio fixo" + +#: models.py:325 +msgid "sticky pagination" +msgstr "paginação fixa" + +#: models.py:334 +msgid "Theme" +msgstr "Tema" + +#: models.py:335 +msgid "Themes" +msgstr "Temas" + +#: templates/admin/filter.html:13 +#: templates/admin_interface/dropdown_filter.html:4 +#, python-format +msgid " By %(filter_title)s " +msgstr " por %(filter_title)s " + +#: templates/admin/popup_response.html:3 +msgid "Popup closing..." +msgstr "Pop-up fechando..." From c8ababb8e4b9c256efddc8634a0cdfdc9d976dc6 Mon Sep 17 00:00:00 2001 From: Fabio Caccamo Date: Thu, 20 Jan 2022 19:26:59 +0100 Subject: [PATCH 2/7] Create SECURITY.md --- SECURITY.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 SECURITY.md diff --git a/SECURITY.md b/SECURITY.md new file mode 100644 index 0000000..e6b4772 --- /dev/null +++ b/SECURITY.md @@ -0,0 +1,14 @@ +# Security Policy + +## Supported Versions + +Keep this library updated to the latest version. + +| Version | Supported | +| ------- | ------------------ | +| latest | :white_check_mark: | +| oldest | :x: | + +## Reporting a Vulnerability + +Open an issue. From 7c0a105c928b00425530dc86a59299e408b02d76 Mon Sep 17 00:00:00 2001 From: Fabio Caccamo Date: Fri, 21 Jan 2022 13:39:21 +0100 Subject: [PATCH 3/7] Fixed body scroll reset to top when opening related modal. #150 --- .../static/admin_interface/related-modal/related-modal.js | 1 + 1 file changed, 1 insertion(+) diff --git a/admin_interface/static/admin_interface/related-modal/related-modal.js b/admin_interface/static/admin_interface/related-modal/related-modal.js index 1c2ec84..49c4fd9 100644 --- a/admin_interface/static/admin_interface/related-modal/related-modal.js +++ b/admin_interface/static/admin_interface/related-modal/related-modal.js @@ -108,6 +108,7 @@ if (typeof(django) !== 'undefined' && typeof(django.jQuery) !== 'undefined') // open the popup using magnific popup $.magnificPopup.open({ mainClass: iframeInternalModalClass, + fixedContentPos: false, showCloseBtn: true, closeBtnInside: true, items: { From ee6382683601728a3bbf2b2e09a5ec725666f123 Mon Sep 17 00:00:00 2001 From: Fabio Caccamo Date: Fri, 21 Jan 2022 13:41:56 +0100 Subject: [PATCH 4/7] Updated CHANGELOG and version. --- CHANGELOG.md | 4 ++++ admin_interface/version.py | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9389203..d3b4ed0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [0.18.5](https://github.com/fabiocaccamo/django-admin-interface/releases/tag/0.18.5) - 2022-01-21 +- Added portuguese brazil (`pt_BR`) localization by [leandromsd](https://github.com/leandromsd). #149 +- Fixed body scroll reset to top when opening related modal. #150 + ## [0.18.4](https://github.com/fabiocaccamo/django-admin-interface/releases/tag/0.18.4) - 2022-01-05 - Added official django 4.0 support. - Added link to admin home page on logo and title. #147 diff --git a/admin_interface/version.py b/admin_interface/version.py index b2caf64..182fb53 100644 --- a/admin_interface/version.py +++ b/admin_interface/version.py @@ -1,3 +1,3 @@ # -*- coding: utf-8 -*- -__version__ = '0.18.4' +__version__ = '0.18.5' From 8930ba1ddcc5995abaff51b8bccc1425d7764701 Mon Sep 17 00:00:00 2001 From: Fabio Caccamo Date: Fri, 21 Jan 2022 14:17:09 +0100 Subject: [PATCH 5/7] Fixed login logo max-width and title color. --- .../admin_interface/css/admin-interface-fix.css | 11 ++--------- .../templates/admin_interface/css/admin-interface.css | 10 ++++++++-- 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/admin_interface/templates/admin_interface/css/admin-interface-fix.css b/admin_interface/templates/admin_interface/css/admin-interface-fix.css index cfc8ae8..643e96d 100644 --- a/admin_interface/templates/admin_interface/css/admin-interface-fix.css +++ b/admin_interface/templates/admin_interface/css/admin-interface-fix.css @@ -26,7 +26,7 @@ min-height: auto; padding: 10px 30px; line-height: 30px; - align-items: flex-start; + align-items: center; justify-content: flex-start; } @@ -35,7 +35,6 @@ } .admin-interface.login #header #branding h1 img.logo { - max-width: 100%; margin-right: 0; } @@ -82,7 +81,7 @@ @media (max-width:1024px) { .admin-interface #header { - align-items: center; + align-items: start; } } @@ -93,12 +92,6 @@ display:inline-block !important; /* override inline display:none; */ } -@media (max-width:400px) { - .admin-interface #branding h1 img.logo { - max-width: 100%; - } -} - .admin-interface #branding h1 span { display: inline-block; } diff --git a/admin_interface/templates/admin_interface/css/admin-interface.css b/admin_interface/templates/admin_interface/css/admin-interface.css index 43e845d..53a350f 100644 --- a/admin_interface/templates/admin_interface/css/admin-interface.css +++ b/admin_interface/templates/admin_interface/css/admin-interface.css @@ -133,7 +133,9 @@ display: inline-block; } -.admin-interface #branding h1 { +.admin-interface #branding h1, +.admin-interface.login #header h1, +.admin-interface.login #header h1 a { color: {{ theme.title_color }}; } @@ -149,9 +151,13 @@ background-image: url("data:image/svg+xml;utf8,"); } -.admin-interface #branding h1 img.logo { +.admin-interface #branding h1 img.logo, +.admin-interface.login #header #branding h1 img.logo { {% if theme.logo_max_width > 0 %} max-width: {{ theme.logo_max_width }}px; + max-width: min({{ theme.logo_max_width }}px, 100%); + {% else %} + max-width: 100%; {% endif %} {% if theme.logo_max_height > 0 %} max-height: {{ theme.logo_max_height }}px; From 7719ac42776ef892098d177af01fc99828143333 Mon Sep 17 00:00:00 2001 From: Fabio Caccamo Date: Thu, 27 Jan 2022 23:26:26 +0100 Subject: [PATCH 6/7] Updated README. [ci skip] --- README.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 6d3e269..cf11c39 100644 --- a/README.md +++ b/README.md @@ -2,16 +2,15 @@ [![](https://img.shields.io/pypi/djversions/django-admin-interface?color=0C4B33&logo=django&logoColor=white&label=django)](https://www.djangoproject.com/) [![](https://img.shields.io/pypi/v/django-admin-interface.svg?color=blue&logo=pypi&logoColor=white)](https://pypi.org/project/django-admin-interface/) -[![](https://pepy.tech/badge/django-admin-interface)](https://pepy.tech/project/django-admin-interface) +[![](https://pepy.tech/badge/django-admin-interface/month)](https://pepy.tech/project/django-admin-interface) [![](https://img.shields.io/github/stars/fabiocaccamo/django-admin-interface?logo=github)](https://github.com/fabiocaccamo/django-admin-interface/) [![](https://badges.pufler.dev/visits/fabiocaccamo/django-admin-interface?label=visitors&color=blue)](https://badges.pufler.dev) [![](https://img.shields.io/pypi/l/django-admin-interface.svg?color=blue)](https://github.com/fabiocaccamo/django-admin-interface/blob/master/LICENSE.txt) -[![](https://img.shields.io/github/workflow/status/fabiocaccamo/django-admin-interface/Python%20package?label=build&logo=github)](https://github.com/fabiocaccamo/django-admin-interface) +[![](https://img.shields.io/github/workflow/status/fabiocaccamo/django-admin-interface/Test%20package?label=build&logo=github)](https://github.com/fabiocaccamo/django-admin-interface) [![](https://img.shields.io/codecov/c/gh/fabiocaccamo/django-admin-interface?logo=codecov)](https://codecov.io/gh/fabiocaccamo/django-admin-interface) [![](https://img.shields.io/codacy/grade/21cb657283c04e70b56fb935277a1ad1?logo=codacy)](https://www.codacy.com/app/fabiocaccamo/django-admin-interface) [![](https://img.shields.io/codeclimate/maintainability/fabiocaccamo/django-admin-interface?logo=code-climate)](https://codeclimate.com/github/fabiocaccamo/django-admin-interface/) -[![](https://requires.io/github/fabiocaccamo/django-admin-interface/requirements.svg?branch=master)](https://requires.io/github/fabiocaccamo/django-admin-interface/requirements/?branch=master) # django-admin-interface django-admin-interface is a modern **responsive flat admin interface customizable by the admin itself**. From 958996f119e578fe89c07658363bce5623a853bf Mon Sep 17 00:00:00 2001 From: Fabio Caccamo Date: Thu, 27 Jan 2022 23:26:30 +0100 Subject: [PATCH 7/7] Update test-package.yml --- .github/workflows/test-package.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test-package.yml b/.github/workflows/test-package.yml index c176ea2..4533cf2 100644 --- a/.github/workflows/test-package.yml +++ b/.github/workflows/test-package.yml @@ -1,8 +1,9 @@ name: Test package on: - - push - - pull_request + push: + pull_request: + workflow_dispatch: jobs: build: