[PR #395] android(i18n): externalize hardcoded strings and add Chinese translations #392

Open
opened 2026-03-02 12:41:00 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/kavishdevar/librepods/pull/395
Author: @zhanghaifei1997
Created: 12/19/2025
Status: 🔄 Open

Base: mainHead: main


📝 Commits (2)

  • 8a6d18d android(i18n): externalize hardcoded strings and add Chinese translations
  • 03c3a0b android(fix): add navigation debounce and safe back stack handling

📊 Changes

13 files changed (+421 additions, -123 deletions)

View changed files

📝 android/app/src/main/java/me/kavishdevar/librepods/MainActivity.kt (+20 -14)
📝 android/app/src/main/java/me/kavishdevar/librepods/QuickSettingsDialogActivity.kt (+8 -6)
📝 android/app/src/main/java/me/kavishdevar/librepods/composables/NavigationButton.kt (+2 -1)
📝 android/app/src/main/java/me/kavishdevar/librepods/screens/AirPodsSettingsScreen.kt (+3 -2)
📝 android/app/src/main/java/me/kavishdevar/librepods/screens/AppSettingsScreen.kt (+18 -13)
📝 android/app/src/main/java/me/kavishdevar/librepods/screens/HearingAidScreen.kt (+4 -4)
📝 android/app/src/main/java/me/kavishdevar/librepods/screens/Onboarding.kt (+43 -40)
📝 android/app/src/main/java/me/kavishdevar/librepods/screens/TroubleshootingScreen.kt (+30 -30)
📝 android/app/src/main/java/me/kavishdevar/librepods/services/AirPodsQSService.kt (+5 -5)
📝 android/app/src/main/java/me/kavishdevar/librepods/services/AirPodsService.kt (+8 -8)
android/app/src/main/java/me/kavishdevar/librepods/utils/NavigationExtensions.kt (+76 -0)
📝 android/app/src/main/res/values-zh-rCN/strings.xml (+102 -0)
📝 android/app/src/main/res/values/strings.xml (+102 -0)

📄 Description

Summary

This PR extracts hardcoded strings from Kotlin source files into strings.xml for better internationalization support, and adds corresponding Chinese Simplified translations.

Changes

  • Extract hardcoded strings to strings.xml for:

    • Onboarding.kt
    • TroubleshootingScreen.kt
    • AppSettingsScreen.kt
    • HearingAidScreen.kt
    • MainActivity.kt
    • QuickSettingsDialogActivity.kt
    • AirPodsService.kt
    • AirPodsQSService.kt
  • Add Chinese Simplified translations in values-zh-rCN/strings.xml

Type of Change

  • Internationalization (i18n)

Summary by CodeRabbit

  • New Features

    • Added full Chinese (Simplified) translations for all UI text, onboarding, permissions, troubleshooting, notifications, and dialogs.
    • Replaced hardcoded labels with localized resources for better multilingual support.
  • Improvements

    • Debounced navigation to prevent accidental double-taps.
    • Safer back-navigation behavior to avoid unwanted exits.
    • Adjusted top padding to account for the status bar for more consistent layout.

✏️ Tip: You can customize this high-level summary in your review settings.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/kavishdevar/librepods/pull/395 **Author:** [@zhanghaifei1997](https://github.com/zhanghaifei1997) **Created:** 12/19/2025 **Status:** 🔄 Open **Base:** `main` ← **Head:** `main` --- ### 📝 Commits (2) - [`8a6d18d`](https://github.com/kavishdevar/librepods/commit/8a6d18d300abc2f0ca9582f3e5c7480202e28d3f) android(i18n): externalize hardcoded strings and add Chinese translations - [`03c3a0b`](https://github.com/kavishdevar/librepods/commit/03c3a0b7b8bb4002adb9c38f9b338ab33401c7e3) android(fix): add navigation debounce and safe back stack handling ### 📊 Changes **13 files changed** (+421 additions, -123 deletions) <details> <summary>View changed files</summary> 📝 `android/app/src/main/java/me/kavishdevar/librepods/MainActivity.kt` (+20 -14) 📝 `android/app/src/main/java/me/kavishdevar/librepods/QuickSettingsDialogActivity.kt` (+8 -6) 📝 `android/app/src/main/java/me/kavishdevar/librepods/composables/NavigationButton.kt` (+2 -1) 📝 `android/app/src/main/java/me/kavishdevar/librepods/screens/AirPodsSettingsScreen.kt` (+3 -2) 📝 `android/app/src/main/java/me/kavishdevar/librepods/screens/AppSettingsScreen.kt` (+18 -13) 📝 `android/app/src/main/java/me/kavishdevar/librepods/screens/HearingAidScreen.kt` (+4 -4) 📝 `android/app/src/main/java/me/kavishdevar/librepods/screens/Onboarding.kt` (+43 -40) 📝 `android/app/src/main/java/me/kavishdevar/librepods/screens/TroubleshootingScreen.kt` (+30 -30) 📝 `android/app/src/main/java/me/kavishdevar/librepods/services/AirPodsQSService.kt` (+5 -5) 📝 `android/app/src/main/java/me/kavishdevar/librepods/services/AirPodsService.kt` (+8 -8) ➕ `android/app/src/main/java/me/kavishdevar/librepods/utils/NavigationExtensions.kt` (+76 -0) 📝 `android/app/src/main/res/values-zh-rCN/strings.xml` (+102 -0) 📝 `android/app/src/main/res/values/strings.xml` (+102 -0) </details> ### 📄 Description ## Summary This PR extracts hardcoded strings from Kotlin source files into `strings.xml` for better internationalization support, and adds corresponding Chinese Simplified translations. ## Changes - Extract hardcoded strings to `strings.xml` for: - `Onboarding.kt` - `TroubleshootingScreen.kt` - `AppSettingsScreen.kt` - `HearingAidScreen.kt` - `MainActivity.kt` - `QuickSettingsDialogActivity.kt` - `AirPodsService.kt` - `AirPodsQSService.kt` - Add Chinese Simplified translations in `values-zh-rCN/strings.xml` ## Type of Change - [x] Internationalization (i18n) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Added full Chinese (Simplified) translations for all UI text, onboarding, permissions, troubleshooting, notifications, and dialogs. * Replaced hardcoded labels with localized resources for better multilingual support. * **Improvements** * Debounced navigation to prevent accidental double-taps. * Safer back-navigation behavior to avoid unwanted exits. * Adjusted top padding to account for the status bar for more consistent layout. <sub>✏️ Tip: You can customize this high-level summary in your review settings.</sub> <!-- end of auto-generated comment: release notes by coderabbit.ai --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/librepods#392
No description provided.