Skip to content

Commit

Permalink
Added extended info for multivalue suggestions in IX (#6931)
Browse files Browse the repository at this point in the history
* Added extended info for multivalue suggestions in IX

* updated translations
  • Loading branch information
konzz authored Jun 25, 2024
1 parent 98615b6 commit bbee051
Show file tree
Hide file tree
Showing 11 changed files with 81 additions and 5 deletions.
10 changes: 10 additions & 0 deletions app/react/App/styles/globals.css
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down Expand Up @@ -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;
}
Expand Down
40 changes: 35 additions & 5 deletions app/react/V2/Routes/Settings/IX/components/TableElements.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ const ActionHeader = () => <Translate className="sr-only">Action</Translate>;
const PropertyCell = ({ cell }: CellContext<Extractor, Extractor['propertyType']>) => {
const property = cell.getValue();
return (
<div className="flex gap-2 items-center">
<div className="flex items-center gap-2">
<span className="w-4">{propertyIcons[property]}</span>
<p className="text-gray-500 whitespace-nowrap">{cell.row.original.propertyLabel}</p>
</div>
Expand All @@ -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 (
<span className="text-xs font-bold text-gray-500">
{cell.row.original.children.length} <Translate>Suggestions</Translate>
</span>
<div className="flex gap-1 text-xs font-bold text-gray-500">
<span>
{amountOfValues} <Translate>values</Translate>
</span>
<span>|</span>
<span>
{ammountOfSuggestions} <Translate>suggestions</Translate>
</span>
{amountOfMatches > 0 && (
<>
<span>|</span>
<span>
<span className="text-green-500">{amountOfMatches}</span>{' '}
<Translate>matching</Translate>
</span>
</>
)}
{amountOfMissmatches > 0 && (
<>
<span>|</span>
<span>
<span className="text-orange-500 ">{amountOfMissmatches}</span>{' '}
<Translate>mismatching</Translate>
</span>
</>
)}
</div>
);
}
return (
Expand All @@ -94,7 +124,7 @@ const AcceptButton = ({
const suggestionHasEntity = Boolean(cell.row.original.entityId);

if (color === 'green') {
return <div className="m-auto w-6 h-6">{getIcon(color)}</div>;
return <div className="w-6 h-6 m-auto">{getIcon(color)}</div>;
}

return (
Expand Down
4 changes: 4 additions & 0 deletions contents/ui-translations/ar.csv
Original file line number Diff line number Diff line change
Expand Up @@ -467,6 +467,7 @@ Maps,خرائط
Mark as Reviewed,ضع علامة للإشارة إلى خضوعه للمراجعة
Markdown,ماركداون
Matching,Matching
matching,matching
Matomo,Matomo
Members,أعضاء
Menu,قائمة التحكم
Expand All @@ -478,6 +479,7 @@ Metadata Extraction,استخلاص البيانات الوصفية
MIGRATE,MIGRATE
Minimum,الحد الأدنى
mismatched passwords,Passwords don't match
mismatching,mismatching
Mixed access,وصول مختلط
ML TOC,ML TOC
Month,شهر
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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,عرض
Expand Down
4 changes: 4 additions & 0 deletions contents/ui-translations/en.csv
Original file line number Diff line number Diff line change
Expand Up @@ -470,6 +470,7 @@ Maps,Maps
Mark as Reviewed,Mark as Reviewed
Markdown,Markdown
Matching,Matching
matching,matching
Matomo,Matomo
Members,Members
Menu,Menu
Expand All @@ -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
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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
Expand Down
4 changes: 4 additions & 0 deletions contents/ui-translations/es.csv
Original file line number Diff line number Diff line change
Expand Up @@ -466,6 +466,7 @@ Maps,Mapas
Mark as Reviewed,Marcar como Revisado
Markdown,Markdown
Matching,Coincidencia
matching,matching
Matomo,Matomo
Members,Miembros
Menu,Menú
Expand All @@ -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
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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
Expand Down
4 changes: 4 additions & 0 deletions contents/ui-translations/fr.csv
Original file line number Diff line number Diff line change
Expand Up @@ -467,6 +467,7 @@ Maps,Maps
Mark as Reviewed,Mark as Reviewed
Markdown,Markdown
Matching,Matching
matching,matching
Matomo,Matomo
Members,Members
Menu,Menu
Expand All @@ -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
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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
Expand Down
4 changes: 4 additions & 0 deletions contents/ui-translations/ko.csv
Original file line number Diff line number Diff line change
Expand Up @@ -468,6 +468,7 @@ Maps,지도
Mark as Reviewed,검토 완료로 표시
Markdown,Markdown
Matching,Matching
matching,matching
Matomo,Matomo
Members,멤버
Menu,메뉴
Expand All @@ -479,6 +480,7 @@ Metadata Extraction,메타데이터 추출
MIGRATE,MIGRATE
Minimum,최소
mismatched passwords,Passwords don't match
mismatching,mismatching
Mixed access,혼합 접근
ML TOC,ML TOC
Month,월
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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,보기
Expand Down
4 changes: 4 additions & 0 deletions contents/ui-translations/my.csv
Original file line number Diff line number Diff line change
Expand Up @@ -468,6 +468,7 @@ Maps,မြေပုံများ
Mark as Reviewed,သုံးသပ်ပြီးဟု မှတ်ရန်
Markdown,အမှတ်အသား
Matching,Matching
matching,matching
Matomo,Matomo
Members,အဖွဲ့ဝင်များ
Menu,မီနူး
Expand All @@ -479,6 +480,7 @@ Metadata Extraction,မီတာဒေတာ ထုတ်ယူခြင်း
MIGRATE,MIGRATE
Minimum,အနည်းဆုံး
mismatched passwords,Passwords don't match
mismatching,mismatching
Mixed access,ရောထားသော ဝင်ရောက်သုံးစွဲမှု
ML TOC,ML TOC
Month,လ
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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,ကြည့်ရန်
Expand Down
4 changes: 4 additions & 0 deletions contents/ui-translations/ru.csv
Original file line number Diff line number Diff line change
Expand Up @@ -465,6 +465,7 @@ Maps,Карты
Mark as Reviewed,Отметить как Просмотрено
Markdown,Markdown
Matching,Matching
matching,matching
Matomo,Matomo
Members,Участники
Menu,Меню
Expand All @@ -476,6 +477,7 @@ Metadata Extraction,Извлечение метаданных
MIGRATE,MIGRATE
Minimum,Минимум
mismatched passwords,Passwords don't match
mismatching,mismatching
Mixed access,Доступ смешанного типа
ML TOC,Оглавление для машинного обучения
Month,Месяц
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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,Просмотреть
Expand Down
4 changes: 4 additions & 0 deletions contents/ui-translations/th.csv
Original file line number Diff line number Diff line change
Expand Up @@ -468,6 +468,7 @@ Maps,แผนที่
Mark as Reviewed,ได้ตรวจสอบแล้ว
Markdown,การทำเครื่องหมาย
Matching,Matching
matching,matching
Matomo,Matomo
Members,สมาชิก
Menu,เมนู
Expand All @@ -479,6 +480,7 @@ Metadata Extraction,ค้นหาเมตาดาต้า
MIGRATE,MIGRATE
Minimum,ขั้นต่ำ
mismatched passwords,Passwords don't match
mismatching,mismatching
Mixed access,การเข้าถึงแบบผสม
ML TOC,ML TOC
Month,เดือน
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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,ดู
Expand Down
4 changes: 4 additions & 0 deletions contents/ui-translations/tr.csv
Original file line number Diff line number Diff line change
Expand Up @@ -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ü
Expand All @@ -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
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit bbee051

Please sign in to comment.