Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(admin): widget layer dropdown & translation [EP-3654] #403

Merged
merged 1 commit into from
Jan 6, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions packages/earth-admin/src/pages-client/widgets/details.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ export function WidgetsDetail(props: WidgetProps) {
render={({ setIsEditing, setIsLoading, setServerErrors }) => (
<>
<div className="ng-margin-medium-bottom">
<label htmlFor="provider">{t('Widget Layers')}</label>
<label htmlFor="provider">{t('Widget Layer')}</label>
<Controller
as={AsyncSelect}
name="layers"
Expand All @@ -316,8 +316,8 @@ export function WidgetsDetail(props: WidgetProps) {
onChange={([e]) => e}
isClearable={true}
isSearchable={true}
closeMenuOnSelect={false}
placeholder={t('Select Widget Layers')}
closeMenuOnSelect={true}
placeholder={t('Select Widget Layer')}
/>
</div>
</>
Expand All @@ -327,16 +327,16 @@ export function WidgetsDetail(props: WidgetProps) {
{!!layers ? (
<DetailList
data={layers}
name={t('Widget Layers')}
name={t('Widget Layer')}
type="layers"
className="ng-flex-column ng-flex-top"
/>
) : (
<div>
<p className="ng-text-weight-bold ng-margin-small-bottom">
{t('Widget Layers')}
{t('Widget Layer')}
</p>
<span className="ng-padding-left">{t('No layer references')}</span>
<span className="ng-padding-left">{t('No layer reference')}</span>
</div>
)}
</div>
Expand Down
4 changes: 2 additions & 2 deletions packages/earth-admin/src/pages-client/widgets/new.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ export function NewWidget(props: IProps) {
<div className="ng-grid ng-flex-top ng-margin-medium-bottom">
<div className="ng-width-1-2">
<Card className="ng-margin-medium-bottom">
<label htmlFor="provider">{t('Widget Layers')}:</label>
<label htmlFor="provider">{t('Widget Layer')}:</label>
<Controller
as={AsyncSelect}
name="layers"
Expand All @@ -187,7 +187,7 @@ export function NewWidget(props: IProps) {
selectedGroup={selectedGroup}
isClearable={true}
isSearchable={true}
placeholder={t('Select Widget Layers')}
placeholder={t('Select Widget Layer')}
/>
</Card>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.",
Expand Down Expand Up @@ -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",
Expand All @@ -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",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.",
Expand Down Expand Up @@ -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",
Expand All @@ -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",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.",
Expand Down Expand Up @@ -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",
Expand All @@ -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",
Expand Down