Skip to content

Commit

Permalink
fix: recurrence string and edit recurrence (#482)
Browse files Browse the repository at this point in the history
* fix: recurrence string and edit recurrence

* fix: en locales and release file
  • Loading branch information
giuliaghisini authored Jan 15, 2024
1 parent ccf45b3 commit 276cbef
Show file tree
Hide file tree
Showing 9 changed files with 225 additions and 8 deletions.
10 changes: 10 additions & 0 deletions RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,16 @@
- ...
-->

## Versione x.x.x (dd/mm/yyyy)

### Migliorie

- Migliorata il testo della ricorrenza di un evento.

### Fix

- Risolto un problema nell'edit della ricorrenza di un evento.

## Versione 11.2.0 (11/01/2023)

### Migliorie
Expand Down
30 changes: 30 additions & 0 deletions locales/de/LC_MESSAGES/volto.po
Original file line number Diff line number Diff line change
Expand Up @@ -2919,6 +2919,36 @@ msgstr ""
msgid "risultati_indagini_customer_satisfaction"
msgstr ""

#: overrideTranslations
# defaultMessage: il giorno
msgid "rrule_in"
msgstr ""

#: overrideTranslations
# defaultMessage: _
msgid "rrule_nd"
msgstr ""

#: overrideTranslations
# defaultMessage: il
msgid "rrule_on the"
msgstr ""

#: overrideTranslations
# defaultMessage: _
msgid "rrule_rd"
msgstr ""

#: overrideTranslations
# defaultMessage: _
msgid "rrule_st"
msgstr ""

#: overrideTranslations
# defaultMessage: _
msgid "rrule_th"
msgstr ""

#: components/ItaliaTheme/Blocks/RssBlock/CardWithImageRssTemplate
#: components/ItaliaTheme/Blocks/RssBlock/CardWithoutImageRssTemplate
# defaultMessage: No results from RSS feed.
Expand Down
30 changes: 30 additions & 0 deletions locales/en/LC_MESSAGES/volto.po
Original file line number Diff line number Diff line change
Expand Up @@ -2904,6 +2904,36 @@ msgstr "Rights"
msgid "risultati_indagini_customer_satisfaction"
msgstr "Customer satisfaction survey results"

#: overrideTranslations
# defaultMessage: il giorno
msgid "rrule_in"
msgstr "in"

#: overrideTranslations
# defaultMessage: _
msgid "rrule_nd"
msgstr "nd"

#: overrideTranslations
# defaultMessage: il
msgid "rrule_on the"
msgstr "on the"

#: overrideTranslations
# defaultMessage: _
msgid "rrule_rd"
msgstr "rd"

#: overrideTranslations
# defaultMessage: _
msgid "rrule_st"
msgstr "st"

#: overrideTranslations
# defaultMessage: _
msgid "rrule_th"
msgstr "th"

#: components/ItaliaTheme/Blocks/RssBlock/CardWithImageRssTemplate
#: components/ItaliaTheme/Blocks/RssBlock/CardWithoutImageRssTemplate
# defaultMessage: No results from RSS feed.
Expand Down
30 changes: 30 additions & 0 deletions locales/es/LC_MESSAGES/volto.po
Original file line number Diff line number Diff line change
Expand Up @@ -2913,6 +2913,36 @@ msgstr "Derechos"
msgid "risultati_indagini_customer_satisfaction"
msgstr "Resultados de la encuesta de satisfacción del cliente"

#: overrideTranslations
# defaultMessage: il giorno
msgid "rrule_in"
msgstr ""

#: overrideTranslations
# defaultMessage: _
msgid "rrule_nd"
msgstr ""

#: overrideTranslations
# defaultMessage: il
msgid "rrule_on the"
msgstr ""

#: overrideTranslations
# defaultMessage: _
msgid "rrule_rd"
msgstr ""

#: overrideTranslations
# defaultMessage: _
msgid "rrule_st"
msgstr ""

#: overrideTranslations
# defaultMessage: _
msgid "rrule_th"
msgstr ""

#: components/ItaliaTheme/Blocks/RssBlock/CardWithImageRssTemplate
#: components/ItaliaTheme/Blocks/RssBlock/CardWithoutImageRssTemplate
# defaultMessage: No results from RSS feed.
Expand Down
30 changes: 30 additions & 0 deletions locales/fr/LC_MESSAGES/volto.po
Original file line number Diff line number Diff line change
Expand Up @@ -2921,6 +2921,36 @@ msgstr "Droits"
msgid "risultati_indagini_customer_satisfaction"
msgstr "Résultats des enquêtes de satisfaction clients"

#: overrideTranslations
# defaultMessage: il giorno
msgid "rrule_in"
msgstr ""

#: overrideTranslations
# defaultMessage: _
msgid "rrule_nd"
msgstr ""

#: overrideTranslations
# defaultMessage: il
msgid "rrule_on the"
msgstr ""

#: overrideTranslations
# defaultMessage: _
msgid "rrule_rd"
msgstr ""

#: overrideTranslations
# defaultMessage: _
msgid "rrule_st"
msgstr ""

#: overrideTranslations
# defaultMessage: _
msgid "rrule_th"
msgstr ""

#: components/ItaliaTheme/Blocks/RssBlock/CardWithImageRssTemplate
#: components/ItaliaTheme/Blocks/RssBlock/CardWithoutImageRssTemplate
# defaultMessage: No results from RSS feed.
Expand Down
30 changes: 30 additions & 0 deletions locales/it/LC_MESSAGES/volto.po
Original file line number Diff line number Diff line change
Expand Up @@ -2904,6 +2904,36 @@ msgstr "Diritti"
msgid "risultati_indagini_customer_satisfaction"
msgstr "Risultati indagini di customer satisfaction"

#: overrideTranslations
# defaultMessage: il giorno
msgid "rrule_in"
msgstr "il giorno"

#: overrideTranslations
# defaultMessage: _
msgid "rrule_nd"
msgstr " "

#: overrideTranslations
# defaultMessage: il
msgid "rrule_on the"
msgstr "il giorno"

#: overrideTranslations
# defaultMessage: _
msgid "rrule_rd"
msgstr " "

#: overrideTranslations
# defaultMessage: _
msgid "rrule_st"
msgstr " "

#: overrideTranslations
# defaultMessage: _
msgid "rrule_th"
msgstr " "

#: components/ItaliaTheme/Blocks/RssBlock/CardWithImageRssTemplate
#: components/ItaliaTheme/Blocks/RssBlock/CardWithoutImageRssTemplate
# defaultMessage: No results from RSS feed.
Expand Down
32 changes: 31 additions & 1 deletion locales/volto.pot
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
msgid ""
msgstr ""
"Project-Id-Version: Plone\n"
"POT-Creation-Date: 2024-01-11T11:04:31.849Z\n"
"POT-Creation-Date: 2024-01-11T13:44:40.490Z\n"
"Last-Translator: Plone i18n <[email protected]>\n"
"Language-Team: Plone i18n <[email protected]>\n"
"MIME-Version: 1.0\n"
Expand Down Expand Up @@ -2906,6 +2906,36 @@ msgstr ""
msgid "risultati_indagini_customer_satisfaction"
msgstr ""

#: overrideTranslations
# defaultMessage: il giorno
msgid "rrule_in"
msgstr ""

#: overrideTranslations
# defaultMessage: _
msgid "rrule_nd"
msgstr ""

#: overrideTranslations
# defaultMessage: il
msgid "rrule_on the"
msgstr ""

#: overrideTranslations
# defaultMessage: _
msgid "rrule_rd"
msgstr ""

#: overrideTranslations
# defaultMessage: _
msgid "rrule_st"
msgstr ""

#: overrideTranslations
# defaultMessage: _
msgid "rrule_th"
msgstr ""

#: components/ItaliaTheme/Blocks/RssBlock/CardWithImageRssTemplate
#: components/ItaliaTheme/Blocks/RssBlock/CardWithoutImageRssTemplate
# defaultMessage: No results from RSS feed.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ import {
FREQUENCES,
WEEKLY_DAYS,
MONDAYFRIDAY_DAYS,
toISOString,
rrulei18n,
} from '@plone/volto/components/manage/Widgets/RecurrenceWidget/Utils';

Expand Down Expand Up @@ -437,17 +436,17 @@ class RecurrenceWidget extends Component {
case 'until':
let mDate = null;
if (value) {
mDate = this.moment(new Date(value));
mDate = moment(new Date(value));
if (typeof value === 'string') {
mDate = this.moment(new Date(value));
mDate = moment(new Date(value));
} else {
//object-->Date()
mDate = this.moment(value);
mDate = moment(value);
}

if (this.props.formData.end) {
//set time from formData.end
const mEnd = this.moment(new Date(this.props.formData.end));
const mEnd = moment(new Date(this.props.formData.end));
mDate.set('hour', mEnd.get('hour'));
mDate.set('minute', mEnd.get('minute'));
}
Expand Down Expand Up @@ -476,8 +475,8 @@ class RecurrenceWidget extends Component {
field === 'dtstart'
? value
: rruleSet.dtstart()
? rruleSet.dtstart()
: new Date();
? rruleSet.dtstart()
: new Date();
var exdates =
field === 'exdates' ? value : Object.assign([], rruleSet.exdates());

Expand Down
28 changes: 28 additions & 0 deletions src/overrideTranslations.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import { defineMessages } from 'react-intl';

defineMessages({
rrule_st: {
id: 'rrule_st',
defaultMessage: '_', //in italiano non si traduce
},
rrule_nd: {
id: 'rrule_nd',
defaultMessage: '_', //in italiano non si traduce
},
rrule_rd: {
id: 'rrule_rd',
defaultMessage: '_', //in italiano non si traduce
},
rrule_th: {
id: 'rrule_th',
defaultMessage: '_', //in italiano non si traduce
},
rrule_in: {
id: 'rrule_in',
defaultMessage: 'il giorno',
},
rrule_on_the: {
id: 'rrule_on the',
defaultMessage: 'il',
},
});

0 comments on commit 276cbef

Please sign in to comment.