Skip to content
Draft
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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Has the updated Arabic language pack been approved?

I previously submitted the updated Arabic language files, but they haven't been integrated into the original project yet. Is there a problem? Will they be added in a future update?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not merged yet. It’s not really a problem, but we need some time for all the upcoming PRs to be reviewed and merged. That’s why I drafted this PR to avoid any conflicts in case yours gets merged first.

Original file line number Diff line number Diff line change
Expand Up @@ -4,28 +4,29 @@ import android.content.Context
import androidx.annotation.StringRes
import com.theveloper.pixelplay.R

enum class AppLanguage(val tag: String, @StringRes val labelRes: Int) {
SYSTEM("", R.string.settings_language_system),
ENGLISH("en", R.string.settings_language_english),
GERMAN("de", R.string.settings_language_german),
SPANISH("es", R.string.settings_language_spanish),
FRENCH("fr", R.string.settings_language_french),
INDONESIAN("in", R.string.settings_language_indonesian),
ITALIAN("it", R.string.settings_language_italian),
KOREAN("ko", R.string.settings_language_korean),
NORWEGIAN_BOKMAL("nb", R.string.settings_language_norwegian_bokmal),
RUSSIAN("ru", R.string.settings_language_russian),
SIMPLIFIED_CHINESE("zh-CN", R.string.settings_language_chinese),
TURKISH("tr", R.string.settings_language_turkish);
enum class AppLanguage(val tag: String, val nativeName: String, @StringRes val labelRes: Int?) {
SYSTEM("", "", R.string.settings_language_system),
ENGLISH("en", "English", null),
GERMAN("de", "Deutsch", null),
SPANISH("es", "Español", null),
FRENCH("fr", "Français", null),
INDONESIAN("in", "Bahasa Indonesia", null),
ITALIAN("it", "Italiano", null),
KOREAN("ko", "한국어", null),
NORWEGIAN_BOKMAL("nb", "Norsk bokmål", null),
RUSSIAN("ru", "Русский", null),
SIMPLIFIED_CHINESE("zh-CN", "简体中文", null),
TURKISH("tr", "Türkçe", null),
ARABIC("ar", "العربية", null);

companion object {
val supportedLanguageTags: Set<String> = values().map { it.tag }.toSet()

fun getLanguageOptions(context: Context): Map<String, String> {
val systemOption = SYSTEM.tag to context.getString(SYSTEM.labelRes)
val systemOption = SYSTEM.tag to (SYSTEM.labelRes?.let { context.getString(it) } ?: "")
val otherOptions = values()
.filter { it != SYSTEM }
.map { it.tag to context.getString(it.labelRes) }
.map { it.tag to it.nativeName }
.sortedBy { it.second.lowercase() }

val result = LinkedHashMap<String, String>()
Expand Down
75 changes: 0 additions & 75 deletions app/src/main/res/values-ar/plurals.xml

This file was deleted.

Loading
Loading