From 743e62a1680fe2d4bf8639f62efa022cc7c419ec Mon Sep 17 00:00:00 2001 From: artem888 Date: Wed, 15 Nov 2023 17:52:26 +0100 Subject: [PATCH] Improve device specs message for maestro cloud command to include device locale (#1588) * improve device specs message for maestro cloud command to include device locale * code review fixes --- .../src/main/java/maestro/cli/cloud/CloudInteractor.kt | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/maestro-cli/src/main/java/maestro/cli/cloud/CloudInteractor.kt b/maestro-cli/src/main/java/maestro/cli/cloud/CloudInteractor.kt index 1927d95644..36048f852e 100644 --- a/maestro-cli/src/main/java/maestro/cli/cloud/CloudInteractor.kt +++ b/maestro-cli/src/main/java/maestro/cli/cloud/CloudInteractor.kt @@ -172,8 +172,9 @@ class CloudInteractor( val platform = Platform.fromString(deviceInfo.platform) - val line1 = "Maestro Cloud device specs:\n* ${deviceInfo.displayInfo}" + val line1 = "Maestro Cloud device specs:\n* ${deviceInfo.displayInfo} - ${deviceInfo.deviceLocale}" val line2 = "To change OS version use this option: ${if (platform == Platform.IOS) "--ios-version=" else "--android-api-level="}" + val line3 = "To change device locale use this option: --device-locale=" val version = when(platform) { Platform.ANDROID -> "${androidApiLevel ?: 30}" // todo change with constant from DeviceConfigAndroid @@ -181,8 +182,8 @@ class CloudInteractor( else -> return } - val line3 = "To create a similar device locally, run: `maestro start-device --platform=${platform.toString().lowercase()} --os-version=$version`" - PrintUtils.message("$line1\n\n$line2\n\n$line3".box()) + val line4 = "To create a similar device locally, run: `maestro start-device --platform=${platform.toString().lowercase()} --os-version=$version --device-locale=${deviceInfo.deviceLocale}`" + PrintUtils.message("$line1\n\n$line2\n\n$line3\n\n$line4".box()) }