diff --git a/frontend/messages/de.json b/frontend/messages/de.json index 7fa3867e..47582e07 100644 --- a/frontend/messages/de.json +++ b/frontend/messages/de.json @@ -907,5 +907,68 @@ "bulk_edit_loading": "Dokumente werden geladen…", "bulk_edit_all_x_failed": "Filter konnte nicht abgerufen werden — bitte erneut versuchen.", "bulk_edit_topbar_title": "Massenbearbeitung", - "bulk_edit_count_pill": "{count} werden bearbeitet" + "bulk_edit_count_pill": "{count} werden bearbeitet", + + "nav_stammbaum": "Stammbaum", + + "error_relationship_not_found": "Die Beziehung wurde nicht gefunden.", + "error_circular_relationship": "Diese Beziehung würde einen Kreis erzeugen.", + "error_duplicate_relationship": "Diese Beziehung gibt es bereits.", + + "relation_parent_of": "Elternteil von", + "relation_spouse_of": "Ehegatte", + "relation_sibling_of": "Geschwister", + "relation_friend": "Freund", + "relation_colleague": "Kollege", + "relation_employer": "Arbeitgeber", + "relation_doctor": "Arzt", + "relation_neighbor": "Nachbar", + "relation_other": "Sonstige", + + "relation_inferred_parent": "Elternteil", + "relation_inferred_child": "Kind", + "relation_inferred_spouse": "Ehegatte", + "relation_inferred_sibling": "Geschwister", + "relation_inferred_grandparent": "Großelternteil", + "relation_inferred_grandchild": "Enkelkind", + "relation_inferred_great_grandparent": "Urgroßelternteil", + "relation_inferred_great_grandchild": "Urenkel", + "relation_inferred_uncle_aunt": "Onkel/Tante", + "relation_inferred_niece_nephew": "Nichte/Neffe", + "relation_inferred_great_uncle_aunt": "Großonkel/Großtante", + "relation_inferred_great_niece_nephew": "Großnichte/Großneffe", + "relation_inferred_inlaw_parent": "Schwiegerelternteil", + "relation_inferred_inlaw_child": "Schwiegerkind", + "relation_inferred_sibling_inlaw": "Schwager/Schwägerin", + "relation_inferred_cousin_1": "Cousin/Cousine", + "relation_inferred_distant": "Weitläufige Verwandtschaft", + + "doc_details_field_relationship": "Verwandtschaft", + + "stammbaum_empty_heading": "Noch keine Familienmitglieder", + "stammbaum_empty_body": "Markiere Personen auf ihrer Bearbeitungsseite als Familienmitglied, damit sie hier erscheinen.", + "stammbaum_empty_link": "→ Zur Personenliste", + "stammbaum_panel_direct_rels": "Direkte Beziehungen", + "stammbaum_panel_derived_rels": "Abgeleitete Beziehungen", + "stammbaum_panel_to_person": "Zur Personenseite →", + "stammbaum_panel_add_rel": "+ Beziehung hinzufügen", + "stammbaum_zoom_in": "Vergrößern", + "stammbaum_zoom_out": "Verkleinern", + "stammbaum_generations": "Generationen", + + "relation_error_duplicate": "Diese Beziehung gibt es bereits.", + "relation_error_circular": "Diese Beziehung würde einen Kreis erzeugen.", + "relation_error_self": "Eine Person kann nicht mit sich selbst verbunden werden.", + "relation_year_error_bis_before_von": "Bis-Jahr darf nicht vor Von-Jahr liegen.", + "relation_label_family_member": "Als Familienmitglied", + "relation_label_in_tree": "Erscheint im Stammbaum", + "relation_label_view_in_tree": "Ansehen →", + "relation_label_direct": "Direkte Beziehungen", + "relation_label_derived": "Abgeleitete Beziehungen", + "relation_btn_add": "Hinzufügen", + "relation_btn_save": "Speichern", + "relation_btn_cancel": "Abbrechen", + + "person_relationships_heading": "Beziehungen", + "person_relationships_empty": "Noch keine Beziehungen bekannt." } diff --git a/frontend/messages/en.json b/frontend/messages/en.json index f718d543..5b352f0f 100644 --- a/frontend/messages/en.json +++ b/frontend/messages/en.json @@ -907,5 +907,68 @@ "bulk_edit_loading": "Loading documents…", "bulk_edit_all_x_failed": "Could not load filter results — please retry.", "bulk_edit_topbar_title": "Bulk edit", - "bulk_edit_count_pill": "{count} will be edited" + "bulk_edit_count_pill": "{count} will be edited", + + "nav_stammbaum": "Family tree", + + "error_relationship_not_found": "Relationship not found.", + "error_circular_relationship": "This relationship would form a cycle.", + "error_duplicate_relationship": "This relationship already exists.", + + "relation_parent_of": "Parent of", + "relation_spouse_of": "Spouse", + "relation_sibling_of": "Sibling", + "relation_friend": "Friend", + "relation_colleague": "Colleague", + "relation_employer": "Employer", + "relation_doctor": "Doctor", + "relation_neighbor": "Neighbour", + "relation_other": "Other", + + "relation_inferred_parent": "Parent", + "relation_inferred_child": "Child", + "relation_inferred_spouse": "Spouse", + "relation_inferred_sibling": "Sibling", + "relation_inferred_grandparent": "Grandparent", + "relation_inferred_grandchild": "Grandchild", + "relation_inferred_great_grandparent": "Great-grandparent", + "relation_inferred_great_grandchild": "Great-grandchild", + "relation_inferred_uncle_aunt": "Uncle/Aunt", + "relation_inferred_niece_nephew": "Niece/Nephew", + "relation_inferred_great_uncle_aunt": "Great-uncle/Aunt", + "relation_inferred_great_niece_nephew": "Great-niece/Nephew", + "relation_inferred_inlaw_parent": "Parent-in-law", + "relation_inferred_inlaw_child": "Child-in-law", + "relation_inferred_sibling_inlaw": "Sibling-in-law", + "relation_inferred_cousin_1": "Cousin", + "relation_inferred_distant": "Distant relative", + + "doc_details_field_relationship": "Relationship", + + "stammbaum_empty_heading": "No family members yet", + "stammbaum_empty_body": "Mark a person as a family member on their edit page so they appear here.", + "stammbaum_empty_link": "→ Go to person list", + "stammbaum_panel_direct_rels": "Direct relationships", + "stammbaum_panel_derived_rels": "Derived relationships", + "stammbaum_panel_to_person": "Go to person page →", + "stammbaum_panel_add_rel": "+ Add relationship", + "stammbaum_zoom_in": "Zoom in", + "stammbaum_zoom_out": "Zoom out", + "stammbaum_generations": "Generations", + + "relation_error_duplicate": "This relationship already exists.", + "relation_error_circular": "This relationship would form a cycle.", + "relation_error_self": "A person cannot be related to themselves.", + "relation_year_error_bis_before_von": "End year must not precede start year.", + "relation_label_family_member": "Family member", + "relation_label_in_tree": "Appears in the family tree", + "relation_label_view_in_tree": "View →", + "relation_label_direct": "Direct relationships", + "relation_label_derived": "Derived relationships", + "relation_btn_add": "Add", + "relation_btn_save": "Save", + "relation_btn_cancel": "Cancel", + + "person_relationships_heading": "Relationships", + "person_relationships_empty": "No relationships known yet." } diff --git a/frontend/messages/es.json b/frontend/messages/es.json index 86837a8f..d1f8ac85 100644 --- a/frontend/messages/es.json +++ b/frontend/messages/es.json @@ -907,5 +907,68 @@ "bulk_edit_loading": "Cargando documentos…", "bulk_edit_all_x_failed": "No se pudieron cargar los resultados del filtro; vuelve a intentarlo.", "bulk_edit_topbar_title": "Edición masiva", - "bulk_edit_count_pill": "Se editarán {count}" + "bulk_edit_count_pill": "Se editarán {count}", + + "nav_stammbaum": "Árbol genealógico", + + "error_relationship_not_found": "La relación no fue encontrada.", + "error_circular_relationship": "Esta relación crearía un ciclo.", + "error_duplicate_relationship": "Esta relación ya existe.", + + "relation_parent_of": "Progenitor de", + "relation_spouse_of": "Cónyuge", + "relation_sibling_of": "Hermano/a", + "relation_friend": "Amigo/a", + "relation_colleague": "Colega", + "relation_employer": "Empleador", + "relation_doctor": "Médico", + "relation_neighbor": "Vecino/a", + "relation_other": "Otro", + + "relation_inferred_parent": "Progenitor", + "relation_inferred_child": "Hijo/a", + "relation_inferred_spouse": "Cónyuge", + "relation_inferred_sibling": "Hermano/a", + "relation_inferred_grandparent": "Abuelo/a", + "relation_inferred_grandchild": "Nieto/a", + "relation_inferred_great_grandparent": "Bisabuelo/a", + "relation_inferred_great_grandchild": "Bisnieto/a", + "relation_inferred_uncle_aunt": "Tío/Tía", + "relation_inferred_niece_nephew": "Sobrino/a", + "relation_inferred_great_uncle_aunt": "Tío/a abuelo/a", + "relation_inferred_great_niece_nephew": "Sobrino/a nieto/a", + "relation_inferred_inlaw_parent": "Suegro/a", + "relation_inferred_inlaw_child": "Yerno/Nuera", + "relation_inferred_sibling_inlaw": "Cuñado/a", + "relation_inferred_cousin_1": "Primo/a", + "relation_inferred_distant": "Pariente lejano", + + "doc_details_field_relationship": "Parentesco", + + "stammbaum_empty_heading": "Aún no hay miembros de la familia", + "stammbaum_empty_body": "Marca a una persona como miembro de la familia en su página de edición para que aparezca aquí.", + "stammbaum_empty_link": "→ Ir a la lista de personas", + "stammbaum_panel_direct_rels": "Relaciones directas", + "stammbaum_panel_derived_rels": "Relaciones derivadas", + "stammbaum_panel_to_person": "Ir a la persona →", + "stammbaum_panel_add_rel": "+ Añadir relación", + "stammbaum_zoom_in": "Acercar", + "stammbaum_zoom_out": "Alejar", + "stammbaum_generations": "Generaciones", + + "relation_error_duplicate": "Esta relación ya existe.", + "relation_error_circular": "Esta relación crearía un ciclo.", + "relation_error_self": "Una persona no puede estar relacionada consigo misma.", + "relation_year_error_bis_before_von": "El año final no puede ser anterior al año inicial.", + "relation_label_family_member": "Miembro de la familia", + "relation_label_in_tree": "Aparece en el árbol genealógico", + "relation_label_view_in_tree": "Ver →", + "relation_label_direct": "Relaciones directas", + "relation_label_derived": "Relaciones derivadas", + "relation_btn_add": "Añadir", + "relation_btn_save": "Guardar", + "relation_btn_cancel": "Cancelar", + + "person_relationships_heading": "Relaciones", + "person_relationships_empty": "Aún no se conocen relaciones." } diff --git a/frontend/src/lib/errors.ts b/frontend/src/lib/errors.ts index 6acdefbe..e57f212e 100644 --- a/frontend/src/lib/errors.ts +++ b/frontend/src/lib/errors.ts @@ -38,6 +38,9 @@ export type ErrorCode = | 'TAG_NOT_FOUND' | 'TAG_MERGE_SELF' | 'TAG_MERGE_INVALID_TARGET' + | 'RELATIONSHIP_NOT_FOUND' + | 'CIRCULAR_RELATIONSHIP' + | 'DUPLICATE_RELATIONSHIP' | 'MISSING_CREDENTIALS' | 'UNAUTHORIZED' | 'FORBIDDEN' @@ -136,6 +139,12 @@ export function getErrorMessage(code: ErrorCode | string | undefined): string { return m.error_tag_merge_self(); case 'TAG_MERGE_INVALID_TARGET': return m.error_tag_merge_invalid_target(); + case 'RELATIONSHIP_NOT_FOUND': + return m.error_relationship_not_found(); + case 'CIRCULAR_RELATIONSHIP': + return m.error_circular_relationship(); + case 'DUPLICATE_RELATIONSHIP': + return m.error_duplicate_relationship(); case 'MISSING_CREDENTIALS': return m.login_error_missing_credentials(); case 'UNAUTHORIZED':