mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-03-22 15:19:59 +07:00
Fix RIDER-114729: remove workaround for Vision with specific language codes
GitOrigin-RevId: 5cdef9637551cb85577789c802da1ef034c35287
This commit is contained in:
committed by
intellij-monorepo-bot
parent
85e207094b
commit
2aae136ee4
@@ -279,24 +279,9 @@ internal class WhatsNewVisionContent(page: WhatsNewInVisionContentProvider.Page)
|
||||
}
|
||||
|
||||
fun getCurrentLanguageTag(): String {
|
||||
val lang = LocalizationStateService.getInstance()?.getSelectedLocale()?.lowercase() ?: run {
|
||||
return LocalizationStateService.getInstance()?.getSelectedLocale()?.lowercase() ?: run {
|
||||
logger.error("Cannot get a LocalizationStateService instance. Default to en-us locale.")
|
||||
return "en-us"
|
||||
}
|
||||
if (lang.contains('-')) {
|
||||
logger.error("Failed assumption: it is expected that the IDE language tag \"$lang\" doesn't contain \"-\".")
|
||||
return lang
|
||||
}
|
||||
|
||||
return when(lang) {
|
||||
"en" -> "en-us"
|
||||
"ja" -> "ja-jp"
|
||||
"zh" -> "zh-cn"
|
||||
"ko" -> "ko-kr"
|
||||
else -> {
|
||||
logger.error("Unknown language tag for What's New: \"$lang\".")
|
||||
lang
|
||||
}
|
||||
"en-us"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user