From 1c582b8e18f63801e11bedd4b25d81203dc17f68 Mon Sep 17 00:00:00 2001 From: Andrea Cecchi Date: Tue, 7 Nov 2023 09:46:25 +0100 Subject: [PATCH 01/16] do not use key/value pairs --- redturtle/bandi/profiles/default/metadata.xml | 2 +- redturtle/bandi/upgrades.py | 55 +++++++++++++++++-- redturtle/bandi/upgrades.zcml | 9 ++- redturtle/bandi/vocabularies.py | 22 +------- 4 files changed, 62 insertions(+), 26 deletions(-) diff --git a/redturtle/bandi/profiles/default/metadata.xml b/redturtle/bandi/profiles/default/metadata.xml index 0ad88e5..4d52aee 100644 --- a/redturtle/bandi/profiles/default/metadata.xml +++ b/redturtle/bandi/profiles/default/metadata.xml @@ -1,4 +1,4 @@ - 2101 + 2200 diff --git a/redturtle/bandi/upgrades.py b/redturtle/bandi/upgrades.py index 39d408a..77d31a9 100644 --- a/redturtle/bandi/upgrades.py +++ b/redturtle/bandi/upgrades.py @@ -2,6 +2,9 @@ from plone import api from plone.app.event.base import default_timezone from redturtle.bandi import logger +from redturtle.bandi.interfaces.settings import IBandoSettings +from zope.component import getUtility +from zope.schema.interfaces import IVocabularyFactory import pytz @@ -48,10 +51,10 @@ def migrate_to_1100(context): ) criteria_mapping = { - u"getTipologia_bando": u"tipologia_bando", - u"getChiusura_procedimento_bando": u"chiusura_procedimento_bando", - u"getScadenza_bando": u"scadenza_bando", - u"getDestinatariBando": u"destinatari_bando", + "getTipologia_bando": "tipologia_bando", + "getChiusura_procedimento_bando": "chiusura_procedimento_bando", + "getScadenza_bando": "scadenza_bando", + "getDestinatariBando": "destinatari_bando", } collections = api.content.find(portal_type="Collection") tot_results = len(collections) @@ -169,4 +172,46 @@ def migrate_to_2101(context): ) ) bando = brain.getObject() - bando.reindexObject(idxs=['scadenza_bando']) + bando.reindexObject(idxs=["scadenza_bando"]) + + +def migrate_to_2200(context): + bandi = api.content.find(portal_type="Bando") + tot_results = len(bandi) + logger.info("### Fixing {tot} Bandi ###".format(tot=tot_results)) + + def get_value(key, value): + for entry in api.portal.get_registry_record( + key, interface=IBandoSettings, default=[] + ): + id, label = entry.split("|") + if id == value: + return label + + for counter, brain in enumerate(bandi): + logger.info( + "[{counter}/{tot}] - {bando}".format( + counter=counter + 1, tot=tot_results, bando=brain.getPath() + ) + ) + bando = brain.getObject() + tipologia = getattr(bando, "tipologia_bando", "") + destinatari = getattr(bando, "destinatari", "") + if tipologia: + value = get_value(key="tipologie_bando", value=tipologia) + setattr(bando, "tipologia_bando", value) + if destinatari: + value = [get_value(key="default_destinatari", value=x) for x in destinatari] + setattr(bando, "destinatari", value) + bando.reindexObject(idxs=["tipologia_bando", "destinatari_bando"]) + + # cleanup vocabs + for key in ["tipologie_bando", "default_destinatari"]: + values = [] + for old_val in api.portal.get_registry_record( + key, interface=IBandoSettings, default=[] + ): + id, label = old_val.split("|") + values.append(label) + + api.portal.set_registry_record(key, tuple(values), interface=IBandoSettings) diff --git a/redturtle/bandi/upgrades.zcml b/redturtle/bandi/upgrades.zcml index 8c7263e..d0af100 100644 --- a/redturtle/bandi/upgrades.zcml +++ b/redturtle/bandi/upgrades.zcml @@ -58,5 +58,12 @@ destination="2101" handler=".upgrades.migrate_to_2101" profile="redturtle.bandi:default" /> - + + diff --git a/redturtle/bandi/vocabularies.py b/redturtle/bandi/vocabularies.py index ecb8f97..35237be 100644 --- a/redturtle/bandi/vocabularies.py +++ b/redturtle/bandi/vocabularies.py @@ -14,13 +14,7 @@ def __call__(self, context): values = api.portal.get_registry_record( "tipologie_bando", interface=IBandoSettings, default=[] ) - terms = [] - for tipologia in values: - if tipologia and "|" in tipologia: - key, value = tipologia.split("|", 1) - terms.append(SimpleTerm(value=key, token=key, title=value)) - else: - logger.error("invalid tipologia bando %s", tipologia) + terms = [SimpleTerm(value=x, token=x, title=x) for x in values if x] return SimpleVocabulary(terms) @@ -33,15 +27,7 @@ def __call__(self, context): values = api.portal.get_registry_record( "default_destinatari", interface=IBandoSettings, default=[] ) - - l = [] - for i in range(len(values)): - l.append(tuple(values[i].split("|"))) - - terms = [ - SimpleTerm(value=pair[0], token=pair[0], title=pair[1]) - for pair in l - ] + terms = [SimpleTerm(value=x, token=x, title=x) for x in values if x] return SimpleVocabulary(terms) @@ -53,9 +39,7 @@ class EnteVocabularyFactory(object): def __call__(self, context): catalog = api.portal.get_tool("portal_catalog") enti = list(catalog._catalog.uniqueValuesFor("ente_bando")) - terms = [ - SimpleTerm(value=ente, token=ente, title=ente) for ente in enti - ] + terms = [SimpleTerm(value=ente, token=ente, title=ente) for ente in enti] return SimpleVocabulary(terms) From 31bdd378ac663f7a6dabf66ebcc5fa04794eca0a Mon Sep 17 00:00:00 2001 From: Andrea Cecchi Date: Tue, 7 Nov 2023 12:17:01 +0100 Subject: [PATCH 02/16] update changelog and fix upgrades --- docs/HISTORY.txt | 3 +- redturtle/bandi/interfaces/settings.py | 34 +++++++------- redturtle/bandi/upgrades.py | 61 +++++++++++++++++++++++++- 3 files changed, 78 insertions(+), 20 deletions(-) diff --git a/docs/HISTORY.txt b/docs/HISTORY.txt index bb673b6..7c9f313 100644 --- a/docs/HISTORY.txt +++ b/docs/HISTORY.txt @@ -4,7 +4,8 @@ Changelog 1.4.4 (unreleased) ------------------ -- Nothing changed yet. +- Do not use key/value pairs in tipologia_bando and destinatari. + [cekk] 1.4.3 (2023-06-27) diff --git a/redturtle/bandi/interfaces/settings.py b/redturtle/bandi/interfaces/settings.py index 88e8033..bdf00cb 100644 --- a/redturtle/bandi/interfaces/settings.py +++ b/redturtle/bandi/interfaces/settings.py @@ -10,47 +10,47 @@ class IBandoSettings(Interface): """ default_ente = schema.Tuple( - title=_(u"default_ente_label", default=u"Default Ente"), + title=_("default_ente_label", default="Default Ente"), description=_( - u"default_ente_help", - default=u"Insert a list of default Enti that will be automatically selected when adding a new Bando.", + "default_ente_help", + default="Insert a list of default Enti that will be automatically selected when adding a new Bando.", ), required=False, value_type=schema.TextLine(), missing_value=None, - default=(u"Regione Emilia-Romagna",), + default=("Regione Emilia-Romagna",), ) default_destinatari = schema.Tuple( - title=_(u"default_destinatari_label", default=u"Destinatari types"), + title=_("default_destinatari_label", default="Destinatari types"), description=_( - u"default_destinatari_help", - default=u"Insert a list of available destinatari that can be selected when adding a new Bando.", + "default_destinatari_help", + default="Insert a list of available destinatari that can be selected when adding a new Bando.", ), required=False, value_type=schema.TextLine(), missing_value=None, default=( - u"Cittadini|Cittadini", - u"Imprese|Imprese", - u"Enti locali|Enti locali", - u"Associazioni|Associazioni", - u"Altro|Altro", + "Cittadini", + "Imprese", + "Enti locali", + "Associazioni", + "Altro", ), ) tipologie_bando = schema.Tuple( - title=_("tipologie_bando_label", default=u"Announcement types"), + title=_("tipologie_bando_label", default="Announcement types"), description=_( "tipologie_help", - u"These values will extend bandi.xml vocabulary on filesystem", + "These values will extend bandi.xml vocabulary on filesystem", ), required=False, value_type=schema.TextLine(), missing_value=None, default=( - u"beni_servizi|Acquisizione beni e servizi", - u"agevolazioni|Agevolazioni, finanziamenti, contributi", - u"altro|Altro", + "Acquisizione beni e servizi", + "Agevolazioni, finanziamenti, contributi", + "Altro", ), ) diff --git a/redturtle/bandi/upgrades.py b/redturtle/bandi/upgrades.py index 77d31a9..4de3925 100644 --- a/redturtle/bandi/upgrades.py +++ b/redturtle/bandi/upgrades.py @@ -3,8 +3,6 @@ from plone.app.event.base import default_timezone from redturtle.bandi import logger from redturtle.bandi.interfaces.settings import IBandoSettings -from zope.component import getUtility -from zope.schema.interfaces import IVocabularyFactory import pytz @@ -176,6 +174,18 @@ def migrate_to_2101(context): def migrate_to_2200(context): + from Acquisition import aq_base + from plone.dexterity.utils import iterSchemata + from copy import deepcopy + from zope.schema import getFields + + try: + from collective.volto.blocksfield.field import BlocksField + + HAS_BLOCKS_FIELD = True + except ImportError: + HAS_BLOCKS_FIELD = True + bandi = api.content.find(portal_type="Bando") tot_results = len(bandi) logger.info("### Fixing {tot} Bandi ###".format(tot=tot_results)) @@ -187,6 +197,22 @@ def get_value(key, value): id, label = entry.split("|") if id == value: return label + return value + + def fix_listing(blocks): + for block in blocks.values(): + if block.get("@type", "") != "listing": + continue + for query in block.get("querystring", {}).get("query", []): + value = query["v"] + if query["i"] == "destinatari_bando": + query["v"] = [ + get_value(key="default_destinatari", value=v) for v in value + ] + elif query["i"] == "tipologia_bando": + query["v"] = [ + get_value(key="tipologie_bando", value=v) for v in value + ] for counter, brain in enumerate(bandi): logger.info( @@ -205,6 +231,37 @@ def get_value(key, value): setattr(bando, "destinatari", value) bando.reindexObject(idxs=["tipologia_bando", "destinatari_bando"]) + # fix blocks + # fix blocks in contents + logger.info("### Fixing blocks ###") + pc = api.portal.get_tool(name="portal_catalog") + brains = pc() + tot = len(brains) + i = 0 + for brain in brains: + i += 1 + if i % 1000 == 0: + logger.info("Progress: {}/{}".format(i, tot)) + item = aq_base(brain.getObject()) + if getattr(item, "blocks", {}): + blocks = deepcopy(item.blocks) + if blocks: + fix_listing(blocks) + item.blocks = blocks + if HAS_BLOCKS_FIELD: + for schema in iterSchemata(item): + # fix blocks in blocksfields + for name, field in getFields(schema).items(): + if not isinstance(field, BlocksField): + continue + value = deepcopy(field.get(item)) + if not value: + continue + blocks = value.get("blocks", {}) + if blocks: + fix_listing(blocks) + setattr(item, name, value) + # cleanup vocabs for key in ["tipologie_bando", "default_destinatari"]: values = [] From 3e4d682b7db07774ebabbfeb83ec496450b69e76 Mon Sep 17 00:00:00 2001 From: Andrea Cecchi Date: Tue, 7 Nov 2023 13:41:24 +0100 Subject: [PATCH 03/16] fix tests --- base.cfg | 1 + redturtle/bandi/tests/test_bando_view.py | 85 ++++++++++++------------ 2 files changed, 43 insertions(+), 43 deletions(-) diff --git a/base.cfg b/base.cfg index cc3125d..5005cd3 100644 --- a/base.cfg +++ b/base.cfg @@ -118,3 +118,4 @@ scripts = [versions] # Don't use a released version of redturtle.bandi redturtle.bandi = +setuptools = diff --git a/redturtle/bandi/tests/test_bando_view.py b/redturtle/bandi/tests/test_bando_view.py index 178d327..d4896c8 100644 --- a/redturtle/bandi/tests/test_bando_view.py +++ b/redturtle/bandi/tests/test_bando_view.py @@ -8,100 +8,99 @@ class BandoViewTest(unittest.TestCase): - layer = REDTURTLE_BANDI_INTEGRATION_TESTING def setUp(self): - self.portal = self.layer['portal'] - self.request = self.layer['request'] - setRoles(self.portal, TEST_USER_ID, ['Manager']) + self.portal = self.layer["portal"] + self.request = self.layer["request"] + setRoles(self.portal, TEST_USER_ID, ["Manager"]) self.bando = api.content.create( - container=self.portal, type='Bando', title='Bando foo' + container=self.portal, type="Bando", title="Bando foo" ) def test_bando_views_registered(self): view = api.content.get_view( - name='bando_view', context=self.bando, request=self.request + name="bando_view", context=self.bando, request=self.request ) - self.assertTrue(view.__name__ == 'bando_view') + self.assertTrue(view.__name__ == "bando_view") view_right = api.content.get_view( - name='bando_right_view', context=self.bando, request=self.request + name="bando_right_view", context=self.bando, request=self.request ) - self.assertTrue(view_right.__name__ == 'bando_right_view') + self.assertTrue(view_right.__name__ == "bando_right_view") def test_destinatari_in_view(self): view = api.content.get_view( - name='bando_view', context=self.bando, request=self.request + name="bando_view", context=self.bando, request=self.request ) - self.assertNotIn('Recipients', view()) + self.assertNotIn("Recipients", view()) bando_new = api.content.create( container=self.portal, - type='Bando', - title='Bando new', - destinatari=['foo', 'bar'], + type="Bando", + title="Bando new", + destinatari=["foo", "bar"], ) view_new = api.content.get_view( - name='bando_view', context=bando_new, request=self.request + name="bando_view", context=bando_new, request=self.request ) - self.assertIn('Recipients', view_new()) - self.assertIn('
  • foo
  • ', view_new()) - self.assertIn('
  • bar
  • ', view_new()) + self.assertIn("Recipients", view_new()) + self.assertIn("
  • foo
  • ", view_new()) + self.assertIn("
  • bar
  • ", view_new()) def test_destinatari_in_right_view(self): view = api.content.get_view( - name='bando_right_view', context=self.bando, request=self.request + name="bando_right_view", context=self.bando, request=self.request ) - self.assertNotIn('Recipients', view()) + self.assertNotIn("Recipients", view()) bando_new = api.content.create( container=self.portal, - type='Bando', - title='Bando new', - destinatari=['foo', 'bar'], + type="Bando", + title="Bando new", + destinatari=["foo", "bar"], ) view_new = api.content.get_view( - name='bando_right_view', context=bando_new, request=self.request + name="bando_right_view", context=bando_new, request=self.request ) - self.assertIn('Recipients', view_new()) - self.assertIn('
  • foo
  • ', view_new()) - self.assertIn('
  • bar
  • ', view_new()) + self.assertIn("Recipients", view_new()) + self.assertIn("
  • foo
  • ", view_new()) + self.assertIn("
  • bar
  • ", view_new()) def test_tipologia_bando_in_view(self): view = api.content.get_view( - name='bando_view', context=self.bando, request=self.request + name="bando_view", context=self.bando, request=self.request ) - self.assertNotIn('Announcement type', view()) + self.assertNotIn("Announcement type", view()) bando_new = api.content.create( container=self.portal, - type='Bando', - title='Bando new', - tipologia_bando='altro', + type="Bando", + title="Bando new", + tipologia_bando="Altro", ) view_new = api.content.get_view( - name='bando_view', context=bando_new, request=self.request + name="bando_view", context=bando_new, request=self.request ) - self.assertIn('Announcement type', view_new()) - self.assertIn('Altro', view_new()) + self.assertIn("Announcement type", view_new()) + self.assertIn("Altro", view_new()) def test_tipologia_bando_in_right_view(self): view = api.content.get_view( - name='bando_right_view', context=self.bando, request=self.request + name="bando_right_view", context=self.bando, request=self.request ) - self.assertNotIn('Announcement type', view()) + self.assertNotIn("Announcement type", view()) bando_new = api.content.create( container=self.portal, - type='Bando', - title='Bando new', - tipologia_bando='altro', + type="Bando", + title="Bando new", + tipologia_bando="Altro", ) view_new = api.content.get_view( - name='bando_right_view', context=bando_new, request=self.request + name="bando_right_view", context=bando_new, request=self.request ) - self.assertIn('Announcement type', view_new()) - self.assertIn('Altro', view_new()) + self.assertIn("Announcement type", view_new()) + self.assertIn("Altro", view_new()) From a6f401d307139f14584b88a8fb0e9b06691fc3bd Mon Sep 17 00:00:00 2001 From: Roman Kysil Date: Wed, 22 Jan 2025 12:26:01 +0100 Subject: [PATCH 04/16] Squashed commit of the following: commit f22630251c3fcc383176666cd3f2c15b06352d81 Author: Roman Kysil Date: Wed Jan 22 11:39:12 2025 +0100 Intermediate commit commit dd52d3ccc796c3064bdd03a38b6366617bc3ca84 Author: Roman Kysil Date: Wed Jan 22 11:33:32 2025 +0100 Intermediate commit commit feb34aaaea3f424f5e206d2b71f998532dafedc8 Author: Roman Kysil Date: Wed Jan 22 10:38:11 2025 +0100 Fix voc commit b5049d6912ccba96f77fbb4b6f55be6c6f7724ab Author: Roman Kysil Date: Wed Jan 22 09:51:18 2025 +0100 Intermediate commit commit 97674b11a1d804c1449fea7d1dc3c6536bf8f132 Author: Roman Kysil Date: Tue Jan 21 17:36:04 2025 +0100 more criteria commit e0817632911fcf67819828d4752afd734956801a Author: Roman Kysil Date: Tue Jan 21 17:20:21 2025 +0100 Update upgrades.zcml commit 30eecb41fb5e947e8fad28327057a7b26b214fe3 Author: Roman Kysil Date: Tue Jan 21 17:16:48 2025 +0100 Update metadata.xml commit f4b60be434c8e0d5e4846dac7f78fd731522e944 Author: Roman Kysil Date: Tue Jan 21 17:02:38 2025 +0100 Update registry.xml commit 6507a294b50e3f0ee9c733eaa97fd5cce22c4577 Author: Roman Kysil Date: Mon Jan 20 17:48:22 2025 +0100 Intermediate commit commit 7eeea29b03faac33467a05eb77b8ab1a3aeb9bfe Author: Roman Kysil Date: Mon Jan 20 17:32:56 2025 +0100 Initial implementation commit 203687c34d3bbbb08120fa23e3991090fb9ad848 Author: Roman Kysil Date: Mon Jan 20 15:18:25 2025 +0100 Initial implementation --- redturtle/bandi/configure.zcml | 15 ++++ .../bandi/locales/it/LC_MESSAGES/plone.po | 13 ++++ redturtle/bandi/profiles/default/metadata.xml | 2 +- redturtle/bandi/profiles/default/registry.xml | 35 +++++++++- redturtle/bandi/profiles/to_2300/registry.xml | 37 ++++++++++ redturtle/bandi/querymodifiers/__init__.py | 0 redturtle/bandi/querymodifiers/bandi_state.py | 68 +++++++++++++++++++ redturtle/bandi/querymodifiers/configure.zcml | 13 ++++ redturtle/bandi/upgrades.py | 10 +++ redturtle/bandi/upgrades.zcml | 9 +++ redturtle/bandi/vocabularies.py | 31 ++++++++- 11 files changed, 230 insertions(+), 3 deletions(-) create mode 100644 redturtle/bandi/profiles/to_2300/registry.xml create mode 100644 redturtle/bandi/querymodifiers/__init__.py create mode 100644 redturtle/bandi/querymodifiers/bandi_state.py create mode 100644 redturtle/bandi/querymodifiers/configure.zcml diff --git a/redturtle/bandi/configure.zcml b/redturtle/bandi/configure.zcml index ae217c1..b9cfc3a 100644 --- a/redturtle/bandi/configure.zcml +++ b/redturtle/bandi/configure.zcml @@ -31,6 +31,7 @@ + @@ -58,6 +59,15 @@ description="RedTurtle Bandi migrate to version 1100" provides="Products.GenericSetup.interfaces.EXTENSION" /> + + + + + diff --git a/redturtle/bandi/locales/it/LC_MESSAGES/plone.po b/redturtle/bandi/locales/it/LC_MESSAGES/plone.po index af2366f..8b99359 100644 --- a/redturtle/bandi/locales/it/LC_MESSAGES/plone.po +++ b/redturtle/bandi/locales/it/LC_MESSAGES/plone.po @@ -36,3 +36,16 @@ msgstr "Destinatari bando" #: Custom bandi indexes msgid "scadenza_bando" msgstr "Scadenza bando" + +msgid "open" +msgstr "Aperto" + +msgid "in-progress" +msgstr "In lavorazione" + +msgid "closed" +msgstr "Chiuso" + +msgid "scheduled" +msgstr "Schedulato" + diff --git a/redturtle/bandi/profiles/default/metadata.xml b/redturtle/bandi/profiles/default/metadata.xml index 4d52aee..fbcc667 100644 --- a/redturtle/bandi/profiles/default/metadata.xml +++ b/redturtle/bandi/profiles/default/metadata.xml @@ -1,4 +1,4 @@ - 2200 + 2300 diff --git a/redturtle/bandi/profiles/default/registry.xml b/redturtle/bandi/profiles/default/registry.xml index f36c2d6..97e03fa 100644 --- a/redturtle/bandi/profiles/default/registry.xml +++ b/redturtle/bandi/profiles/default/registry.xml @@ -104,7 +104,7 @@ ++plone++redturtle.bandi.styles/bandi.css - + @@ -116,4 +116,37 @@ 2017-11-26 00:00:00 + + Stato del bando + + True + False + + plone.app.querystring.operation.selection.bando_state_is + + redturtle.bandi.vocabularies.bandi_states + Bando + + + + Is + Tip: you can use * to autocomplete. + plone.app.querystring.queryparser._equal + MultipleSelectionWidget + + diff --git a/redturtle/bandi/profiles/to_2300/registry.xml b/redturtle/bandi/profiles/to_2300/registry.xml new file mode 100644 index 0000000..d6116eb --- /dev/null +++ b/redturtle/bandi/profiles/to_2300/registry.xml @@ -0,0 +1,37 @@ + + + + Is + Tip: you can use * to autocomplete. + plone.app.querystring.queryparser._equal + MultipleSelectionWidget + + + + Stato del bando + + True + False + + plone.app.querystring.operation.selection.is + + redturtle.bandi.vocabularies.bandi_states + Bando + + + \ No newline at end of file diff --git a/redturtle/bandi/querymodifiers/__init__.py b/redturtle/bandi/querymodifiers/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/redturtle/bandi/querymodifiers/bandi_state.py b/redturtle/bandi/querymodifiers/bandi_state.py new file mode 100644 index 0000000..27c2004 --- /dev/null +++ b/redturtle/bandi/querymodifiers/bandi_state.py @@ -0,0 +1,68 @@ +from plone.app.querystring.interfaces import IQueryModifier +from zope.interface import provider +from plone.restapi.serializer.converters import json_compatible +from DateTime import DateTime + + +@provider(IQueryModifier) +def modify_bandi_state_query(query): + now = json_compatible(DateTime()) + item = None + query_extender = [] + + state_operators = { + "open": ( + { + "o": "plone.app.querystring.operation.date.largerThanRelativeDate", + "v": now, + "i": "scadenza_bando", + }, + { + "o": "plone.app.querystring.operation.date.largerThanRelativeDate", + "v": now, + "i": "chiusura_procedimento_bando", + }, + ), + "in-progress": ( + { + "o": "plone.app.querystring.operation.date.lessThanRelativeDate", + "v": now, + "i": "scadenza_bando", + }, + { + "o": "plone.app.querystring.operation.date.largerThanRelativeDate", + "v": now, + "i": "chiusura_procedimento_bando", + }, + ), + "closed": ( + { + "o": "plone.app.querystring.operation.date.lessThanRelativeDate", + "v": now, + "i": "chiusura_procedimento_bando", + }, + ), + "scheduled": ( + { + "o": "plone.app.querystring.operation.date.largerThanRelativeDate", + "v": now, + "i": "apertura_bando", + }, + ), + } + + for i in query: + if i.get("i", "") == "bando_state": + item = i + + for value in i.get("v", []): + operator = state_operators.get(value, None) + + if operator: + query_extender.extend(operator) + + if item: + query.remove(item) + query.extend(query_extender) + + return query diff --git a/redturtle/bandi/querymodifiers/configure.zcml b/redturtle/bandi/querymodifiers/configure.zcml new file mode 100644 index 0000000..39133eb --- /dev/null +++ b/redturtle/bandi/querymodifiers/configure.zcml @@ -0,0 +1,13 @@ + + + + + \ No newline at end of file diff --git a/redturtle/bandi/upgrades.py b/redturtle/bandi/upgrades.py index c329b8a..86cc8f2 100644 --- a/redturtle/bandi/upgrades.py +++ b/redturtle/bandi/upgrades.py @@ -288,3 +288,13 @@ def fix_listing(blocks): values.append(label) api.portal.set_registry_record(key, tuple(values), interface=IBandoSettings) + + +def migrate_to_2300(context): + PROFILE_ID = "profile-redturtle.bandi:to_2300" + context.runAllImportStepsFromProfile(PROFILE_ID) + + # update indexes and topics + context.runImportStepFromProfile( + default_profile, "plone.app.registry", run_dependencies=False + ) diff --git a/redturtle/bandi/upgrades.zcml b/redturtle/bandi/upgrades.zcml index a1f38d0..04b77b0 100644 --- a/redturtle/bandi/upgrades.zcml +++ b/redturtle/bandi/upgrades.zcml @@ -73,6 +73,15 @@ source="2102" destination="2200" handler=".upgrades.migrate_to_2200" + profile="redturtle.bandi:default" + /> + + diff --git a/redturtle/bandi/vocabularies.py b/redturtle/bandi/vocabularies.py index 35237be..4c3dd7f 100644 --- a/redturtle/bandi/vocabularies.py +++ b/redturtle/bandi/vocabularies.py @@ -27,7 +27,18 @@ def __call__(self, context): values = api.portal.get_registry_record( "default_destinatari", interface=IBandoSettings, default=[] ) - terms = [SimpleTerm(value=x, token=x, title=x) for x in values if x] + + l = [] + for i in range(len(values)): + l.append(tuple(values[i].split("|"))) + + terms = [ + SimpleTerm( + value=pair[0], token=pair[0], title=len(pair) > 1 and pair[1] or "" + ) + for pair in l + ] + return SimpleVocabulary(terms) @@ -45,3 +56,21 @@ def __call__(self, context): EnteVocabulary = EnteVocabularyFactory() + + +@implementer(IVocabularyFactory) +class BandiStatesVcabulary(object): + def __call__(self, context): + terms = [ + SimpleTerm( + value=i, + token=i, + title=api.portal.translate(msgid=i, domain="plone"), + ) + for i in ["open", "in-progress", "closed", "scheduled"] + ] + + return SimpleVocabulary(terms) + + +BandiStatesVcabularyFactory = BandiStatesVcabulary() From dbcfb2891ebf29862d375f0683dce96bf168c0f7 Mon Sep 17 00:00:00 2001 From: Roman Kysil Date: Wed, 22 Jan 2025 12:30:09 +0100 Subject: [PATCH 05/16] Update HISTORY.txt --- docs/HISTORY.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docs/HISTORY.txt b/docs/HISTORY.txt index 7507732..0e976e1 100644 --- a/docs/HISTORY.txt +++ b/docs/HISTORY.txt @@ -7,6 +7,9 @@ Changelog - Do not use key/value pairs in tipologia_bando and destinatari. [cekk] +- Bandi querystring criteria to search by bandi state. + [folix-01] + 1.4.7 (2024-12-12) ------------------ From 85fe135e938af690c5ca623c21745f45fc3a37a9 Mon Sep 17 00:00:00 2001 From: Roman Kysil Date: Wed, 22 Jan 2025 14:52:33 +0100 Subject: [PATCH 06/16] Squashed commit of the following: commit aa2b92d0a176c08476c86bee315bfbae51d436ac Author: Roman Kysil Date: Wed Jan 22 14:50:55 2025 +0100 Intermediate commit commit f22630251c3fcc383176666cd3f2c15b06352d81 Author: Roman Kysil Date: Wed Jan 22 11:39:12 2025 +0100 Intermediate commit commit dd52d3ccc796c3064bdd03a38b6366617bc3ca84 Author: Roman Kysil Date: Wed Jan 22 11:33:32 2025 +0100 Intermediate commit commit feb34aaaea3f424f5e206d2b71f998532dafedc8 Author: Roman Kysil Date: Wed Jan 22 10:38:11 2025 +0100 Fix voc commit b5049d6912ccba96f77fbb4b6f55be6c6f7724ab Author: Roman Kysil Date: Wed Jan 22 09:51:18 2025 +0100 Intermediate commit commit 97674b11a1d804c1449fea7d1dc3c6536bf8f132 Author: Roman Kysil Date: Tue Jan 21 17:36:04 2025 +0100 more criteria commit e0817632911fcf67819828d4752afd734956801a Author: Roman Kysil Date: Tue Jan 21 17:20:21 2025 +0100 Update upgrades.zcml commit 30eecb41fb5e947e8fad28327057a7b26b214fe3 Author: Roman Kysil Date: Tue Jan 21 17:16:48 2025 +0100 Update metadata.xml commit f4b60be434c8e0d5e4846dac7f78fd731522e944 Author: Roman Kysil Date: Tue Jan 21 17:02:38 2025 +0100 Update registry.xml commit 6507a294b50e3f0ee9c733eaa97fd5cce22c4577 Author: Roman Kysil Date: Mon Jan 20 17:48:22 2025 +0100 Intermediate commit commit 7eeea29b03faac33467a05eb77b8ab1a3aeb9bfe Author: Roman Kysil Date: Mon Jan 20 17:32:56 2025 +0100 Initial implementation commit 203687c34d3bbbb08120fa23e3991090fb9ad848 Author: Roman Kysil Date: Mon Jan 20 15:18:25 2025 +0100 Initial implementation --- redturtle/bandi/configure.zcml | 2 +- redturtle/bandi/profiles/default/registry.xml | 26 +++++++ redturtle/bandi/profiles/to_2300/registry.xml | 26 +++++++ redturtle/bandi/querystring/__init__.py | 0 redturtle/bandi/querystring/configure.zcml | 11 +++ .../querystring/querymodifiers/__init__.py | 0 .../querystring/querymodifiers/bandi_state.py | 68 +++++++++++++++++++ .../querystring/querymodifiers/configure.zcml | 13 ++++ redturtle/bandi/querystring/queryparser.py | 27 ++++++++ 9 files changed, 172 insertions(+), 1 deletion(-) create mode 100644 redturtle/bandi/querystring/__init__.py create mode 100644 redturtle/bandi/querystring/configure.zcml create mode 100644 redturtle/bandi/querystring/querymodifiers/__init__.py create mode 100644 redturtle/bandi/querystring/querymodifiers/bandi_state.py create mode 100644 redturtle/bandi/querystring/querymodifiers/configure.zcml create mode 100644 redturtle/bandi/querystring/queryparser.py diff --git a/redturtle/bandi/configure.zcml b/redturtle/bandi/configure.zcml index b9cfc3a..1c6cca0 100644 --- a/redturtle/bandi/configure.zcml +++ b/redturtle/bandi/configure.zcml @@ -31,7 +31,7 @@ - + diff --git a/redturtle/bandi/profiles/default/registry.xml b/redturtle/bandi/profiles/default/registry.xml index 97e03fa..73df627 100644 --- a/redturtle/bandi/profiles/default/registry.xml +++ b/redturtle/bandi/profiles/default/registry.xml @@ -149,4 +149,30 @@ MultipleSelectionWidget + + After Date + After selected date + redturtle.bandi.querystring.queryparser._afterDateTime + DateWidget + + + + Before Date + Before selected date + redturtle.bandi.querystring.queryparser._beforeDateTime + DateWidget + + diff --git a/redturtle/bandi/profiles/to_2300/registry.xml b/redturtle/bandi/profiles/to_2300/registry.xml index d6116eb..19135d4 100644 --- a/redturtle/bandi/profiles/to_2300/registry.xml +++ b/redturtle/bandi/profiles/to_2300/registry.xml @@ -34,4 +34,30 @@ >Bando + + After Date + After selected date + redturtle.bandi.querystring.queryparser._afterDateTime + DateWidget + + + + Before Date + Before selected date + redturtle.bandi.querystring.queryparser._beforeDateTime + DateWidget + + \ No newline at end of file diff --git a/redturtle/bandi/querystring/__init__.py b/redturtle/bandi/querystring/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/redturtle/bandi/querystring/configure.zcml b/redturtle/bandi/querystring/configure.zcml new file mode 100644 index 0000000..235254a --- /dev/null +++ b/redturtle/bandi/querystring/configure.zcml @@ -0,0 +1,11 @@ + + + + + \ No newline at end of file diff --git a/redturtle/bandi/querystring/querymodifiers/__init__.py b/redturtle/bandi/querystring/querymodifiers/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/redturtle/bandi/querystring/querymodifiers/bandi_state.py b/redturtle/bandi/querystring/querymodifiers/bandi_state.py new file mode 100644 index 0000000..f849c23 --- /dev/null +++ b/redturtle/bandi/querystring/querymodifiers/bandi_state.py @@ -0,0 +1,68 @@ +from plone.app.querystring.interfaces import IQueryModifier +from zope.interface import provider +from plone.restapi.serializer.converters import json_compatible +from DateTime import DateTime + + +@provider(IQueryModifier) +def modify_bandi_state_query(query): + now = json_compatible(DateTime()) + item = None + query_extender = [] + + state_operators = { + "open": ( + { + "o": "plone.app.querystring.operation.date.afterDateTime", + "v": now, + "i": "scadenza_bando", + }, + { + "o": "plone.app.querystring.operation.date.afterDateTime", + "v": now, + "i": "chiusura_procedimento_bando", + }, + ), + "in-progress": ( + { + "o": "plone.app.querystring.operation.date.beforeDateTime", + "v": now, + "i": "scadenza_bando", + }, + { + "o": "plone.app.querystring.operation.date.afterDateTime", + "v": now, + "i": "chiusura_procedimento_bando", + }, + ), + "closed": ( + { + "o": "plone.app.querystring.operation.date.beforeDateTime", + "v": now, + "i": "chiusura_procedimento_bando", + }, + ), + "scheduled": ( + { + "o": "plone.app.querystring.operation.date.afterDateTime", + "v": now, + "i": "apertura_bando", + }, + ), + } + + for i in query: + if i.get("i", "") == "bando_state": + item = i + + for value in i.get("v", []): + operator = state_operators.get(value, None) + + if operator: + query_extender.extend(operator) + + if item: + query.remove(item) + query.extend(query_extender) + + return query diff --git a/redturtle/bandi/querystring/querymodifiers/configure.zcml b/redturtle/bandi/querystring/querymodifiers/configure.zcml new file mode 100644 index 0000000..39133eb --- /dev/null +++ b/redturtle/bandi/querystring/querymodifiers/configure.zcml @@ -0,0 +1,13 @@ + + + + + \ No newline at end of file diff --git a/redturtle/bandi/querystring/queryparser.py b/redturtle/bandi/querystring/queryparser.py new file mode 100644 index 0000000..690ab11 --- /dev/null +++ b/redturtle/bandi/querystring/queryparser.py @@ -0,0 +1,27 @@ +import DateTime +from collections import namedtuple +from plone.app.querystring.queryparser import _lessThan, _largerThan + +Row = namedtuple("Row", ["index", "operator", "values"]) + + +def _afterDateTime(context, row): # noqa + try: + value = DateTime.DateTime(row.values) + except DateTime.interfaces.SyntaxError: + value = DateTime.DateTime() + + row = Row(index=row.index, operator=row.operator, values=value) + + return _largerThan(context, row) + + +def _beforeDateTime(context, row): # noqa + try: + value = DateTime.DateTime(row.values) + except DateTime.interfaces.SyntaxError: + value = DateTime.DateTime() + + row = Row(index=row.index, operator=row.operator, values=value) + + return _lessThan(context, row) From fc727b26c97aa5e06b262b357c5d6dec030c6cd9 Mon Sep 17 00:00:00 2001 From: Roman Kysil Date: Wed, 22 Jan 2025 15:52:16 +0100 Subject: [PATCH 07/16] Squashed commit of the following: commit aeb3a714e333fb00877b74d160766b01ce6368c1 Author: Roman Kysil Date: Wed Jan 22 15:51:24 2025 +0100 Locales commit 0b238786940685698f4f5f7697b0490d333c9d33 Author: Roman Kysil Date: Wed Jan 22 15:47:52 2025 +0100 Locales commit aa2b92d0a176c08476c86bee315bfbae51d436ac Author: Roman Kysil Date: Wed Jan 22 14:50:55 2025 +0100 Intermediate commit commit f22630251c3fcc383176666cd3f2c15b06352d81 Author: Roman Kysil Date: Wed Jan 22 11:39:12 2025 +0100 Intermediate commit commit dd52d3ccc796c3064bdd03a38b6366617bc3ca84 Author: Roman Kysil Date: Wed Jan 22 11:33:32 2025 +0100 Intermediate commit commit feb34aaaea3f424f5e206d2b71f998532dafedc8 Author: Roman Kysil Date: Wed Jan 22 10:38:11 2025 +0100 Fix voc commit b5049d6912ccba96f77fbb4b6f55be6c6f7724ab Author: Roman Kysil Date: Wed Jan 22 09:51:18 2025 +0100 Intermediate commit commit 97674b11a1d804c1449fea7d1dc3c6536bf8f132 Author: Roman Kysil Date: Tue Jan 21 17:36:04 2025 +0100 more criteria commit e0817632911fcf67819828d4752afd734956801a Author: Roman Kysil Date: Tue Jan 21 17:20:21 2025 +0100 Update upgrades.zcml commit 30eecb41fb5e947e8fad28327057a7b26b214fe3 Author: Roman Kysil Date: Tue Jan 21 17:16:48 2025 +0100 Update metadata.xml commit f4b60be434c8e0d5e4846dac7f78fd731522e944 Author: Roman Kysil Date: Tue Jan 21 17:02:38 2025 +0100 Update registry.xml commit 6507a294b50e3f0ee9c733eaa97fd5cce22c4577 Author: Roman Kysil Date: Mon Jan 20 17:48:22 2025 +0100 Intermediate commit commit 7eeea29b03faac33467a05eb77b8ab1a3aeb9bfe Author: Roman Kysil Date: Mon Jan 20 17:32:56 2025 +0100 Initial implementation commit 203687c34d3bbbb08120fa23e3991090fb9ad848 Author: Roman Kysil Date: Mon Jan 20 15:18:25 2025 +0100 Initial implementation --- .../bandi/locales/it/LC_MESSAGES/manual.po | 0 .../locales/it/LC_MESSAGES/redturtle.bandi.po | 262 +++++++++++------- redturtle/bandi/locales/manual.pot | 32 +++ redturtle/bandi/locales/redturtle.bandi.pot | 262 +++++++++++------- redturtle/bandi/locales/update.py | 11 + redturtle/bandi/locales/update.sh | 1 + redturtle/bandi/vocabularies.py | 2 +- 7 files changed, 367 insertions(+), 203 deletions(-) create mode 100644 redturtle/bandi/locales/it/LC_MESSAGES/manual.po create mode 100644 redturtle/bandi/locales/manual.pot diff --git a/redturtle/bandi/locales/it/LC_MESSAGES/manual.po b/redturtle/bandi/locales/it/LC_MESSAGES/manual.po new file mode 100644 index 0000000..e69de29 diff --git a/redturtle/bandi/locales/it/LC_MESSAGES/redturtle.bandi.po b/redturtle/bandi/locales/it/LC_MESSAGES/redturtle.bandi.po index ce5773e..c3aa7ef 100644 --- a/redturtle/bandi/locales/it/LC_MESSAGES/redturtle.bandi.po +++ b/redturtle/bandi/locales/it/LC_MESSAGES/redturtle.bandi.po @@ -4,7 +4,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 2024-12-04 07:35+0000\n" +"POT-Creation-Date: 2025-01-22 14:46+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI +ZONE\n" "Last-Translator: Filippo Campi \n" "Language-Team: LANGUAGE \n" @@ -17,405 +17,465 @@ msgstr "" "Preferred-Encodings: utf-8 latin1\n" "Domain: redturtle.bandi\n" -#: ../portlets/collection.py:299 +#: redturtle/bandi/portlets/collection.py:299 msgid "Add Bandi Portlet" msgstr "Aggiungi Portlet Bandi" -#: ../portlets/collection.py:23 +#: redturtle/bandi/profiles/default/registry.xml +#: redturtle/bandi/profiles/to_2300/registry.xml +msgid "After Date" +msgstr "" + +#: redturtle/bandi/profiles/default/registry.xml +#: redturtle/bandi/profiles/to_2300/registry.xml +msgid "After selected date" +msgstr "" + +#: redturtle/bandi/portlets/collection.py:23 msgid "Alternative text to show in 'other' link." msgstr "Testo alternativo da mostrare nel link ad 'altro'" -#: ../profiles/default/controlpanel.xml +#: redturtle/bandi/profiles/default/controlpanel.xml msgid "Bandi Settings" msgstr "Bandi" -#: ../browser/configure.zcml:114 +#: redturtle/bandi/browser/configure.zcml:114 msgid "Bandi con scadenza" msgstr "" -#: ../browser/configure.zcml:120 +#: redturtle/bandi/browser/configure.zcml:120 msgid "Bandi con tipologia e scadenza" msgstr "" -#: ../browser/bando.py:252 -#: ../portlets/collection.py:261 +#: redturtle/bandi/profiles/default/registry.xml +#: redturtle/bandi/profiles/to_2300/registry.xml +msgid "Bando" +msgstr "" + +#: redturtle/bandi/profiles/default/registry.xml +#: redturtle/bandi/profiles/to_2300/registry.xml +msgid "Before Date" +msgstr "" + +#: redturtle/bandi/profiles/default/registry.xml +#: redturtle/bandi/profiles/to_2300/registry.xml +msgid "Before selected date" +msgstr "" + +#: redturtle/bandi/browser/bando.py:252 +#: redturtle/bandi/portlets/collection.py:261 msgid "Closed" msgstr "Scaduto" -#: ../browser/configure.zcml:46 +#: redturtle/bandi/browser/configure.zcml:46 msgid "Default" msgstr "" -#: ../portlets/collection.py:318 +#: redturtle/bandi/portlets/collection.py:318 msgid "Edit Bandi Portlet" msgstr "Modifica Portlet Bandi" -#: ../browser/bando.py:257 -#: ../portlets/collection.py:266 +#: redturtle/bandi/browser/bando.py:257 +#: redturtle/bandi/portlets/collection.py:266 msgid "In progress" msgstr "In corso" -#: ../portlets/collection.py:30 +#: redturtle/bandi/portlets/collection.py:30 msgid "Insert an internal link. This field override external link field" msgstr "Inserisci un link interno. Questo campo sovrascriverà il campo link esterno." -#: ../portlets/collection.py:29 +#: redturtle/bandi/portlets/collection.py:29 msgid "Internal link" msgstr "Link interno." -#: ../configure.zcml:60 +#: redturtle/bandi/profiles/default/registry.xml +#: redturtle/bandi/profiles/to_2300/registry.xml +msgid "Is" +msgstr "" + +#: redturtle/bandi/configure.zcml:61 msgid "Migrate to version 1100" msgstr "" -#: ../browser/configure.zcml:64 +#: redturtle/bandi/configure.zcml:69 +msgid "Migrate to version 2300" +msgstr "" + +#: redturtle/bandi/browser/configure.zcml:64 msgid "Mostra altre informazioni a destra" msgstr "" -#: ../browser/bando.py:242 -#: ../portlets/collection.py:253 +#: redturtle/bandi/browser/bando.py:242 +#: redturtle/bandi/portlets/collection.py:253 msgid "Open" msgstr "Attivo" -#: ../portlets/collection.py:22 +#: redturtle/bandi/portlets/collection.py:22 msgid "Other text" msgstr "Testo per 'altro'" -#: ../configure.zcml:60 +#: redturtle/bandi/configure.zcml:61 msgid "RedTurtle Bandi migrate to version 1100" msgstr "" -#: ../configure.zcml:44 +#: redturtle/bandi/configure.zcml:69 +msgid "RedTurtle Bandi migrate to version 2300" +msgstr "" + +#: redturtle/bandi/configure.zcml:45 msgid "Redturtle: Bandi" msgstr "" -#: ../browser/bando.py:241 +#: redturtle/bandi/browser/bando.py:241 msgid "Scheduled" msgstr "Programmato" -#: ../browser/configure.zcml:64 +#: redturtle/bandi/profiles/default/registry.xml +#: redturtle/bandi/profiles/to_2300/registry.xml +msgid "Stato del bando" +msgstr "" + +#: redturtle/bandi/browser/configure.zcml:64 msgid "Sulla destra" msgstr "" -#: ../portlets/collection.py:300 +#: redturtle/bandi/portlets/collection.py:300 msgid "This portlet display a listing of bandi from a Collection." msgstr "Questa portlet mostra una lista di bandi da una collezione." -#: ../configure.zcml:52 +#: redturtle/bandi/profiles/default/registry.xml +#: redturtle/bandi/profiles/to_2300/registry.xml +msgid "Tip: you can use * to autocomplete." +msgstr "" + +#: redturtle/bandi/configure.zcml:53 msgid "Uninstalls the redturtle.bandi package" msgstr "" -#: ../browser/configure.zcml:46 +#: redturtle/bandi/browser/configure.zcml:46 msgid "Vista predefinita, altre informazioni sotto" msgstr "" #. Default: "Date and time of the opening of the announcement. Use this field if you want to set a specific opening date. If not set, the announcement will be open immediately." -#: ../interfaces/bandoSchema.py:41 +#: redturtle/bandi/interfaces/bandoSchema.py:41 msgid "apertura_bando_help" msgstr "Data e ora dell'apertura del bando. Usa questo campo se vuoi impostare una data di apertura specifica. Se non impostato, il bando sarà aperto immediatamente." #. Default: "Opening date" -#: ../browser/bando.pt:84 -#: ../interfaces/bandoSchema.py:40 -#: ../profiles/default/registry.xml +#: redturtle/bandi/browser/bando.pt:84 +#: redturtle/bandi/interfaces/bandoSchema.py:40 +#: redturtle/bandi/profiles/default/registry.xml msgid "apertura_bando_label" msgstr "Data di apertura" #. Default: "Layout Bandi" -#: ../tiles/bandi_render.py:11 +#: redturtle/bandi/tiles/bandi_render.py:11 msgid "bandi_layout" msgstr "" #. Default: "Published on" -#: ../browser/collection.pt:77 -#: ../browser/search.pt:124 -#: ../portlets/collection.pt:46 +#: redturtle/bandi/browser/collection.pt:77 +#: redturtle/bandi/browser/search.pt:124 +#: redturtle/bandi/portlets/collection.pt:46 msgid "bandi_published_on" msgstr "Pubblicato il" #. Default: "Authorities" -#: ../browser/search_form.pt:113 +#: redturtle/bandi/browser/search_form.pt:113 msgid "bandi_search_authority_label" msgstr "Enti" #. Default: "This search mask allows to find announcements in the site that satisfy one or more search criteria." -#: ../browser/search_form.pt:22 +#: redturtle/bandi/browser/search_form.pt:22 msgid "bandi_search_help" msgstr "Questa maschera di ricerca permette di trovare i bandi nel sito che soddisfano uno o più criteri di ricerca." #. Default: "Announcements Search" -#: ../browser/search_form.pt:20 +#: redturtle/bandi/browser/search_form.pt:20 msgid "bandi_search_label" msgstr "Ricerca bandi" #. Default: "Select announcements recipients." -#: ../browser/search_form.pt:94 +#: redturtle/bandi/browser/search_form.pt:94 msgid "bandi_search_recipients_help" msgstr "Seleziona i destinatari dei bandi." #. Default: "Recipients" -#: ../browser/search_form.pt:92 +#: redturtle/bandi/browser/search_form.pt:92 msgid "bandi_search_recipients_label" msgstr "Destinatari" #. Default: "All" -#: ../browser/search_form.pt:60 +#: redturtle/bandi/browser/search_form.pt:60 msgid "bandi_search_state_all" msgstr "Tutti" #. Default: "Closed" -#: ../browser/search_form.pt:64 +#: redturtle/bandi/browser/search_form.pt:64 msgid "bandi_search_state_closed" msgstr "Chiusi" #. Default: "Search announcements scheduled (with open date in the future), open (with participation terms not expired), in progress (participation terms expired, but the procedure isn't already closed) or closed (the procedure is closed)." -#: ../browser/search_form.pt:52 +#: redturtle/bandi/browser/search_form.pt:52 #, fuzzy msgid "bandi_search_state_help" msgstr "Cerca i bandi aperti (non sono scaduti i termini per la partecipazione), in corso (sono scaduti i termini di partecipazione e il procedimento non è ancora chiuso) o chiusi (il procedimento è chiuso)." #. Default: "In progress" -#: ../browser/search_form.pt:63 +#: redturtle/bandi/browser/search_form.pt:63 msgid "bandi_search_state_inprogress" msgstr "In corso" #. Default: "State" -#: ../browser/search_form.pt:50 +#: redturtle/bandi/browser/search_form.pt:50 msgid "bandi_search_state_label" msgstr "Stato" #. Default: "Open" -#: ../browser/search_form.pt:62 +#: redturtle/bandi/browser/search_form.pt:62 msgid "bandi_search_state_open" msgstr "Aperti" #. Default: "Scheduled" -#: ../browser/search_form.pt:61 +#: redturtle/bandi/browser/search_form.pt:61 msgid "bandi_search_state_scheduled" msgstr "Programmati" #. Default: "For a simple text search, enter your search term here. Multiple words may be found by combining them with AND and OR. The text in this field will be matched with Announcements' title, description and text." -#: ../browser/search_form.pt:35 +#: redturtle/bandi/browser/search_form.pt:35 msgid "bandi_search_text_help" msgstr "Per una semplice ricerca di testo inserisci qui i termini desiderati. Possono essere cercate più parole contemporaneamente combinandole con gli operatori AND e OR. Il testo inserito in questo campo verrà cercato nel titolo, descrizione e testo dei bandi." #. Default: "Search text" -#: ../browser/search_form.pt:33 +#: redturtle/bandi/browser/search_form.pt:33 msgid "bandi_search_text_label" msgstr "Ricerca testuale" #. Default: "Select an annonuncement type." -#: ../browser/search_form.pt:72 +#: redturtle/bandi/browser/search_form.pt:72 msgid "bandi_search_type_help" msgstr "Seleziona una tipologia di bando." #. Default: "Type" -#: ../browser/search_form.pt:70 +#: redturtle/bandi/browser/search_form.pt:70 msgid "bandi_search_type_label" msgstr "Tipologia" #. Default: "Select where to search." -#: ../browser/search_form.pt:184 +#: redturtle/bandi/browser/search_form.pt:184 msgid "bandi_searchsites_help" msgstr "Seleziona i portali dove effettuare la ricerca." #. Default: "Available sites" -#: ../browser/search_form.pt:183 +#: redturtle/bandi/browser/search_form.pt:183 msgid "bandi_searchsites_label" msgstr "Portali disponibili" #. Default: "Impostazioni per i bandi" -#: ../browser/controlpanel.py:9 +#: redturtle/bandi/browser/controlpanel.py:10 msgid "bandi_settings_label" msgstr "Impostazioni per i bandi" #. Default: "If checked, the search will be made on a selected list of ER Sites. If not checked, the search will be made only on this site." -#: ../browser/search_form.pt:176 +#: redturtle/bandi/browser/search_form.pt:176 msgid "bandi_use_solr_help" msgstr "Se selezionato, la ricerca verrà effettuata in una serie di portali ER. Se non selezionato, la ricerca verrà effettuata solamente in questo portale." #. Default: "Multisite search" -#: ../browser/search_form.pt:175 +#: redturtle/bandi/browser/search_form.pt:175 msgid "bandi_use_solr_label" msgstr "Ricerca multisito" #. Default: "Consulta gli approfondimenti" -#: ../browser/bando.pt:111 +#: redturtle/bandi/browser/bando.pt:111 msgid "bando_anchor_foldeeps" msgstr "" #. Default: "Closing process" -#: ../browser/bando-right.pt:91 -#: ../browser/bando.pt:100 +#: redturtle/bandi/browser/bando-right.pt:91 +#: redturtle/bandi/browser/bando.pt:100 msgid "bando_chiusura_procedimento" msgstr "Chiusura procedimento" #. Default: "Publication date" -#: ../browser/bando-right.pt:74 -#: ../browser/bando.pt:76 +#: redturtle/bandi/browser/bando-right.pt:74 +#: redturtle/bandi/browser/bando.pt:76 msgid "bando_pub_date" msgstr "Data di pubblicazione" #. Default: "Deadline participation terms" -#: ../browser/bando-right.pt:83 -#: ../browser/bando.pt:92 -#: ../browser/collection.pt:85 +#: redturtle/bandi/browser/bando-right.pt:83 +#: redturtle/bandi/browser/bando.pt:92 +#: redturtle/bandi/browser/collection.pt:85 msgid "bando_scadenza_partecipazione" msgstr "Scadenza termini partecipazione" #. Default: "Status" -#: ../browser/bando-right.pt:32 -#: ../browser/bando.pt:35 +#: redturtle/bandi/browser/bando-right.pt:32 +#: redturtle/bandi/browser/bando.pt:35 msgid "bando_status_label" msgstr "Stato" #. Default: "${number} item matching your search terms" -#: ../browser/search.pt:57 +#: redturtle/bandi/browser/search.pt:57 msgid "batch_x_item_matching_your_criteria" msgstr "${number} elemento soddisfa i criteri specificati" #. Default: "${number} items matching your search terms" -#: ../browser/search.pt:48 +#: redturtle/bandi/browser/search.pt:48 msgid "batch_x_items_matching_your_criteria" msgstr "${number} elementi soddisfano i criteri specificati" #. Default: "Chiusura procedimento bando" -#: ../profiles/default/registry.xml +#: redturtle/bandi/profiles/default/registry.xml msgid "chiusura_procedimento_bando" msgstr "" -#: ../interfaces/bandoSchema.py:54 +#: redturtle/bandi/interfaces/bandoSchema.py:54 msgid "chiusura_procedimento_bando_help" msgstr "" #. Default: "Closing date procedure" -#: ../interfaces/bandoSchema.py:50 +#: redturtle/bandi/interfaces/bandoSchema.py:50 msgid "chiusura_procedimento_bando_label" msgstr "Data chiusura procedimento" +msgid "closed" +msgstr "" + #. Default: "Insert a list of available destinatari that can be selected when adding a new Bando." -#: ../interfaces/settings.py:26 +#: redturtle/bandi/interfaces/settings.py:26 msgid "default_destinatari_help" msgstr "Inserisci una lista di possibili destinatari che possono essere selezionati quando si aggiunge o modifica un Bando." #. Default: "Destinatari types" -#: ../interfaces/settings.py:25 +#: redturtle/bandi/interfaces/settings.py:25 msgid "default_destinatari_label" msgstr "Destinatari" #. Default: "Insert a list of default Enti that will be automatically selected when adding a new Bando." -#: ../interfaces/settings.py:14 +#: redturtle/bandi/interfaces/settings.py:14 msgid "default_ente_help" msgstr "Inserisci una lista di enti di default che verranno automaticamente selezionati quando si aggiunge un nuovo Bando." #. Default: "Default Ente" -#: ../interfaces/settings.py:13 +#: redturtle/bandi/interfaces/settings.py:13 msgid "default_ente_label" msgstr "Enti di default" #. Default: "There are currently no items in this folder." -#: ../browser/collection.pt:96 +#: redturtle/bandi/browser/collection.pt:96 msgid "description_no_items_in_folder" msgstr "Non ci sono elementi." #. Default: "No results were found." -#: ../browser/search.pt:84 +#: redturtle/bandi/browser/search.pt:84 msgid "description_no_results_found" msgstr "Nessun risultato è stato trovato" -#: ../interfaces/bandoSchema.py:78 +#: redturtle/bandi/interfaces/bandoSchema.py:78 msgid "destinatari_help" msgstr "" #. Default: "Recipients" -#: ../browser/bando-right.pt:52 -#: ../browser/bando.pt:54 -#: ../interfaces/bandoSchema.py:77 +#: redturtle/bandi/browser/bando-right.pt:52 +#: redturtle/bandi/browser/bando.pt:54 +#: redturtle/bandi/interfaces/bandoSchema.py:77 msgid "destinatari_label" msgstr "Destinatari" #. Default: "Select some authorities." -#: ../interfaces/bandoSchema.py:69 +#: redturtle/bandi/interfaces/bandoSchema.py:69 msgid "ente_help" msgstr "Selezionare l'ente proponente del bando." #. Default: "Authority" -#: ../browser/bando-right.pt:63 -#: ../browser/bando.pt:65 -#: ../interfaces/bandoSchema.py:68 +#: redturtle/bandi/browser/bando-right.pt:63 +#: redturtle/bandi/browser/bando.pt:65 +#: redturtle/bandi/interfaces/bandoSchema.py:68 msgid "ente_label" msgstr "Ente" #. Default: "Announcements search results" -#: ../browser/search.pt:40 +#: redturtle/bandi/browser/search.pt:40 msgid "heading_search_results" msgstr "Risultati ricerca bandi" #. Default: "Return items matching some or all of these authorities. Multiple words may be found by pressing Ctrl (or Apple key on Mac) while clicking the keywords." -#: ../browser/search_form.pt:115 +#: redturtle/bandi/browser/search_form.pt:115 msgid "help_search_authorities" msgstr "Mostra i bandi appartenenti a questi enti. Possono essere selezionati più tag mantenendo premuto il tasto Ctrl (o il tasto Mela sul Mac)." +msgid "in-progress" +msgstr "In lavorazione" + #. Default: "Search" -#: ../browser/search_form.pt:203 +#: redturtle/bandi/browser/search_form.pt:203 msgid "label_search" msgstr "Cerca" #. Default: "More…" -#: ../tiles/bandi_render.pt:80 +#: redturtle/bandi/tiles/bandi_render.pt:80 msgid "more_url" msgstr "Altro…" -#: ../configure.zcml:52 +msgid "open" +msgstr "Attivo" + +#: redturtle/bandi/configure.zcml:53 msgid "redturtle.bandi uninstall" msgstr "" #. Default: "indicare la struttura di riferimento e il responsabile del procedimento" -#: ../interfaces/bandoSchema.py:36 +#: redturtle/bandi/interfaces/bandoSchema.py:36 msgid "riferimenti_bando_help" msgstr "indicare la struttura di riferimento e il responsabile del procedimento" #. Default: "References" -#: ../interfaces/bandoSchema.py:35 +#: redturtle/bandi/interfaces/bandoSchema.py:35 msgid "riferimenti_bando_label" msgstr "Riferimenti" #. Default: "Deadline to participate in the announcement" -#: ../interfaces/bandoSchema.py:60 +#: redturtle/bandi/interfaces/bandoSchema.py:60 msgid "scadenza_bando_help" msgstr "Scadenza dei termini per partecipare al bando" #. Default: "Expiration date and time" -#: ../interfaces/bandoSchema.py:59 +#: redturtle/bandi/interfaces/bandoSchema.py:59 msgid "scadenza_bando_label" msgstr "Data e ora di scadenza" +msgid "scheduled" +msgstr "Programmato" + #. Default: "No results found" -#: ../tiles/bandi_render.pt:23 +#: redturtle/bandi/tiles/bandi_render.pt:23 msgid "tiles_collection_noresults" msgstr "Non sono stati trovati bandi" -#: ../interfaces/bandoSchema.py:85 +#: redturtle/bandi/interfaces/bandoSchema.py:85 msgid "tipologia_bando_help" msgstr "" #. Default: "Announcement type" -#: ../browser/bando-right.pt:45 -#: ../browser/bando.pt:47 -#: ../browser/collection.pt:69 +#: redturtle/bandi/browser/bando-right.pt:45 +#: redturtle/bandi/browser/bando.pt:47 +#: redturtle/bandi/browser/collection.pt:69 msgid "tipologia_bando_label" msgstr "Tipologia di bando" #. Default: "Announcement types" -#: ../interfaces/settings.py:43 +#: redturtle/bandi/interfaces/settings.py:43 msgid "tipologie_bando_label" msgstr "Tipi di Bando" #. Default: "These values will extend bandi.xml vocabulary on filesystem" -#: ../interfaces/settings.py:44 +#: redturtle/bandi/interfaces/settings.py:44 msgid "tipologie_help" msgstr "Questi valori estendono quelli del file bandi.xml su filesystem" #. Default: "Subscribe to an always-updated feed of these search terms" -#: ../browser/search.pt:75 +#: redturtle/bandi/browser/search.pt:75 msgid "title_rss_feed" msgstr "Ricevi il flusso RSS costantemente aggiornato dei risultati di questa ricerca" diff --git a/redturtle/bandi/locales/manual.pot b/redturtle/bandi/locales/manual.pot new file mode 100644 index 0000000..2cf4db2 --- /dev/null +++ b/redturtle/bandi/locales/manual.pot @@ -0,0 +1,32 @@ +# --- PLEASE EDIT THE LINES BELOW CORRECTLY --- +# SOME DESCRIPTIVE TITLE. +# FIRST AUTHOR , YEAR. +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"POT-Creation-Date: 2013-04-30 08:03+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI +ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=1; plural=0\n" +"Language-Code: en\n" +"Language-Name: English\n" +"Preferred-Encodings: utf-8 latin1\n" +"Domain: redturtle.bandi\n" + + +msgid "open" +msgstr "" + +msgid "in-progress" +msgstr "" + +msgid "closed" +msgstr "" + +msgid "scheduled" +msgstr "" + diff --git a/redturtle/bandi/locales/redturtle.bandi.pot b/redturtle/bandi/locales/redturtle.bandi.pot index a9c600f..951dabc 100644 --- a/redturtle/bandi/locales/redturtle.bandi.pot +++ b/redturtle/bandi/locales/redturtle.bandi.pot @@ -4,7 +4,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 2024-12-04 07:35+0000\n" +"POT-Creation-Date: 2025-01-22 14:46+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI +ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -17,403 +17,463 @@ msgstr "" "Preferred-Encodings: utf-8 latin1\n" "Domain: redturtle.bandi\n" -#: ../portlets/collection.py:299 +#: redturtle/bandi/portlets/collection.py:299 msgid "Add Bandi Portlet" msgstr "" -#: ../portlets/collection.py:23 +#: redturtle/bandi/profiles/default/registry.xml +#: redturtle/bandi/profiles/to_2300/registry.xml +msgid "After Date" +msgstr "" + +#: redturtle/bandi/profiles/default/registry.xml +#: redturtle/bandi/profiles/to_2300/registry.xml +msgid "After selected date" +msgstr "" + +#: redturtle/bandi/portlets/collection.py:23 msgid "Alternative text to show in 'other' link." msgstr "" -#: ../profiles/default/controlpanel.xml +#: redturtle/bandi/profiles/default/controlpanel.xml msgid "Bandi Settings" msgstr "" -#: ../browser/configure.zcml:114 +#: redturtle/bandi/browser/configure.zcml:114 msgid "Bandi con scadenza" msgstr "" -#: ../browser/configure.zcml:120 +#: redturtle/bandi/browser/configure.zcml:120 msgid "Bandi con tipologia e scadenza" msgstr "" -#: ../browser/bando.py:252 -#: ../portlets/collection.py:261 +#: redturtle/bandi/profiles/default/registry.xml +#: redturtle/bandi/profiles/to_2300/registry.xml +msgid "Bando" +msgstr "" + +#: redturtle/bandi/profiles/default/registry.xml +#: redturtle/bandi/profiles/to_2300/registry.xml +msgid "Before Date" +msgstr "" + +#: redturtle/bandi/profiles/default/registry.xml +#: redturtle/bandi/profiles/to_2300/registry.xml +msgid "Before selected date" +msgstr "" + +#: redturtle/bandi/browser/bando.py:252 +#: redturtle/bandi/portlets/collection.py:261 msgid "Closed" msgstr "" -#: ../browser/configure.zcml:46 +#: redturtle/bandi/browser/configure.zcml:46 msgid "Default" msgstr "" -#: ../portlets/collection.py:318 +#: redturtle/bandi/portlets/collection.py:318 msgid "Edit Bandi Portlet" msgstr "" -#: ../browser/bando.py:257 -#: ../portlets/collection.py:266 +#: redturtle/bandi/browser/bando.py:257 +#: redturtle/bandi/portlets/collection.py:266 msgid "In progress" msgstr "" -#: ../portlets/collection.py:30 +#: redturtle/bandi/portlets/collection.py:30 msgid "Insert an internal link. This field override external link field" msgstr "" -#: ../portlets/collection.py:29 +#: redturtle/bandi/portlets/collection.py:29 msgid "Internal link" msgstr "" -#: ../configure.zcml:60 +#: redturtle/bandi/profiles/default/registry.xml +#: redturtle/bandi/profiles/to_2300/registry.xml +msgid "Is" +msgstr "" + +#: redturtle/bandi/configure.zcml:61 msgid "Migrate to version 1100" msgstr "" -#: ../browser/configure.zcml:64 +#: redturtle/bandi/configure.zcml:69 +msgid "Migrate to version 2300" +msgstr "" + +#: redturtle/bandi/browser/configure.zcml:64 msgid "Mostra altre informazioni a destra" msgstr "" -#: ../browser/bando.py:242 -#: ../portlets/collection.py:253 +#: redturtle/bandi/browser/bando.py:242 +#: redturtle/bandi/portlets/collection.py:253 msgid "Open" msgstr "" -#: ../portlets/collection.py:22 +#: redturtle/bandi/portlets/collection.py:22 msgid "Other text" msgstr "" -#: ../configure.zcml:60 +#: redturtle/bandi/configure.zcml:61 msgid "RedTurtle Bandi migrate to version 1100" msgstr "" -#: ../configure.zcml:44 +#: redturtle/bandi/configure.zcml:69 +msgid "RedTurtle Bandi migrate to version 2300" +msgstr "" + +#: redturtle/bandi/configure.zcml:45 msgid "Redturtle: Bandi" msgstr "" -#: ../browser/bando.py:241 +#: redturtle/bandi/browser/bando.py:241 msgid "Scheduled" msgstr "" -#: ../browser/configure.zcml:64 +#: redturtle/bandi/profiles/default/registry.xml +#: redturtle/bandi/profiles/to_2300/registry.xml +msgid "Stato del bando" +msgstr "" + +#: redturtle/bandi/browser/configure.zcml:64 msgid "Sulla destra" msgstr "" -#: ../portlets/collection.py:300 +#: redturtle/bandi/portlets/collection.py:300 msgid "This portlet display a listing of bandi from a Collection." msgstr "" -#: ../configure.zcml:52 +#: redturtle/bandi/profiles/default/registry.xml +#: redturtle/bandi/profiles/to_2300/registry.xml +msgid "Tip: you can use * to autocomplete." +msgstr "" + +#: redturtle/bandi/configure.zcml:53 msgid "Uninstalls the redturtle.bandi package" msgstr "" -#: ../browser/configure.zcml:46 +#: redturtle/bandi/browser/configure.zcml:46 msgid "Vista predefinita, altre informazioni sotto" msgstr "" #. Default: "Date and time of the opening of the announcement. Use this field if you want to set a specific opening date. If not set, the announcement will be open immediately." -#: ../interfaces/bandoSchema.py:41 +#: redturtle/bandi/interfaces/bandoSchema.py:41 msgid "apertura_bando_help" msgstr "" #. Default: "Opening date" -#: ../browser/bando.pt:84 -#: ../interfaces/bandoSchema.py:40 -#: ../profiles/default/registry.xml +#: redturtle/bandi/browser/bando.pt:84 +#: redturtle/bandi/interfaces/bandoSchema.py:40 +#: redturtle/bandi/profiles/default/registry.xml msgid "apertura_bando_label" msgstr "" #. Default: "Layout Bandi" -#: ../tiles/bandi_render.py:11 +#: redturtle/bandi/tiles/bandi_render.py:11 msgid "bandi_layout" msgstr "" #. Default: "Published on" -#: ../browser/collection.pt:77 -#: ../browser/search.pt:124 -#: ../portlets/collection.pt:46 +#: redturtle/bandi/browser/collection.pt:77 +#: redturtle/bandi/browser/search.pt:124 +#: redturtle/bandi/portlets/collection.pt:46 msgid "bandi_published_on" msgstr "" #. Default: "Authorities" -#: ../browser/search_form.pt:113 +#: redturtle/bandi/browser/search_form.pt:113 msgid "bandi_search_authority_label" msgstr "" #. Default: "This search mask allows to find announcements in the site that satisfy one or more search criteria." -#: ../browser/search_form.pt:22 +#: redturtle/bandi/browser/search_form.pt:22 msgid "bandi_search_help" msgstr "" #. Default: "Announcements Search" -#: ../browser/search_form.pt:20 +#: redturtle/bandi/browser/search_form.pt:20 msgid "bandi_search_label" msgstr "" #. Default: "Select announcements recipients." -#: ../browser/search_form.pt:94 +#: redturtle/bandi/browser/search_form.pt:94 msgid "bandi_search_recipients_help" msgstr "" #. Default: "Recipients" -#: ../browser/search_form.pt:92 +#: redturtle/bandi/browser/search_form.pt:92 msgid "bandi_search_recipients_label" msgstr "" #. Default: "All" -#: ../browser/search_form.pt:60 +#: redturtle/bandi/browser/search_form.pt:60 msgid "bandi_search_state_all" msgstr "" #. Default: "Closed" -#: ../browser/search_form.pt:64 +#: redturtle/bandi/browser/search_form.pt:64 msgid "bandi_search_state_closed" msgstr "" #. Default: "Search announcements scheduled (with open date in the future), open (with participation terms not expired), in progress (participation terms expired, but the procedure isn't already closed) or closed (the procedure is closed)." -#: ../browser/search_form.pt:52 +#: redturtle/bandi/browser/search_form.pt:52 msgid "bandi_search_state_help" msgstr "" #. Default: "In progress" -#: ../browser/search_form.pt:63 +#: redturtle/bandi/browser/search_form.pt:63 msgid "bandi_search_state_inprogress" msgstr "" #. Default: "State" -#: ../browser/search_form.pt:50 +#: redturtle/bandi/browser/search_form.pt:50 msgid "bandi_search_state_label" msgstr "" #. Default: "Open" -#: ../browser/search_form.pt:62 +#: redturtle/bandi/browser/search_form.pt:62 msgid "bandi_search_state_open" msgstr "" #. Default: "Scheduled" -#: ../browser/search_form.pt:61 +#: redturtle/bandi/browser/search_form.pt:61 msgid "bandi_search_state_scheduled" msgstr "" #. Default: "For a simple text search, enter your search term here. Multiple words may be found by combining them with AND and OR. The text in this field will be matched with Announcements' title, description and text." -#: ../browser/search_form.pt:35 +#: redturtle/bandi/browser/search_form.pt:35 msgid "bandi_search_text_help" msgstr "" #. Default: "Search text" -#: ../browser/search_form.pt:33 +#: redturtle/bandi/browser/search_form.pt:33 msgid "bandi_search_text_label" msgstr "" #. Default: "Select an annonuncement type." -#: ../browser/search_form.pt:72 +#: redturtle/bandi/browser/search_form.pt:72 msgid "bandi_search_type_help" msgstr "" #. Default: "Type" -#: ../browser/search_form.pt:70 +#: redturtle/bandi/browser/search_form.pt:70 msgid "bandi_search_type_label" msgstr "" #. Default: "Select where to search." -#: ../browser/search_form.pt:184 +#: redturtle/bandi/browser/search_form.pt:184 msgid "bandi_searchsites_help" msgstr "" #. Default: "Available sites" -#: ../browser/search_form.pt:183 +#: redturtle/bandi/browser/search_form.pt:183 msgid "bandi_searchsites_label" msgstr "" #. Default: "Impostazioni per i bandi" -#: ../browser/controlpanel.py:9 +#: redturtle/bandi/browser/controlpanel.py:10 msgid "bandi_settings_label" msgstr "" #. Default: "If checked, the search will be made on a selected list of ER Sites. If not checked, the search will be made only on this site." -#: ../browser/search_form.pt:176 +#: redturtle/bandi/browser/search_form.pt:176 msgid "bandi_use_solr_help" msgstr "" #. Default: "Multisite search" -#: ../browser/search_form.pt:175 +#: redturtle/bandi/browser/search_form.pt:175 msgid "bandi_use_solr_label" msgstr "" #. Default: "Consulta gli approfondimenti" -#: ../browser/bando.pt:111 +#: redturtle/bandi/browser/bando.pt:111 msgid "bando_anchor_foldeeps" msgstr "" #. Default: "Closing process" -#: ../browser/bando-right.pt:91 -#: ../browser/bando.pt:100 +#: redturtle/bandi/browser/bando-right.pt:91 +#: redturtle/bandi/browser/bando.pt:100 msgid "bando_chiusura_procedimento" msgstr "" #. Default: "Publication date" -#: ../browser/bando-right.pt:74 -#: ../browser/bando.pt:76 +#: redturtle/bandi/browser/bando-right.pt:74 +#: redturtle/bandi/browser/bando.pt:76 msgid "bando_pub_date" msgstr "" #. Default: "Deadline participation terms" -#: ../browser/bando-right.pt:83 -#: ../browser/bando.pt:92 -#: ../browser/collection.pt:85 +#: redturtle/bandi/browser/bando-right.pt:83 +#: redturtle/bandi/browser/bando.pt:92 +#: redturtle/bandi/browser/collection.pt:85 msgid "bando_scadenza_partecipazione" msgstr "" #. Default: "Status" -#: ../browser/bando-right.pt:32 -#: ../browser/bando.pt:35 +#: redturtle/bandi/browser/bando-right.pt:32 +#: redturtle/bandi/browser/bando.pt:35 msgid "bando_status_label" msgstr "" #. Default: "${number} item matching your search terms" -#: ../browser/search.pt:57 +#: redturtle/bandi/browser/search.pt:57 msgid "batch_x_item_matching_your_criteria" msgstr "" #. Default: "${number} items matching your search terms" -#: ../browser/search.pt:48 +#: redturtle/bandi/browser/search.pt:48 msgid "batch_x_items_matching_your_criteria" msgstr "" #. Default: "Chiusura procedimento bando" -#: ../profiles/default/registry.xml +#: redturtle/bandi/profiles/default/registry.xml msgid "chiusura_procedimento_bando" msgstr "" -#: ../interfaces/bandoSchema.py:54 +#: redturtle/bandi/interfaces/bandoSchema.py:54 msgid "chiusura_procedimento_bando_help" msgstr "" #. Default: "Closing date procedure" -#: ../interfaces/bandoSchema.py:50 +#: redturtle/bandi/interfaces/bandoSchema.py:50 msgid "chiusura_procedimento_bando_label" msgstr "" +msgid "closed" +msgstr "" + #. Default: "Insert a list of available destinatari that can be selected when adding a new Bando." -#: ../interfaces/settings.py:26 +#: redturtle/bandi/interfaces/settings.py:26 msgid "default_destinatari_help" msgstr "" #. Default: "Destinatari types" -#: ../interfaces/settings.py:25 +#: redturtle/bandi/interfaces/settings.py:25 msgid "default_destinatari_label" msgstr "" #. Default: "Insert a list of default Enti that will be automatically selected when adding a new Bando." -#: ../interfaces/settings.py:14 +#: redturtle/bandi/interfaces/settings.py:14 msgid "default_ente_help" msgstr "" #. Default: "Default Ente" -#: ../interfaces/settings.py:13 +#: redturtle/bandi/interfaces/settings.py:13 msgid "default_ente_label" msgstr "" #. Default: "There are currently no items in this folder." -#: ../browser/collection.pt:96 +#: redturtle/bandi/browser/collection.pt:96 msgid "description_no_items_in_folder" msgstr "" #. Default: "No results were found." -#: ../browser/search.pt:84 +#: redturtle/bandi/browser/search.pt:84 msgid "description_no_results_found" msgstr "" -#: ../interfaces/bandoSchema.py:78 +#: redturtle/bandi/interfaces/bandoSchema.py:78 msgid "destinatari_help" msgstr "" #. Default: "Recipients" -#: ../browser/bando-right.pt:52 -#: ../browser/bando.pt:54 -#: ../interfaces/bandoSchema.py:77 +#: redturtle/bandi/browser/bando-right.pt:52 +#: redturtle/bandi/browser/bando.pt:54 +#: redturtle/bandi/interfaces/bandoSchema.py:77 msgid "destinatari_label" msgstr "" #. Default: "Select some authorities." -#: ../interfaces/bandoSchema.py:69 +#: redturtle/bandi/interfaces/bandoSchema.py:69 msgid "ente_help" msgstr "" #. Default: "Authority" -#: ../browser/bando-right.pt:63 -#: ../browser/bando.pt:65 -#: ../interfaces/bandoSchema.py:68 +#: redturtle/bandi/browser/bando-right.pt:63 +#: redturtle/bandi/browser/bando.pt:65 +#: redturtle/bandi/interfaces/bandoSchema.py:68 msgid "ente_label" msgstr "" #. Default: "Announcements search results" -#: ../browser/search.pt:40 +#: redturtle/bandi/browser/search.pt:40 msgid "heading_search_results" msgstr "" #. Default: "Return items matching some or all of these authorities. Multiple words may be found by pressing Ctrl (or Apple key on Mac) while clicking the keywords." -#: ../browser/search_form.pt:115 +#: redturtle/bandi/browser/search_form.pt:115 msgid "help_search_authorities" msgstr "" +msgid "in-progress" +msgstr "" + #. Default: "Search" -#: ../browser/search_form.pt:203 +#: redturtle/bandi/browser/search_form.pt:203 msgid "label_search" msgstr "" #. Default: "More…" -#: ../tiles/bandi_render.pt:80 +#: redturtle/bandi/tiles/bandi_render.pt:80 msgid "more_url" msgstr "" -#: ../configure.zcml:52 +msgid "open" +msgstr "" + +#: redturtle/bandi/configure.zcml:53 msgid "redturtle.bandi uninstall" msgstr "" -#: ../interfaces/bandoSchema.py:36 +#: redturtle/bandi/interfaces/bandoSchema.py:36 msgid "riferimenti_bando_help" msgstr "" #. Default: "References" -#: ../interfaces/bandoSchema.py:35 +#: redturtle/bandi/interfaces/bandoSchema.py:35 msgid "riferimenti_bando_label" msgstr "" #. Default: "Deadline to participate in the announcement" -#: ../interfaces/bandoSchema.py:60 +#: redturtle/bandi/interfaces/bandoSchema.py:60 msgid "scadenza_bando_help" msgstr "" #. Default: "Expiration date and time" -#: ../interfaces/bandoSchema.py:59 +#: redturtle/bandi/interfaces/bandoSchema.py:59 msgid "scadenza_bando_label" msgstr "" +msgid "scheduled" +msgstr "" + #. Default: "No results found" -#: ../tiles/bandi_render.pt:23 +#: redturtle/bandi/tiles/bandi_render.pt:23 msgid "tiles_collection_noresults" msgstr "" -#: ../interfaces/bandoSchema.py:85 +#: redturtle/bandi/interfaces/bandoSchema.py:85 msgid "tipologia_bando_help" msgstr "" #. Default: "Announcement type" -#: ../browser/bando-right.pt:45 -#: ../browser/bando.pt:47 -#: ../browser/collection.pt:69 +#: redturtle/bandi/browser/bando-right.pt:45 +#: redturtle/bandi/browser/bando.pt:47 +#: redturtle/bandi/browser/collection.pt:69 msgid "tipologia_bando_label" msgstr "" #. Default: "Announcement types" -#: ../interfaces/settings.py:43 +#: redturtle/bandi/interfaces/settings.py:43 msgid "tipologie_bando_label" msgstr "" #. Default: "These values will extend bandi.xml vocabulary on filesystem" -#: ../interfaces/settings.py:44 +#: redturtle/bandi/interfaces/settings.py:44 msgid "tipologie_help" msgstr "" #. Default: "Subscribe to an always-updated feed of these search terms" -#: ../browser/search.pt:75 +#: redturtle/bandi/browser/search.pt:75 msgid "title_rss_feed" msgstr "" diff --git a/redturtle/bandi/locales/update.py b/redturtle/bandi/locales/update.py index d70e9dc..8c96e39 100644 --- a/redturtle/bandi/locales/update.py +++ b/redturtle/bandi/locales/update.py @@ -52,7 +52,18 @@ def _sync(): subprocess.call(cmd, shell=True) +def _merge(): + cmd = "{0} merge --pot {1}/{2}.pot --merge {3}/manual.pot".format( + i18ndude, locale_path, domain, locale_path + ) + subprocess.call( + cmd, + shell=True, + ) + + def update_locale(): locale_folder_setup() _sync() _rebuild() + _merge() diff --git a/redturtle/bandi/locales/update.sh b/redturtle/bandi/locales/update.sh index 444517b..0e23004 100755 --- a/redturtle/bandi/locales/update.sh +++ b/redturtle/bandi/locales/update.sh @@ -9,4 +9,5 @@ domain=redturtle.bandi i18ndude rebuild-pot --pot $domain.pot --create $domain ../ +i18ndude merge --pot $domain.pot --merge manual.pot i18ndude sync --pot $domain.pot */LC_MESSAGES/$domain.po diff --git a/redturtle/bandi/vocabularies.py b/redturtle/bandi/vocabularies.py index 4c3dd7f..38bdd28 100644 --- a/redturtle/bandi/vocabularies.py +++ b/redturtle/bandi/vocabularies.py @@ -65,7 +65,7 @@ def __call__(self, context): SimpleTerm( value=i, token=i, - title=api.portal.translate(msgid=i, domain="plone"), + title=api.portal.translate(msgid=i, domain="redturtle.bandi"), ) for i in ["open", "in-progress", "closed", "scheduled"] ] From 188031b7d007f174858f7d17be589a1cf8a58f69 Mon Sep 17 00:00:00 2001 From: Roman Kysil Date: Wed, 22 Jan 2025 15:59:40 +0100 Subject: [PATCH 08/16] Squashed commit of the following: commit fd1a39d124749bfbbc879030bdb87ef83d733559 Author: Roman Kysil Date: Wed Jan 22 15:58:50 2025 +0100 Translations commit aeb3a714e333fb00877b74d160766b01ce6368c1 Author: Roman Kysil Date: Wed Jan 22 15:51:24 2025 +0100 Locales commit 0b238786940685698f4f5f7697b0490d333c9d33 Author: Roman Kysil Date: Wed Jan 22 15:47:52 2025 +0100 Locales commit aa2b92d0a176c08476c86bee315bfbae51d436ac Author: Roman Kysil Date: Wed Jan 22 14:50:55 2025 +0100 Intermediate commit commit f22630251c3fcc383176666cd3f2c15b06352d81 Author: Roman Kysil Date: Wed Jan 22 11:39:12 2025 +0100 Intermediate commit commit dd52d3ccc796c3064bdd03a38b6366617bc3ca84 Author: Roman Kysil Date: Wed Jan 22 11:33:32 2025 +0100 Intermediate commit commit feb34aaaea3f424f5e206d2b71f998532dafedc8 Author: Roman Kysil Date: Wed Jan 22 10:38:11 2025 +0100 Fix voc commit b5049d6912ccba96f77fbb4b6f55be6c6f7724ab Author: Roman Kysil Date: Wed Jan 22 09:51:18 2025 +0100 Intermediate commit commit 97674b11a1d804c1449fea7d1dc3c6536bf8f132 Author: Roman Kysil Date: Tue Jan 21 17:36:04 2025 +0100 more criteria commit e0817632911fcf67819828d4752afd734956801a Author: Roman Kysil Date: Tue Jan 21 17:20:21 2025 +0100 Update upgrades.zcml commit 30eecb41fb5e947e8fad28327057a7b26b214fe3 Author: Roman Kysil Date: Tue Jan 21 17:16:48 2025 +0100 Update metadata.xml commit f4b60be434c8e0d5e4846dac7f78fd731522e944 Author: Roman Kysil Date: Tue Jan 21 17:02:38 2025 +0100 Update registry.xml commit 6507a294b50e3f0ee9c733eaa97fd5cce22c4577 Author: Roman Kysil Date: Mon Jan 20 17:48:22 2025 +0100 Intermediate commit commit 7eeea29b03faac33467a05eb77b8ab1a3aeb9bfe Author: Roman Kysil Date: Mon Jan 20 17:32:56 2025 +0100 Initial implementation commit 203687c34d3bbbb08120fa23e3991090fb9ad848 Author: Roman Kysil Date: Mon Jan 20 15:18:25 2025 +0100 Initial implementation --- redturtle/bandi/locales/it/LC_MESSAGES/redturtle.bandi.po | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/redturtle/bandi/locales/it/LC_MESSAGES/redturtle.bandi.po b/redturtle/bandi/locales/it/LC_MESSAGES/redturtle.bandi.po index c3aa7ef..ac1ef61 100644 --- a/redturtle/bandi/locales/it/LC_MESSAGES/redturtle.bandi.po +++ b/redturtle/bandi/locales/it/LC_MESSAGES/redturtle.bandi.po @@ -341,7 +341,7 @@ msgid "chiusura_procedimento_bando_label" msgstr "Data chiusura procedimento" msgid "closed" -msgstr "" +msgstr "Scaduto" #. Default: "Insert a list of available destinatari that can be selected when adding a new Bando." #: redturtle/bandi/interfaces/settings.py:26 From c64137afd0869c84a2e5b43c0243defd33aeabd2 Mon Sep 17 00:00:00 2001 From: Roman Kysil Date: Wed, 29 Jan 2025 10:55:04 +0100 Subject: [PATCH 09/16] Squashed commit of the following: commit be4c48c5fec4bca56dc5a8b290dbc527fb9a5b12 Author: Roman Kysil Date: Wed Jan 29 10:53:48 2025 +0100 Locales commit fd1a39d124749bfbbc879030bdb87ef83d733559 Author: Roman Kysil Date: Wed Jan 22 15:58:50 2025 +0100 Translations commit aeb3a714e333fb00877b74d160766b01ce6368c1 Author: Roman Kysil Date: Wed Jan 22 15:51:24 2025 +0100 Locales commit 0b238786940685698f4f5f7697b0490d333c9d33 Author: Roman Kysil Date: Wed Jan 22 15:47:52 2025 +0100 Locales commit aa2b92d0a176c08476c86bee315bfbae51d436ac Author: Roman Kysil Date: Wed Jan 22 14:50:55 2025 +0100 Intermediate commit commit f22630251c3fcc383176666cd3f2c15b06352d81 Author: Roman Kysil Date: Wed Jan 22 11:39:12 2025 +0100 Intermediate commit commit dd52d3ccc796c3064bdd03a38b6366617bc3ca84 Author: Roman Kysil Date: Wed Jan 22 11:33:32 2025 +0100 Intermediate commit commit feb34aaaea3f424f5e206d2b71f998532dafedc8 Author: Roman Kysil Date: Wed Jan 22 10:38:11 2025 +0100 Fix voc commit b5049d6912ccba96f77fbb4b6f55be6c6f7724ab Author: Roman Kysil Date: Wed Jan 22 09:51:18 2025 +0100 Intermediate commit commit 97674b11a1d804c1449fea7d1dc3c6536bf8f132 Author: Roman Kysil Date: Tue Jan 21 17:36:04 2025 +0100 more criteria commit e0817632911fcf67819828d4752afd734956801a Author: Roman Kysil Date: Tue Jan 21 17:20:21 2025 +0100 Update upgrades.zcml commit 30eecb41fb5e947e8fad28327057a7b26b214fe3 Author: Roman Kysil Date: Tue Jan 21 17:16:48 2025 +0100 Update metadata.xml commit f4b60be434c8e0d5e4846dac7f78fd731522e944 Author: Roman Kysil Date: Tue Jan 21 17:02:38 2025 +0100 Update registry.xml commit 6507a294b50e3f0ee9c733eaa97fd5cce22c4577 Author: Roman Kysil Date: Mon Jan 20 17:48:22 2025 +0100 Intermediate commit commit 7eeea29b03faac33467a05eb77b8ab1a3aeb9bfe Author: Roman Kysil Date: Mon Jan 20 17:32:56 2025 +0100 Initial implementation commit 203687c34d3bbbb08120fa23e3991090fb9ad848 Author: Roman Kysil Date: Mon Jan 20 15:18:25 2025 +0100 Initial implementation --- redturtle/bandi/locales/it/LC_MESSAGES/redturtle.bandi.po | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/redturtle/bandi/locales/it/LC_MESSAGES/redturtle.bandi.po b/redturtle/bandi/locales/it/LC_MESSAGES/redturtle.bandi.po index ac1ef61..0ffe777 100644 --- a/redturtle/bandi/locales/it/LC_MESSAGES/redturtle.bandi.po +++ b/redturtle/bandi/locales/it/LC_MESSAGES/redturtle.bandi.po @@ -65,7 +65,7 @@ msgstr "" #: redturtle/bandi/browser/bando.py:252 #: redturtle/bandi/portlets/collection.py:261 msgid "Closed" -msgstr "Scaduto" +msgstr "Chiuso" #: redturtle/bandi/browser/configure.zcml:46 msgid "Default" @@ -407,7 +407,7 @@ msgid "help_search_authorities" msgstr "Mostra i bandi appartenenti a questi enti. Possono essere selezionati più tag mantenendo premuto il tasto Ctrl (o il tasto Mela sul Mac)." msgid "in-progress" -msgstr "In lavorazione" +msgstr "In corso" #. Default: "Search" #: redturtle/bandi/browser/search_form.pt:203 @@ -420,7 +420,7 @@ msgid "more_url" msgstr "Altro…" msgid "open" -msgstr "Attivo" +msgstr "Aperto" #: redturtle/bandi/configure.zcml:53 msgid "redturtle.bandi uninstall" From c61422bd6f8373bcd624a40347c04bb25ccabeab Mon Sep 17 00:00:00 2001 From: Roman Kysil Date: Tue, 4 Feb 2025 11:19:40 +0100 Subject: [PATCH 10/16] Squashed commit of the following: commit 1a0e43aeefb94babdd94520203c18b4731338f30 Author: Roman Kysil Date: Tue Feb 4 11:16:40 2025 +0100 Locales commit 08d7c6d585493594824153299d2c45d891cea8b8 Author: Roman Kysil Date: Fri Jan 31 16:55:22 2025 +0100 Original Bandi states translation commit fd1a39d124749bfbbc879030bdb87ef83d733559 Author: Roman Kysil Date: Wed Jan 22 15:58:50 2025 +0100 Translations commit aeb3a714e333fb00877b74d160766b01ce6368c1 Author: Roman Kysil Date: Wed Jan 22 15:51:24 2025 +0100 Locales commit 0b238786940685698f4f5f7697b0490d333c9d33 Author: Roman Kysil Date: Wed Jan 22 15:47:52 2025 +0100 Locales commit aa2b92d0a176c08476c86bee315bfbae51d436ac Author: Roman Kysil Date: Wed Jan 22 14:50:55 2025 +0100 Intermediate commit commit f22630251c3fcc383176666cd3f2c15b06352d81 Author: Roman Kysil Date: Wed Jan 22 11:39:12 2025 +0100 Intermediate commit commit dd52d3ccc796c3064bdd03a38b6366617bc3ca84 Author: Roman Kysil Date: Wed Jan 22 11:33:32 2025 +0100 Intermediate commit commit feb34aaaea3f424f5e206d2b71f998532dafedc8 Author: Roman Kysil Date: Wed Jan 22 10:38:11 2025 +0100 Fix voc commit b5049d6912ccba96f77fbb4b6f55be6c6f7724ab Author: Roman Kysil Date: Wed Jan 22 09:51:18 2025 +0100 Intermediate commit commit 97674b11a1d804c1449fea7d1dc3c6536bf8f132 Author: Roman Kysil Date: Tue Jan 21 17:36:04 2025 +0100 more criteria commit e0817632911fcf67819828d4752afd734956801a Author: Roman Kysil Date: Tue Jan 21 17:20:21 2025 +0100 Update upgrades.zcml commit 30eecb41fb5e947e8fad28327057a7b26b214fe3 Author: Roman Kysil Date: Tue Jan 21 17:16:48 2025 +0100 Update metadata.xml commit f4b60be434c8e0d5e4846dac7f78fd731522e944 Author: Roman Kysil Date: Tue Jan 21 17:02:38 2025 +0100 Update registry.xml commit 6507a294b50e3f0ee9c733eaa97fd5cce22c4577 Author: Roman Kysil Date: Mon Jan 20 17:48:22 2025 +0100 Intermediate commit commit 7eeea29b03faac33467a05eb77b8ab1a3aeb9bfe Author: Roman Kysil Date: Mon Jan 20 17:32:56 2025 +0100 Initial implementation commit 203687c34d3bbbb08120fa23e3991090fb9ad848 Author: Roman Kysil Date: Mon Jan 20 15:18:25 2025 +0100 Initial implementation --- .../bandi/locales/it/LC_MESSAGES/manual.po | 27 +++++++++++++++++++ .../locales/it/LC_MESSAGES/redturtle.bandi.po | 3 --- redturtle/bandi/vocabularies.py | 2 +- 3 files changed, 28 insertions(+), 4 deletions(-) diff --git a/redturtle/bandi/locales/it/LC_MESSAGES/manual.po b/redturtle/bandi/locales/it/LC_MESSAGES/manual.po index e69de29..fc23b3c 100644 --- a/redturtle/bandi/locales/it/LC_MESSAGES/manual.po +++ b/redturtle/bandi/locales/it/LC_MESSAGES/manual.po @@ -0,0 +1,27 @@ +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"POT-Creation-Date: 2025-01-22 14:46+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI +ZONE\n" +"Last-Translator: Filippo Campi \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=1; plural=0\n" +"Language-Code: en\n" +"Language-Name: English\n" +"Preferred-Encodings: utf-8 latin1\n" +"Domain: redturle.bandi" + +msgid "open" +msgstr "Attivo" + +msgid "closed" +msgstr "Chiuso" + +msgid "in-progress" +msgstr "In corso" + +msgid "scheduled" +msgstr "Programmato" \ No newline at end of file diff --git a/redturtle/bandi/locales/it/LC_MESSAGES/redturtle.bandi.po b/redturtle/bandi/locales/it/LC_MESSAGES/redturtle.bandi.po index 0ffe777..1e6a00b 100644 --- a/redturtle/bandi/locales/it/LC_MESSAGES/redturtle.bandi.po +++ b/redturtle/bandi/locales/it/LC_MESSAGES/redturtle.bandi.po @@ -419,9 +419,6 @@ msgstr "Cerca" msgid "more_url" msgstr "Altro…" -msgid "open" -msgstr "Aperto" - #: redturtle/bandi/configure.zcml:53 msgid "redturtle.bandi uninstall" msgstr "" diff --git a/redturtle/bandi/vocabularies.py b/redturtle/bandi/vocabularies.py index 38bdd28..8122871 100644 --- a/redturtle/bandi/vocabularies.py +++ b/redturtle/bandi/vocabularies.py @@ -65,7 +65,7 @@ def __call__(self, context): SimpleTerm( value=i, token=i, - title=api.portal.translate(msgid=i, domain="redturtle.bandi"), + title=api.portal.translate(msgid=i, domain="manual"), ) for i in ["open", "in-progress", "closed", "scheduled"] ] From 777c9ee99f574bf977a71476a6600c7f6879008e Mon Sep 17 00:00:00 2001 From: Roman Kysil Date: Wed, 5 Feb 2025 12:36:33 +0100 Subject: [PATCH 11/16] Squashed commit of the following: commit b6cc2d3aac4018b86c740684582ef2b32f01449e Author: Roman Kysil Date: Wed Feb 5 12:35:39 2025 +0100 minor fixes commit 1a0e43aeefb94babdd94520203c18b4731338f30 Author: Roman Kysil Date: Tue Feb 4 11:16:40 2025 +0100 Locales commit 08d7c6d585493594824153299d2c45d891cea8b8 Author: Roman Kysil Date: Fri Jan 31 16:55:22 2025 +0100 Original Bandi states translation commit fd1a39d124749bfbbc879030bdb87ef83d733559 Author: Roman Kysil Date: Wed Jan 22 15:58:50 2025 +0100 Translations commit aeb3a714e333fb00877b74d160766b01ce6368c1 Author: Roman Kysil Date: Wed Jan 22 15:51:24 2025 +0100 Locales commit 0b238786940685698f4f5f7697b0490d333c9d33 Author: Roman Kysil Date: Wed Jan 22 15:47:52 2025 +0100 Locales commit aa2b92d0a176c08476c86bee315bfbae51d436ac Author: Roman Kysil Date: Wed Jan 22 14:50:55 2025 +0100 Intermediate commit commit f22630251c3fcc383176666cd3f2c15b06352d81 Author: Roman Kysil Date: Wed Jan 22 11:39:12 2025 +0100 Intermediate commit commit dd52d3ccc796c3064bdd03a38b6366617bc3ca84 Author: Roman Kysil Date: Wed Jan 22 11:33:32 2025 +0100 Intermediate commit commit feb34aaaea3f424f5e206d2b71f998532dafedc8 Author: Roman Kysil Date: Wed Jan 22 10:38:11 2025 +0100 Fix voc commit b5049d6912ccba96f77fbb4b6f55be6c6f7724ab Author: Roman Kysil Date: Wed Jan 22 09:51:18 2025 +0100 Intermediate commit commit 97674b11a1d804c1449fea7d1dc3c6536bf8f132 Author: Roman Kysil Date: Tue Jan 21 17:36:04 2025 +0100 more criteria commit e0817632911fcf67819828d4752afd734956801a Author: Roman Kysil Date: Tue Jan 21 17:20:21 2025 +0100 Update upgrades.zcml commit 30eecb41fb5e947e8fad28327057a7b26b214fe3 Author: Roman Kysil Date: Tue Jan 21 17:16:48 2025 +0100 Update metadata.xml commit f4b60be434c8e0d5e4846dac7f78fd731522e944 Author: Roman Kysil Date: Tue Jan 21 17:02:38 2025 +0100 Update registry.xml commit 6507a294b50e3f0ee9c733eaa97fd5cce22c4577 Author: Roman Kysil Date: Mon Jan 20 17:48:22 2025 +0100 Intermediate commit commit 7eeea29b03faac33467a05eb77b8ab1a3aeb9bfe Author: Roman Kysil Date: Mon Jan 20 17:32:56 2025 +0100 Initial implementation commit 203687c34d3bbbb08120fa23e3991090fb9ad848 Author: Roman Kysil Date: Mon Jan 20 15:18:25 2025 +0100 Initial implementation --- .../querystring/querymodifiers/bandi_state.py | 21 +++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/redturtle/bandi/querystring/querymodifiers/bandi_state.py b/redturtle/bandi/querystring/querymodifiers/bandi_state.py index f849c23..05c63d8 100644 --- a/redturtle/bandi/querystring/querymodifiers/bandi_state.py +++ b/redturtle/bandi/querystring/querymodifiers/bandi_state.py @@ -51,18 +51,27 @@ def modify_bandi_state_query(query): ), } + query_items_to_remove = [] + for i in query: if i.get("i", "") == "bando_state": item = i - for value in i.get("v", []): - operator = state_operators.get(value, None) + value = i.get("v", "") + + if type(value) is list: + value = value and value[0] or "" + + operator = state_operators.get(value, None) + + if operator: + query_extender.extend(operator) + query_items_to_remove.append(item) - if operator: - query_extender.extend(operator) + if query_extender: + for i in query_items_to_remove: + query.remove(i) - if item: - query.remove(item) query.extend(query_extender) return query From 11896abfeec1dc8927c1f3c010f43e2a3a66916c Mon Sep 17 00:00:00 2001 From: Roman Kysil Date: Wed, 5 Feb 2025 14:14:47 +0100 Subject: [PATCH 12/16] Squashed commit of the following: commit 9c5e9881d2b0b125d65c1897db16918947f10af9 Author: Roman Kysil Date: Wed Feb 5 14:12:17 2025 +0100 Locales commit 8f188238f931670aa76b190261be95648265b380 Author: Roman Kysil Date: Wed Feb 5 12:56:34 2025 +0100 Locales commit b6cc2d3aac4018b86c740684582ef2b32f01449e Author: Roman Kysil Date: Wed Feb 5 12:35:39 2025 +0100 minor fixes commit 1a0e43aeefb94babdd94520203c18b4731338f30 Author: Roman Kysil Date: Tue Feb 4 11:16:40 2025 +0100 Locales commit 08d7c6d585493594824153299d2c45d891cea8b8 Author: Roman Kysil Date: Fri Jan 31 16:55:22 2025 +0100 Original Bandi states translation commit fd1a39d124749bfbbc879030bdb87ef83d733559 Author: Roman Kysil Date: Wed Jan 22 15:58:50 2025 +0100 Translations commit aeb3a714e333fb00877b74d160766b01ce6368c1 Author: Roman Kysil Date: Wed Jan 22 15:51:24 2025 +0100 Locales commit 0b238786940685698f4f5f7697b0490d333c9d33 Author: Roman Kysil Date: Wed Jan 22 15:47:52 2025 +0100 Locales commit aa2b92d0a176c08476c86bee315bfbae51d436ac Author: Roman Kysil Date: Wed Jan 22 14:50:55 2025 +0100 Intermediate commit commit f22630251c3fcc383176666cd3f2c15b06352d81 Author: Roman Kysil Date: Wed Jan 22 11:39:12 2025 +0100 Intermediate commit commit dd52d3ccc796c3064bdd03a38b6366617bc3ca84 Author: Roman Kysil Date: Wed Jan 22 11:33:32 2025 +0100 Intermediate commit commit feb34aaaea3f424f5e206d2b71f998532dafedc8 Author: Roman Kysil Date: Wed Jan 22 10:38:11 2025 +0100 Fix voc commit b5049d6912ccba96f77fbb4b6f55be6c6f7724ab Author: Roman Kysil Date: Wed Jan 22 09:51:18 2025 +0100 Intermediate commit commit 97674b11a1d804c1449fea7d1dc3c6536bf8f132 Author: Roman Kysil Date: Tue Jan 21 17:36:04 2025 +0100 more criteria commit e0817632911fcf67819828d4752afd734956801a Author: Roman Kysil Date: Tue Jan 21 17:20:21 2025 +0100 Update upgrades.zcml commit 30eecb41fb5e947e8fad28327057a7b26b214fe3 Author: Roman Kysil Date: Tue Jan 21 17:16:48 2025 +0100 Update metadata.xml commit f4b60be434c8e0d5e4846dac7f78fd731522e944 Author: Roman Kysil Date: Tue Jan 21 17:02:38 2025 +0100 Update registry.xml commit 6507a294b50e3f0ee9c733eaa97fd5cce22c4577 Author: Roman Kysil Date: Mon Jan 20 17:48:22 2025 +0100 Intermediate commit commit 7eeea29b03faac33467a05eb77b8ab1a3aeb9bfe Author: Roman Kysil Date: Mon Jan 20 17:32:56 2025 +0100 Initial implementation commit 203687c34d3bbbb08120fa23e3991090fb9ad848 Author: Roman Kysil Date: Mon Jan 20 15:18:25 2025 +0100 Initial implementation --- redturtle/bandi/locales/it/LC_MESSAGES/redturtle.bandi.po | 7 +++++-- redturtle/bandi/locales/manual.pot | 2 +- redturtle/bandi/locales/redturtle.bandi.pot | 2 +- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/redturtle/bandi/locales/it/LC_MESSAGES/redturtle.bandi.po b/redturtle/bandi/locales/it/LC_MESSAGES/redturtle.bandi.po index 1e6a00b..d109e6b 100644 --- a/redturtle/bandi/locales/it/LC_MESSAGES/redturtle.bandi.po +++ b/redturtle/bandi/locales/it/LC_MESSAGES/redturtle.bandi.po @@ -4,7 +4,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 2025-01-22 14:46+0000\n" +"POT-Creation-Date: 2025-02-05 13:12+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI +ZONE\n" "Last-Translator: Filippo Campi \n" "Language-Team: LANGUAGE \n" @@ -341,7 +341,7 @@ msgid "chiusura_procedimento_bando_label" msgstr "Data chiusura procedimento" msgid "closed" -msgstr "Scaduto" +msgstr "Chiuso" #. Default: "Insert a list of available destinatari that can be selected when adding a new Bando." #: redturtle/bandi/interfaces/settings.py:26 @@ -419,6 +419,9 @@ msgstr "Cerca" msgid "more_url" msgstr "Altro…" +msgid "open" +msgstr "Attivo" + #: redturtle/bandi/configure.zcml:53 msgid "redturtle.bandi uninstall" msgstr "" diff --git a/redturtle/bandi/locales/manual.pot b/redturtle/bandi/locales/manual.pot index 2cf4db2..cfc888d 100644 --- a/redturtle/bandi/locales/manual.pot +++ b/redturtle/bandi/locales/manual.pot @@ -15,7 +15,7 @@ msgstr "" "Language-Code: en\n" "Language-Name: English\n" "Preferred-Encodings: utf-8 latin1\n" -"Domain: redturtle.bandi\n" +"Domain: DOMAIN\n" msgid "open" diff --git a/redturtle/bandi/locales/redturtle.bandi.pot b/redturtle/bandi/locales/redturtle.bandi.pot index 951dabc..dd5405c 100644 --- a/redturtle/bandi/locales/redturtle.bandi.pot +++ b/redturtle/bandi/locales/redturtle.bandi.pot @@ -4,7 +4,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 2025-01-22 14:46+0000\n" +"POT-Creation-Date: 2025-02-05 13:12+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI +ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" From 47f4e1f2ea86bee5395fc1e6b91828a36eca21a2 Mon Sep 17 00:00:00 2001 From: Roman Kysil Date: Wed, 5 Feb 2025 14:54:52 +0100 Subject: [PATCH 13/16] Remove redundant file --- .../bandi/locales/it/LC_MESSAGES/manual.po | 27 ------------------- 1 file changed, 27 deletions(-) delete mode 100644 redturtle/bandi/locales/it/LC_MESSAGES/manual.po diff --git a/redturtle/bandi/locales/it/LC_MESSAGES/manual.po b/redturtle/bandi/locales/it/LC_MESSAGES/manual.po deleted file mode 100644 index fc23b3c..0000000 --- a/redturtle/bandi/locales/it/LC_MESSAGES/manual.po +++ /dev/null @@ -1,27 +0,0 @@ -msgid "" -msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 2025-01-22 14:46+0000\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI +ZONE\n" -"Last-Translator: Filippo Campi \n" -"Language-Team: LANGUAGE \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=utf-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=1; plural=0\n" -"Language-Code: en\n" -"Language-Name: English\n" -"Preferred-Encodings: utf-8 latin1\n" -"Domain: redturle.bandi" - -msgid "open" -msgstr "Attivo" - -msgid "closed" -msgstr "Chiuso" - -msgid "in-progress" -msgstr "In corso" - -msgid "scheduled" -msgstr "Programmato" \ No newline at end of file From 42b1f0518978f6e40e0fa967094bcd0578beafd8 Mon Sep 17 00:00:00 2001 From: Roman Kysil Date: Wed, 5 Feb 2025 15:55:24 +0100 Subject: [PATCH 14/16] fix --- redturtle/bandi/vocabularies.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/redturtle/bandi/vocabularies.py b/redturtle/bandi/vocabularies.py index 8122871..fc1c839 100644 --- a/redturtle/bandi/vocabularies.py +++ b/redturtle/bandi/vocabularies.py @@ -65,7 +65,7 @@ def __call__(self, context): SimpleTerm( value=i, token=i, - title=api.portal.translate(msgid=i, domain="manual"), + title=api.portal.translate(msgid=i), ) for i in ["open", "in-progress", "closed", "scheduled"] ] From 2457844e4d232f6029ee1cb296087526e87c493c Mon Sep 17 00:00:00 2001 From: Roman Kysil Date: Wed, 5 Feb 2025 16:00:07 +0100 Subject: [PATCH 15/16] locales --- redturtle/bandi/locales/it/LC_MESSAGES/plone.po | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/redturtle/bandi/locales/it/LC_MESSAGES/plone.po b/redturtle/bandi/locales/it/LC_MESSAGES/plone.po index 8b99359..af2366f 100644 --- a/redturtle/bandi/locales/it/LC_MESSAGES/plone.po +++ b/redturtle/bandi/locales/it/LC_MESSAGES/plone.po @@ -36,16 +36,3 @@ msgstr "Destinatari bando" #: Custom bandi indexes msgid "scadenza_bando" msgstr "Scadenza bando" - -msgid "open" -msgstr "Aperto" - -msgid "in-progress" -msgstr "In lavorazione" - -msgid "closed" -msgstr "Chiuso" - -msgid "scheduled" -msgstr "Schedulato" - From 2125d06aeb53797168441968ddd2a2cbe1b171f1 Mon Sep 17 00:00:00 2001 From: Roman Kysil Date: Wed, 5 Feb 2025 16:04:22 +0100 Subject: [PATCH 16/16] fix --- redturtle/bandi/vocabularies.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/redturtle/bandi/vocabularies.py b/redturtle/bandi/vocabularies.py index fc1c839..38bdd28 100644 --- a/redturtle/bandi/vocabularies.py +++ b/redturtle/bandi/vocabularies.py @@ -65,7 +65,7 @@ def __call__(self, context): SimpleTerm( value=i, token=i, - title=api.portal.translate(msgid=i), + title=api.portal.translate(msgid=i, domain="redturtle.bandi"), ) for i in ["open", "in-progress", "closed", "scheduled"] ]