Skip to content

Commit

Permalink
Corrige i18n e linters
Browse files Browse the repository at this point in the history
  • Loading branch information
ericof committed Nov 11, 2024
1 parent 4309f4a commit 25c3061
Show file tree
Hide file tree
Showing 9 changed files with 73 additions and 19 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"POT-Creation-Date: 2024-10-23 23:06+0000\n"
"POT-Creation-Date: 2024-11-11 22:12+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI +ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <[email protected]>\n"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"POT-Creation-Date: 2024-10-23 23:06+0000\n"
"POT-Creation-Date: 2024-11-11 22:12+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI +ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <[email protected]>\n"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"POT-Creation-Date: 2024-10-23 23:06+0000\n"
"POT-Creation-Date: 2024-11-11 22:12+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI +ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <[email protected]>\n"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@ msgstr ""
msgid "Colaboradores"
msgstr ""

#. Default: "Adicionar descrição dos eventos?"
#: components/Blocks/Calendario/schema
msgid "Descrição"
msgstr ""

#. Default: "Gestor"
#: components/Blocks/Gestor/schema
msgid "Gestor"
Expand All @@ -46,6 +51,11 @@ msgstr ""
msgid "Powered by Portal Brasil: Intranet, Plone & Python"
msgstr ""

#. Default: "Query"
#: components/Blocks/Calendario/schema
msgid "Query"
msgstr ""

#. Default: "Título"
#: components/Blocks/Areas/schema
#: components/Blocks/Calendario/schema
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@ msgstr ""
msgid "Colaboradores"
msgstr ""

#. Default: "Adicionar descrição dos eventos?"
#: components/Blocks/Calendario/schema
msgid "Descrição"
msgstr ""

#. Default: "Gestor"
#: components/Blocks/Gestor/schema
msgid "Gestor"
Expand All @@ -46,6 +51,11 @@ msgstr ""
msgid "Powered by Portal Brasil: Intranet, Plone & Python"
msgstr ""

#. Default: "Query"
#: components/Blocks/Calendario/schema
msgid "Query"
msgstr ""

#. Default: "Título"
#: components/Blocks/Areas/schema
#: components/Blocks/Calendario/schema
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@ msgstr ""
msgid "Colaboradores"
msgstr ""

#. Default: "Adicionar descrição dos eventos?"
#: components/Blocks/Calendario/schema
msgid "Descrição"
msgstr ""

#. Default: "Gestor"
#: components/Blocks/Gestor/schema
msgid "Gestor"
Expand All @@ -46,6 +51,11 @@ msgstr ""
msgid "Powered by Portal Brasil: Intranet, Plone & Python"
msgstr ""

#. Default: "Query"
#: components/Blocks/Calendario/schema
msgid "Query"
msgstr ""

#. Default: "Título"
#: components/Blocks/Areas/schema
#: components/Blocks/Calendario/schema
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@ msgstr ""
msgid "Colaboradores"
msgstr ""

#. Default: "Adicionar descrição dos eventos?"
#: components/Blocks/Calendario/schema
msgid "Descrição"
msgstr ""

#. Default: "Gestor"
#: components/Blocks/Gestor/schema
msgid "Gestor"
Expand All @@ -46,6 +51,11 @@ msgstr ""
msgid "Powered by Portal Brasil: Intranet, Plone & Python"
msgstr ""

#. Default: "Query"
#: components/Blocks/Calendario/schema
msgid "Query"
msgstr ""

#. Default: "Título"
#: components/Blocks/Areas/schema
#: components/Blocks/Calendario/schema
Expand Down
12 changes: 11 additions & 1 deletion frontend/packages/portalbrasil-intranet/locales/volto.pot
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
msgid ""
msgstr ""
"Project-Id-Version: Plone\n"
"POT-Creation-Date: 2024-10-23T23:05:42.097Z\n"
"POT-Creation-Date: 2024-11-11T22:12:20.630Z\n"
"Last-Translator: Plone i18n <[email protected]>\n"
"Language-Team: Plone i18n <[email protected]>\n"
"Content-Type: text/plain; charset=utf-8\n"
Expand All @@ -28,6 +28,11 @@ msgstr ""
msgid "Colaboradores"
msgstr ""

#. Default: "Adicionar descrição dos eventos?"
#: components/Blocks/Calendario/schema
msgid "Descrição"
msgstr ""

#. Default: "Gestor"
#: components/Blocks/Gestor/schema
msgid "Gestor"
Expand All @@ -48,6 +53,11 @@ msgstr ""
msgid "Powered by Portal Brasil: Intranet, Plone & Python"
msgstr ""

#. Default: "Query"
#: components/Blocks/Calendario/schema
msgid "Query"
msgstr ""

#. Default: "Título"
#: components/Blocks/Areas/schema
#: components/Blocks/Calendario/schema
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,26 +5,30 @@ import { parseDate } from '@internationalized/date';
import withQuerystringResults from './withQuerystringResults';

const groupByDate = (items) => {
return items.reduce((map, obj) => {
if (!obj.start) return;
return items
.reduce((map, obj) => {
if (!obj.start) {
return null;
}

let start = obj.start ? parseDate(obj.start.slice(0, 10)) : null;
const end = obj.end ? parseDate(obj.end.slice(0, 10)) : start;
let start = obj.start ? parseDate(obj.start.slice(0, 10)) : null;
const end = obj.end ? parseDate(obj.end.slice(0, 10)) : start;

while (start < end) {
const key = start.toString();
while (start < end) {
const key = start.toString();

if (key) {
if (map[key] === undefined) {
map[key] = [];
if (key) {
if (map[key] === undefined) {
map[key] = [];
}
map[key].push(obj);
}
map[key].push(obj);
}

start = start.add({ days: 1 });
}
return map;
}, {});
start = start.add({ days: 1 });
}
return map;
}, {})
.filter((item) => item !== null);
};

const CalendarioBlockView = withQuerystringResults((props) => {
Expand Down

0 comments on commit 25c3061

Please sign in to comment.