Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dashboard: smoother translations (fixes #4923) #4924

Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Original file line number Diff line number Diff line change
Expand Up @@ -340,13 +340,13 @@ class DashboardActivity : DashboardElementActivity(), OnHomeItemClickListener, N
val max = progress.get("max").asInt
val current = progress.get("current").asInt
val courseStatus = if (current == max) {
"$courseName terminado!"
getString(R.string.course_completed, courseName)
} else {
"Ingresa al curso $courseName completalo ($current de $max hecho)"
getString(R.string.course_in_progress, courseName, current, max)
}
challengeDialog(uniqueDates.size, courseStatus, allUniqueDates.size, hasUnfinishedSurvey)
} else {
challengeDialog(uniqueDates.size, "$courseName no iniciado", allUniqueDates.size, hasUnfinishedSurvey)
challengeDialog(uniqueDates.size, getString(R.string.course_not_started, courseName), allUniqueDates.size, hasUnfinishedSurvey)
}
}
}
Expand Down Expand Up @@ -376,27 +376,25 @@ class DashboardActivity : DashboardElementActivity(), OnHomeItemClickListener, N
if (isCompleted && !hasShownCongrats) {
editor.putBoolean("has_shown_congrats", true).apply()
val markdownContent = """
Ingresos totales de la comunidad: **$${calculateCommunityProgress(allVoiceCount, hasUnfinishedSurvey)}** /$500

Tus ganancias totales: **$${calculateIndividualProgress(voiceCount, hasUnfinishedSurvey)}** /$11
### ¡Felicidades! Reto Completado <br/>
""".trimIndent()
${getString(R.string.community_earnings, calculateCommunityProgress(allVoiceCount, hasUnfinishedSurvey))}
${getString(R.string.your_earnings, calculateIndividualProgress(voiceCount, hasUnfinishedSurvey))}
### ${getString(R.string.congratulations)} <br/>
""".trimIndent()
MarkdownDialog.newInstance(markdownContent, courseStatus, voiceCount, allVoiceCount, hasUnfinishedSurvey).show(supportFragmentManager, "markdown_dialog")
} else {
val cappedVoiceCount = minOf(voiceCount, 5)
val voicesText = if (cappedVoiceCount > 0) {
"$cappedVoiceCount de 5 Voces diarias"
"$cappedVoiceCount ${getString(R.string.daily_voices)}"
} else {
""
}
val markdownContent = """
Ingresos totales de la comunidad: **$${calculateCommunityProgress(allVoiceCount, hasUnfinishedSurvey)}** /$500

Tus ganancias totales: **$${calculateIndividualProgress(voiceCount, hasUnfinishedSurvey)}** /$11
### $courseTaskDone $1 por encuesta <br/>
### $voiceTaskDone Comparte tu opinión en Nuestras Voces.[$2/voz] $voicesText <br/>
### $syncTaskDone Recuerda sincronizar la aplicación móvil. <br/>
""".trimIndent()
${getString(R.string.community_earnings, calculateCommunityProgress(allVoiceCount, hasUnfinishedSurvey))}
${getString(R.string.your_earnings, calculateIndividualProgress(voiceCount, hasUnfinishedSurvey))}
### ${getString(R.string.per_survey, courseTaskDone)} <br/>
### ${getString(R.string.share_opinion)} $voicesText <br/>
### ${getString(R.string.remember_sync)} <br/>
""".trimIndent()
MarkdownDialog.newInstance(markdownContent, courseStatus, voiceCount, allVoiceCount, hasUnfinishedSurvey)
.show(supportFragmentManager, "markdown_dialog")
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -340,13 +340,13 @@ class DashboardActivity : DashboardElementActivity(), OnHomeItemClickListener, N
val max = progress.get("max").asInt
val current = progress.get("current").asInt
val courseStatus = if (current == max) {
"$courseName terminado!"
getString(R.string.course_completed, courseName)
} else {
"Ingresa al curso $courseName completalo ($current de $max hecho)"
getString(R.string.course_in_progress, courseName, current, max)
}
challengeDialog(uniqueDates.size, courseStatus, allUniqueDates.size, hasUnfinishedSurvey)
} else {
challengeDialog(uniqueDates.size, "$courseName no iniciado", allUniqueDates.size, hasUnfinishedSurvey)
challengeDialog(uniqueDates.size, getString(R.string.course_not_started, courseName), allUniqueDates.size, hasUnfinishedSurvey)
}
}
}
Expand Down Expand Up @@ -376,27 +376,25 @@ class DashboardActivity : DashboardElementActivity(), OnHomeItemClickListener, N
if (isCompleted && !hasShownCongrats) {
editor.putBoolean("has_shown_congrats", true).apply()
val markdownContent = """
Ingresos totales de la comunidad: **$${calculateCommunityProgress(allVoiceCount, hasUnfinishedSurvey)}** /$500

Tus ganancias totales: **$${calculateIndividualProgress(voiceCount, hasUnfinishedSurvey)}** /$11
### ¡Felicidades! Reto Completado <br/>
""".trimIndent()
${getString(R.string.community_earnings, calculateCommunityProgress(allVoiceCount, hasUnfinishedSurvey))}
${getString(R.string.your_earnings, calculateIndividualProgress(voiceCount, hasUnfinishedSurvey))}
### ${getString(R.string.congratulations)} <br/>
""".trimIndent()
MarkdownDialog.newInstance(markdownContent, courseStatus, voiceCount, allVoiceCount, hasUnfinishedSurvey).show(supportFragmentManager, "markdown_dialog")
} else {
val cappedVoiceCount = minOf(voiceCount, 5)
val voicesText = if (cappedVoiceCount > 0) {
"$cappedVoiceCount de 5 Voces diarias"
"$cappedVoiceCount ${getString(R.string.daily_voices)}"
} else {
""
}
val markdownContent = """
Ingresos totales de la comunidad: **$${calculateCommunityProgress(allVoiceCount, hasUnfinishedSurvey)}** /$500

Tus ganancias totales: **$${calculateIndividualProgress(voiceCount, hasUnfinishedSurvey)}** /$11
### $courseTaskDone $1 por encuesta <br/>
### $voiceTaskDone Comparte tu opinión en Nuestras Voces.[$2/voz] $voicesText <br/>
### $syncTaskDone Recuerda sincronizar la aplicación móvil. <br/>
""".trimIndent()
${getString(R.string.community_earnings, calculateCommunityProgress(allVoiceCount, hasUnfinishedSurvey))}
${getString(R.string.your_earnings, calculateIndividualProgress(voiceCount, hasUnfinishedSurvey))}
### ${getString(R.string.per_survey, courseTaskDone)} <br/>
### ${getString(R.string.share_opinion)} $voicesText <br/>
### ${getString(R.string.remember_sync)} <br/>
""".trimIndent()
MarkdownDialog.newInstance(markdownContent, courseStatus, voiceCount, allVoiceCount, hasUnfinishedSurvey)
.show(supportFragmentManager, "markdown_dialog")
}
Expand Down
10 changes: 10 additions & 0 deletions app/src/main/res/values-ar/strings.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="community_earnings">إجمالي أرباح المجتمع: **$%1$d** /$500</string>
<string name="your_earnings">أرباحك الإجمالية: **$%1$d** /$11</string>
<string name="congratulations">تهانينا! التحدي مكتمل</string>
<string name="daily_voices">من 5 أصوات يومية</string>
<string name="share_opinion">شارك رأيك في أصواتنا.[$2/صوت]</string>
<string name="remember_sync">تذكر مزامنة التطبيق المحمول.</string>
<string name="per_survey">%1$s لكل استبيان</string>
<string name="course_completed">%1$s مكتمل!</string>
<string name="course_in_progress">أدخل الدورة %1$s أكملها (%2$d من %3$d تم)</string>
<string name="course_not_started">%1$s لم يبدأ</string>
<string name="app_name">My Planet</string>
<string name="planet">كوكب</string>
<string name="app_project_name">myPlanet</string>
Expand Down
10 changes: 10 additions & 0 deletions app/src/main/res/values-es/strings.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="community_earnings">Ingresos totales de la comunidad: **$%1$d** /$500</string>
<string name="your_earnings">Tus ganancias totales: **$%1$d** /$11</string>
<string name="congratulations">¡Felicidades! Reto Completado</string>
<string name="daily_voices">de 5 Voces diarias</string>
<string name="share_opinion">Comparte tu opinión en Nuestras Voces.[$2/voz]</string>
<string name="remember_sync">Recuerda sincronizar la aplicación móvil.</string>
<string name="per_survey">%1$s por encuesta</string>
<string name="course_completed">%1$s terminado!</string>
<string name="course_in_progress">Ingresa al curso %1$s completalo (%2$d de %3$d hecho)</string>
<string name="course_not_started">%1$s no iniciado</string>
<string name="app_name">My Planet</string>
<string name="planet">Planeta</string>
<string name="app_project_name">myPlanet</string>
Expand Down
10 changes: 10 additions & 0 deletions app/src/main/res/values-fr/strings.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="community_earnings">Revenus totaux de la communauté: **$%1$d** /$500</string>
<string name="your_earnings">Vos gains totaux: **$%1$d** /$11</string>
<string name="congratulations">Félicitations! Défi terminé</string>
<string name="daily_voices">de 5 Voix quotidiennes</string>
<string name="share_opinion">Partagez votre opinion dans Nos Voix.[$2/voix]</string>
<string name="remember_sync">N\'oubliez pas de synchroniser l\'application mobile.</string>
<string name="per_survey">%1$s par enquête</string>
<string name="course_completed">%1$s terminé!</string>
<string name="course_in_progress">Entrez dans le cours %1$s complétez-le (%2$d de %3$d fait)</string>
<string name="course_not_started">%1$s non commencé</string>
<string name="app_name">My Planet</string>
<string name="planet">planète</string>
<string name="app_project_name">myPlanet</string>
Expand Down
10 changes: 10 additions & 0 deletions app/src/main/res/values-ne/strings.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="community_earnings">समुदायको कुल आम्दानी: **$%1$d** /$500</string>
<string name="your_earnings">तपाईंको कुल आम्दानी: **$%1$d** /$11</string>
<string name="congratulations">बधाई छ! चुनौती पूरा भयो</string>
<string name="daily_voices">५ दैनिक आवाजहरू</string>
<string name="share_opinion">हाम्रो आवाजमा आफ्नो विचार साझा गर्नुहोस्।[$2/आवाज]</string>
<string name="remember_sync">मोबाइल एप्लिकेसनलाई समक्रमण गर्न सम्झनुहोस्।</string>
<string name="per_survey">%1$s प्रति सर्वेक्षण</string>
<string name="course_completed">%1$s समाप्त!</string>
<string name="course_in_progress">कोर्स %1$s मा प्रवेश गर्नुहोस् यसलाई पूरा गर्नुहोस् (%2$d को %3$d गरियो)</string>
<string name="course_not_started">%1$s सुरु भएको छैन</string>
<string name="app_name">My Planet</string>
<string name="planet">ग्रह</string>
<string name="app_project_name">myPlanet</string>
Expand Down
10 changes: 10 additions & 0 deletions app/src/main/res/values-so/strings.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="community_earnings">Dakhliga guud ee bulshada: **$%1$d** /$500</string>
<string name="your_earnings">Dakhligaaga guud: **$%1$d** /$11</string>
<string name="congratulations">Hambalyo! Tartanka waa la dhameeyay</string>
<string name="daily_voices">5 Cod maalinle ah</string>
<string name="share_opinion">La wadaag fikradaada Codkayaga.[$2/cod]</string>
<string name="remember_sync">Xusuusnow inaad la socodsiiso codsiga mobilka.</string>
<string name="per_survey">%1$s halkii sahamin</string>
<string name="course_completed">%1$s dhameystiran!</string>
<string name="course_in_progress">Geli koorsada %1$s dhameystir (%2$d ka %3$d la sameeyay)</string>
<string name="course_not_started">%1$s lama bilaabin</string>
<string name="app_name">My Planet</string>
<string name="planet">Meerah</string>
<string name="app_project_name">myPlanet</string>
Expand Down
10 changes: 10 additions & 0 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="community_earnings">Community total earnings: **$%1$d** /$500</string>
<string name="your_earnings">Your total earnings: **$%1$d** /$11</string>
<string name="congratulations">Congratulations! Challenge Completed</string>
<string name="daily_voices">of 5 Daily Voices</string>
<string name="share_opinion">Share your opinion in Our Voices.[$2/voice]</string>
<string name="remember_sync">Remember to sync the mobile app.</string>
<string name="per_survey">%1$s per survey</string>
<string name="course_completed">%1$s completed!</string>
<string name="course_in_progress">Enter the course %1$s and complete it (%2$d of %3$d done)</string>
<string name="course_not_started">%1$s not started</string>
<string name="app_name">My Planet</string>
<string name="planet">Planet</string>
<string name="app_project_name">myPlanet</string>
Expand Down
Loading