@eeacms/volto-cca-policy 0.2.94 → 0.2.95

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -14,12 +14,12 @@ msgstr ""
14
14
  #. Default: "A background document for the event is available"
15
15
  #: components/theme/Views/CcaEventView
16
16
  msgid "A background document for the event is available"
17
- msgstr ""
17
+ msgstr "Un document de fond pentru eveniment este disponibil"
18
18
 
19
19
  #. Default: "Adaptation Approaches:"
20
20
  #: helpers/ContentMetadata
21
21
  msgid "Adaptation Approaches:"
22
- msgstr ""
22
+ msgstr "Abordări de adaptare:"
23
23
 
24
24
  #. Default: "Adaptation Details"
25
25
  #: components/theme/Views/AdaptationOptionView
@@ -34,7 +34,7 @@ msgstr "Opțiuni de adaptare puse în aplicare în acest caz"
34
34
  #. Default: "Adaptation approaches"
35
35
  #: components/manage/Blocks/CaseStudyExplorer/CaseStudyFilters
36
36
  msgid "Adaptation approaches"
37
- msgstr ""
37
+ msgstr "Abordări de adaptare"
38
38
 
39
39
  #. Default: "Adaptation options"
40
40
  #: components/manage/Blocks/CaseStudyExplorer/FeatureDisplay
@@ -93,11 +93,6 @@ msgstr "Descrierea studiului de caz"
93
93
  msgid "Case Study illustrations"
94
94
  msgstr "Ilustrații pentru studii de caz"
95
95
 
96
- #. Default: "Case studies collected at national level in Spain, provided by AdapteCCA.es"
97
- #: components/manage/Blocks/CaseStudyExplorer/CaseStudyFilters
98
- msgid "Case studies collected at national level in Spain, provided by AdapteCCA.es"
99
- msgstr "Studii de caz colectate la nivel național în Spania, furnizate de AdapteCCA.es"
100
-
101
96
  #. Default: "Case studies related to this option:"
102
97
  #: components/theme/Views/AdaptationOptionView
103
98
  msgid "Case studies related to this option:"
@@ -224,7 +219,7 @@ msgstr "Descarcă Evenimentul"
224
219
  #. Default: "Download the detailed agenda"
225
220
  #: components/theme/Views/CcaEventView
226
221
  msgid "Download the detailed agenda"
227
- msgstr ""
222
+ msgstr "Descărcați agenda detaliată"
228
223
 
229
224
  #. Default: "Download this event in iCal format"
230
225
  #: helpers/Utils
@@ -239,13 +234,23 @@ msgstr "Durată:"
239
234
  #. Default: "Exit fullscreen"
240
235
  #: components/theme/Views/C3SIndicatorView
241
236
  msgid "Exit fullscreen"
242
- msgstr ""
237
+ msgstr "Ieșiți din ecranul complet"
238
+
239
+ #. Default: "Explore more on Climate-ADAPT"
240
+ #: index
241
+ msgid "Explore more on Climate-ADAPT"
242
+ msgstr "Explorați mai multe despre Climate-ADAPT"
243
243
 
244
244
  #. Default: "Feb"
245
245
  #: components/manage/Blocks/Listing/EventCardsListingView
246
246
  msgid "Feb"
247
247
  msgstr "Feb"
248
248
 
249
+ #. Default: "For more search options"
250
+ #: index
251
+ msgid "For more search options"
252
+ msgstr "Pentru mai multe opțiuni de căutare"
253
+
249
254
  #. Default: "Fr"
250
255
  #: components/manage/Blocks/Listing/EventCardsListingView
251
256
  msgid "Fr"
@@ -254,7 +259,7 @@ msgstr "FR"
254
259
  #. Default: "Fullscreen"
255
260
  #: components/theme/Views/C3SIndicatorView
256
261
  msgid "Fullscreen"
257
- msgstr ""
262
+ msgstr "Ecran complet"
258
263
 
259
264
  #. Default: "Funding Programme:"
260
265
  #: helpers/ContentMetadata
@@ -271,6 +276,11 @@ msgstr "Caracterizarea geografică:"
271
276
  msgid "Getting started"
272
277
  msgstr "Noțiuni de bază"
273
278
 
279
+ #. Default: "Go to advanced search"
280
+ #: index
281
+ msgid "Go to advanced search"
282
+ msgstr "Accesați căutarea avansată"
283
+
274
284
  #. Default: "Governance level:"
275
285
  #: helpers/ContentMetadata
276
286
  msgid "Governance level:"
@@ -404,6 +414,11 @@ msgstr "Timpul de viață"
404
414
  msgid "Links to further information"
405
415
  msgstr "Linkuri către informații suplimentare"
406
416
 
417
+ #. Default: "Looking for more information?"
418
+ #: index
419
+ msgid "Looking for more information?"
420
+ msgstr "Căutați mai multe informații?"
421
+
407
422
  #. Default: "Macro-Transnational region:"
408
423
  #: helpers/ContentMetadata
409
424
  msgid "Macro-Transnational region:"
@@ -492,7 +507,7 @@ msgstr "Parteneri"
492
507
  #. Default: "Policy and legal background"
493
508
  #: components/theme/Views/CaseStudyView
494
509
  msgid "Policy and legal background"
495
- msgstr ""
510
+ msgstr "Politică și fundal juridic"
496
511
 
497
512
  #. Default: "Practical information"
498
513
  #: components/theme/Views/CcaEventView
@@ -561,6 +576,21 @@ msgstr "Relevanță"
561
576
  msgid "Sa"
562
577
  msgstr "Sa"
563
578
 
579
+ #. Default: "Search the Climate-ADAPT database"
580
+ #: index
581
+ msgid "Search the Climate-ADAPT database"
582
+ msgstr "Căutați în baza de date Climate-ADAPT"
583
+
584
+ #. Default: "Search the EU Mission on Adaptation"
585
+ #: index
586
+ msgid "Search the EU Mission on Adaptation"
587
+ msgstr "Căutați în Misiunea UE pentru adaptare"
588
+
589
+ #. Default: "Search the Observatory Resource Catalogue..."
590
+ #: index
591
+ msgid "Search the Observatory Resource Catalogue..."
592
+ msgstr "Căutați în Catalogul de resurse ale Observatorului..."
593
+
564
594
  #. Default: "Sector"
565
595
  #: components/manage/Blocks/FilterAceContent/FilterAceContentView
566
596
  msgid "Sector"
@@ -590,7 +620,7 @@ msgstr "A se vedea videoclipul din afara Climate-ADAPT"
590
620
  #: components/manage/Blocks/ContentLinks/DropdownListView
591
621
  #: components/manage/Blocks/Listing/DropdownListingView
592
622
  msgid "Select"
593
- msgstr ""
623
+ msgstr "Selecteaza"
594
624
 
595
625
  #. Default: "Sep"
596
626
  #: components/manage/Blocks/Listing/EventCardsListingView
@@ -680,7 +710,7 @@ msgstr "TU"
680
710
  #. Default: "Updating notes"
681
711
  #: components/theme/Views/CaseStudyView
682
712
  msgid "Updating notes"
683
- msgstr ""
713
+ msgstr "Note de actualizare"
684
714
 
685
715
  #. Default: "View all contributions in the resource catalogue"
686
716
  #: helpers/Utils
@@ -1510,7 +1540,7 @@ msgstr "Căutați în baza de date"
1510
1540
  #. undefined
1511
1541
  #: health_menu:2201
1512
1542
  msgid "Climate Services"
1513
- msgstr ""
1543
+ msgstr "Servicii climatice"
1514
1544
 
1515
1545
  #. undefined
1516
1546
  #: health_menu:222
@@ -2219,6 +2249,11 @@ msgstr "Caz dezvoltat și pus în aplicare în principal din cauza altor obiecti
2219
2249
  msgid "Case studies and Adaptation Options"
2220
2250
  msgstr "Studii de caz și opțiuni de adaptare"
2221
2251
 
2252
+ #. undefined
2253
+ #: ../../climateadapt/browser/pt/case-study-and-adaptation-options-map-viewer.pt:301
2254
+ msgid "Case studies collected at national level in Spain, provided by AdapteCCA.es"
2255
+ msgstr "Studii de caz colectate la nivel național în Spania, furnizate de AdapteCCA.es"
2256
+
2222
2257
  #. undefined
2223
2258
  #: ../../climateadapt/mayorsadapt/views.py:78
2224
2259
  msgid "Check-out created"
@@ -3267,4 +3302,4 @@ msgstr "sortare_by"
3267
3302
  #. Default: "Located in"
3268
3303
  #: ../../climateadapt/browser/pt-overrides/plone.app.search.search.pt:541
3269
3304
  msgid "text_searchitem_location"
3270
- msgstr ""
3305
+ msgstr "text_searchitem_location"
@@ -14,12 +14,12 @@ msgstr ""
14
14
  #. Default: "A background document for the event is available"
15
15
  #: components/theme/Views/CcaEventView
16
16
  msgid "A background document for the event is available"
17
- msgstr ""
17
+ msgstr "Dokument o ozadju dogodka je na voljo"
18
18
 
19
19
  #. Default: "Adaptation Approaches:"
20
20
  #: helpers/ContentMetadata
21
21
  msgid "Adaptation Approaches:"
22
- msgstr ""
22
+ msgstr "Pristopi prilagajanja:"
23
23
 
24
24
  #. Default: "Adaptation Details"
25
25
  #: components/theme/Views/AdaptationOptionView
@@ -34,7 +34,7 @@ msgstr "Možnosti prilagajanja, ki se izvajajo v tem primeru"
34
34
  #. Default: "Adaptation approaches"
35
35
  #: components/manage/Blocks/CaseStudyExplorer/CaseStudyFilters
36
36
  msgid "Adaptation approaches"
37
- msgstr ""
37
+ msgstr "Pristopi prilagajanja"
38
38
 
39
39
  #. Default: "Adaptation options"
40
40
  #: components/manage/Blocks/CaseStudyExplorer/FeatureDisplay
@@ -93,11 +93,6 @@ msgstr "Opis študije primera"
93
93
  msgid "Case Study illustrations"
94
94
  msgstr "Ilustracije študije primera"
95
95
 
96
- #. Default: "Case studies collected at national level in Spain, provided by AdapteCCA.es"
97
- #: components/manage/Blocks/CaseStudyExplorer/CaseStudyFilters
98
- msgid "Case studies collected at national level in Spain, provided by AdapteCCA.es"
99
- msgstr "Študije primerov, zbrane na nacionalni ravni v Španiji, ki jih zagotavlja AdapteCCA.es"
100
-
101
96
  #. Default: "Case studies related to this option:"
102
97
  #: components/theme/Views/AdaptationOptionView
103
98
  msgid "Case studies related to this option:"
@@ -224,7 +219,7 @@ msgstr "Prenos dogodka"
224
219
  #. Default: "Download the detailed agenda"
225
220
  #: components/theme/Views/CcaEventView
226
221
  msgid "Download the detailed agenda"
227
- msgstr ""
222
+ msgstr "Prenesite podroben dnevni red"
228
223
 
229
224
  #. Default: "Download this event in iCal format"
230
225
  #: helpers/Utils
@@ -239,13 +234,23 @@ msgstr "Trajanje:"
239
234
  #. Default: "Exit fullscreen"
240
235
  #: components/theme/Views/C3SIndicatorView
241
236
  msgid "Exit fullscreen"
242
- msgstr ""
237
+ msgstr "Izhod iz celozaslonskega načina"
238
+
239
+ #. Default: "Explore more on Climate-ADAPT"
240
+ #: index
241
+ msgid "Explore more on Climate-ADAPT"
242
+ msgstr "Raziščite več na Climate-ADAPT"
243
243
 
244
244
  #. Default: "Feb"
245
245
  #: components/manage/Blocks/Listing/EventCardsListingView
246
246
  msgid "Feb"
247
247
  msgstr "Feb"
248
248
 
249
+ #. Default: "For more search options"
250
+ #: index
251
+ msgid "For more search options"
252
+ msgstr "Za več možnosti iskanja"
253
+
249
254
  #. Default: "Fr"
250
255
  #: components/manage/Blocks/Listing/EventCardsListingView
251
256
  msgid "Fr"
@@ -254,7 +259,7 @@ msgstr "Fr"
254
259
  #. Default: "Fullscreen"
255
260
  #: components/theme/Views/C3SIndicatorView
256
261
  msgid "Fullscreen"
257
- msgstr ""
262
+ msgstr "Cel zaslon"
258
263
 
259
264
  #. Default: "Funding Programme:"
260
265
  #: helpers/ContentMetadata
@@ -271,6 +276,11 @@ msgstr "Geografska opredelitev:"
271
276
  msgid "Getting started"
272
277
  msgstr "Začetek"
273
278
 
279
+ #. Default: "Go to advanced search"
280
+ #: index
281
+ msgid "Go to advanced search"
282
+ msgstr "Pojdite na napredno iskanje"
283
+
274
284
  #. Default: "Governance level:"
275
285
  #: helpers/ContentMetadata
276
286
  msgid "Governance level:"
@@ -404,6 +414,11 @@ msgstr "Življenjski čas"
404
414
  msgid "Links to further information"
405
415
  msgstr "Povezave do dodatnih informacij"
406
416
 
417
+ #. Default: "Looking for more information?"
418
+ #: index
419
+ msgid "Looking for more information?"
420
+ msgstr "Iščete več informacij?"
421
+
407
422
  #. Default: "Macro-Transnational region:"
408
423
  #: helpers/ContentMetadata
409
424
  msgid "Macro-Transnational region:"
@@ -492,7 +507,7 @@ msgstr "Partnerji"
492
507
  #. Default: "Policy and legal background"
493
508
  #: components/theme/Views/CaseStudyView
494
509
  msgid "Policy and legal background"
495
- msgstr ""
510
+ msgstr "Politika in pravno ozadje"
496
511
 
497
512
  #. Default: "Practical information"
498
513
  #: components/theme/Views/CcaEventView
@@ -561,6 +576,21 @@ msgstr "Ustreznost"
561
576
  msgid "Sa"
562
577
  msgstr "Sa"
563
578
 
579
+ #. Default: "Search the Climate-ADAPT database"
580
+ #: index
581
+ msgid "Search the Climate-ADAPT database"
582
+ msgstr "Preiščite bazo podatkov Climate-ADAPT"
583
+
584
+ #. Default: "Search the EU Mission on Adaptation"
585
+ #: index
586
+ msgid "Search the EU Mission on Adaptation"
587
+ msgstr "Poiščite misijo EU za prilagajanje"
588
+
589
+ #. Default: "Search the Observatory Resource Catalogue..."
590
+ #: index
591
+ msgid "Search the Observatory Resource Catalogue..."
592
+ msgstr "Iščite v katalogu virov observatorija ..."
593
+
564
594
  #. Default: "Sector"
565
595
  #: components/manage/Blocks/FilterAceContent/FilterAceContentView
566
596
  msgid "Sector"
@@ -590,7 +620,7 @@ msgstr "Oglejte si video zunaj Climate-ADAPT"
590
620
  #: components/manage/Blocks/ContentLinks/DropdownListView
591
621
  #: components/manage/Blocks/Listing/DropdownListingView
592
622
  msgid "Select"
593
- msgstr ""
623
+ msgstr "Izberite"
594
624
 
595
625
  #. Default: "Sep"
596
626
  #: components/manage/Blocks/Listing/EventCardsListingView
@@ -680,7 +710,7 @@ msgstr "Tu"
680
710
  #. Default: "Updating notes"
681
711
  #: components/theme/Views/CaseStudyView
682
712
  msgid "Updating notes"
683
- msgstr ""
713
+ msgstr "Posodabljanje zapiskov"
684
714
 
685
715
  #. Default: "View all contributions in the resource catalogue"
686
716
  #: helpers/Utils
@@ -1510,7 +1540,7 @@ msgstr "Iskanje po zbirki podatkov"
1510
1540
  #. undefined
1511
1541
  #: health_menu:2201
1512
1542
  msgid "Climate Services"
1513
- msgstr ""
1543
+ msgstr "Podnebne storitve"
1514
1544
 
1515
1545
  #. undefined
1516
1546
  #: health_menu:222
@@ -2219,6 +2249,11 @@ msgstr "Primer je bil razvit in izveden predvsem zaradi drugih ciljev politike,
2219
2249
  msgid "Case studies and Adaptation Options"
2220
2250
  msgstr "Študije primerov in možnosti prilagajanja"
2221
2251
 
2252
+ #. undefined
2253
+ #: ../../climateadapt/browser/pt/case-study-and-adaptation-options-map-viewer.pt:301
2254
+ msgid "Case studies collected at national level in Spain, provided by AdapteCCA.es"
2255
+ msgstr "Študije primerov, zbrane na nacionalni ravni v Španiji, ki jih zagotavlja AdapteCCA.es"
2256
+
2222
2257
  #. undefined
2223
2258
  #: ../../climateadapt/mayorsadapt/views.py:78
2224
2259
  msgid "Check-out created"
@@ -3267,4 +3302,4 @@ msgstr "sort_by"
3267
3302
  #. Default: "Located in"
3268
3303
  #: ../../climateadapt/browser/pt-overrides/plone.app.search.search.pt:541
3269
3304
  msgid "text_searchitem_location"
3270
- msgstr ""
3305
+ msgstr "text_searchitem_location"
package/locales/volto.pot CHANGED
@@ -1,7 +1,7 @@
1
1
  msgid ""
2
2
  msgstr ""
3
3
  "Project-Id-Version: Plone\n"
4
- "POT-Creation-Date: 2024-09-26T08:46:04.444Z\n"
4
+ "POT-Creation-Date: 2025-01-21T10:42:44.543Z\n"
5
5
  "Last-Translator: Plone i18n <plone-i18n@lists.sourceforge.net>\n"
6
6
  "Language-Team: Plone i18n <plone-i18n@lists.sourceforge.net>\n"
7
7
  "Content-Type: text/plain; charset=utf-8\n"
@@ -95,11 +95,6 @@ msgstr ""
95
95
  msgid "Case Study illustrations"
96
96
  msgstr ""
97
97
 
98
- #. Default: "Case studies collected at national level in Spain, provided by AdapteCCA.es"
99
- #: components/manage/Blocks/CaseStudyExplorer/CaseStudyFilters
100
- msgid "Case studies collected at national level in Spain, provided by AdapteCCA.es"
101
- msgstr ""
102
-
103
98
  #. Default: "Case studies related to this option:"
104
99
  #: components/theme/Views/AdaptationOptionView
105
100
  msgid "Case studies related to this option:"
@@ -243,11 +238,21 @@ msgstr ""
243
238
  msgid "Exit fullscreen"
244
239
  msgstr ""
245
240
 
241
+ #. Default: "Explore more on Climate-ADAPT"
242
+ #: index
243
+ msgid "Explore more on Climate-ADAPT"
244
+ msgstr ""
245
+
246
246
  #. Default: "Feb"
247
247
  #: components/manage/Blocks/Listing/EventCardsListingView
248
248
  msgid "Feb"
249
249
  msgstr ""
250
250
 
251
+ #. Default: "For more search options"
252
+ #: index
253
+ msgid "For more search options"
254
+ msgstr ""
255
+
251
256
  #. Default: "Fr"
252
257
  #: components/manage/Blocks/Listing/EventCardsListingView
253
258
  msgid "Fr"
@@ -273,6 +278,11 @@ msgstr ""
273
278
  msgid "Getting started"
274
279
  msgstr ""
275
280
 
281
+ #. Default: "Go to advanced search"
282
+ #: index
283
+ msgid "Go to advanced search"
284
+ msgstr ""
285
+
276
286
  #. Default: "Governance level:"
277
287
  #: helpers/ContentMetadata
278
288
  msgid "Governance level:"
@@ -406,6 +416,11 @@ msgstr ""
406
416
  msgid "Links to further information"
407
417
  msgstr ""
408
418
 
419
+ #. Default: "Looking for more information?"
420
+ #: index
421
+ msgid "Looking for more information?"
422
+ msgstr ""
423
+
409
424
  #. Default: "Macro-Transnational region:"
410
425
  #: helpers/ContentMetadata
411
426
  msgid "Macro-Transnational region:"
@@ -563,6 +578,21 @@ msgstr ""
563
578
  msgid "Sa"
564
579
  msgstr ""
565
580
 
581
+ #. Default: "Search the Climate-ADAPT database"
582
+ #: index
583
+ msgid "Search the Climate-ADAPT database"
584
+ msgstr ""
585
+
586
+ #. Default: "Search the EU Mission on Adaptation"
587
+ #: index
588
+ msgid "Search the EU Mission on Adaptation"
589
+ msgstr ""
590
+
591
+ #. Default: "Search the Observatory Resource Catalogue..."
592
+ #: index
593
+ msgid "Search the Observatory Resource Catalogue..."
594
+ msgstr ""
595
+
566
596
  #. Default: "Sector"
567
597
  #: components/manage/Blocks/FilterAceContent/FilterAceContentView
568
598
  msgid "Sector"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eeacms/volto-cca-policy",
3
- "version": "0.2.94",
3
+ "version": "0.2.95",
4
4
  "description": "@eeacms/volto-cca-policy: Volto add-on",
5
5
  "main": "src/index.js",
6
6
  "author": "European Environment Agency: IDM2 A-Team",
@@ -3,6 +3,8 @@ import { Container, Input, List } from 'semantic-ui-react';
3
3
  import { withRouter, Link } from 'react-router-dom';
4
4
  import { useClickOutside } from '@eeacms/volto-eea-design-system/helpers';
5
5
  import { handleEnterKeyPress } from '@eeacms/volto-eea-design-system/helpers';
6
+ import { useSelector } from 'react-redux';
7
+ import { useIntl } from 'react-intl';
6
8
 
7
9
  const getRandomItems = (arr, max) => {
8
10
  return (
@@ -27,6 +29,7 @@ function HeaderSearchPopUp({
27
29
  location.pathname.match(v.matchpath ? v.matchpath : v.path),
28
30
  );
29
31
  const activeView = localView.length > 0 ? localView[0] : defaultView[0];
32
+ const currentLang = useSelector((state) => state.intl.locale);
30
33
 
31
34
  const {
32
35
  path = '',
@@ -36,6 +39,14 @@ function HeaderSearchPopUp({
36
39
  placeholder = 'Search',
37
40
  searchSuggestions,
38
41
  } = activeView || {};
42
+
43
+ const searchPath = typeof path === 'function' ? path({ currentLang }) : path;
44
+
45
+ const url =
46
+ typeof buttonUrl === 'function'
47
+ ? buttonUrl({ currentLang })
48
+ : buttonUrl || defaultView[0].path;
49
+
39
50
  const { suggestionsTitle, suggestions, maxToShow } = searchSuggestions || {};
40
51
 
41
52
  const [visibleSuggestions, setVisibileSuggestions] = React.useState(
@@ -50,7 +61,7 @@ function HeaderSearchPopUp({
50
61
 
51
62
  const onSubmit = (event) => {
52
63
  const text = searchInputRef?.current?.inputRef?.current?.value;
53
- history.push(`${path}?q=${text}`);
64
+ history.push(`${searchPath}?q=${text}`);
54
65
 
55
66
  if (window?.searchContext?.resetSearch) {
56
67
  window.searchContext.resetSearch({ searchTerm: text });
@@ -68,6 +79,10 @@ function HeaderSearchPopUp({
68
79
  onClose();
69
80
  };
70
81
 
82
+ const intl = useIntl();
83
+ const translatedPlaceholder =
84
+ typeof placeholder === 'function' ? placeholder({ intl }) : placeholder;
85
+
71
86
  return (
72
87
  <div id="search-box" ref={nodeRef}>
73
88
  <div className="wrapper">
@@ -84,7 +99,7 @@ function HeaderSearchPopUp({
84
99
  handleEnterKeyPress(event, onSubmit);
85
100
  },
86
101
  }}
87
- placeholder={placeholder}
102
+ placeholder={translatedPlaceholder}
88
103
  fluid
89
104
  />
90
105
  </form>
@@ -114,7 +129,7 @@ function HeaderSearchPopUp({
114
129
  <Container>
115
130
  <div>{description}</div>
116
131
  <a
117
- href={buttonUrl || defaultView[0].path}
132
+ href={url}
118
133
  className="ui button white inverted"
119
134
  title="Advanced search"
120
135
  >
package/src/index.js CHANGED
@@ -1,3 +1,4 @@
1
+ import { defineMessages, FormattedMessage } from 'react-intl';
1
2
  import loadable from '@loadable/component';
2
3
  import { compose } from 'redux';
3
4
  import { Sitemap } from '@plone/volto/components';
@@ -43,6 +44,21 @@ const getEnv = () => (typeof window !== 'undefined' ? window.env : process.env);
43
44
 
44
45
  const pathToNegRegex = (p) => `(?!(${p}))`;
45
46
 
47
+ const messages = defineMessages({
48
+ placeholderClimateSearch: {
49
+ id: 'Search the Climate-ADAPT database',
50
+ defaultMessage: 'Search the Climate-ADAPT database',
51
+ },
52
+ placeholderObservatorySearch: {
53
+ id: 'Search the Observatory Resource Catalogue...',
54
+ defaultMessage: 'Search the Observatory Resource Catalogue...',
55
+ },
56
+ placeholderMissionSearch: {
57
+ id: 'Search the EU Mission on Adaptation',
58
+ defaultMessage: 'Search the EU Mission on Adaptation',
59
+ },
60
+ });
61
+
46
62
  const applyConfig = (config) => {
47
63
  const env = getEnv();
48
64
 
@@ -172,33 +188,67 @@ const applyConfig = (config) => {
172
188
  {
173
189
  isDefault: false,
174
190
  // to replace search path change path to whatever you want and match with the page in volto website
175
- matchpath: '/en/mission',
176
- path: '/en/mission/advanced-search',
177
- placeholder: 'Search the EU Mission on Adaptation',
178
- description: 'For more search options',
179
- buttonTitle: 'Go to advanced search',
180
- buttonUrl:
181
- 'https://climate-adapt.eea.europa.eu/en/mission/advanced-search/',
191
+ matchpath: /\/([a-z]{2})\/mission/,
192
+ path: ({ currentLang }) => `/${currentLang}/mission/advanced-search`,
193
+ placeholder: ({ intl }) =>
194
+ intl.formatMessage(messages.placeholderMissionSearch),
195
+ description: (
196
+ <FormattedMessage
197
+ id="For more search options"
198
+ defaultMessage="For more search options"
199
+ />
200
+ ),
201
+ buttonTitle: (
202
+ <FormattedMessage
203
+ id="Go to advanced search"
204
+ defaultMessage="Go to advanced search"
205
+ />
206
+ ),
207
+ buttonUrl: ({ currentLang }) =>
208
+ `/${currentLang}/mission/advanced-search/`,
182
209
  },
183
210
  {
184
211
  isDefault: false,
185
212
  // to replace search path change path to whatever you want and match with the page in volto website
186
- matchpath: '/en/observatory',
187
- path: '/en/observatory/advanced-search',
188
- placeholder: 'Search the Observatory Resource Catalogue...',
189
- description: 'Looking for more information?',
190
- buttonTitle: 'Explore more on Climate-ADAPT',
191
- buttonUrl: 'https://climate-adapt.eea.europa.eu/en/data-and-downloads/',
213
+ matchpath: /\/([a-z]{2})\/observatory/,
214
+ path: ({ currentLang }) =>
215
+ `/${currentLang}/observatory/advanced-search`,
216
+ placeholder: ({ intl }) =>
217
+ intl.formatMessage(messages.placeholderObservatorySearch),
218
+ description: (
219
+ <FormattedMessage
220
+ id="Looking for more information?"
221
+ defaultMessage="Looking for more information?"
222
+ />
223
+ ),
224
+ buttonTitle: (
225
+ <FormattedMessage
226
+ id="Explore more on Climate-ADAPT"
227
+ defaultMessage="Explore more on Climate-ADAPT"
228
+ />
229
+ ),
230
+ buttonUrl: ({ currentLang }) => `/${currentLang}/data-and-downloads/`,
192
231
  },
193
232
  {
194
233
  isDefault: true,
195
234
  // to replace search path change path to whatever you want and match with the page in volto website
196
235
  matchpath: '/',
197
- path: '/en/data-and-downloads',
198
- placeholder: 'Search the Climate-ADAPT database',
199
- description: 'Looking for more information?',
200
- buttonTitle: 'Explore more on Climate-ADAPT',
201
- buttonUrl: 'https://climate-adapt.eea.europa.eu/en/data-and-downloads/',
236
+ path: ({ currentLang }) => `/${currentLang}/data-and-downloads`,
237
+ placeholder: ({ intl }) =>
238
+ intl.formatMessage(messages.placeholderClimateSearch),
239
+ description: (
240
+ <FormattedMessage
241
+ id="Looking for more information?"
242
+ defaultMessage="Looking for more information?"
243
+ />
244
+ ),
245
+ buttonTitle: (
246
+ <FormattedMessage
247
+ id="Explore more on Climate-ADAPT"
248
+ defaultMessage="Explore more on Climate-ADAPT"
249
+ />
250
+ ),
251
+ buttonUrl: ({ currentLang }) => `/${currentLang}/data-and-downloads/`,
202
252
  },
203
253
  ],
204
254
  logoTargetUrl: '/',