From 381f365b1759d0a874db349d0ed8f234ce4b6039 Mon Sep 17 00:00:00 2001 From: Natanael Fernandes Date: Thu, 18 May 2023 19:07:40 -0300 Subject: [PATCH 1/2] feat: add new prop and set up translations --- messages/context.json | 1 + messages/en.json | 1 + messages/pt.json | 1 + react/components/admin/pages/Form/SelectConditions.tsx | 3 +++ react/components/admin/pages/Form/messages.tsx | 5 +++++ 5 files changed, 11 insertions(+) diff --git a/messages/context.json b/messages/context.json index 03003442b..49ee08e33 100644 --- a/messages/context.json +++ b/messages/context.json @@ -61,6 +61,7 @@ "admin/pages.admin.pages.form.templates.simple.conditions.operator-and": "admin/pages.admin.pages.form.templates.simple.conditions.operator-and", "admin/pages.admin.pages.form.templates.simple.conditions.operator-any": "admin/pages.admin.pages.form.templates.simple.conditions.operator-any", "admin/pages.admin.pages.form.templates.simple.conditions.operator-or": "admin/pages.admin.pages.form.templates.simple.conditions.operator-or", + "admin/pages.admin.pages.form.templates.simple.conditions.empty-conditions-options": "admin/pages.admin.pages.form.templates.simple.conditions.empty-conditions-options", "admin/pages.admin.pages.form.templates.title": "admin/pages.admin.pages.form.templates.title", "admin/pages.admin.pages.form.title.new": "admin/pages.admin.pages.form.title.new", "admin/pages.admin.pages.list.button.create": "admin/pages.admin.pages.list.button.create", diff --git a/messages/en.json b/messages/en.json index 5c7501fcd..faa52a703 100644 --- a/messages/en.json +++ b/messages/en.json @@ -61,6 +61,7 @@ "admin/pages.admin.pages.form.templates.simple.conditions.operator-and": "and", "admin/pages.admin.pages.form.templates.simple.conditions.operator-any": "any", "admin/pages.admin.pages.form.templates.simple.conditions.operator-or": "or", + "admin/pages.admin.pages.form.templates.simple.conditions.empty-conditions-options": "No options", "admin/pages.admin.pages.form.templates.title": "Templates", "admin/pages.admin.pages.form.title.new": "New Page", "admin/pages.admin.pages.list.button.create": "Create New", diff --git a/messages/pt.json b/messages/pt.json index 75ed08dc0..386d850c0 100644 --- a/messages/pt.json +++ b/messages/pt.json @@ -61,6 +61,7 @@ "admin/pages.admin.pages.form.templates.simple.conditions.operator-and": "e", "admin/pages.admin.pages.form.templates.simple.conditions.operator-any": "qualquer uma das", "admin/pages.admin.pages.form.templates.simple.conditions.operator-or": "ou", + "admin/pages.admin.pages.form.templates.simple.conditions.empty-conditions-options": "Sem opções", "admin/pages.admin.pages.form.templates.title": "Templates", "admin/pages.admin.pages.form.title.new": "Nova página", "admin/pages.admin.pages.list.button.create": "Criar página", diff --git a/react/components/admin/pages/Form/SelectConditions.tsx b/react/components/admin/pages/Form/SelectConditions.tsx index 82e101aab..d9c9a5ec7 100644 --- a/react/components/admin/pages/Form/SelectConditions.tsx +++ b/react/components/admin/pages/Form/SelectConditions.tsx @@ -99,6 +99,9 @@ class SelectConditions extends React.Component { subjectPlaceholder={this.props.intl.formatMessage( messages.subjectPlaceholder )} + noOptionsMessage={this.props.intl.formatMessage( + messages.emptyConditionsOptions + )} statements={this.props.condition.statements} operator={this.props.operator} onChangeOperator={this.handleToggleOperator} diff --git a/react/components/admin/pages/Form/messages.tsx b/react/components/admin/pages/Form/messages.tsx index d32dcf542..ce63398b1 100644 --- a/react/components/admin/pages/Form/messages.tsx +++ b/react/components/admin/pages/Form/messages.tsx @@ -65,4 +65,9 @@ export const messages = defineMessages({ id: 'admin/pages.admin.pages.form.templates.simple.conditions.category-placeholder', }, + emptyConditionsOptions: { + defaultMessage: 'No options', + id: + 'admin/pages.admin.pages.form.templates.simple.conditions.empty-conditions-options', + }, }) From be0a7d49c80c7f2db739fd67d7a15195567862c0 Mon Sep 17 00:00:00 2001 From: Camila Vieira Coutinho Date: Fri, 26 May 2023 18:20:48 -0300 Subject: [PATCH 2/2] add new translations --- messages/bg.json | 1 + messages/de.json | 1 + messages/en.json | 2 +- messages/es.json | 1 + messages/fr.json | 1 + messages/it.json | 1 + messages/ja.json | 1 + messages/ko.json | 1 + messages/nl.json | 1 + messages/pt.json | 2 +- messages/ro.json | 1 + messages/th.json | 1 + 12 files changed, 12 insertions(+), 2 deletions(-) diff --git a/messages/bg.json b/messages/bg.json index 43ccc346c..5e220cb08 100644 --- a/messages/bg.json +++ b/messages/bg.json @@ -61,6 +61,7 @@ "admin/pages.admin.pages.form.templates.simple.conditions.operator-and": "и", "admin/pages.admin.pages.form.templates.simple.conditions.operator-any": "което и да е", "admin/pages.admin.pages.form.templates.simple.conditions.operator-or": "или", + "admin/pages.admin.pages.form.templates.simple.conditions.empty-conditions-options": "Няма намерени опции", "admin/pages.admin.pages.form.templates.title": "Шаблони", "admin/pages.admin.pages.form.title.new": "Нова страница", "admin/pages.admin.pages.list.button.create": "Създаване на нов", diff --git a/messages/de.json b/messages/de.json index 5a2f9929c..b759d9d5b 100644 --- a/messages/de.json +++ b/messages/de.json @@ -61,6 +61,7 @@ "admin/pages.admin.pages.form.templates.simple.conditions.operator-and": "und", "admin/pages.admin.pages.form.templates.simple.conditions.operator-any": "alle", "admin/pages.admin.pages.form.templates.simple.conditions.operator-or": "oder", + "admin/pages.admin.pages.form.templates.simple.conditions.empty-conditions-options": "Es wurden keine Optionen gefunden", "admin/pages.admin.pages.form.templates.title": "Vorlagen", "admin/pages.admin.pages.form.title.new": "Neue Seite", "admin/pages.admin.pages.list.button.create": "Neue erstellen", diff --git a/messages/en.json b/messages/en.json index faa52a703..cf9c90292 100644 --- a/messages/en.json +++ b/messages/en.json @@ -61,7 +61,7 @@ "admin/pages.admin.pages.form.templates.simple.conditions.operator-and": "and", "admin/pages.admin.pages.form.templates.simple.conditions.operator-any": "any", "admin/pages.admin.pages.form.templates.simple.conditions.operator-or": "or", - "admin/pages.admin.pages.form.templates.simple.conditions.empty-conditions-options": "No options", + "admin/pages.admin.pages.form.templates.simple.conditions.empty-conditions-options": "No options found", "admin/pages.admin.pages.form.templates.title": "Templates", "admin/pages.admin.pages.form.title.new": "New Page", "admin/pages.admin.pages.list.button.create": "Create New", diff --git a/messages/es.json b/messages/es.json index 7af498603..51715924b 100644 --- a/messages/es.json +++ b/messages/es.json @@ -61,6 +61,7 @@ "admin/pages.admin.pages.form.templates.simple.conditions.operator-and": "y", "admin/pages.admin.pages.form.templates.simple.conditions.operator-any": "cualquiera de las", "admin/pages.admin.pages.form.templates.simple.conditions.operator-or": "o", + "admin/pages.admin.pages.form.templates.simple.conditions.empty-conditions-options": "No hay opciones", "admin/pages.admin.pages.form.templates.title": "Templates", "admin/pages.admin.pages.form.title.new": "Nueva página", "admin/pages.admin.pages.list.button.create": "Crear nueva", diff --git a/messages/fr.json b/messages/fr.json index ec3ef393b..11285711e 100644 --- a/messages/fr.json +++ b/messages/fr.json @@ -61,6 +61,7 @@ "admin/pages.admin.pages.form.templates.simple.conditions.operator-and": "et", "admin/pages.admin.pages.form.templates.simple.conditions.operator-any": "chaque", "admin/pages.admin.pages.form.templates.simple.conditions.operator-or": "ou", + "admin/pages.admin.pages.form.templates.simple.conditions.empty-conditions-options": "Aucune option trouvée", "admin/pages.admin.pages.form.templates.title": "Modèles", "admin/pages.admin.pages.form.title.new": "Nouvelle page", "admin/pages.admin.pages.list.button.create": "Créer nouvelle", diff --git a/messages/it.json b/messages/it.json index 2ca3c0860..838ad0c3e 100644 --- a/messages/it.json +++ b/messages/it.json @@ -61,6 +61,7 @@ "admin/pages.admin.pages.form.templates.simple.conditions.operator-and": "e", "admin/pages.admin.pages.form.templates.simple.conditions.operator-any": "nessuna delle", "admin/pages.admin.pages.form.templates.simple.conditions.operator-or": "o", + "admin/pages.admin.pages.form.templates.simple.conditions.empty-conditions-options": "Nessuna informazione trovata", "admin/pages.admin.pages.form.templates.title": "Template", "admin/pages.admin.pages.form.title.new": "Nuova pagina", "admin/pages.admin.pages.list.button.create": "Crea nuova pagina", diff --git a/messages/ja.json b/messages/ja.json index 498e5c367..f3f9478f7 100644 --- a/messages/ja.json +++ b/messages/ja.json @@ -61,6 +61,7 @@ "admin/pages.admin.pages.form.templates.simple.conditions.operator-and": "および", "admin/pages.admin.pages.form.templates.simple.conditions.operator-any": "いずれか", "admin/pages.admin.pages.form.templates.simple.conditions.operator-or": "または", + "admin/pages.admin.pages.form.templates.simple.conditions.empty-conditions-options": "No options found", "admin/pages.admin.pages.form.templates.title": "テンプレート", "admin/pages.admin.pages.form.title.new": "新しいページ", "admin/pages.admin.pages.list.button.create": "ページを作成する", diff --git a/messages/ko.json b/messages/ko.json index 477f0ed80..457cdfc8a 100644 --- a/messages/ko.json +++ b/messages/ko.json @@ -61,6 +61,7 @@ "admin/pages.admin.pages.form.templates.simple.conditions.operator-and": "및", "admin/pages.admin.pages.form.templates.simple.conditions.operator-any": "일부", "admin/pages.admin.pages.form.templates.simple.conditions.operator-or": "혹은", + "admin/pages.admin.pages.form.templates.simple.conditions.empty-conditions-options": "옵션을 찾을 수 없음", "admin/pages.admin.pages.form.templates.title": "템플릿", "admin/pages.admin.pages.form.title.new": "새 페이지", "admin/pages.admin.pages.list.button.create": "새로 만들기", diff --git a/messages/nl.json b/messages/nl.json index 88d8f6362..939f33d9a 100644 --- a/messages/nl.json +++ b/messages/nl.json @@ -61,6 +61,7 @@ "admin/pages.admin.pages.form.templates.simple.conditions.operator-and": "en", "admin/pages.admin.pages.form.templates.simple.conditions.operator-any": "elke", "admin/pages.admin.pages.form.templates.simple.conditions.operator-or": "of", + "admin/pages.admin.pages.form.templates.simple.conditions.empty-conditions-options": "Geen opties gevonden", "admin/pages.admin.pages.form.templates.title": "Sjablonen", "admin/pages.admin.pages.form.title.new": "Nieuwe pagina", "admin/pages.admin.pages.list.button.create": "Nieuwe aanmaken", diff --git a/messages/pt.json b/messages/pt.json index 386d850c0..59384e7ef 100644 --- a/messages/pt.json +++ b/messages/pt.json @@ -61,7 +61,7 @@ "admin/pages.admin.pages.form.templates.simple.conditions.operator-and": "e", "admin/pages.admin.pages.form.templates.simple.conditions.operator-any": "qualquer uma das", "admin/pages.admin.pages.form.templates.simple.conditions.operator-or": "ou", - "admin/pages.admin.pages.form.templates.simple.conditions.empty-conditions-options": "Sem opções", + "admin/pages.admin.pages.form.templates.simple.conditions.empty-conditions-options": "Nenhuma opção encontrada", "admin/pages.admin.pages.form.templates.title": "Templates", "admin/pages.admin.pages.form.title.new": "Nova página", "admin/pages.admin.pages.list.button.create": "Criar página", diff --git a/messages/ro.json b/messages/ro.json index 4c4cd3742..77eafcad4 100644 --- a/messages/ro.json +++ b/messages/ro.json @@ -61,6 +61,7 @@ "admin/pages.admin.pages.form.templates.simple.conditions.operator-and": "și", "admin/pages.admin.pages.form.templates.simple.conditions.operator-any": "oricare", "admin/pages.admin.pages.form.templates.simple.conditions.operator-or": "sau", + "admin/pages.admin.pages.form.templates.simple.conditions.empty-conditions-options": "Nu s-au găsit opțiuni", "admin/pages.admin.pages.form.templates.title": "Template-uri", "admin/pages.admin.pages.form.title.new": "Pagină nouă", "admin/pages.admin.pages.list.button.create": "Creează o pagină nouă", diff --git a/messages/th.json b/messages/th.json index e36634483..f643c57b7 100644 --- a/messages/th.json +++ b/messages/th.json @@ -61,6 +61,7 @@ "admin/pages.admin.pages.form.templates.simple.conditions.operator-and": "และ", "admin/pages.admin.pages.form.templates.simple.conditions.operator-any": "ใด ๆ", "admin/pages.admin.pages.form.templates.simple.conditions.operator-or": "หรือ", + "admin/pages.admin.pages.form.templates.simple.conditions.empty-conditions-options": "ไม่พบตัวเลือก", "admin/pages.admin.pages.form.templates.title": "แม่แบบ", "admin/pages.admin.pages.form.title.new": "หน้าใหม่", "admin/pages.admin.pages.list.button.create": "สร้างใหม่",