Update Install.ps1

This commit is contained in:
amd64fox
2022-09-14 20:21:15 +03:00
committed by GitHub
parent 1392269209
commit 8f73b7e0a7
+10 -2
View File
@@ -98,7 +98,7 @@ function Format-LanguageCode {
begin { begin {
$supportLanguages = @( $supportLanguages = @(
'en', 'ru', 'it', 'tr', 'ka', 'pl', 'es', 'fr', 'hi' 'en', 'ru', 'it', 'tr', 'ka', 'pl', 'es', 'fr', 'hi', 'pt'
) )
} }
@@ -141,6 +141,10 @@ function Format-LanguageCode {
$returnCode = 'hi' $returnCode = 'hi'
break break
} }
'^pt' {
$returnCode = 'pt'
break
}
Default { Default {
$returnCode = $PSUICulture.Remove(2) $returnCode = $PSUICulture.Remove(2)
break break
@@ -215,6 +219,10 @@ function Set-ScriptLanguageStrings($LanguageCode) {
$langStrings = CallLang -clg "hi" $langStrings = CallLang -clg "hi"
break break
} }
'pt' {
$langStrings = CallLang -clg "pt"
break
}
Default { Default {
# Default to English if unable to find a match. # Default to English if unable to find a match.
$langStrings = CallLang -clg "en" $langStrings = CallLang -clg "en"
@@ -235,7 +243,7 @@ $lang = Set-ScriptLanguageStrings -LanguageCode $langCode
# Set variable 'ru'. # Set variable 'ru'.
if ($langCode -eq 'ru') { $ru = $true } if ($langCode -eq 'ru') { $ru = $true }
# Set variable 'add transl line'. # Set variable 'add transl line'.
if ($langCode -match '^(it|tr|ka|pl|es|fr|hi)') { $line = $true } if ($langCode -match '^(it|tr|ka|pl|es|fr|hi|pt)') { $line = $true }
# Automatic length of stars # Automatic length of stars
$au = ($lang).Author.Length + ($lang).Author2.Length $au = ($lang).Author.Length + ($lang).Author2.Length