-
Type: Improvement
-
Status: Open
-
Priority: Minor
-
Resolution: Unresolved
-
Affects Version/s: None
-
Fix Version/s: 11.x
-
Component/s: Translations, Web UI
-
Tags:
People trying to reproduce the default Web UI search and extending it in Studio go through some pain points:
- Web UI uses naming conventions that look like "last24h"
- Studio uses conventions that will generate "from_now-24H_to_now" for the same thing in order to prevent collisions
=> as a result, customers have to dig into the Web UI source code to see what are the keys being used, and copy them into Designer.
We need to align the default search aggregates label keys so that the default web ui keys can be used out of the box in studio and overridden if needed.
Typically:
fox@fox-xps:~/workspace/nuxeo$ git diff diff --git i/nuxeo-features/nuxeo-search/nuxeo-search-core/src/main/resources/OSGI-INF/search-pageprovider-contrib.xml w/nuxeo-features/nuxeo-search/nuxeo-search-core/src/main/resources/OSGI-INF/search-pageprovider-contrib.xml index 289edcefc39..923533dbe0a 100644 --- i/nuxeo-features/nuxeo-search/nuxeo-search-core/src/main/resources/OSGI-INF/search-pageprovider-contrib.xml +++ w/nuxeo-features/nuxeo-search/nuxeo-search-core/src/main/resources/OSGI-INF/search-pageprovider-contrib.xml @@ -90,7 +90,7 @@ <property name="format">"dd-MM-yyyy"</property> </properties> <dateRanges> - <dateRange key="last24h" fromDate="now-24H" toDate="now"/> + <dateRange key="from_now-24H_to_now" fromDate="now-24H" toDate="now"/> <dateRange key="lastWeek" fromDate="now-7d" toDate="now-24H"/> <dateRange key="lastMonth" fromDate="now-1M" toDate="now-7d"/> <dateRange key="lastYear" fromDate="now-1y" toDate="now-1M"/>
and
fox@fox-xps:~/workspace/nuxeo-web-ui$ git diff i18n/messages.json diff --git i/i18n/messages.json w/i18n/messages.json index ae5e626b519..96a236f6eac 100644 --- i/i18n/messages.json +++ w/i18n/messages.json @@ -756,7 +756,7 @@ "label.ui.aggregate.from_500_to_1500_px": "Between 500 px and 1,500 px", "label.ui.aggregate.from_600_to_1800_s": "Between 600 s and 1,800 s", "label.ui.aggregate.huge": "More than 100 MB", - "label.ui.aggregate.last24h": "Last 24h", + "label.ui.aggregate.from_now-24H_to_now": "Last 24h", "label.ui.aggregate.lastMonth": "Last month", "label.ui.aggregate.lastWeek": "Last week", "label.ui.aggregate.lastYear": "Last year",
Other default search options as generated by Studio are:
"label.ui.aggregate.from_now-1M_to_now-7d": "Last month", "label.ui.aggregate.from_now-7d_to_now-24H": "Last week", "label.ui.aggregate.from_now-1y_to_now-1M": "Last year"
Think about other existing translated locales