-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3522 from CruGlobal/chore/oneskyTranslations
Update Translations
- Loading branch information
Showing
3 changed files
with
33 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
app/src/test/kotlin/org/cru/godtools/ui/languages/I18nStringsTest.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
package org.cru.godtools.ui.languages | ||
|
||
import android.app.Application | ||
import android.content.Context | ||
import androidx.test.core.app.ApplicationProvider | ||
import androidx.test.ext.junit.runners.AndroidJUnit4 | ||
import kotlin.test.Test | ||
import org.cru.godtools.R | ||
import org.junit.runner.RunWith | ||
import org.robolectric.annotation.Config | ||
|
||
@RunWith(AndroidJUnit4::class) | ||
@Config(application = Application::class) | ||
class I18nStringsTest { | ||
private val context: Context get() = ApplicationProvider.getApplicationContext() | ||
private val resources get() = context.resources | ||
|
||
@Test | ||
@Config(qualifiers = "ar") | ||
fun `Languages - Arabic - Valid format placeholders`() { | ||
// plurals | ||
repeat(200) { | ||
resources.getQuantityString(R.plurals.dashboard_tools_section_filter_available_tools, it, it) | ||
resources.getQuantityString(R.plurals.language_settings_downloadable_languages_available_tools, it, it) | ||
resources.getQuantityString(R.plurals.language_settings_section_app_language_available, it, it) | ||
} | ||
} | ||
} |