From 30b0cef0ae67a8429548d924cc1b7b37023e9115 Mon Sep 17 00:00:00 2001 From: Bogdan Bruma Date: Wed, 6 Jan 2021 10:37:05 +0200 Subject: [PATCH] fix(admin): widget layer dropdown & translation [EP-3654] --- .../earth-admin/src/pages-client/widgets/details.tsx | 12 ++++++------ .../earth-admin/src/pages-client/widgets/new.tsx | 4 ++-- .../src/translations/en/admin.translation.json | 3 +++ .../src/translations/es/admin.translation.json | 3 +++ .../src/translations/fr/admin.translation.json | 3 +++ 5 files changed, 17 insertions(+), 8 deletions(-) diff --git a/packages/earth-admin/src/pages-client/widgets/details.tsx b/packages/earth-admin/src/pages-client/widgets/details.tsx index b2eb40ab..72098625 100644 --- a/packages/earth-admin/src/pages-client/widgets/details.tsx +++ b/packages/earth-admin/src/pages-client/widgets/details.tsx @@ -301,7 +301,7 @@ export function WidgetsDetail(props: WidgetProps) { render={({ setIsEditing, setIsLoading, setServerErrors }) => ( <>
- + e} isClearable={true} isSearchable={true} - closeMenuOnSelect={false} - placeholder={t('Select Widget Layers')} + closeMenuOnSelect={true} + placeholder={t('Select Widget Layer')} />
@@ -327,16 +327,16 @@ export function WidgetsDetail(props: WidgetProps) { {!!layers ? ( ) : (

- {t('Widget Layers')} + {t('Widget Layer')}

- {t('No layer references')} + {t('No layer reference')}
)} diff --git a/packages/earth-admin/src/pages-client/widgets/new.tsx b/packages/earth-admin/src/pages-client/widgets/new.tsx index 4ce6acba..a9ce0b33 100644 --- a/packages/earth-admin/src/pages-client/widgets/new.tsx +++ b/packages/earth-admin/src/pages-client/widgets/new.tsx @@ -174,7 +174,7 @@ export function NewWidget(props: IProps) {
- +
diff --git a/packages/earth-shared/src/translations/en/admin.translation.json b/packages/earth-shared/src/translations/en/admin.translation.json index fd9811bb..b2ee426e 100644 --- a/packages/earth-shared/src/translations/en/admin.translation.json +++ b/packages/earth-shared/src/translations/en/admin.translation.json @@ -90,6 +90,7 @@ "New Widget": "New Widget", "No dashboard widgets": "No dashboard widgets", "No description": "No description", + "No layer reference": "No layer reference", "No layer references": "No layer references", "No organisations available": "No organisations available", "Only lowercase alphanumeric characters and hyphens allowed": "Only lowercase alphanumeric characters and hyphens allowed.", @@ -150,6 +151,7 @@ "Select metric slug": "Select metric slug", "Select place type": "Select place type", "Select role": "Select role", + "Select Widget Layer": "Select layer", "Select Widget Layers": "Select layer(s)", "Select widgets": "Select widgets", "Shape File": "Shape File", @@ -176,6 +178,7 @@ "Welcome to org admin": "Welcome to the {{value}} Admin!", "widget": "widget", "Widget Config": "Widget Config", + "Widget Layer": "Widget Layer", "Widget Layers": "Widget Layer(s)", "Widget slug": "Widget slug", "Widget slug is required": "Widget slug is required", diff --git a/packages/earth-shared/src/translations/es/admin.translation.json b/packages/earth-shared/src/translations/es/admin.translation.json index 22a7bf14..731fa24e 100644 --- a/packages/earth-shared/src/translations/es/admin.translation.json +++ b/packages/earth-shared/src/translations/es/admin.translation.json @@ -90,6 +90,7 @@ "New Widget": "Nuevo Widget", "No dashboard widgets": "Sin widgets de panel", "No description": "Sin descripción", + "No layer reference": "Sin referencia de capa", "No layer references": "Sin referencias de capa", "No organisations available": "No hay organizaciones disponibles", "Only lowercase alphanumeric characters and hyphens allowed": "Solo se permiten guiones y caracteres alfanuméricos en minúscula.", @@ -150,6 +151,7 @@ "Select metric slug": "Seleccionar slug métrico", "Select place type": "Seleccionar tipo de lugar", "Select role": "Seleccionar rol", + "Select Widget Layer": "Seleccionar capa", "Select Widget Layers": "Seleccionar capa(s)", "Select widgets": "Seleccionar widgets", "Shape File": "Archivo de forma", @@ -176,6 +178,7 @@ "Welcome to org admin": "Bienvenido al administrador de {{value}}!", "widget": "widget", "Widget Config": "Configuración de widget", + "Widget Layer": "Capa de widget", "Widget Layers": "Capa(s) de widget", "Widget slug": "El slug de widget", "Widget slug is required": "Se requiere widgets slug", diff --git a/packages/earth-shared/src/translations/fr/admin.translation.json b/packages/earth-shared/src/translations/fr/admin.translation.json index a9ce6233..45c003c2 100644 --- a/packages/earth-shared/src/translations/fr/admin.translation.json +++ b/packages/earth-shared/src/translations/fr/admin.translation.json @@ -90,6 +90,7 @@ "New Widget": "Nouveau widget", "No dashboard widgets": "Pas de widgets de tableau de bord", "No description": "Pas de description", + "No layer reference": "Aucune référence de calque", "No layer references": "Aucune référence de calque", "No organisations available": "Aucune organisation disponible", "Only lowercase alphanumeric characters and hyphens allowed": "Seuls les caractères alphanumériques minuscules et les traits d'union sont autorisés.", @@ -150,6 +151,7 @@ "Select metric slug": "Sélectionnez le slug métrique", "Select place type": "Sélectionnez le type de lieu", "Select role": "Sélectionnez un rôle", + "Select Widget Layer": "Sélectionnez le calque", "Select Widget Layers": "Sélectionnez le(s) calque(s)", "Select widgets": "Sélectionnez des widgets", "Shape File": "Fichier de forme", @@ -176,6 +178,7 @@ "Welcome to org admin": "Bienvenue dans l’administrateur de {{value}}!", "widget": "widget", "Widget Config": "Configuration du widget", + "Widget Layer": "Couche de widget", "Widget Layers": "Couche(s) de widget", "Widget slug": "Widget slug", "Widget slug is required": "Le slug de widget est requis",