Added Ukrainian translation 💙💛

https: //github.com/SpotX-CLI/SpotX-Win/issues/234
Co-Authored-By: vaidee <85072834+va1dee@users.noreply.github.com>
This commit is contained in:
amd64fox
2022-12-03 10:42:53 +03:00
parent e5924d373d
commit 8d406acace
2 changed files with 71 additions and 2 deletions
+10 -2
View File
@@ -107,7 +107,7 @@ function Format-LanguageCode {
begin {
$supportLanguages = @(
'en', 'ru', 'it', 'tr', 'ka', 'pl', 'es', 'fr', 'hi', 'pt', 'id', 'vi', 'ro', 'de', 'hu', 'zh', 'ko'
'en', 'ru', 'it', 'tr', 'ka', 'pl', 'es', 'fr', 'hi', 'pt', 'id', 'vi', 'ro', 'de', 'hu', 'zh', 'ko', 'ua'
)
}
@@ -182,6 +182,10 @@ function Format-LanguageCode {
$returnCode = 'ko'
break
}
'^ua' {
$returnCode = 'ua'
break
}
Default {
$returnCode = $PSUICulture.Remove(2)
break
@@ -288,6 +292,10 @@ function Set-ScriptLanguageStrings($LanguageCode) {
$langStrings = CallLang -clg "ko"
break
}
'ua' {
$langStrings = CallLang -clg "ua"
break
}
Default {
# Default to English if unable to find a match.
$langStrings = CallLang -clg "en"
@@ -312,7 +320,7 @@ if ($langCode -eq 'ru') {
$webjsonru = (Invoke-WebRequest -UseBasicParsing -Uri $urlru).Content | ConvertFrom-Json
}
# Set variable 'add translation line'.
if ($langCode -match '^(it|tr|ka|pl|es|fr|hi|pt|id|vi|ro|de|hu|zh|ko)') { $line = $true }
if ($langCode -match '^(it|tr|ka|pl|es|fr|hi|pt|id|vi|ro|de|hu|zh|ko|ua)') { $line = $true }
# Automatic length of stars
$au = ($lang).Author.Length + ($lang).Author2.Length