Skip to content

Commit c687483

Browse files
Translate German toast messages and UI strings to English
This commit translates various German toast messages and user-facing strings across multiple Kotlin files to English. Files modified: - app/src/main/kotlin/com/google/ai/sample/MainActivity.kt - app/src/main/kotlin/com/google/ai/sample/MenuScreen.kt - app/src/main/kotlin/com/google/ai/sample/ScreenOperatorAccessibilityService.kt - app/src/main/kotlin/com/google/ai/sample/feature/multimodal/PhotoReasoningViewModel.kt - app/src/main/kotlin/com/google/ai/sample/feature/multimodal/PhotoReasoningScreen.kt The translations ensure a consistent English language experience throughout your application.
1 parent c6cffd4 commit c687483

5 files changed

Lines changed: 233 additions & 233 deletions

File tree

app/src/main/kotlin/com/google/ai/sample/MainActivity.kt

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -164,10 +164,10 @@ class MainActivity : ComponentActivity() {
164164
}
165165
} else if (billingResult.responseCode == BillingClient.BillingResponseCode.USER_CANCELED) {
166166
Log.i(TAG, "purchasesUpdatedListener: User cancelled the purchase flow.")
167-
Toast.makeText(this, "Spendevorgang abgebrochen.", Toast.LENGTH_SHORT).show()
167+
Toast.makeText(this, "Donation process cancelled.", Toast.LENGTH_SHORT).show()
168168
} else {
169169
Log.e(TAG, "purchasesUpdatedListener: Billing error: ${billingResult.debugMessage} (Code: ${billingResult.responseCode})")
170-
Toast.makeText(this, "Fehler beim Spendevorgang: ${billingResult.debugMessage}", Toast.LENGTH_LONG).show()
170+
Toast.makeText(this, "Error during donation process: ${billingResult.debugMessage}", Toast.LENGTH_LONG).show()
171171
}
172172
}
173173

@@ -505,12 +505,12 @@ class MainActivity : ComponentActivity() {
505505
Log.d(TAG, "initiateDonationPurchase called.")
506506
if (!::billingClient.isInitialized) {
507507
Log.e(TAG, "initiateDonationPurchase: BillingClient not initialized.")
508-
updateStatusMessage("Bezahldienst nicht initialisiert. Bitte später versuchen.", true)
508+
updateStatusMessage("Payment service not initialized. Please try again later.", true)
509509
return
510510
}
511511
if (!billingClient.isReady) {
512512
Log.e(TAG, "initiateDonationPurchase: BillingClient not ready. Connection state: ${billingClient.connectionState}")
513-
updateStatusMessage("Bezahldienst nicht bereit. Bitte später versuchen.", true)
513+
updateStatusMessage("Payment service not ready. Please try again later.", true)
514514
if (billingClient.connectionState == BillingClient.ConnectionState.CLOSED || billingClient.connectionState == BillingClient.ConnectionState.DISCONNECTED){
515515
Log.d(TAG, "initiateDonationPurchase: BillingClient disconnected, attempting to reconnect.")
516516
billingClient.startConnection(object : BillingClientStateListener {
@@ -559,7 +559,7 @@ class MainActivity : ComponentActivity() {
559559
Log.i(TAG, "initiateDonationPurchase: Billing flow launch result: ${billingResult.responseCode} - ${billingResult.debugMessage}")
560560
if (billingResult.responseCode != BillingClient.BillingResponseCode.OK) {
561561
Log.e(TAG, "Failed to launch billing flow: ${billingResult.debugMessage}")
562-
updateStatusMessage("Fehler beim Starten des Spendevorgangs: ${billingResult.debugMessage}", true)
562+
updateStatusMessage("Error starting donation process: ${billingResult.debugMessage}", true)
563563
}
564564
} ?: run {
565565
Log.e(TAG, "initiateDonationPurchase: Subscription product details are null even after check. This shouldn't happen.")
@@ -582,30 +582,30 @@ class MainActivity : ComponentActivity() {
582582
Log.i(TAG, "handlePurchase (acknowledgePurchase): Result code: ${ackBillingResult.responseCode}, Message: ${ackBillingResult.debugMessage}")
583583
if (ackBillingResult.responseCode == BillingClient.BillingResponseCode.OK) {
584584
Log.i(TAG, "Subscription purchase acknowledged successfully.")
585-
updateStatusMessage("Vielen Dank für Ihr Abonnement!")
585+
updateStatusMessage("Thank you for your subscription!")
586586
TrialManager.markAsPurchased(this)
587-
updateTrialState(TrialManager.getTrialState(this, null)) // Aktualisiere Zustand nach Kauf
587+
updateTrialState(TrialManager.getTrialState(this, null)) // Update state after purchase
588588
Log.d(TAG, "handlePurchase: Stopping TrialTimerService as app is purchased.")
589589
val stopIntent = Intent(this, TrialTimerService::class.java)
590590
stopIntent.action = TrialTimerService.ACTION_STOP_TIMER
591591
startService(stopIntent)
592592
} else {
593593
Log.e(TAG, "Failed to acknowledge purchase: ${ackBillingResult.debugMessage}")
594-
updateStatusMessage("Fehler beim Bestätigen des Kaufs: ${ackBillingResult.debugMessage}", true)
594+
updateStatusMessage("Error confirming purchase: ${ackBillingResult.debugMessage}", true)
595595
}
596596
}
597597
} else {
598598
Log.i(TAG, "handlePurchase: Subscription already acknowledged.")
599-
updateStatusMessage("Abonnement bereits aktiv.")
599+
updateStatusMessage("Subscription already active.")
600600
TrialManager.markAsPurchased(this)
601-
updateTrialState(TrialManager.getTrialState(this, null)) // Aktualisiere Zustand nach Kauf
601+
updateTrialState(TrialManager.getTrialState(this, null)) // Update state after purchase
602602
}
603603
} else {
604604
Log.w(TAG, "handlePurchase: Purchase is PURCHASED but does not contain the target product ID ($subscriptionProductId). Products: ${purchase.products}")
605605
}
606606
} else if (purchase.purchaseState == Purchase.PurchaseState.PENDING) {
607607
Log.i(TAG, "handlePurchase: Purchase state is PENDING.")
608-
updateStatusMessage("Ihre Zahlung ist in Bearbeitung.")
608+
updateStatusMessage("Your payment is being processed.")
609609
} else {
610610
Log.w(TAG, "handlePurchase: Purchase state is UNSPECIFIED_STATE or other: ${purchase.purchaseState}")
611611
}
@@ -796,7 +796,7 @@ class MainActivity : ComponentActivity() {
796796
val allGranted = permissions.entries.all { it.value }
797797
if (allGranted) {
798798
Log.i(TAG, "All required permissions granted by user.")
799-
updateStatusMessage("Alle erforderlichen Berechtigungen erteilt")
799+
updateStatusMessage("All required permissions granted")
800800
// Any other logic that should happen when permissions are granted (e.g., related to trial service)
801801
// This part should remain as it was if permissions being granted triggered other actions.
802802
} else {

app/src/main/kotlin/com/google/ai/sample/MenuScreen.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ fun MenuScreen(
182182
TextButton(
183183
onClick = {
184184
if (isTrialExpired) {
185-
Toast.makeText(context, "Bitte abonnieren Sie die App, um fortzufahren.", Toast.LENGTH_LONG).show()
185+
Toast.makeText(context, "Please subscribe to the app to continue.", Toast.LENGTH_LONG).show()
186186
} else {
187187
onItemClicked(menuItem.routeId)
188188
}

0 commit comments

Comments
 (0)