File tree Expand file tree Collapse file tree 1 file changed +15
-3
lines changed
WooCommerce/Classes/ViewRelated/Custom Fields Expand file tree Collapse file tree 1 file changed +15
-3
lines changed Original file line number Diff line number Diff line change @@ -99,11 +99,11 @@ struct CustomFieldEditorView: View {
9999 }
100100 . background ( Color ( . listBackground) )
101101 . toolbar {
102- ToolbarItem ( placement: . topBarLeading ) {
102+ ToolbarItem ( placement: . cancellationAction ) {
103103 Button {
104104 dismiss ( )
105105 } label: {
106- Text ( " Cancel " ) // todo-13493: set String to be translatable
106+ Text ( Localization . cancelButton )
107107 }
108108 }
109109 ToolbarItem ( placement: . navigationBarTrailing) {
@@ -112,7 +112,7 @@ struct CustomFieldEditorView: View {
112112 saveChanges ( )
113113 dismiss ( )
114114 } label: {
115- Text ( " Save " ) // todo-13493: set String to be translatable
115+ Text ( Localization . saveButton )
116116 }
117117 . disabled ( !hasUnsavedChanges)
118118
@@ -163,6 +163,18 @@ private extension CustomFieldEditorView {
163163 }
164164
165165 enum Localization {
166+ static let cancelButton = NSLocalizedString (
167+ " customFieldEditorView.cancel " ,
168+ value: " Cancel " ,
169+ comment: " Label for the Cancel button to close the editor "
170+ )
171+
172+ static let saveButton = NSLocalizedString (
173+ " customFieldEditorView.save " ,
174+ value: " Save " ,
175+ comment: " Label for the Save button to save changes "
176+ )
177+
166178 static let keyLabel = NSLocalizedString (
167179 " customFieldEditorView.keyLabel " ,
168180 value: " Key " ,
You can’t perform that action at this time.
0 commit comments