From 82d9cf23a9f2b1e29275781e9d2c6e032edd9448 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Igor=20R=C3=BCckert?= Date: Wed, 14 Sep 2022 14:02:05 -0300 Subject: [PATCH 1/5] Create pt.ps1 Portuguese translation for SpotX installer --- scripts/installer-lang/pt.ps1 | 65 +++++++++++++++++++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 scripts/installer-lang/pt.ps1 diff --git a/scripts/installer-lang/pt.ps1 b/scripts/installer-lang/pt.ps1 new file mode 100644 index 0000000..ebb472a --- /dev/null +++ b/scripts/installer-lang/pt.ps1 @@ -0,0 +1,65 @@ +[PSCustomObject]@{ + Author = "Autor do patch:" + Author2 = "@Amd64fox" + Incorrect = "Ops, um valor incorreto," + Incorrect2 = "entre novamente por " + Download = "Erro no download" + Download2 = "Solicitando novamente em 5 segundos..." + Download3 = "Erro de novo" + Download4 = "Verifique suas configurações de rede e tente executar a instalação novamente" + Download5 = "Baixando o Spotify" + Download6 = "Erro de Curl" + StopScrpit = "O script foi interrompido" + MsSpoti = "A versão do Spotify da Microsoft Store foi detectada, a qual não é suportada" + MsSpoti2 = "Desinstalar edição do Spotify da Microsoft Store [Y/N]" + MsSpoti3 = "Desinstalação automática do Spotify da MS..." + MsSpoti4 = "Desinstalando Spotify da MS..." + Prem = "Modificação para conta Premium..." + OldV = "Encontrada uma versão desatualizada do Spotify" + OldV2 = "A sua versão {0} do Spotify está desatualizada, é recomendado atualizar para {1}" + OldV3 = "Gostaria de atualizar? [Y/N]" + AutoUpd = "Atualização automática para a versão recomendada" + DelOrOver = "Gostaria de desinstalar a versão atual do {0} ou substituir a instalação atual? Y [Desinstalar] / N [Substituir]" + DelOld = "Desinstalando a versão antiga do Spotify..." + NewV = "Encontrada uma versão não suportada do Spotify" + NewV2 = "A sua versão do Spotify {0} não foi testada ainda, no momento, há uma versão estável {1}" + NewV3 = "Gostaria de continuar com a versão {0} (possíveis erros) ? [Y/N]" + Recom = "Gostaria de instalar a versão recomendada {0}? [Y/N]" + DelNew = "Desinstalando versão não testada do Spotify..." + DownSpoti = "Baixando e instalando o Spotify" + DownSpoti2 = "Aguarde..." + PodcatsOff = "Podcasts desativado" + PodcastsOn = "Podcasts ativado" + PodcatsSelect = "Deseja desativar os podcasts da página principal? [Y/N]" + DowngradeNote = "É recomendado bloquear, pois houve um downgrade do Spotify" + UpdBlock = "Atualizações do Spotify bloqueadas" + UpdUnblock = "Atualizações do Spotify não bloqueadas" + UpdSelect = "Deseja bloquear as atualizações do Spotify? [Y/N]" + CacheOn = "Limpar cache ativado ({0})" + CacheOff = "A limpeza do cache não está ativada" + CacheSelect = "Deseja definir a limpeza automática do cache? [Y/N]" + CacheDays = "Cache antigo: XX dias para serem limpos" + CacheDays2 = "Digite o número de dias entre 1 a 100" + NoVariable = "Variável não encontrada" + NoVariable2 = "em xpui.js" + NoVariable3 = "em licenses.html" + NoVariable4 = "em html" + NoVariable5 = "em home-v2.js" + NoVariable6 = "em xpui-desktop-modals.js" + ModSpoti = "Aplicando patch no Spotify..." + Error = "Erro" + FileLocBroken = "A localização dos arquivos do Sotify está incorreta, desinstale o cliente e execute o script novamente" + Spicetify = "Spicetify detectado" + NoRestore = "O SpotX já foi instalado, mas os arquivos de recuperação xpui.js.bak e xpui.css.bak não foram encontrados. `nPor favor, desinstale o cliente do Spotify e execute Install.bat novamente" + ExpSpotify = "Recursos experimentais oferecidos pelo Spotify" + ExpStandart = "Os recursos experimentais do SpotX não estão incluídos" + NoRestore2 = "O SpotX já foi instalado, xpui.bak não encontrado. Por favor, desinstale o cliente do Spotify e execute Install.bat novamente" + UpdateBlocked = "As atualizações do Spotify já estão bloqueadas" + UpdateError = "Falha ao bloquear as atualizações" + NoSpotifyExe = "Não foi possível localizar Spotify.exe" + InstallComplete = "instalação concluída" + HostInfo = "URLs indesejados encontradas no arquivo hosts" + HostBak = "Fazendo backup de hosts.bak..." + HostDel = "Tentando remover URLs indesejados do arquivo hosts original..." + HostError = "Algo deu errado ao editar o arquivo hosts, edite-o manualmente ou execute o script como Administrador" +} From 13922692099ec257afa8af2a8f6dc17d84ceaa94 Mon Sep 17 00:00:00 2001 From: amd64fox <62529699+amd64fox@users.noreply.github.com> Date: Wed, 14 Sep 2022 20:20:43 +0300 Subject: [PATCH 2/5] add translation author --- scripts/installer-lang/pt.ps1 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/installer-lang/pt.ps1 b/scripts/installer-lang/pt.ps1 index ebb472a..fa9e1dd 100644 --- a/scripts/installer-lang/pt.ps1 +++ b/scripts/installer-lang/pt.ps1 @@ -1,6 +1,8 @@ [PSCustomObject]@{ Author = "Autor do patch:" Author2 = "@Amd64fox" + TranslationBy = "Translation author:" + TranslationBy2 = "@igorruckert" Incorrect = "Ops, um valor incorreto," Incorrect2 = "entre novamente por " Download = "Erro no download" From 8f73b7e0a7aa779cf592ea862113c2e293fff947 Mon Sep 17 00:00:00 2001 From: amd64fox <62529699+amd64fox@users.noreply.github.com> Date: Wed, 14 Sep 2022 20:21:15 +0300 Subject: [PATCH 3/5] Update Install.ps1 --- Install.ps1 | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/Install.ps1 b/Install.ps1 index cf6fd1d..00e5b57 100644 --- a/Install.ps1 +++ b/Install.ps1 @@ -98,7 +98,7 @@ function Format-LanguageCode { begin { $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' break } + '^pt' { + $returnCode = 'pt' + break + } Default { $returnCode = $PSUICulture.Remove(2) break @@ -215,6 +219,10 @@ function Set-ScriptLanguageStrings($LanguageCode) { $langStrings = CallLang -clg "hi" break } + 'pt' { + $langStrings = CallLang -clg "pt" + break + } Default { # Default to English if unable to find a match. $langStrings = CallLang -clg "en" @@ -235,7 +243,7 @@ $lang = Set-ScriptLanguageStrings -LanguageCode $langCode # Set variable 'ru'. if ($langCode -eq 'ru') { $ru = $true } # 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 $au = ($lang).Author.Length + ($lang).Author2.Length From a1b33cae116d9b5f997e2fb9cef79c0664f8f1a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Igor=20R=C3=BCckert?= Date: Wed, 14 Sep 2022 14:36:57 -0300 Subject: [PATCH 4/5] Update pt.ps1 --- scripts/installer-lang/pt.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/installer-lang/pt.ps1 b/scripts/installer-lang/pt.ps1 index fa9e1dd..c4f2b13 100644 --- a/scripts/installer-lang/pt.ps1 +++ b/scripts/installer-lang/pt.ps1 @@ -1,7 +1,7 @@ [PSCustomObject]@{ Author = "Autor do patch:" Author2 = "@Amd64fox" - TranslationBy = "Translation author:" + TranslationBy = "Autor da tradução:" TranslationBy2 = "@igorruckert" Incorrect = "Ops, um valor incorreto," Incorrect2 = "entre novamente por " From df9e7f43c4e25d0434573a5cecae6bb7df7f1a19 Mon Sep 17 00:00:00 2001 From: amd64fox <62529699+amd64fox@users.noreply.github.com> Date: Wed, 14 Sep 2022 20:38:21 +0300 Subject: [PATCH 5/5] fix --- scripts/installer-lang/pt.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/installer-lang/pt.ps1 b/scripts/installer-lang/pt.ps1 index c4f2b13..3bdbaa5 100644 --- a/scripts/installer-lang/pt.ps1 +++ b/scripts/installer-lang/pt.ps1 @@ -55,7 +55,7 @@ NoRestore = "O SpotX já foi instalado, mas os arquivos de recuperação xpui.js.bak e xpui.css.bak não foram encontrados. `nPor favor, desinstale o cliente do Spotify e execute Install.bat novamente" ExpSpotify = "Recursos experimentais oferecidos pelo Spotify" ExpStandart = "Os recursos experimentais do SpotX não estão incluídos" - NoRestore2 = "O SpotX já foi instalado, xpui.bak não encontrado. Por favor, desinstale o cliente do Spotify e execute Install.bat novamente" + NoRestore2 = "O SpotX já foi instalado, xpui.bak não encontrado. `nPor favor, desinstale o cliente do Spotify e execute Install.bat novamente" UpdateBlocked = "As atualizações do Spotify já estão bloqueadas" UpdateError = "Falha ao bloquear as atualizações" NoSpotifyExe = "Não foi possível localizar Spotify.exe"