Skip to content

Commit ed0afe0

Browse files
committed
Remove unused import and simplify language detection logic
1 parent c33339a commit ed0afe0

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

src/main/kotlin/com/airsaid/localization/utils/LanguageUtil.kt

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ import com.airsaid.localization.translate.lang.Languages
2323
import com.intellij.ide.util.PropertiesComponent
2424
import com.intellij.openapi.project.Project
2525
import com.intellij.openapi.vfs.VirtualFile
26-
import org.apache.http.util.TextUtils
2726

2827
/**
2928
* A util class that operates on language data.
@@ -100,12 +99,7 @@ object LanguageUtil {
10099
if (child.isDirectory) {
101100
val dirName = child.name
102101

103-
if (dirName == "values") {
104-
// Default values directory represents the default language (usually English)
105-
// We'll look for a language with empty directoryName or "en" code
106-
val defaultLang = supportedLanguages.find { it.directoryName.isBlank() || it.code == "en" }
107-
defaultLang?.let { existingLanguages.add(it) }
108-
} else if (dirName.startsWith("values-")) {
102+
if (dirName.startsWith("values-")) {
109103
val languageCode = dirName.substring(7) // Remove "values-" prefix
110104

111105
// Find matching language by directory name

0 commit comments

Comments
 (0)