diff --git a/README.md b/README.md index 4ffb845..c487522 100644 --- a/README.md +++ b/README.md @@ -36,7 +36,7 @@ These commands are not mandatory for you to use this mod. To do the same, you c | ````/candidates```` | | Show the name of all candidates for president. | | ````/candidate```` or ````/campaign```` | ````[]```` | Show the Campaign of candidate for president. | | ````/vote```` | ````[]```` | Vote for a specific candidate for president. Need a minimum number of hours of online play. | -| ````/unvote```` | | Unvote for presidetial candidate. | +| ````/unvote```` or ````/whitevote```` | | Apply Blank Vote. | | ````/votes```` | | Show the name of all candidates for president with the amount of votes. Need the ````electoraljudge```` privilege. | | ````/election```` | | Apply presidential selection vote counting! Need the ````electoraljudge```` privilege. | diff --git a/api.lua b/api.lua index 107b903..0f1b417 100644 --- a/api.lua +++ b/api.lua @@ -313,15 +313,19 @@ end modEUrn.doUnvote = function(playername) modEUrn.doCheckDataBase(candidatename) - for iCandPresName, _ in pairs(modEUrn.handler.candidates.president) do - --modEUrn.debug("iCandPresName = "..iCandPresName) - if type(modEUrn.handler.candidates.president[iCandPresName].voters[playername])~="nil" then - --modEUrn.debug("modEUrn.handler.candidates.president["..iCandPresName.."].voters = "..dump(modEUrn.handler.candidates.president[iCandPresName].voters)) - modEUrn.handler.candidates.president[iCandPresName].voters[playername] = nil - return true, modEUrn.translate("You unvoted for the presidential candidate!") - end + local voterTimePlayed = modEUrn.getVoterPlayedTime(playername) + if type(voterTimePlayed)=="number" and voterTimePlayed >= modEUrn.MinPlayedHours * (60*60) then + for iCandPresName, _ in pairs(modEUrn.handler.candidates.president) do + --modEUrn.debug("iCandPresName = "..iCandPresName) + if type(modEUrn.handler.candidates.president[iCandPresName].voters[playername])~="nil" then + --modEUrn.debug("modEUrn.handler.candidates.president["..iCandPresName.."].voters = "..dump(modEUrn.handler.candidates.president[iCandPresName].voters)) + modEUrn.handler.candidates.president[iCandPresName].voters[playername] = nil + end + end + return true, modEUrn.translate("You voted blank!") + else + return false, modEUrn.translate("You have not yet played the minimum number of hours to become a presidential voter. (Minimum %02d hours)"):format(modEUrn.MinPlayedHours) end - return false, modEUrn.translate("You can't have registered vote!") end --[[ ]] @@ -329,9 +333,7 @@ modEUrn.doVote = function(playername, candidatename) local voterTimePlayed = modEUrn.getVoterPlayedTime(playername) --modEUrn.debug("modEUrn.doVote(): voterTimePlayed = "..dump(voterTimePlayed)) if type(voterTimePlayed)=="number" then - --if type(modEUrn.handler.voters[playername])=="table" then - --local voterTimePlayed = modEUrn.handler.voters[playername].times.played --in secounds - if voterTimePlayed >= modEUrn.MinPlayedHours * (60*60) then + if voterTimePlayed >= modEUrn.MinPlayedHours * (60*60) then if type(candidatename)=="string" and candidatename ~= "" then if minetest.player_exists(candidatename) then if type(modEUrn.handler.candidates.president[candidatename])=="table" then diff --git a/commands.lua b/commands.lua index f53e56d..4402a5d 100644 --- a/commands.lua +++ b/commands.lua @@ -193,7 +193,7 @@ minetest.register_chatcommand( ) --############################################################################ ---[[ ]] + modEUrn.getPropCommCandVote = function() return { --privs = {electoraljudge=true}, @@ -220,7 +220,39 @@ minetest.register_chatcommand( "vote", modEUrn.getPropCommCandVote() ) ---]] + +--############################################################################ + +modEUrn.getPropCommUnvote = function() + return { + --privs = {electoraljudge=true}, + --params = "<".. modEUrn.translate("candidate_name")..">", + description = modEUrn.translate("Apply Blank Vote."), + func = function(playername, param) + local resulte, cause = modEUrn.doUnvote(playername) + local color = "#FF0000" + if resulte then + color = "#00FF00" + minetest.sound_play("sfx_eurn_confirm", {to_player=playername, max_hear_distance=5.0,}) + else + minetest.sound_play("sfx_failure", {to_player=playername, max_hear_distance=5.0,}) + end + minetest.chat_send_player( + playername, + core.colorize(color, "[E-URN]").." "..cause + ) + end, + } +end + +minetest.register_chatcommand( + "unvote", + modEUrn.getPropCommUnvote() +) +minetest.register_chatcommand( + "whitevote", + modEUrn.getPropCommUnvote() +) --############################################################################ diff --git a/formspecs.lua b/formspecs.lua index 2a0fd17..814e56d 100644 --- a/formspecs.lua +++ b/formspecs.lua @@ -9,7 +9,7 @@ modEUrn.FormSpecs = { .."background[0,-8;16,16;text_eurn_front.png]" .."box[2.05,1.50;7.75,5.00;#001100CC]" .."button[2.15,1.65;7.55,1;btnPresElection;"..modEUrn.translate("PRESIDENTIAL ELECTION").."]" - --.."button[2.15,2.65;7.55,1;btnElectoralCourt;"..modEUrn.translate("ELECTORAL COURT").."]" + .."button[2.15,2.65;7.55,1;btnElectoralCourt;"..modEUrn.translate("ELECTORAL COURT").."]" .."style_type[button_exit;bgimg=;bgimg_pressed=;border=;bgcolor=red]" .."button_exit[2.15,3.65;7.55,1;;"..modEUrn.translate("EXIT").."]" minetest.sound_play("sfx_eurn_button", {to_player=playername, max_hear_distance=5.0,}) @@ -68,9 +68,10 @@ modEUrn.FormSpecs = { %s ]] myFormSpec = myFormSpec + --.."style[htmPanel;bgcolor=white;border=#008800CC;color=black]" .."hypertext[4.0,0.5;11.25,6.00;htmPanel;" --..minetest.formspec_escape("") - .."" + .."" .."" .."" .."" @@ -78,15 +79,13 @@ modEUrn.FormSpecs = { ..minetest.formspec_escape(body:format(cands[selected], Campaign)) .."]" -- Fim de hypertext[] - myFormSpec = myFormSpec - .."style[btnWhiteVote;bgcolor=white;color=black]" - .."button[4.0,6.75;3.00,1;btnWhiteVote;"..minetest.formspec_escape(modEUrn.translate("WHITE")).."]" - local voterTimePlayed = modEUrn.getVoterPlayedTime(playername) if type(voterTimePlayed)=="number" and voterTimePlayed >= modEUrn.MinPlayedHours * (60*60) then - myFormSpec = myFormSpec - .."style[btnPresVote;bgimg=;bgimg_pressed=;border=;bgcolor=green]" - .."button[7.10,6.75;5.65,1;btnPresVote;"..minetest.formspec_escape(modEUrn.translate("CONFIRM")).."]" + myFormSpec = myFormSpec + .."style[btnWhiteVote;bgcolor=white;color=black]" + .."button[4.0,6.75;3.00,1;btnWhiteVote;"..minetest.formspec_escape(modEUrn.translate("WHITE")).."]" + .."style[btnPresVote;bgimg=;bgimg_pressed=;border=;bgcolor=green]" + .."button[7.10,6.75;5.65,1;btnPresVote;"..minetest.formspec_escape(modEUrn.translate("CONFIRM")).."]" end end @@ -96,35 +95,19 @@ modEUrn.FormSpecs = { minetest.sound_play("sfx_eurn_button", {to_player=playername, max_hear_distance=5.0,}) minetest.show_formspec(playername, "frmEUrnPresCands", myFormSpec) end, - showFormPresElect = function(playername) + showFormAlert = function(playername, icon, title, titlecolor, message, buttonname, buttonsound) local body = "" - local presidentname = modEUrn.getPresidentName() - if presidentname~="" then - body = [[ + body = [[
- - %s - %s + + + %s
- ]] - body = body:format( - presidentname:upper(), - modEUrn.translate("PRESIDENT ELECT") - ) - else - body = [[ -
- - %s - - %s -
- ]] - body = body:format( - modEUrn.translate("E-URN"), - modEUrn.translate("No presidential candidate has yet been elected!") - ) - end + ]] + if type(titlecolor)=="nil" or titlecolor=="" then + titlecolor = "#00FF00" + end + body = body:format(icon, titlecolor, title, message) local myFormSpec = "" myFormSpec = myFormSpec .."formspec_version[6]" @@ -135,15 +118,23 @@ modEUrn.FormSpecs = { --..minetest.formspec_escape("") .."" .."" - .."" + .."" .."" .."" ..minetest.formspec_escape(body) .."]" -- Fim de hypertext[] - .."style[btnBack;bgimg=;bgimg_pressed=;border=;bgcolor=red]" - .."button[2.15,5.50;7.55,1;btnBack;"..minetest.formspec_escape(modEUrn.translate("BACK")).."]" - minetest.sound_play("sfx_eurn_button", {to_player=playername, max_hear_distance=5.0,}) - minetest.show_formspec(playername, "frmEUrnPresElect", myFormSpec) + --.."style[btnBack;bgimg=;bgimg_pressed=;border=;bgcolor=red]" + + local button_type = "button" + if type(buttonname)=="nil" or buttonname=="" or buttonname=="btnExit" then + button_type = "button_exit" + end + myFormSpec = myFormSpec + ..button_type.."[2.15,5.50;7.55,1;"..minetest.formspec_escape(buttonname)..";OK]" + if type(buttonsound)=="string" and buttonsound~="" then + minetest.sound_play(buttonsound, {to_player=playername, max_hear_distance=5.0,}) + end + minetest.show_formspec(playername, "frmEUrnAlert", myFormSpec) end, showFormRegCampaign = function(playername, political_campaign) local Campaign = modEUrn.getPresCandCampaign(playername) @@ -237,7 +228,15 @@ minetest.register_on_player_receive_fields(function(player, formname, fields) local playername = player:get_player_name() --modEUrn.debug("formname: "..formname.."\n".."fields: "..dump(fields), playername) - if type(formname)=="string" and formname == "frmEUrnMain" then + if type(formname)=="string" and formname == "frmEUrnAlert" then + if type(fields.btnEUrnMain) ~= "nil" then + modEUrn.FormSpecs.showFormMain(playername) + elseif type(fields.btnEUrnPresElection) ~= "nil" then + modEUrn.FormSpecs.showFormPresElection(playername) + elseif type(fields.btnEUrnPresCands) ~= "nil" then + modEUrn.FormSpecs.showFormPresCands(playername) + end + elseif type(formname)=="string" and formname == "frmEUrnMain" then if type(fields.btnPresElection) ~= "nil" then modEUrn.FormSpecs.showFormPresElection(playername) elseif type(fields.quit) ~= "true" then @@ -247,7 +246,30 @@ minetest.register_on_player_receive_fields(function(player, formname, fields) if type(fields.btnPresCandidates) ~= "nil" then modEUrn.FormSpecs.showFormPresCands(playername, nil) elseif type(fields.btnPresElect) ~= "nil" then - modEUrn.FormSpecs.showFormPresElect(playername) + local icon, title, message, buttonname = "" + local presidentname = modEUrn.getPresidentName() + if presidentname~="" then + icon = "text_candidate_face.png" + title = presidentname:upper() + titlecolor = "#00FF00" + message = modEUrn.translate("PRESIDENT ELECT") + buttonname = "btnEUrnMain" + else + icon = "favicon.png" + title = modEUrn.translate("E-URN") + titlecolor = "#FF0000" + message = modEUrn.translate("No presidential candidate has yet been elected!") + buttonname = "btnEUrnPresElection" + end + modEUrn.FormSpecs.showFormAlert( + playername, + icon, + title, + titlecolor, + message, + buttonname, + "sfx_eurn_button" + ) elseif type(fields.btnBack) ~= "nil" then modEUrn.FormSpecs.showFormMain(playername) end @@ -265,29 +287,61 @@ minetest.register_on_player_receive_fields(function(player, formname, fields) end elseif type(fields.btnPresVote) ~= "nil" then if type(modEUrn.selCand[playername])=="string" and modEUrn.selCand[playername]~="" then - local voterTimePlayed = modEUrn.getVoterPlayedTime(playername) - if type(voterTimePlayed)=="number" and voterTimePlayed >= modEUrn.MinPlayedHours * (60*60) then - local resulte, cause = modEUrn.doVote(playername, modEUrn.selCand[playername]) - local color = "#FF0000" - if resulte then - color = "#00FF00" - minetest.sound_play("sfx_eurn_confirm", {to_player=playername, max_hear_distance=5.0,}) - else - minetest.sound_play("sfx_failure", {to_player=playername, max_hear_distance=5.0,}) - end - minetest.chat_send_player( - playername, - core.colorize(color, "[E-URN]").." "..cause - ) - modEUrn.FormSpecs.showFormPresElection(playername) - else - minetest.sound_play("sfx_failure", {to_player=playername, max_hear_distance=5.0,}) - minetest.chat_send_player( - playername, - core.colorize("#FF0000", "[E-URN]").." " - ..modEUrn.translate("You have not yet played the minimum number of hours to become a presidential voter. (Minimum %02d hours)"):format(modEUrn.MinPlayedHours) - ) + local resulte, cause = modEUrn.doVote(playername, modEUrn.selCand[playername]) + local color = "#FF0000" + local icon = "favicon.png" + local title = modEUrn.translate("E-URN") + local message = cause + local buttonname = "btnEUrnPresCands" + local buttonsound = "sfx_failure" + + if resulte then + color = "#00FF00" + icon = "text_candidate_face.png" + title = modEUrn.selCand[playername]:upper() + message = modEUrn.translate("Thanks for your vote!") + buttonname = "btnEUrnMain" + buttonsound = "sfx_eurn_confirm" + --minetest.sound_play("sfx_eurn_confirm", {to_player=playername, max_hear_distance=5.0,}) end + minetest.chat_send_player( + playername, + core.colorize(color, "[E-URN]").." "..cause + ) + modEUrn.FormSpecs.showFormAlert( + playername, + icon, + title, + color, + message, + buttonname, + buttonsound + ) + end + elseif type(fields.btnWhiteVote) ~= "nil" then + local resulte, cause = modEUrn.doUnvote(playername) + if type(modEUrn.selCand[playername])=="string" and modEUrn.selCand[playername]~="" then + local resulte, cause = modEUrn.doUnvote(playername) + local color = "#FF0000" + local buttonsound = "sfx_failure" + + if resulte then + color = "#00FF00" + buttonsound = "sfx_eurn_confirm" + end + minetest.chat_send_player( + playername, + core.colorize(color, "[E-URN]").." "..cause + ) + modEUrn.FormSpecs.showFormAlert( + playername, + "favicon.png", + modEUrn.translate("E-URN"), + color, + cause, + "btnEUrnPresCands", + buttonsound + ) end elseif type(fields.btnBack) ~= "nil" then modEUrn.FormSpecs.showFormPresElection(playername) diff --git a/locale/README.md b/locale/README.md index d2d63ca..5372186 100644 --- a/locale/README.md +++ b/locale/README.md @@ -69,10 +69,10 @@ sudo apt-get install poedit Translate Sample: [locale/eurn.pt_BR.tr] ```bash -$ cd ./locale/ -$ lua5.3 po2tr.lua "eurn" "pt_BR.po" -$ mv "pt_BR.tr" "eurn.pt_BR.tr" -$ cat eurn.pt_BR.tr | less +cd ./locale/ +lua5.3 po2tr.lua "eurn" "pt_BR.po" +mv "pt_BR.tr" "eurn.pt_BR.tr" +cat eurn.pt_BR.tr | less ``` ----- diff --git a/locale/eurn.pt_BR.tr b/locale/eurn.pt_BR.tr index 49c032c..1247a05 100644 --- a/locale/eurn.pt_BR.tr +++ b/locale/eurn.pt_BR.tr @@ -2,8 +2,10 @@ * %s : %02d votes= * %s : %02d votos Allows you to configure the Electronic Urn.=Permite configurar a Urna Eletrônica. Apply presidential selection vote counting! Need the 'electoraljudge' privilege.=Aplique a contagem de votos nas eleições presidenciais! Precisa do privilégio de 'electoraljudge'. +BACK=VOLTAR CANCEL=CANCELAR CLOSE=FECHAR +CONFIRM=CONFIRMAR Candidate Campaign=Campanha do Candidato Candidate List: %s=Lista de Candidatos: %s Candidate Name=Nome do Candidato @@ -12,17 +14,24 @@ Database '%s' loaded!=Banco de dados '%s' carregado! Database saved in file '%s'!=Banco de dados salvo no arquivo '%s'! Displays the number of votes for each candidate!=Exibe o número de votos de cada candidato! E-URN=URNA ELETRÔNICA +ELECTORAL COURT=TRIBUNAL ELEITORAL +EXIT=SAÍDA Electronic Urn=Urna Eletrônica Impossible to register login for player '%s' !=Impossível registrar login do jogador '%s'! Impossible to register logout for player '%s' !=Impossível registrar logout do jogador '%s' ! No one has voted in the presidential election yet!=Ninguém votou nas eleições presidenciais ainda! +No presidential candidate has yet been elected!=Nenhum candidato presidencial foi eleito ainda! Number of Candidates: %s=Número de candidatos: %s +PRESIDENT ELECT=PRESIDENTE ELELEITO(A) +PRESIDENTIAL CANDIDATES=CANDIDATOS PRESIDENCIAIS +PRESIDENTIAL ELECTION=ELEIÇÃO PRESIDENCIAL Player %s has been named the president of this server!=O jogador %s foi nomeado presidente deste servidor! Player %s has been registered to run as a candidate for president of this server!=O jogador %s foi registrado para concorrer como candidato a presidente deste servidor! Player %s has been unregistered to run as a candidate for president of this server!=O jogador %s teve seu registro cancelado para concorrer como candidato a presidente deste servidor! Player %s is listing campaign data...=O jogador %s está listando dados da campanha... Player %s is not registered as a candidate for president!=O jogador %s não está registrado como candidato a presidente! Player '%s' is not registered as a candidate for president!=O jogador %s não está registrado como candidato a presidente! +Player @1 has been registered to run as a candidate for president of this server!=O jogador %s foi registrado para concorrer como candidato a presidente deste servidor! Please enter the name of the candidate you wish to display the campaign!=Por favor, insira o nome do candidato que deseja exibir na campanha! Please enter the name of the presidential candidate you wish to vote!=Por favor, digite o nome do candidato presidencial que você deseja votar! Political Campaign of=Campanha Política de @@ -31,6 +40,7 @@ Register your campaign to run for server president.=Registre sua campanha para c Show or Select the presidente of the server.=Exibe ou Seleciona o presidente do servidor. Show the Campaign of candidate for president.=Exibe a Campanha do candidato a presidente. Show the name of all candidates for president.=Exibe o nome de todos os candidatos a presidente. +Thanks for your vote!=Obrigado pelo seu voto! The file '%s' is not in table format!=O arquivo '%s' não está em formato de tabela! The name '%s' is not the player name registered on the server!=O nome '%s' não é o nome do jogador registrado no servidor! The president of this server is %s!=O presidente deste servidor é %s! @@ -40,12 +50,13 @@ There are no votes registered!=Não há votos registrados! There is no registered candidate for the presidential election!=Não há candidato registrado para as eleições presidenciais! Unable to address debug for player '%s'.=Não foi possível resolver a depuração do jogador '%s'. Unregister your campaign to run for server president.=Cancela o registro de sua campanha para concorrer à presidência do servidor. +VOTE=VOTAR Vote for a specific candidate for president.=Vote em um candidato específico para presidente. Voting list for presidential election: =Lista de votação para as eleições presidenciais: -You can't have registered vote!=Você não pode ter voto registrado! +WHITE=BRANCO You do not have the 'electoraljudge' privilege to define who will be the president of the server!=Você não tem o privilégio de 'juiz eleitoral' para definir quem será o presidente do servidor! You have not yet played the minimum number of hours to become a presidential voter. (Minimum %02d hours)=Você ainda não jogou o número mínimo de horas para se tornar um eleitor presidencial. (Mínimo %02d horas) -You unvoted for the presidential candidate!=Você não votou no candidato presidencial! +You voted blank!=Você votou em Branco! You voted for the candidate: =Você votou no candidato: Your name is not registered as a voter.=Seu nome não está registrado como eleitor. candidate_name=nome_do_candidato diff --git a/locale/pt_BR.po b/locale/pt_BR.po index f94887e..30f8db2 100644 --- a/locale/pt_BR.po +++ b/locale/pt_BR.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: pt_BR 1.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-02-22 16:53-0300\n" +"POT-Creation-Date: 2024-02-26 12:43-0300\n" "PO-Revision-Date: 2023-07-20 19:59-0300\n" "Last-Translator: Lunovox Heavenfinder \n" "Language-Team: Lunovox Heavenfinder\n" @@ -19,7 +19,7 @@ msgstr "" "Plural-Forms: nplurals=2; plural=(n > 1);\n" "X-Generator: Poedit 3.3.1\n" -#: commands.lua:250 commands.lua:252 +#: commands.lua:253 commands.lua:255 #, lua-format msgid " * %s : %02d votes" msgstr " * %s : %02d votos" @@ -28,19 +28,27 @@ msgstr " * %s : %02d votos" msgid "Allows you to configure the Electronic Urn." msgstr "Permite configurar a Urna Eletrônica." -#: commands.lua:294 +#: commands.lua:297 msgid "Apply presidential selection vote counting! Need the 'electoraljudge' privilege." msgstr "Aplique a contagem de votos nas eleições presidenciais! Precisa do privilégio de 'electoraljudge'." -#: formspecs.lua:25 +#: formspecs.lua:28 +msgid "BACK" +msgstr "VOLTAR" + +#: formspecs.lua:94 formspecs.lua:160 msgid "CANCEL" msgstr "CANCELAR" -#: formspecs.lua:46 +#: formspecs.lua:181 msgid "CLOSE" msgstr "FECHAR" -#: api.lua:267 formspecs.lua:50 +#: formspecs.lua:88 +msgid "CONFIRM" +msgstr "CONFIRMAR" + +#: api.lua:279 formspecs.lua:185 msgid "Candidate Campaign" msgstr "Campanha do Candidato" @@ -49,7 +57,7 @@ msgstr "Campanha do Candidato" msgid "Candidate List: %s" msgstr "Lista de Candidatos: %s" -#: api.lua:257 formspecs.lua:49 +#: api.lua:269 formspecs.lua:184 msgid "Candidate Name" msgstr "Nome do Candidato" @@ -67,19 +75,27 @@ msgstr "Banco de dados '%s' carregado!" msgid "Database saved in file '%s'!" msgstr "Banco de dados salvo no arquivo '%s'!" -#: commands.lua:228 +#: commands.lua:231 msgid "Displays the number of votes for each candidate!" msgstr "Exibe o número de votos de cada candidato!" -#: item_eurn.lua:9 +#: formspecs.lua:259 formspecs.lua:293 formspecs.lua:339 item_eurn.lua:9 msgid "E-URN" msgstr "URNA ELETRÔNICA" +#: formspecs.lua:12 +msgid "ELECTORAL COURT" +msgstr "TRIBUNAL ELEITORAL" + +#: formspecs.lua:14 +msgid "EXIT" +msgstr "SAÍDA" + #: item_eurn.lua:36 msgid "Electronic Urn" msgstr "Urna Eletrônica" -#: api.lua:409 +#: api.lua:426 #, lua-format msgid "Impossible to register login for player '%s' !" msgstr "Impossível registrar login do jogador '%s'!" @@ -89,21 +105,37 @@ msgstr "Impossível registrar login do jogador '%s'!" msgid "Impossible to register logout for player '%s' !" msgstr "Impossível registrar logout do jogador '%s' !" -#: commands.lua:267 +#: commands.lua:270 msgid "No one has voted in the presidential election yet!" msgstr "Ninguém votou nas eleições presidenciais ainda!" +#: formspecs.lua:261 +msgid "No presidential candidate has yet been elected!" +msgstr "Nenhum candidato presidencial foi eleito ainda!" + #: commands.lua:157 #, lua-format msgid "Number of Candidates: %s" msgstr "Número de candidatos: %s" -#: api.lua:361 commands.lua:36 +#: formspecs.lua:26 formspecs.lua:255 +msgid "PRESIDENT ELECT" +msgstr "PRESIDENTE ELELEITO(A)" + +#: formspecs.lua:25 +msgid "PRESIDENTIAL CANDIDATES" +msgstr "CANDIDATOS PRESIDENCIAIS" + +#: formspecs.lua:11 +msgid "PRESIDENTIAL ELECTION" +msgstr "ELEIÇÃO PRESIDENCIAL" + +#: api.lua:378 commands.lua:36 #, lua-format msgid "Player %s has been named the president of this server!" msgstr "O jogador %s foi nomeado presidente deste servidor!" -#: commands.lua:90 formspecs.lua:111 +#: commands.lua:90 #, lua-format msgid "Player %s has been registered to run as a candidate for president of this server!" msgstr "O jogador %s foi registrado para concorrer como candidato a presidente deste servidor!" @@ -113,34 +145,39 @@ msgstr "O jogador %s foi registrado para concorrer como candidato a presidente d msgid "Player %s has been unregistered to run as a candidate for president of this server!" msgstr "O jogador %s teve seu registro cancelado para concorrer como candidato a presidente deste servidor!" -#: formspecs.lua:48 +#: formspecs.lua:183 #, lua-format msgid "Player %s is listing campaign data..." msgstr "O jogador %s está listando dados da campanha..." -#: api.lua:277 +#: api.lua:289 #, lua-format msgid "Player %s is not registered as a candidate for president!" msgstr "O jogador %s não está registrado como candidato a presidente!" -#: api.lua:327 +#: api.lua:344 #, lua-format msgid "Player '%s' is not registered as a candidate for president!" msgstr "O jogador %s não está registrado como candidato a presidente!" -#: api.lua:293 +#: formspecs.lua:362 +#, fuzzy +msgid "Player @1 has been registered to run as a candidate for president of this server!" +msgstr "O jogador %s foi registrado para concorrer como candidato a presidente deste servidor!" + +#: api.lua:305 msgid "Please enter the name of the candidate you wish to display the campaign!" msgstr "Por favor, insira o nome do candidato que deseja exibir na campanha!" -#: api.lua:333 +#: api.lua:350 msgid "Please enter the name of the presidential candidate you wish to vote!" msgstr "Por favor, digite o nome do candidato presidencial que você deseja votar!" -#: formspecs.lua:19 formspecs.lua:40 +#: formspecs.lua:154 formspecs.lua:175 msgid "Political Campaign of" msgstr "Campanha Política de" -#: formspecs.lua:24 +#: formspecs.lua:159 msgid "REGISTER" msgstr "REGISTRAR" @@ -160,12 +197,16 @@ msgstr "Exibe a Campanha do candidato a presidente." msgid "Show the name of all candidates for president." msgstr "Exibe o nome de todos os candidatos a presidente." +#: formspecs.lua:302 +msgid "Thanks for your vote!" +msgstr "Obrigado pelo seu voto!" + #: api.lua:96 api.lua:110 #, lua-format msgid "The file '%s' is not in table format!" msgstr "O arquivo '%s' não está em formato de tabela!" -#: api.lua:195 api.lua:218 api.lua:285 api.lua:330 +#: api.lua:195 api.lua:218 api.lua:297 api.lua:347 #, lua-format msgid "The name '%s' is not the player name registered on the server!" msgstr "O nome '%s' não é o nome do jogador registrado no servidor!" @@ -179,15 +220,15 @@ msgstr "O presidente deste servidor é %s!" msgid "There are no campaign data about this political candidate." msgstr "Não existem dados de campanha sobre este candidato político." -#: api.lua:371 +#: api.lua:388 msgid "There are no candidates registered!" msgstr "Não há candidatos cadastrados!" -#: api.lua:368 +#: api.lua:385 msgid "There are no votes registered!" msgstr "Não há votos registrados!" -#: commands.lua:275 +#: commands.lua:278 msgid "There is no registered candidate for the presidential election!" msgstr "Não há candidato registrado para as eleições presidenciais!" @@ -200,43 +241,53 @@ msgstr "Não foi possível resolver a depuração do jogador '%s'." msgid "Unregister your campaign to run for server president." msgstr "Cancela o registro de sua campanha para concorrer à presidência do servidor." +#: formspecs.lua:180 +msgid "VOTE" +msgstr "VOTAR" + #: commands.lua:201 msgid "Vote for a specific candidate for president." msgstr "Vote em um candidato específico para presidente." -#: commands.lua:258 +#: commands.lua:261 msgid "Voting list for presidential election: " msgstr "Lista de votação para as eleições presidenciais: " -#: api.lua:312 -msgid "You can't have registered vote!" -msgstr "Você não pode ter voto registrado!" +#: formspecs.lua:86 +msgid "WHITE" +msgstr "BRANCO" #: commands.lua:44 msgid "You do not have the 'electoraljudge' privilege to define who will be the president of the server!" msgstr "Você não tem o privilégio de 'juiz eleitoral' para definir quem será o presidente do servidor!" -#: api.lua:336 +#: api.lua:327 api.lua:353 #, lua-format msgid "You have not yet played the minimum number of hours to become a presidential voter. (Minimum %02d hours)" msgstr "Você ainda não jogou o número mínimo de horas para se tornar um eleitor presidencial. (Mínimo %02d horas)" -#: api.lua:309 -msgid "You unvoted for the presidential candidate!" -msgstr "Você não votou no candidato presidencial!" - #: api.lua:325 +msgid "You voted blank!" +msgstr "Você votou em Branco!" + +#: api.lua:342 msgid "You voted for the candidate: " msgstr "Você votou no candidato: " -#: api.lua:339 +#: api.lua:356 msgid "Your name is not registered as a voter." msgstr "Seu nome não está registrado como eleitor." -#: api.lua:296 api.lua:333 commands.lua:25 commands.lua:178 commands.lua:200 +#: api.lua:308 api.lua:350 commands.lua:25 commands.lua:178 commands.lua:200 msgid "candidate_name" msgstr "nome_do_candidato" #: commands.lua:75 msgid "political campaign" msgstr "campanha política" + +#~ msgid "You can't have registered vote!" +#~ msgstr "Você não pode ter voto registrado!" + +#~ msgid "You unvoted for the presidential candidate!" +#~ msgstr "Você não votou no candidato presidencial!" diff --git a/locale/template.pot b/locale/template.pot index 9a0d096..803a302 100644 --- a/locale/template.pot +++ b/locale/template.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-02-22 16:53-0300\n" +"POT-Creation-Date: 2024-02-26 12:43-0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -46,7 +46,7 @@ msgstr "" msgid "Impossible to register logout for player '%s' !" msgstr "" -#: api.lua:195 api.lua:218 api.lua:285 api.lua:330 +#: api.lua:195 api.lua:218 api.lua:297 api.lua:347 #, lua-format msgid "The name '%s' is not the player name registered on the server!" msgstr "" @@ -55,74 +55,70 @@ msgstr "" msgid "There are no campaign data about this political candidate." msgstr "" -#: api.lua:257 formspecs.lua:49 +#: api.lua:269 formspecs.lua:184 msgid "Candidate Name" msgstr "" -#: api.lua:267 formspecs.lua:50 +#: api.lua:279 formspecs.lua:185 msgid "Candidate Campaign" msgstr "" -#: api.lua:277 +#: api.lua:289 #, lua-format msgid "Player %s is not registered as a candidate for president!" msgstr "" -#: api.lua:293 +#: api.lua:305 msgid "" "Please enter the name of the candidate you wish to display the campaign!" msgstr "" -#: api.lua:296 api.lua:333 commands.lua:25 commands.lua:178 commands.lua:200 +#: api.lua:308 api.lua:350 commands.lua:25 commands.lua:178 commands.lua:200 msgid "candidate_name" msgstr "" -#: api.lua:309 -msgid "You unvoted for the presidential candidate!" -msgstr "" - -#: api.lua:312 -msgid "You can't have registered vote!" -msgstr "" - #: api.lua:325 -msgid "You voted for the candidate: " +msgid "You voted blank!" msgstr "" -#: api.lua:327 -#, lua-format -msgid "Player '%s' is not registered as a candidate for president!" -msgstr "" - -#: api.lua:333 -msgid "Please enter the name of the presidential candidate you wish to vote!" -msgstr "" - -#: api.lua:336 +#: api.lua:327 api.lua:353 #, lua-format msgid "" "You have not yet played the minimum number of hours to become a presidential " "voter. (Minimum %02d hours)" msgstr "" -#: api.lua:339 +#: api.lua:342 +msgid "You voted for the candidate: " +msgstr "" + +#: api.lua:344 +#, lua-format +msgid "Player '%s' is not registered as a candidate for president!" +msgstr "" + +#: api.lua:350 +msgid "Please enter the name of the presidential candidate you wish to vote!" +msgstr "" + +#: api.lua:356 msgid "Your name is not registered as a voter." msgstr "" -#: api.lua:361 commands.lua:36 +#: api.lua:378 commands.lua:36 #, lua-format msgid "Player %s has been named the president of this server!" msgstr "" -#: api.lua:368 +#: api.lua:385 msgid "There are no votes registered!" msgstr "" -#: api.lua:371 +#: api.lua:388 msgid "There are no candidates registered!" msgstr "" -#: api.lua:409 +#: api.lua:426 #, lua-format msgid "Impossible to register login for player '%s' !" msgstr "" @@ -150,7 +146,7 @@ msgstr "" msgid "Register your campaign to run for server president." msgstr "" -#: commands.lua:90 formspecs.lua:111 +#: commands.lua:90 #, lua-format msgid "" "Player %s has been registered to run as a candidate for president of this " @@ -190,58 +186,108 @@ msgstr "" msgid "Vote for a specific candidate for president." msgstr "" -#: commands.lua:228 +#: commands.lua:231 msgid "Displays the number of votes for each candidate!" msgstr "" -#: commands.lua:250 commands.lua:252 +#: commands.lua:253 commands.lua:255 #, lua-format msgid " * %s : %02d votes" msgstr "" -#: commands.lua:258 +#: commands.lua:261 msgid "Voting list for presidential election: " msgstr "" -#: commands.lua:267 +#: commands.lua:270 msgid "No one has voted in the presidential election yet!" msgstr "" -#: commands.lua:275 +#: commands.lua:278 msgid "There is no registered candidate for the presidential election!" msgstr "" -#: commands.lua:294 +#: commands.lua:297 msgid "" "Apply presidential selection vote counting! Need the 'electoraljudge' " "privilege." msgstr "" -#: formspecs.lua:19 formspecs.lua:40 -msgid "Political Campaign of" +#: formspecs.lua:11 +msgid "PRESIDENTIAL ELECTION" msgstr "" -#: formspecs.lua:24 -msgid "REGISTER" +#: formspecs.lua:12 +msgid "ELECTORAL COURT" +msgstr "" + +#: formspecs.lua:14 +msgid "EXIT" msgstr "" #: formspecs.lua:25 +msgid "PRESIDENTIAL CANDIDATES" +msgstr "" + +#: formspecs.lua:26 formspecs.lua:255 +msgid "PRESIDENT ELECT" +msgstr "" + +#: formspecs.lua:28 +msgid "BACK" +msgstr "" + +#: formspecs.lua:86 +msgid "WHITE" +msgstr "" + +#: formspecs.lua:88 +msgid "CONFIRM" +msgstr "" + +#: formspecs.lua:94 formspecs.lua:160 msgid "CANCEL" msgstr "" -#: formspecs.lua:46 +#: formspecs.lua:154 formspecs.lua:175 +msgid "Political Campaign of" +msgstr "" + +#: formspecs.lua:159 +msgid "REGISTER" +msgstr "" + +#: formspecs.lua:180 +msgid "VOTE" +msgstr "" + +#: formspecs.lua:181 msgid "CLOSE" msgstr "" -#: formspecs.lua:48 +#: formspecs.lua:183 #, lua-format msgid "Player %s is listing campaign data..." msgstr "" -#: item_eurn.lua:9 +#: formspecs.lua:259 formspecs.lua:293 formspecs.lua:339 item_eurn.lua:9 msgid "E-URN" msgstr "" +#: formspecs.lua:261 +msgid "No presidential candidate has yet been elected!" +msgstr "" + +#: formspecs.lua:302 +msgid "Thanks for your vote!" +msgstr "" + +#: formspecs.lua:362 +msgid "" +"Player @1 has been registered to run as a candidate for president of this " +"server!" +msgstr "" + #: item_eurn.lua:10 msgid "Colect opinion of player with electronic urn." msgstr ""