mirror of
https://github.com/SpotX-Official/SpotX.git
synced 2026-04-21 18:40:20 +10:00
Added Hungarian translation
https: //github.com/SpotX-CLI/SpotX-Win/issues/181 Co-Authored-By: Wex02 <68199765+Wex02@users.noreply.github.com>
This commit is contained in:
12
Install.ps1
12
Install.ps1
@@ -104,7 +104,7 @@ function Format-LanguageCode {
|
||||
|
||||
begin {
|
||||
$supportLanguages = @(
|
||||
'en', 'ru', 'it', 'tr', 'ka', 'pl', 'es', 'fr', 'hi', 'pt', 'id', 'vi', 'ro', 'de'
|
||||
'en', 'ru', 'it', 'tr', 'ka', 'pl', 'es', 'fr', 'hi', 'pt', 'id', 'vi', 'ro', 'de', 'hu'
|
||||
)
|
||||
}
|
||||
|
||||
@@ -167,6 +167,10 @@ function Format-LanguageCode {
|
||||
$returnCode = 'de'
|
||||
break
|
||||
}
|
||||
'^hu' {
|
||||
$returnCode = 'hu'
|
||||
break
|
||||
}
|
||||
Default {
|
||||
$returnCode = $PSUICulture.Remove(2)
|
||||
break
|
||||
@@ -261,6 +265,10 @@ function Set-ScriptLanguageStrings($LanguageCode) {
|
||||
$langStrings = CallLang -clg "de"
|
||||
break
|
||||
}
|
||||
'hu' {
|
||||
$langStrings = CallLang -clg "hu"
|
||||
break
|
||||
}
|
||||
Default {
|
||||
# Default to English if unable to find a match.
|
||||
$langStrings = CallLang -clg "en"
|
||||
@@ -281,7 +289,7 @@ $lang = Set-ScriptLanguageStrings -LanguageCode $langCode
|
||||
# Set variable 'ru'.
|
||||
if ($langCode -eq 'ru') { $ru = $true }
|
||||
# Set variable 'add translation line'.
|
||||
if ($langCode -match '^(it|tr|ka|pl|es|fr|hi|pt|id|vi|ro|de)') { $line = $true }
|
||||
if ($langCode -match '^(it|tr|ka|pl|es|fr|hi|pt|id|vi|ro|de|hu)') { $line = $true }
|
||||
|
||||
# Automatic length of stars
|
||||
$au = ($lang).Author.Length + ($lang).Author2.Length
|
||||
|
||||
Reference in New Issue
Block a user