Add Romanian translation

https: //github.com/SpotX-CLI/SpotX-Win/issues/173
Co-Authored-By: scrappie <scr3ppie@gmail.com>
This commit is contained in:
amd64fox
2022-10-05 16:53:13 +03:00
parent 237965887a
commit 0432de8aa2
2 changed files with 77 additions and 2 deletions
+10 -2
View File
@@ -104,7 +104,7 @@ function Format-LanguageCode {
begin {
$supportLanguages = @(
'en', 'ru', 'it', 'tr', 'ka', 'pl', 'es', 'fr', 'hi', 'pt', 'id', 'vi'
'en', 'ru', 'it', 'tr', 'ka', 'pl', 'es', 'fr', 'hi', 'pt', 'id', 'vi', 'ro'
)
}
@@ -159,6 +159,10 @@ function Format-LanguageCode {
$returnCode = 'vi'
break
}
'^ro' {
$returnCode = 'ro'
break
}
Default {
$returnCode = $PSUICulture.Remove(2)
break
@@ -245,6 +249,10 @@ function Set-ScriptLanguageStrings($LanguageCode) {
$langStrings = CallLang -clg "vi"
break
}
'ro' {
$langStrings = CallLang -clg "ro"
break
}
Default {
# Default to English if unable to find a match.
$langStrings = CallLang -clg "en"
@@ -265,7 +273,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)') { $line = $true }
if ($langCode -match '^(it|tr|ka|pl|es|fr|hi|pt|id|vi|ro)') { $line = $true }
# Automatic length of stars
$au = ($lang).Author.Length + ($lang).Author2.Length