Skip to content

Commit

Permalink
PT localization
Browse files Browse the repository at this point in the history
  • Loading branch information
mxgrn committed Jan 27, 2024
1 parent cce71b0 commit d98ee8c
Show file tree
Hide file tree
Showing 4 changed files with 49 additions and 43 deletions.
48 changes: 24 additions & 24 deletions assets/elm/I18n/Pt.elm
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ translate t =
"Sua vez, " ++ name ++ "!"

YourName ->
"Your name"
"Seu nome"

Chat ->
"Chat"
"Bater papo"

You name ->
"Você, " ++ name
Expand All @@ -34,7 +34,7 @@ translate t =
"Percentual de acerto: " ++ toString value ++ "%"

Score value ->
"Score: " ++ toString value
"Pontuação: " ++ toString value

Scoreboard t ->
case t of
Expand All @@ -48,70 +48,70 @@ translate t =
"Compartilhe essa URL com seu(s) oponente(s):"

ShareThisUrlRandom ->
"As soon as there is another player available, we'll hook you up! If you don't want to wait, share this URL with anybody you want to play with:"
"Assim que houver outro jogador disponível, ligaremos para você! Se você não quiser esperar, compartilhe este URL com quem quiser jogar:"

HelpMeKeepItAdFree ->
"Ajude-me a manter o Pairs One sem anúncios, doando no"

Theme ->
"Theme"
"Tema"

Size ->
"Size"
"Tamanho"

Public ->
"Public"
"Público"

Private ->
"Private"
"Privado"

Local ->
"Local"

PickTheme ->
"Pick a theme"
"Escolha um tema"

Difficulty ->
"Difficulty"
"Dificuldade"

DifficultyEasy ->
"easy"
"fácil"

DifficultyMedium ->
"medium"
"média"

DifficultyHard ->
"hard"
"dura"

SelectGameMode ->
"With whom would you like to play?"
"Com quem você gostaria de jogar?"

GameModeDescription ->
"In a 'public' game, someone may join you when choosing a random player to play with. If you want to only play with someone that you'll send the link to - choose 'private'. If you have a friend right next to you and you want to play on the same device, choose 'local'."
"Em um jogo “público”, alguém pode se juntar a você ao escolher um jogador aleatório para jogar. Se você quiser jogar apenas com alguém para quem enviará o link - escolha 'privado'. Se você tem um amigo próximo a você e deseja jogar no mesmo dispositivo, escolha 'local'."

WillPlayWithStranger ->
"I'd like a stranger to join me!"
"Eu gostaria que um estranho se juntasse a mim"

WillSelectOpponents ->
"I'll invite my opponent(s) myself"
"Eu mesmo convidarei meu(s) oponente(s)"

WillPlayLocally ->
"I'll play with someone locally"
"Vou brincar com alguém localmente"

SelectNumberOfPlayers ->
"Select number of players"
"Selecione o número de jogadores"

NumberOfPlayersDescription ->
"If you select 1, you'll be able to play alone. However, it's much more fun to play with someone over the Internet!"
"Se você selecionar 1, poderá jogar sozinho. Porém, é muito mais divertido brincar com alguém pela Internet!"

SelectBoardSize ->
"Select the size"
"Selecione o tamanho"

SelectBoardSizeDescription ->
"The bigger the board - the more cards will there be to remember"
"Quanto maior o tabuleiro, mais cartas haverá para lembrar"

StartGame ->
"Start game"
"Começar o jogo"

Waiting ->
"Waiting"
"Esperando"
2 changes: 1 addition & 1 deletion config/config.exs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ config :logger,
backends: [:console, Sentry.LoggerBackend]

# TODO: finish localization for pt and uk
config :pairs_one, PairsOneWeb.Gettext, locales: ~w(en de pl es it fr ru)
config :pairs_one, PairsOneWeb.Gettext, locales: ~w(en de pl es it pt fr ru)

# Use Jason for JSON parsing in Phoenix
config :phoenix, :json_library, Jason
Expand Down
36 changes: 21 additions & 15 deletions lib/pairs_one_web/templates/page/index.pt.html.eex
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
<div class="rules">
<div class="rules-header">
<span class="header-icon fa fa-question"></span>
You know the rules, right?
Você conhece as regras, certo?
</div>
<p class="text-muted">Look for pairs of cards by turning them over in turns, 2 at a time. If you find a match, you get a point - and you may turn over 2 more cards. Whoever finds more matches wins.</p>
<p class="text-muted">Procure pares de cartas virando-as alternadamente, 2 de cada vez. Se encontrar uma correspondência, você ganha um ponto - e pode virar mais 2 cartas. Quem encontrar mais partidas vence.</p>
</div>
</div>

Expand All @@ -15,9 +15,9 @@
<form class="game-option option-four" method=post action="/<%= locale() %>/games">
<div class="row">
<div class="col-md-6 game-option__title">
<h4>Play solo</h4>
<h4>Jogar sozinho</h4>
<div class="game-option__description">
Play solo to improve your accuracy!
Jogue sozinho para melhorar sua precisão!
<br/>
<input type="hidden" name="_csrf_token" value="<%= get_csrf_token() %>">
<input type="hidden" name="game[theme]" value="eighties">
Expand All @@ -27,7 +27,9 @@
</div>
</div>
<div class="col-md-6 btn-option-go__block">
<button type="submit" class="btn btn-option-go btn-info">Start <strong>solo</strong> game</button>
<button type="submit" class="btn btn-option-go btn-info">
Comece o jogo <strong>solo</strong>
</button>
</div>
</div>
</form>
Expand All @@ -36,9 +38,9 @@
<input type="hidden" name="_csrf_token" value="<%= get_csrf_token() %>">
<div class="row">
<div class="col-md-6 game-option__title">
<h4>Play with anybody</h4>
<h4>Jogue com qualquer</h4>
<div class="game-option__description">
Somebody may be waiting for you to join right now!
Alguém pode estar esperando você entrar agora mesmo!
</div>
</div>
<div class="col-md-6 btn-option-go__block">
Expand All @@ -50,9 +52,9 @@
<form class="game-option option-two" method=post action="/<%= locale() %>/games">
<div class="row">
<div class="col-md-6 game-option__title">
<h4>Play with a friend</h4>
<h4>Jogue com um amigo</h4>
<div class="game-option__description">
Simply send a link to your online friend to begin!
Basta enviar um link para seu amigo online para começar!
<br/>
<input type="hidden" name="_csrf_token" value="<%= get_csrf_token() %>">
<input type="hidden" name="game[theme]" value="eighties">
Expand All @@ -62,17 +64,19 @@
</div>
</div>
<div class="col-md-6 btn-option-go__block">
<button type="submit" class="btn btn-option-go btn-success">Start <strong>2-player</strong> game</button>
<button type="submit" class="btn btn-option-go btn-success">
Iniciar um jogo <strong>para 2</strong>
</button>
</div>
</div>
</form>

<form class="game-option option-three" method=post action="/<%= locale() %>/games">
<div class="row">
<div class="col-md-6 game-option__title">
<h4>Play locally</h4>
<h4>Jogue localmente</h4>
<div class="game-option__description">
Play with your friend on the same device!
Jogue com seu amigo no mesmo dispositivo!
<br/>
<input type="hidden" name="_csrf_token" value="<%= get_csrf_token() %>">
<input type="hidden" name="game[theme]" value="eighties">
Expand All @@ -82,20 +86,22 @@
</div>
</div>
<div class="col-md-6 btn-option-go__block">
<button type="submit" class="btn btn-option-go btn-warning">Start <strong>local</strong> game</button>
<button type="submit" class="btn btn-option-go btn-warning">
Comece um jogo <strong>local</strong>
</button>
</div>
</div>
</form>

<div class="centered-content more-game-options hidden-xs">
<a href="#custom-game"><span class="fa fa-angle-down"></span> More options</a>
<a href="#custom-game"><span class="fa fa-angle-down"></span> Mais opções</a>
</div>

</div>

</div>

<h3 id="custom-game" class="centered-content custom-game__title">Start a custom game</h3>
<h3 id="custom-game" class="centered-content custom-game__title">Inicie um jogo personalizado</h3>
<div class="col-sm-12">
<div class="elm-game-selector" data-themes='<%= raw @themes %>' data-csrf='<%= get_csrf_token() %>'></div>
</div>
6 changes: 3 additions & 3 deletions priv/gettext/pt/LC_MESSAGES/default.po
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@ msgstr "Código fonte"
#: lib/pairs_one_web/templates/layout/app.html.eex:10
#: lib/pairs_one_web/templates/layout/app.html.eex:43
msgid "Concentration game: multiplayer and registration-free"
msgstr ""
msgstr "Jogo da memória: multiplayer e sem registro"

#: lib/pairs_one_web/templates/layout/app.html.eex:45
msgid "Unload your mind while improving your memory"
msgstr ""
msgstr "Descarregue sua mente enquanto melhora sua memória"

#: lib/pairs_one_web/templates/layout/app.html.eex:73
msgid "Help with translation"
msgstr ""
msgstr "Ajude com a tradução"

0 comments on commit d98ee8c

Please sign in to comment.