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:
amd64fox
2022-10-12 19:51:05 +03:00
parent d6e432be5e
commit b0b5fbaa11
2 changed files with 77 additions and 2 deletions

View File

@@ -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