From bbee0518da162f3da7fcd211a2a1480656f8348f Mon Sep 17 00:00:00 2001 From: Alberto Casado Torres Date: Tue, 25 Jun 2024 15:39:34 +0200 Subject: [PATCH] Added extended info for multivalue suggestions in IX (#6931) * Added extended info for multivalue suggestions in IX * updated translations --- app/react/App/styles/globals.css | 10 +++++ .../Settings/IX/components/TableElements.tsx | 40 ++++++++++++++++--- contents/ui-translations/ar.csv | 4 ++ contents/ui-translations/en.csv | 4 ++ contents/ui-translations/es.csv | 4 ++ contents/ui-translations/fr.csv | 4 ++ contents/ui-translations/ko.csv | 4 ++ contents/ui-translations/my.csv | 4 ++ contents/ui-translations/ru.csv | 4 ++ contents/ui-translations/th.csv | 4 ++ contents/ui-translations/tr.csv | 4 ++ 11 files changed, 81 insertions(+), 5 deletions(-) diff --git a/app/react/App/styles/globals.css b/app/react/App/styles/globals.css index a8fbbef5fa..2194eeb4ac 100644 --- a/app/react/App/styles/globals.css +++ b/app/react/App/styles/globals.css @@ -3434,6 +3434,11 @@ input[type="range"]::-ms-fill-lower { color: rgb(49 196 141 / var(--tw-text-opacity)); } +.text-green-500 { + --tw-text-opacity: 1; + color: rgb(14 159 110 / var(--tw-text-opacity)); +} + .text-green-600 { --tw-text-opacity: 1; color: rgb(5 122 85 / var(--tw-text-opacity)); @@ -3534,6 +3539,11 @@ input[type="range"]::-ms-fill-lower { color: rgb(114 59 19 / var(--tw-text-opacity)); } +.text-orange-500 { + --tw-text-opacity: 1; + color: rgb(255 90 31 / var(--tw-text-opacity)); +} + .underline { text-decoration-line: underline; } diff --git a/app/react/V2/Routes/Settings/IX/components/TableElements.tsx b/app/react/V2/Routes/Settings/IX/components/TableElements.tsx index 37fc23a2c9..b953b91a8a 100644 --- a/app/react/V2/Routes/Settings/IX/components/TableElements.tsx +++ b/app/react/V2/Routes/Settings/IX/components/TableElements.tsx @@ -53,7 +53,7 @@ const ActionHeader = () => Action; const PropertyCell = ({ cell }: CellContext) => { const property = cell.getValue(); return ( -
+
{propertyIcons[property]}

{cell.row.original.propertyLabel}

@@ -68,10 +68,40 @@ const CurrentValueCell = ({ allProperties: ClientPropertySchema[]; }) => { if ('children' in cell.row.original) { + const suggestions = cell.row.original.children; + const ammountOfSuggestions = suggestions.length; + const amountOfValues = suggestions.filter(suggestion => suggestion.currentValue).length; + const amountOfMatches = suggestions.filter(s => s.currentValue === s.suggestedValue).length; + const amountOfMissmatches = ammountOfSuggestions - amountOfMatches; + return ( - - {cell.row.original.children.length} Suggestions - +
+ + {amountOfValues} values + + | + + {ammountOfSuggestions} suggestions + + {amountOfMatches > 0 && ( + <> + | + + {amountOfMatches}{' '} + matching + + + )} + {amountOfMissmatches > 0 && ( + <> + | + + {amountOfMissmatches}{' '} + mismatching + + + )} +
); } return ( @@ -94,7 +124,7 @@ const AcceptButton = ({ const suggestionHasEntity = Boolean(cell.row.original.entityId); if (color === 'green') { - return
{getIcon(color)}
; + return
{getIcon(color)}
; } return ( diff --git a/contents/ui-translations/ar.csv b/contents/ui-translations/ar.csv index a88f3782be..b9fc75435c 100644 --- a/contents/ui-translations/ar.csv +++ b/contents/ui-translations/ar.csv @@ -467,6 +467,7 @@ Maps,خرائط Mark as Reviewed,ضع علامة للإشارة إلى خضوعه للمراجعة Markdown,ماركداون Matching,Matching +matching,matching Matomo,Matomo Members,أعضاء Menu,قائمة التحكم @@ -478,6 +479,7 @@ Metadata Extraction,استخلاص البيانات الوصفية MIGRATE,MIGRATE Minimum,الحد الأدنى mismatched passwords,Passwords don't match +mismatching,mismatching Mixed access,وصول مختلط ML TOC,ML TOC Month,شهر @@ -769,6 +771,7 @@ Suggestion,Suggestion Suggestion accepted.,Suggestion accepted. Suggestion:,Suggestion: Suggestions,اقتراحات +suggestions,suggestions Supporting files,ملفات الدعم Synced template,Synced template syncedTemplateEditorMessage,This template is synced from another instance. Only entity view page can be enabled. @@ -910,6 +913,7 @@ Uwazi is developed by,أوازي من إعداد: Uwazi UI,واجهة استخدام أوازي Value,قيمة Value cannot be transformed to the correct type,Value cannot be transformed to the correct type +values,values Verify,تحقق Verifying...,تحقق.. View,عرض diff --git a/contents/ui-translations/en.csv b/contents/ui-translations/en.csv index 4672d16782..035a04887d 100644 --- a/contents/ui-translations/en.csv +++ b/contents/ui-translations/en.csv @@ -470,6 +470,7 @@ Maps,Maps Mark as Reviewed,Mark as Reviewed Markdown,Markdown Matching,Matching +matching,matching Matomo,Matomo Members,Members Menu,Menu @@ -481,6 +482,7 @@ Metadata Extraction,Metadata Extraction MIGRATE,MIGRATE Minimum,Minimum mismatched passwords,Passwords don't match +mismatching,mismatching Mixed access,Mixed access ML TOC,ML TOC Month,Month @@ -772,6 +774,7 @@ Suggestion,Suggestion Suggestion accepted.,Suggestion accepted. Suggestion:,Suggestion: Suggestions,Suggestions +suggestions,suggestions Supporting files,Supporting files Synced template,Synced template syncedTemplateEditorMessage,This template is synced from another instance. Only entity view page can be enabled. @@ -913,6 +916,7 @@ Uwazi is developed by,Uwazi is developed by Uwazi UI,Uwazi UI Value,Value Value cannot be transformed to the correct type,Value cannot be transformed to the correct type +values,values Verify,Verify Verifying...,Verifying... View,View diff --git a/contents/ui-translations/es.csv b/contents/ui-translations/es.csv index e501bdd776..352a803101 100644 --- a/contents/ui-translations/es.csv +++ b/contents/ui-translations/es.csv @@ -466,6 +466,7 @@ Maps,Mapas Mark as Reviewed,Marcar como Revisado Markdown,Markdown Matching,Coincidencia +matching,matching Matomo,Matomo Members,Miembros Menu,Menú @@ -477,6 +478,7 @@ Metadata Extraction,Extracción de metadatos MIGRATE,MIGRAR Minimum,Mínimo mismatched passwords,Las contraseñas no coinciden +mismatching,mismatching Mixed access,Acceso mixto ML TOC,ML TdC Month,Mes @@ -768,6 +770,7 @@ Suggestion,Sugerencia Suggestion accepted.,Suggestion accepted. Suggestion:,Suggestion: Suggestions,Sugerencias +suggestions,suggestions Supporting files,Archivos de soporte Synced template,Plantilla sincronizada syncedTemplateEditorMessage,Esta plantilla esta sincronizada desde otra instancia. Solo se puede habilitar la página de vista de entidad. @@ -908,6 +911,7 @@ Uwazi is developed by,Uwazi es desarrollado por Uwazi UI,Uwazi UI Value,valor Value cannot be transformed to the correct type,Value cannot be transformed to the correct type +values,values Verify,Verificar Verifying...,Verificando View,Ver diff --git a/contents/ui-translations/fr.csv b/contents/ui-translations/fr.csv index 3a44201bf2..3f85b08171 100644 --- a/contents/ui-translations/fr.csv +++ b/contents/ui-translations/fr.csv @@ -467,6 +467,7 @@ Maps,Maps Mark as Reviewed,Mark as Reviewed Markdown,Markdown Matching,Matching +matching,matching Matomo,Matomo Members,Members Menu,Menu @@ -478,6 +479,7 @@ Metadata Extraction,Metadata Extraction MIGRATE,MIGRATE Minimum,Minimum mismatched passwords,Passwords don't match +mismatching,mismatching Mixed access,Mixed access ML TOC,ML TOC Month,Month @@ -769,6 +771,7 @@ Suggestion,Suggestion Suggestion accepted.,Suggestion accepted. Suggestion:,Suggestion: Suggestions,Suggestions +suggestions,suggestions Supporting files,Fichiers de support Synced template,Synced template syncedTemplateEditorMessage,This template is synced from another instance. Only entity view page can be enabled. @@ -910,6 +913,7 @@ Uwazi is developed by,Uwazi est développé par Uwazi UI,Interface utilisateur d'Uwazi Value,Value Value cannot be transformed to the correct type,Value cannot be transformed to the correct type +values,values Verify,Vérifier Verifying...,En cours de vérification... View,Vue diff --git a/contents/ui-translations/ko.csv b/contents/ui-translations/ko.csv index 2408a616d0..d4e8e55151 100644 --- a/contents/ui-translations/ko.csv +++ b/contents/ui-translations/ko.csv @@ -468,6 +468,7 @@ Maps,지도 Mark as Reviewed,검토 완료로 표시 Markdown,Markdown Matching,Matching +matching,matching Matomo,Matomo Members,멤버 Menu,메뉴 @@ -479,6 +480,7 @@ Metadata Extraction,메타데이터 추출 MIGRATE,MIGRATE Minimum,최소 mismatched passwords,Passwords don't match +mismatching,mismatching Mixed access,혼합 접근 ML TOC,ML TOC Month,월 @@ -770,6 +772,7 @@ Suggestion,Suggestion Suggestion accepted.,Suggestion accepted. Suggestion:,Suggestion: Suggestions,자동 제안 +suggestions,suggestions Supporting files,추가 파일 Synced template,Synced template syncedTemplateEditorMessage,This template is synced from another instance. Only entity view page can be enabled. @@ -911,6 +914,7 @@ Uwazi is developed by,Uwazi 제작 및 개발: Uwazi UI,Uwazi UI Value,Value Value cannot be transformed to the correct type,Value cannot be transformed to the correct type +values,values Verify,검증 Verifying...,검증 중 View,보기 diff --git a/contents/ui-translations/my.csv b/contents/ui-translations/my.csv index a5396e6c8d..c30f78356e 100644 --- a/contents/ui-translations/my.csv +++ b/contents/ui-translations/my.csv @@ -468,6 +468,7 @@ Maps,မြေပုံများ Mark as Reviewed,သုံးသပ်ပြီးဟု မှတ်ရန် Markdown,အမှတ်အသား Matching,Matching +matching,matching Matomo,Matomo Members,အဖွဲ့ဝင်များ Menu,မီနူး @@ -479,6 +480,7 @@ Metadata Extraction,မီတာဒေတာ ထုတ်ယူခြင်း MIGRATE,MIGRATE Minimum,အနည်းဆုံး mismatched passwords,Passwords don't match +mismatching,mismatching Mixed access,ရောထားသော ဝင်ရောက်သုံးစွဲမှု ML TOC,ML TOC Month,လ @@ -770,6 +772,7 @@ Suggestion,Suggestion Suggestion accepted.,Suggestion accepted. Suggestion:,Suggestion: Suggestions,အကြံပြုချက်များ +suggestions,suggestions Supporting files,အထောက်အကူပြုဖိုင်များ Synced template,Synced template syncedTemplateEditorMessage,This template is synced from another instance. Only entity view page can be enabled. @@ -911,6 +914,7 @@ Uwazi is developed by,Uwazi ကို တီထွင်ရေးသားသူ Uwazi UI,Uwazi UI Value,Value Value cannot be transformed to the correct type,Value cannot be transformed to the correct type +values,values Verify,မှန်ကန်ကြောင်း စစ်ဆေးရန် Verifying...,မှန်ကန်ကြောင်း စစ်ဆေးဆဲ... View,ကြည့်ရန် diff --git a/contents/ui-translations/ru.csv b/contents/ui-translations/ru.csv index 241d9fcc22..733bb8e257 100644 --- a/contents/ui-translations/ru.csv +++ b/contents/ui-translations/ru.csv @@ -465,6 +465,7 @@ Maps,Карты Mark as Reviewed,Отметить как Просмотрено Markdown,Markdown Matching,Matching +matching,matching Matomo,Matomo Members,Участники Menu,Меню @@ -476,6 +477,7 @@ Metadata Extraction,Извлечение метаданных MIGRATE,MIGRATE Minimum,Минимум mismatched passwords,Passwords don't match +mismatching,mismatching Mixed access,Доступ смешанного типа ML TOC,Оглавление для машинного обучения Month,Месяц @@ -767,6 +769,7 @@ Suggestion,Suggestion Suggestion accepted.,Suggestion accepted. Suggestion:,Suggestion: Suggestions,Предлагаемые варианты +suggestions,suggestions Supporting files,Сопроводительные файлы Synced template,Synced template syncedTemplateEditorMessage,This template is synced from another instance. Only entity view page can be enabled. @@ -908,6 +911,7 @@ Uwazi is developed by,Uwazi разработан Uwazi UI,Uwazi UI Value,Value Value cannot be transformed to the correct type,Value cannot be transformed to the correct type +values,values Verify,Верифицировать Verifying...,Верифицирование... View,Просмотреть diff --git a/contents/ui-translations/th.csv b/contents/ui-translations/th.csv index 680872e7e8..10a4821d2b 100644 --- a/contents/ui-translations/th.csv +++ b/contents/ui-translations/th.csv @@ -468,6 +468,7 @@ Maps,แผนที่ Mark as Reviewed,ได้ตรวจสอบแล้ว Markdown,การทำเครื่องหมาย Matching,Matching +matching,matching Matomo,Matomo Members,สมาชิก Menu,เมนู @@ -479,6 +480,7 @@ Metadata Extraction,ค้นหาเมตาดาต้า MIGRATE,MIGRATE Minimum,ขั้นต่ำ mismatched passwords,Passwords don't match +mismatching,mismatching Mixed access,การเข้าถึงแบบผสม ML TOC,ML TOC Month,เดือน @@ -770,6 +772,7 @@ Suggestion,Suggestion Suggestion accepted.,Suggestion accepted. Suggestion:,Suggestion: Suggestions,คำแนะนำ +suggestions,suggestions Supporting files,รองรับไฟล์ Synced template,Synced template syncedTemplateEditorMessage,This template is synced from another instance. Only entity view page can be enabled. @@ -911,6 +914,7 @@ Uwazi is developed by,Uwazi ได้รับการพัฒนาโดย Uwazi UI,uwazi ui Value,Value Value cannot be transformed to the correct type,Value cannot be transformed to the correct type +values,values Verify,ตรวจสอบ Verifying...,กำลังตรวจสอบ.... View,ดู diff --git a/contents/ui-translations/tr.csv b/contents/ui-translations/tr.csv index 0b4d6ba5d7..508a684410 100644 --- a/contents/ui-translations/tr.csv +++ b/contents/ui-translations/tr.csv @@ -468,6 +468,7 @@ Maps,Haritalar Mark as Reviewed,İncelendi olarak işaretle Markdown,Not et Matching,Matching +matching,matching Matomo,Matomo Members,Üyeler Menu,Menü @@ -479,6 +480,7 @@ Metadata Extraction,Meta veri özütleme MIGRATE,MIGRATE Minimum,Minimum mismatched passwords,Passwords don't match +mismatching,mismatching Mixed access,Karma erişim ML TOC,ML TOC Month,Ay @@ -770,6 +772,7 @@ Suggestion,Suggestion Suggestion accepted.,Suggestion accepted. Suggestion:,Suggestion: Suggestions,Öneriler +suggestions,suggestions Supporting files,Destekleyici belgeler Synced template,Synced template syncedTemplateEditorMessage,This template is synced from another instance. Only entity view page can be enabled. @@ -911,6 +914,7 @@ Uwazi is developed by,Uwazi tarafından geliştirildi Uwazi UI,Uwazi UI Value,Value Value cannot be transformed to the correct type,Value cannot be transformed to the correct type +values,values Verify,Doğrula Verifying...,Doğrulanıyor... View,Görüntüle