Skip to content

Commit 986909c

Browse files
Merge pull request #14558 from woocommerce/issue/WOOMOB-12-update-disabled-state-text-of-package-buttons
[Shipping Labels] Update the disabled button text on the package selection screen
2 parents 370a6d4 + 10992d7 commit 986909c

File tree

5 files changed

+29
-3
lines changed

5 files changed

+29
-3
lines changed

RELEASE-NOTES.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
- [*] Add more filter options to orders filters sales channel [https://github.com/woocommerce/woocommerce-android/pull/14546]
2020
- [*] Automatically populate the weight field in the create shipment flow [https://github.com/woocommerce/woocommerce-android/pull/14525]
2121
- [*] [Shipping Labels] Fixed displaying incorrect hazardous material option for purchased labels [https://github.com/woocommerce/woocommerce-android/pull/14571]
22+
- [*] Shipping Labels: Updated the disabled button text on the package selection screen [https://github.com/woocommerce/woocommerce-android/pull/14558]
2223

2324
23.1
2425
-----

WooCommerce/src/main/kotlin/com/woocommerce/android/ui/orders/wooshippinglabels/packages/ui/WooShippingCarrierPackageScreen.kt

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,15 @@ fun WooShippingCarrierPackageScreen(
120120
enabled = isAddPackageEnabled,
121121
onClick = onAddPackageClick
122122
) {
123-
Text(stringResource(id = R.string.woo_shipping_labels_package_creation_add_package))
123+
Text(
124+
stringResource(
125+
id = if (isAddPackageEnabled) {
126+
R.string.woo_shipping_labels_package_creation_add_package
127+
} else {
128+
R.string.shipping_label_select_package_button
129+
}
130+
)
131+
)
124132
}
125133
}
126134
}

WooCommerce/src/main/kotlin/com/woocommerce/android/ui/orders/wooshippinglabels/packages/ui/WooShippingCustomPackageScreen.kt

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,15 @@ fun WooShippingCustomPackageCreationScreen(
238238
enabled = isAddPackageEnabled,
239239
onClick = { onAddPackageClick(isSaveAsTemplateChecked) }
240240
) {
241-
Text(stringResource(id = R.string.woo_shipping_labels_package_creation_add_package))
241+
Text(
242+
stringResource(
243+
id = if (isAddPackageEnabled) {
244+
R.string.woo_shipping_labels_package_creation_add_package
245+
} else {
246+
R.string.woo_shipping_labels_package_creation_add_package_details
247+
}
248+
)
249+
)
242250
}
243251
}
244252
}

WooCommerce/src/main/kotlin/com/woocommerce/android/ui/orders/wooshippinglabels/packages/ui/WooShippingSavedPackageScreen.kt

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,15 @@ fun WooShippingSavedPackageScreen(
103103
enabled = isAddPackageEnabled,
104104
onClick = onAddPackageClick
105105
) {
106-
Text(stringResource(id = R.string.woo_shipping_labels_package_creation_add_package))
106+
Text(
107+
stringResource(
108+
id = if (isAddPackageEnabled) {
109+
R.string.woo_shipping_labels_package_creation_add_package
110+
} else {
111+
R.string.shipping_label_select_package_button
112+
}
113+
)
114+
)
107115
}
108116
}
109117
}

WooCommerce/src/main/res/values/strings.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4655,6 +4655,7 @@
46554655
<string name="woo_shipping_labels_package_creation_invalid_dimension">Package dimensions should all be larger than 0.</string>
46564656
<string name="woo_shipping_labels_package_creation_save_package_option">Save this as a new package template</string>
46574657
<string name="woo_shipping_labels_package_creation_add_package">Add Package</string>
4658+
<string name="woo_shipping_labels_package_creation_add_package_details">Add Package Details</string>
46584659
<string name="woo_shipping_labels_package_creation_empty_button">Create a custom package</string>
46594660
<string name="woo_shipping_labels_package_creation_empty_carrier_message">No carrier information found</string>
46604661
<string name="woo_shipping_labels_package_creation_empty_saved_message">No saved packages yet</string>

0 commit comments

Comments
 (0)