From 703d86525182a40e288e7258ec50e9f1a071bca9 Mon Sep 17 00:00:00 2001 From: Ludovic PINEL Date: Wed, 5 Feb 2025 09:54:06 +0100 Subject: [PATCH] update wording and apply same rules on key naming --- .../Components/Button/ButtonConfiguration.swift | 2 +- .../Pages/Components/EmptyState/EmptyState.swift | 4 ++-- .../Pages/Components/Link/LinkConfiguration.swift | 2 +- .../Components/Switch/SwitchConfiguration.swift | 6 +++--- .../Pages/Utils/DesignToolboxTextField.swift | 2 +- .../Resources/en.lproj/Localizable.strings | 12 ++++++++---- 6 files changed, 16 insertions(+), 12 deletions(-) diff --git a/DesignToolbox/DesignToolbox/Pages/Components/Button/ButtonConfiguration.swift b/DesignToolbox/DesignToolbox/Pages/Components/Button/ButtonConfiguration.swift index ce2fa69ed3..964e576990 100644 --- a/DesignToolbox/DesignToolbox/Pages/Components/Button/ButtonConfiguration.swift +++ b/DesignToolbox/DesignToolbox/Pages/Components/Button/ButtonConfiguration.swift @@ -197,7 +197,7 @@ struct ButtonConfiguration: View { } if model.layout == .iconAndText || model.layout == .textOnly { - DesignToolboxTextField(text: $model.text, prompt: "app_component_common_userText_prompt") + DesignToolboxTextField(text: $model.text, prompt: "app_components_common_userText_prompt") } } } diff --git a/DesignToolbox/DesignToolbox/Pages/Components/EmptyState/EmptyState.swift b/DesignToolbox/DesignToolbox/Pages/Components/EmptyState/EmptyState.swift index e01307002d..a1faf97472 100644 --- a/DesignToolbox/DesignToolbox/Pages/Components/EmptyState/EmptyState.swift +++ b/DesignToolbox/DesignToolbox/Pages/Components/EmptyState/EmptyState.swift @@ -26,9 +26,9 @@ struct EmptyState: View { .frame(width: 160, height: 160, alignment: .center) VStack(alignment: .center, spacing: theme.spaces.spaceFixedShorter) { - Text("app_component_emptyContent_text") + Text("app_components_emptyContent_text") .typeHeadingMedium(theme) - Text("app_component_emptyContent_description_text") + Text("app_components_emptyContent_description_text") .typeBodyDefaultSmall(theme) } .padding(.vertical, theme.spaces.spaceFixedMedium) diff --git a/DesignToolbox/DesignToolbox/Pages/Components/Link/LinkConfiguration.swift b/DesignToolbox/DesignToolbox/Pages/Components/Link/LinkConfiguration.swift index e18412f08c..54ab0d966a 100644 --- a/DesignToolbox/DesignToolbox/Pages/Components/Link/LinkConfiguration.swift +++ b/DesignToolbox/DesignToolbox/Pages/Components/Link/LinkConfiguration.swift @@ -167,7 +167,7 @@ struct LinkConfiguration: View { } } - DesignToolboxTextField(text: $model.text, prompt: "app_component_common_userText_prompt") + DesignToolboxTextField(text: $model.text, prompt: "app_components_common_userText_prompt") } } } diff --git a/DesignToolbox/DesignToolbox/Pages/Components/Switch/SwitchConfiguration.swift b/DesignToolbox/DesignToolbox/Pages/Components/Switch/SwitchConfiguration.swift index c1e946630e..57e3cc371f 100644 --- a/DesignToolbox/DesignToolbox/Pages/Components/Switch/SwitchConfiguration.swift +++ b/DesignToolbox/DesignToolbox/Pages/Components/Switch/SwitchConfiguration.swift @@ -162,10 +162,10 @@ struct SwitchConfiguration: View { } } - DisclosureGroup("Edit texts") { - DesignToolboxTextField(text: $model.labelContent, prompt: "app_component_common_userText_prompt", title: "app_components_switch_label_text") + DisclosureGroup("app_components_common_editContent_label") { + DesignToolboxTextField(text: $model.labelContent, prompt: "app_components_common_userText_prompt", title: "app_components_switch_label_text") if model.helperText { - DesignToolboxTextField(text: $model.helperTextContent, prompt: "app_component_common_userText_prompt", title: "app_components_common_helperText_label") + DesignToolboxTextField(text: $model.helperTextContent, prompt: "app_components_common_userText_prompt", title: "app_components_common_helperText_label") } } } diff --git a/DesignToolbox/DesignToolbox/Pages/Utils/DesignToolboxTextField.swift b/DesignToolbox/DesignToolbox/Pages/Utils/DesignToolboxTextField.swift index 7266872643..a5003d490f 100644 --- a/DesignToolbox/DesignToolbox/Pages/Utils/DesignToolboxTextField.swift +++ b/DesignToolbox/DesignToolbox/Pages/Utils/DesignToolboxTextField.swift @@ -24,7 +24,7 @@ struct DesignToolboxTextField: View { let prompt: String let title: String - init(text: Binding, prompt: String, title: String = "app_component_common_userText_label") { + init(text: Binding, prompt: String, title: String = "app_components_common_userText_label") { self.title = title self.text = text self.prompt = prompt diff --git a/DesignToolbox/DesignToolbox/Resources/en.lproj/Localizable.strings b/DesignToolbox/DesignToolbox/Resources/en.lproj/Localizable.strings index 6989dfd47b..0b6cc61537 100644 --- a/DesignToolbox/DesignToolbox/Resources/en.lproj/Localizable.strings +++ b/DesignToolbox/DesignToolbox/Resources/en.lproj/Localizable.strings @@ -103,10 +103,8 @@ // MARK: - Component Screen "app_components_common_viewCodeExample_label" = "View component code example"; -"app_component_emptyContent_text" = "No content"; -"app_component_emptyContent_description_text" = "This content is under construction and will be available very soon"; -"app_component_common_userText_prompt" = "Enter a text"; -"app_component_common_userText_label" = "Text"; +"app_components_common_userText_prompt" = "Enter a text"; +"app_components_common_userText_label" = "Text"; "app_components_common_layout_label" = "Layout"; "app_components_common_textOnlyLayout_label" = "Text only"; "app_components_common_iconAndTextLayout_label" = "Icon + text"; @@ -117,6 +115,12 @@ "app_components_common_divider_label" = "Divider"; "app_components_common_onError_label" = "On error"; "app_components_common_orientation_label" = "Orientation"; +"app_components_common_editContent_label" = "Edit content"; + +// MARK: Components: Empty state + +"app_components_emptyContent_text" = "No content"; +"app_components_emptyContent_description_text" = "This content is under construction and will be available very soon"; // MARK: Components: Button