Build your personal knowledge base with Trilium Notes
TypeScript electronelectron-appknowledge-baseknowledge-graphknowledge-managementknowledge-management-graphlocal-firstnote-managmentnote-takernote-takingnotebooknotesnotes-apppersonal-knowledge-basepersonal-wikiscriptableself-hostedself-hostingwiki
refactor(attributes): retitle the detail popup
Elian Doran92d4a1c986ec
diff --git a/apps/client/src/translations/en/translation.json b/apps/client/src/translations/en/translation.jsonindex 9bbf38ab95..f2be2502e9 100644--- a/apps/client/src/translations/en/translation.json+++ b/apps/client/src/translations/en/translation.json@@ -554,10 +554,9 @@"delete": "Delete","related_notes_title": "Other notes with this label","more_notes": "More notes",- "label": "Label detail",- "label_definition": "Label definition detail",- "relation": "Relation detail",- "relation_definition": "Relation definition detail",+ "label": "Label",+ "relation": "Relation",+ "definition": "Attribute definition","disable_versioning": "disables auto-versioning. Useful for e.g. large, but unimportant notes - e.g. large JS libraries used for scripting","calendar_root": "marks note which should be used as root for day notes. Only one should be marked as such.","archived": "notes with this label won't be visible by default in search results (also in Jump To, Add Link dialogs etc).",diff --git a/apps/client/src/widgets/attribute_widgets/attribute_detail.tsx b/apps/client/src/widgets/attribute_widgets/attribute_detail.tsxindex eeb802bf91..64f287ed46 100644--- a/apps/client/src/widgets/attribute_widgets/attribute_detail.tsx+++ b/apps/client/src/widgets/attribute_widgets/attribute_detail.tsx@@ -812,11 +812,17 @@ function formatAttributeForSearch({ type, name }: Attribute) {return `${type === "label" ? "#" : "~"}${name}`;}+/**+ * The two kinds of definition share a title: which of them it is now being one of the values of the+ * type below, a title naming it too would say it twice and would rename the popup as the type is+ * changed — while what the title is for is the distinction the form cannot show, between a value this+ * note carries and a declaration of what the attribute it names is for.+ */const ATTR_TITLES: Record<string, string> = {label: t("attribute_detail.label"),- "label-definition": t("attribute_detail.label_definition"),+ "label-definition": t("attribute_detail.definition"),relation: t("attribute_detail.relation"),- "relation-definition": t("attribute_detail.relation_definition")+ "relation-definition": t("attribute_detail.definition")};const isNewLayout = isExperimentalFeatureEnabled("new-layout");