Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions README.es.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
[📦 Instalación](#-instalación) ·
[🎮 Cómo jugar](#-cómo-jugar) ·
[🎨 Temas visuales](#-temas-visuales) ·
[🌍 Localización](#-localización) ·
[🗺️ Roadmap](#️-roadmap) ·
[🤝 Contribuir](#-contribuir)
</div>
Expand Down Expand Up @@ -369,6 +370,19 @@ Code Tamagotchi incluye **12 temas premium** con personalidad única. Cada uno c

---

## 🌍 Localización

Code Tamagotchi es totalmente bilingüe (**español + inglés**) y sigue el **idioma del sistema** automáticamente — no hay selector dentro de la app:

- ✅ UI, diálogos, textos de juegos, notificaciones y widget: `values/` (es) + `values-en/` (en)
- ✅ Contenido educativo: 90 retos de código, 6 desafíos de algoritmos, 10 snippets de Code Review y 40 code cards traducidos al inglés (emparejados por id estable, verificado en `LocalizedContentTest`)
- ⚠️ Las etiquetas de los **canales de notificación** (Ajustes de Android) se crean una sola vez con el idioma activo en la primera instalación
- ⚠️ Los nombres de los temas se muestran en español por diseño (son identificadores estables persistidos en preferencias)

Las traducciones viven junto a los datos originales: `ChallengesDataEn.kt`, `SpecialChallengesDataEn.kt`, `CodeReviewDataEn.kt`, `CodeCardsEn.kt`. PRs para mejorar redacción (en cualquier idioma) son muy bienvenidas.

---

## 🗺️ Roadmap

- [x] 🐾 Mascota virtual con estados emocionales y decaimiento
Expand Down
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
[⚡ Quick Start](#-quick-start) ·
[🎮 How to Play](#-how-to-play) ·
[🎨 Themes](#-themes) ·
[🌍 Localization](#-localization) ·
[🗺️ Roadmap](#️-roadmap) ·
[🤝 Contributing](#-contributing)
</div>
Expand Down Expand Up @@ -328,6 +329,19 @@ Code Tamagotchi ships with **12 premium themes**. Each configures colors, typogr

---

## 🌍 Localization

Code Tamagotchi is fully bilingual (**English + Spanish**) and follows your **system language** automatically — there is no in-app switcher:

- ✅ UI, dialogs, game texts, notifications and widget: `values/` (es) + `values-en/` (en)
- ✅ Learning content: 90 code challenges, 6 special algorithm challenges, 10 code-review snippets and 40 code cards translated to English (matched by stable id, order-checked in `LocalizedContentTest`)
- ⚠️ Notification **channel labels** (Android Settings) are created once with the language active at first install
- ⚠️ Theme names are shown in Spanish by design (they are stable identifiers stored in preferences)

Translations live next to the original data: `ChallengesDataEn.kt`, `SpecialChallengesDataEn.kt`, `CodeReviewDataEn.kt`, `CodeCardsEn.kt`. PRs to fix wording (either language) are very welcome.

---

## 🗺️ Roadmap

- [x] 🐾 Virtual pet with emotional states and decay
Expand Down
22 changes: 11 additions & 11 deletions app/src/main/java/com/tamagotchi/code/CodeTamagotchiApp.kt
Original file line number Diff line number Diff line change
Expand Up @@ -36,27 +36,27 @@ class CodeTamagotchiApp : Application() {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
val manager = getSystemService(NotificationManager::class.java)
val groupId = "pet_care"
NotificationChannelGroup(groupId, "Cuidado de Codey").let { manager.createNotificationChannelGroup(it) }
NotificationChannelGroup(groupId, getString(R.string.channel_group_care)).let { manager.createNotificationChannelGroup(it) }

val channels = listOf(
NotificationChannel("pet_hunger", "Hambre de Codey", NotificationManager.IMPORTANCE_DEFAULT).apply {
description = "Codey tiene hambre"
NotificationChannel("pet_hunger", getString(R.string.channel_hunger_name), NotificationManager.IMPORTANCE_DEFAULT).apply {
description = getString(R.string.channel_hunger_desc)
this.group = groupId
},
NotificationChannel("pet_health", "Salud de Codey", NotificationManager.IMPORTANCE_HIGH).apply {
description = "Codey está enfermo"
NotificationChannel("pet_health", getString(R.string.channel_health_name), NotificationManager.IMPORTANCE_HIGH).apply {
description = getString(R.string.channel_health_desc)
this.group = groupId
},
NotificationChannel("pet_energy", "Energía de Codey", NotificationManager.IMPORTANCE_DEFAULT).apply {
description = "Codey está cansado"
NotificationChannel("pet_energy", getString(R.string.channel_energy_name), NotificationManager.IMPORTANCE_DEFAULT).apply {
description = getString(R.string.channel_energy_desc)
this.group = groupId
},
NotificationChannel("pet_critical", "Codey en peligro", NotificationManager.IMPORTANCE_HIGH).apply {
description = "Codey está en estado crítico"
NotificationChannel("pet_critical", getString(R.string.channel_critical_name), NotificationManager.IMPORTANCE_HIGH).apply {
description = getString(R.string.channel_critical_desc)
this.group = groupId
},
NotificationChannel(NOTIFICATION_CHANNEL_ID, "Recordatorios de Codey", NotificationManager.IMPORTANCE_DEFAULT).apply {
description = "Recordatorios sobre el estado de tu mascota virtual"
NotificationChannel(NOTIFICATION_CHANNEL_ID, getString(R.string.channel_reminders_name), NotificationManager.IMPORTANCE_DEFAULT).apply {
description = getString(R.string.channel_reminders_desc)
this.group = groupId
}
)
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/java/com/tamagotchi/code/SplashActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ class SplashActivity : Activity() {

// Tagline
val taglineTextView = android.widget.TextView(this@SplashActivity).apply {
text = "Tu compañero de programación"
text = getString(R.string.splash_tagline)
textSize = 14f
setTextColor(android.graphics.Color.parseColor("#E6E9FF"))
layoutParams = android.view.ViewGroup.LayoutParams(
Expand Down
Loading
Loading