From 9b394785bb8496af152dd94007269fe731079882 Mon Sep 17 00:00:00 2001 From: Henrique Santiago Date: Sun, 26 Aug 2012 06:10:48 -0300 Subject: [PATCH] Pt translations, flexibility changes --- modules/client/client.lua | 17 ++++++++++++++--- modules/client_locales/locales.lua | 1 + modules/client_locales/locales/pt.lua | 11 +++++++++++ modules/client_topmenu/topmenu.otui | 9 +++------ modules/game_bugreport/bugreport.lua | 11 +++++++---- 5 files changed, 36 insertions(+), 13 deletions(-) diff --git a/modules/client/client.lua b/modules/client/client.lua index bccc12db..428cac4a 100644 --- a/modules/client/client.lua +++ b/modules/client/client.lua @@ -1,5 +1,16 @@ Client = {} +local musicFilename = "startup.ogg" + +function Client.setMusic(filename) + musicFilename = filename + g_sounds.stopMusic(0) + + if not g_game.isOnline() then + g_sounds.playMusic(musicFilename, 3) + end +end + function Client.reloadScripts() g_modules.reloadModules() dofile '/otclientrc' @@ -11,9 +22,9 @@ end function Client.startup() -- Play startup music (The Silver Tree, by Mattias Westlund) - g_sounds.playMusic("startup.ogg", 3) + g_sounds.playMusic(musicFilename, 3) connect(g_game, { onGameStart = function() g_sounds.stopMusic(3) end }) - connect(g_game, { onGameEnd = function() g_sounds.playMusic("startup.ogg", 3) end }) + connect(g_game, { onGameEnd = function() g_sounds.playMusic(musicFilename, 3) end }) -- Check for startup errors local errtitle = nil @@ -35,7 +46,7 @@ end function Client.init() g_window.setMinimumSize({ width = 600, height = 480 }) - g_sounds.preload("startup.ogg") + g_sounds.preload(musicFilename) -- initialize in fullscreen mode on mobile devices if g_window.getPlatformType() == "X11-EGL" then diff --git a/modules/client_locales/locales.lua b/modules/client_locales/locales.lua index 242ec67b..108eb686 100644 --- a/modules/client_locales/locales.lua +++ b/modules/client_locales/locales.lua @@ -139,6 +139,7 @@ function Locales.setLocale(name) return false end currentLocale = locale + if Locales.onLocaleChanged then Locales.onLocaleChanged(name) end return true end diff --git a/modules/client_locales/locales/pt.lua b/modules/client_locales/locales/pt.lua index 82d0ea1f..1979c6ce 100644 --- a/modules/client_locales/locales/pt.lua +++ b/modules/client_locales/locales/pt.lua @@ -24,6 +24,7 @@ locale = { ["4a) Threatening Gamemaster"] = "4a) Ameaçar Gamemaster", ["4b) Pretending to Have Influence on Rule Enforcement"] = "4b) Fingir ter influencia sobre a execução de regras", ["4c) False Report to Gamemaster"] = "4c) Relatório falso para Gamemaster", + ["Abilities"] = "Abilidades", ["Accept"] = "Aceitar", ["Account name"] = "Nome da conta", ["Account Status:\nFree Account"] = "Estado da conta:\nGrátis", @@ -40,6 +41,7 @@ locale = { ["All"] = "Todos", ["All modules and scripts were reloaded."] = "Todos módulos e scripts foram recarregados.", ["Allow auto chase override"] = "Permitir sobrescrever o modo de perseguição", + ["Also known as dash in tibia community, recommended\nfor playing characters with high speed"] = "Também conhecido como dash na comunidade tibiana, recomendado\npara jogar com personagem que possuam velocidade alta", ["Amount:"] = "Quantidade:", ["Amount"] = "Quantidade", ["Anonymous"] = "Anônimo", @@ -80,6 +82,7 @@ locale = { ["Comment:"] = "Comentário:", ["Connecting to game server..."] = "Conectando no servidor do jogo...", ["Connecting to login server..."] = "Conectando no servidor de autenticação...", + ["Console"] = "Console", ["Copy message"] = "Copiar mensagem", ["Copy name"] = "Copiar nome", ["Copy Name"] = "Copiar Nome", @@ -94,13 +97,16 @@ locale = { ["Detail"] = "Detalhe", ["Details"] = "Detalhes", ["Disable Shared Experience"] = "Desativar experiência compartilhada", + ["Display connection speed to the server (milliseconds)"] = "Exibir a velocidade de conexão com o servidor (milisegundos)", ["Distance Fighting"] = "Combate a Distância", ["Edit hotkey text:"] = "Editar texto do atalho", ["Edit List"] = "Editar lista", ["Edit Text"] = "Editar Texto", ["Enable music"] = "Ativar musica", + ["Enable smart walking"] = "Ativar andar inteligente", ["Enable Shared Experience"] = "Ativar experiência compartilhada", ["Enable vertical synchronization"] = "Ativar sincronização vertical", + ["Enable walk booster"] = "Ativar andar intensificado", ["Enter Game"] = "Entrar no jogo", ["Enter one name per line."] = "Entre somente um nome por linha.", ["Error"] = "Erro", @@ -117,6 +123,7 @@ locale = { ["Follow"] = "Seguir", ["Force Exit"] = "Forçar Saida", ["Fullscreen"] = "Tela cheia", + ["Game"] = "Jogo", ["Game framerate limit: %s"] = "Limite da taxa de quadros do jogo: %s", ["General"] = "Geral", ["Graphics"] = "Gráficos", @@ -170,6 +177,7 @@ locale = { ["Module name"] = "Nome do módulo", ["Move Stackable Item"] = "Mover item contável", ["Move up"] = "Mover para cima", + ["Moves"] = "Movimentos", ["My Offers"] = "Minhas ofertas", ["Name:"] = "Nome:", ["Name"] = "Nome", @@ -249,6 +257,7 @@ locale = { ["Set Outfit"] = "Escolher Roupa", ["Shielding"] = "Defesa", ["Show all items"] = "Exibir todos os itens", + ["Show connection ping"] = "Mostrar latência de conexão", ["Show Depot Only"] = "Mostrar somente o depósito", ["Show event messages in console"] = "Exibir mensagens de eventos no console", ["Show frame rate"] = "Exibir FPS", @@ -283,6 +292,7 @@ locale = { ["Trade"] = "Trocar", ["Trade with ..."] = "Trocar com ...", ["Trying to reconnect in %s seconds."] = "Tentando reconectar em %s segundos.", + ["Type"] = "Tipo", ["Unable to load dat file, please place a valid dat in '%s'"] = "Não foi possível carregar o arquivo dat, por favor coloque um arquivo válido em %s", ["Unable to load spr file, please place a valid spr in '%s'"] = "Não foi possível carregar o arquivo spr, por favor coloque um arquivo válido em %s", ["Unable to logout."] = "Não é possivel sair", @@ -298,6 +308,7 @@ locale = { ["Waiting List"] = "Lista de espera", ["Website"] = "Website", ["Weight:"] = "Peso", + ["Will detect when to use diagonal step based on the\nkeys you are pressing"] = "Detectar quando usar o passo diagonal\nbaseado nas teclas pressionadas", ["With crosshair"] = "Com mira", ["Yes"] = "Sim", ["You are bleeding"] = "Você está sangrando", diff --git a/modules/client_topmenu/topmenu.otui b/modules/client_topmenu/topmenu.otui index ddc11811..f2fb82ea 100644 --- a/modules/client_topmenu/topmenu.otui +++ b/modules/client_topmenu/topmenu.otui @@ -45,8 +45,8 @@ TopMenuPanel < Panel TopMenuFrameCounterLabel < FrameCounterLabel color: white - margin-top: 10 - margin-right: 5 + margin-top: 4 + margin-left: 5 TopMenuPanel id: topMenu @@ -67,11 +67,8 @@ TopMenuPanel anchors.left: prev.right visible: false - FrameCounterLabel + TopMenuFrameCounterLabel id: frameCounter - color: white - margin-top: 4 - margin-left: 5 text-auto-resize: true anchors.top: parent.top anchors.left: leftGameButtonsPanel.right diff --git a/modules/game_bugreport/bugreport.lua b/modules/game_bugreport/bugreport.lua index 70fa2488..9eb992a0 100644 --- a/modules/game_bugreport/bugreport.lua +++ b/modules/game_bugreport/bugreport.lua @@ -1,3 +1,4 @@ +-- TODO: find another hotkey for this. Ctrl+Z will be reserved to undo on textedits. HOTKEY = 'Ctrl+Z' bugReportWindow = nil @@ -26,8 +27,10 @@ function doReport() end function show() - bugTextEdit:setText('') - bugReportWindow:show() - bugReportWindow:raise() - bugReportWindow:focus() + if g_game.isOnline() then + bugTextEdit:setText('') + bugReportWindow:show() + bugReportWindow:raise() + bugReportWindow:focus() + end end