Browse Source

implement all needed tr() for localization

* implement some pt-BR translations
* remove legacy about module
Eduardo Bart 8 years ago
parent
commit
34091bc48e
47 changed files with 480 additions and 417 deletions
  1. 3
    2
      modules/client/client.lua
  2. 0
    32
      modules/client_about/about.lua
  3. 0
    15
      modules/client_about/about.otmod
  4. 0
    58
      modules/client_about/about.otui
  5. BIN
      modules/client_about/about.png
  6. 7
    7
      modules/client_entergame/characterlist.lua
  7. 1
    1
      modules/client_entergame/characterlist.otui
  8. 6
    6
      modules/client_entergame/entergame.lua
  9. 18
    25
      modules/client_locales/locales.lua
  10. 193
    20
      modules/client_locales/locales/pt-br.lua
  11. 1
    1
      modules/client_modulemanager/modulemanager.lua
  12. 13
    13
      modules/client_modulemanager/modulemanager.otui
  13. 7
    7
      modules/client_options/general.otui
  14. 5
    5
      modules/client_options/graphics.otui
  15. 2
    5
      modules/client_options/options.lua
  16. 2
    2
      modules/client_options/options.otui
  17. 1
    1
      modules/client_terminal/terminal.lua
  18. 5
    1
      modules/core_lib/util.lua
  19. 28
    28
      modules/game/gameinterface.lua
  20. 4
    4
      modules/game/styles/countwindow.otui
  21. 0
    1
      modules/game/styles/miniwindow.otui
  22. 1
    1
      modules/game/widgets/uigamemap.lua
  23. 1
    1
      modules/game_battle/battle.lua
  24. 6
    6
      modules/game_battle/battle.otui
  25. 1
    1
      modules/game_combatcontrols/combatcontrols.lua
  26. 1
    1
      modules/game_combatcontrols/combatcontrols.otui
  27. 4
    4
      modules/game_console/channelswindow.otui
  28. 15
    15
      modules/game_console/console.lua
  29. 3
    3
      modules/game_console/console.otui
  30. 16
    16
      modules/game_healthbar/healthbar.lua
  31. 1
    1
      modules/game_healthbar/healthbar.otui
  32. 11
    11
      modules/game_hotkeys/hotkeys_manager.lua
  33. 15
    15
      modules/game_hotkeys/hotkeys_manager.otui
  34. 1
    1
      modules/game_inventory/inventory.lua
  35. 1
    1
      modules/game_inventory/inventory.otui
  36. 2
    2
      modules/game_minimap/minimap.lua
  37. 11
    11
      modules/game_npctrade/npctrade.lua
  38. 39
    39
      modules/game_npctrade/npctrade.otui
  39. 11
    11
      modules/game_outfit/outfit.otui
  40. 5
    5
      modules/game_skills/skills.lua
  41. 16
    16
      modules/game_skills/skills.otui
  42. 8
    8
      modules/game_textmessage/textmessage.lua
  43. 2
    2
      modules/game_tibiafiles/tibiafiles.otmod
  44. 4
    4
      modules/game_viplist/addvip.otui
  45. 4
    4
      modules/game_viplist/viplist.lua
  46. 1
    1
      modules/game_viplist/viplist.otui
  47. 4
    3
      src/otclient/core/mapview.cpp

+ 3
- 2
modules/client/client.lua View File

@@ -3,8 +3,9 @@ Client = {}
3 3
 function Client.reloadScripts()
4 4
   dofile '/otclientrc'
5 5
   reloadModules()
6
-  TextMessage.displayEventAdvance('All modules and scripts were reloaded.')
7
-  print('All modules and scripts were reloaded.')
6
+  local message = tr('All modules and scripts were reloaded.')
7
+  TextMessage.displayEventAdvance(message)
8
+  print(message)
8 9
 end
9 10
 
10 11
 function Client.init()

+ 0
- 32
modules/client_about/about.lua View File

@@ -1,34 +0,0 @@
1
-About = {}
2
-
3
-local aboutButton
4
-local aboutWindow
5
-
6
-function About.init()
7
-  aboutButton = TopMenu.addRightButton('aboutButton', 'About', 'about.png', About.show)
8
-  aboutWindow = displayUI('about.otui')
9
-  aboutWindow:hide()
10
-end
11
-
12
-function About.terminate()
13
-  aboutButton:destroy()
14
-  aboutButton = nil
15
-  aboutWindow:destroy()
16
-  aboutWindow = nil
17
-  About = nil
18
-end
19
-
20
-function About.show()
21
-  aboutWindow:show()
22
-  aboutWindow:raise()
23
-  aboutWindow:focus()
24
-end
25
-
26
-function About.hide()
27
-  aboutWindow:hide()
28
-end
29
-
30
-function About.openWebpage()
31
-  displayErrorBox("Error", "Not implemented yet")
32
-end

+ 0
- 15
modules/client_about/about.otmod View File

@@ -1,15 +0,0 @@
1
-Module
2
-  name: client_about
3
-  description: Create the about window
4
-  author: OTClient team
5
-  website: https://github.com/edubart/otclient
6
-
7
-  dependencies:
8
-    - client_topmenu
9
-
10
-  @onLoad: |
11
-    dofile 'about'
12
-    About.init()
13
-
14
-  @onUnload: |
15
-    About.terminate()

+ 0
- 58
modules/client_about/about.otui View File

@@ -1,58 +0,0 @@
1
-MainWindow
2
-  id: about
3
-  text: Info
4
-  size: 244 221
5
-
6
-  @onEnter: About.hide()
7
-  @onEscape: About.hide()
8
-
9
-  FlatPanel
10
-    size: 208 129
11
-    anchors.left: parent.left
12
-    anchors.top: parent.top
13
-
14
-    Label
15
-      text-align: center
16
-      text: |-
17
-        OTClient
18
-        Version 0.4.0
19
-        Created by edubart
20
-      anchors.horizontalCenter: parent.horizontalCenter
21
-      anchors.top: parent.top
22
-      margin-top: 20
23
-
24
-    HorizontalSeparator
25
-      size: 190 2
26
-      anchors.left: parent.left
27
-      anchors.top: parent.top
28
-      margin-top: 83
29
-      margin-left: 9
30
-
31
-    Label
32
-      text: Official Website
33
-      anchors.left: parent.left
34
-      anchors.bottom: parent.bottom
35
-      margin-bottom: 14
36
-      margin-left: 9
37
-
38
-    Button
39
-      text: Github Page
40
-      size: 88 24
41
-      anchors.right: parent.right
42
-      anchors.bottom: parent.bottom
43
-      margin-bottom: 9
44
-      margin-right: 9
45
-      @onClick: About.openWebpage()
46
-
47
-  HorizontalSeparator
48
-    anchors.left: parent.left
49
-    anchors.right: parent.right
50
-    anchors.top: prev.bottom
51
-    margin-top: 12
52
-
53
-  Button
54
-    text: Ok
55
-    size: 46 24
56
-    anchors.right: parent.right
57
-    anchors.bottom: parent.bottom
58
-    @onClick: About.hide()

BIN
modules/client_about/about.png View File


+ 7
- 7
modules/client_entergame/characterlist.lua View File

@@ -25,14 +25,14 @@ local function tryLogin(charInfo, tries)
25 25
 
26 26
   if tries > 4 then
27 27
     CharacterList.destroyLoadBox()
28
-    displayErrorBox('Error', 'Could not logout.')
28
+    displayErrorBox(tr('Error'), tr('Unable to logout.'))
29 29
     return
30 30
   end
31 31
 
32 32
   if g_game.isOnline() then
33 33
     g_game.safeLogout()
34 34
     if tries == 1 then
35
-      loadBox = displayCancelBox('Please wait', 'Loggin out...')
35
+      loadBox = displayCancelBox(tr('Please wait'), tr('Loggin out...'))
36 36
     end
37 37
     scheduleEvent(function() tryLogin(charInfo, tries+1) end, 250)
38 38
     return
@@ -42,7 +42,7 @@ local function tryLogin(charInfo, tries)
42 42
 
43 43
   g_game.loginWorld(EnterGame.account, EnterGame.password, charInfo.worldName, charInfo.worldHost, charInfo.worldPort, charInfo.characterName)
44 44
 
45
-  loadBox = displayCancelBox('Please wait', 'Connecting to game server...')
45
+  loadBox = displayCancelBox(tr('Please wait'), tr('Connecting to game server...'))
46 46
   connect(loadBox, { onCancel = function()
47 47
                                   loadBox = nil
48 48
                                   g_game.cancelLogin()
@@ -55,7 +55,7 @@ end
55 55
 
56 56
 function onGameLoginError(message)
57 57
   CharacterList.destroyLoadBox()
58
-  errorBox = displayErrorBox("Login Error", "Login error: " .. message)
58
+  errorBox = displayErrorBox(tr("Login Error"), message)
59 59
   errorBox.onOk = function()
60 60
     errorBox = nil
61 61
     CharacterList.showAgain()
@@ -64,7 +64,7 @@ end
64 64
 
65 65
 function onGameConnectionError(message)
66 66
   CharacterList.destroyLoadBox()
67
-  errorBox = displayErrorBox("Login Error", "Connection error: " .. message)
67
+  errorBox = displayErrorBox(tr("Login Error"), message)
68 68
   errorBox.onOk = function()
69 69
     errorBox = nil
70 70
     CharacterList.showAgain()
@@ -128,7 +128,7 @@ function CharacterList.create(characters, premDays)
128 128
   characterList:focusChild(focusLabel, ActiveFocusReason)
129 129
 
130 130
   if premDays > 0 then
131
-    accountStatusLabel:setText("Account Status:\nPremium Account (" .. premDays .. ' days left)')
131
+    accountStatusLabel:setText(tr("Account Status:\nPremium Account (%s) days left", premDays))
132 132
   end
133 133
 end
134 134
 
@@ -173,7 +173,7 @@ function CharacterList.doLogin()
173 173
     CharacterList.hide()
174 174
     tryLogin(charInfo)
175 175
   else
176
-    displayErrorBox('Error', 'You must select a character to login!')
176
+    displayErrorBox(tr('Error'), tr('You must select a character to login!'))
177 177
   end
178 178
 end
179 179
 

+ 1
- 1
modules/client_entergame/characterlist.otui View File

@@ -51,7 +51,7 @@ MainWindow
51 51
   //CheckBox
52 52
   //  id: charAutoLoginBox
53 53
   //  !text: tr('Auto login')
54
-  //  tooltip: Auto login selected character on next charlist load
54
+  //  !tooltip: tr('Auto login selected character on next charlist load')
55 55
   //  anchors.left: parent.left
56 56
   //  anchors.right: parent.right
57 57
   //  anchors.bottom: next.top

+ 6
- 6
modules/client_entergame/entergame.lua View File

@@ -24,7 +24,7 @@ local function onError(protocol, message, connectionError)
24 24
   if not connectionError then
25 25
     clearAccountFields()
26 26
   end
27
-  local errorBox = displayErrorBox('Login Error', message)
27
+  local errorBox = displayErrorBox(tr('Login Error'), message)
28 28
   connect(errorBox, { onOk = EnterGame.show })
29 29
 end
30 30
 
@@ -51,7 +51,7 @@ local function onCharacterList(protocol, characters, premDays)
51 51
   local lastMotdNumber = Settings.getNumber("motd")
52 52
   if motdNumber and motdNumber ~= lastMotdNumber then
53 53
     Settings.set("motd", motdNumber)
54
-    local motdBox = displayInfoBox("Message of the day", motdMessage)
54
+    local motdBox = displayInfoBox(tr('Message of the day'), motdMessage)
55 55
     connect(motdBox, { onOk = CharacterList.show })
56 56
     CharacterList.hide()
57 57
   end
@@ -60,8 +60,8 @@ end
60 60
 -- public functions
61 61
 function EnterGame.init()
62 62
   enterGame = displayUI('entergame.otui')
63
-  enterGameButton = TopMenu.addLeftButton('enterGameButton', 'Login (Ctrl + G)', 'login.png', EnterGame.openWindow)
64
-  motdButton = TopMenu.addLeftButton('motdButton', 'Message of the day', 'motd.png', EnterGame.displayMotd)
63
+  enterGameButton = TopMenu.addLeftButton('enterGameButton', tr('Login') .. ' (Ctrl + G)', 'login.png', EnterGame.openWindow)
64
+  motdButton = TopMenu.addLeftButton('motdButton', tr('Message of the day'), 'motd.png', EnterGame.displayMotd)
65 65
   motdButton:hide()
66 66
   Keyboard.bindKeyDown('Ctrl+G', EnterGame.openWindow)
67 67
 
@@ -133,7 +133,7 @@ function EnterGame.doLogin()
133 133
   protocolLogin.onMotd = onMotd
134 134
   protocolLogin.onCharacterList = onCharacterList
135 135
 
136
-  loadBox = displayCancelBox('Please wait', 'Connecting to login server...')
136
+  loadBox = displayCancelBox(tr('Please wait'), tr('Connecting to login server...'))
137 137
   connect(loadBox, { onCancel = function(msgbox)
138 138
                                   loadBox = nil
139 139
                                   protocolLogin:cancelLogin()
@@ -144,5 +144,5 @@ function EnterGame.doLogin()
144 144
 end
145 145
 
146 146
 function EnterGame.displayMotd()
147
-  displayInfoBox('Message of the day', motdMessage)
147
+  displayInfoBox(tr('Message of the day'), motdMessage)
148 148
 end

+ 18
- 25
modules/client_locales/locales.lua View File

@@ -12,12 +12,12 @@ function Locales.init()
12 12
   Locales.installLocales('locales')
13 13
 
14 14
   local userLocaleName = Settings.get('locale')
15
-  if not userLocaleName or not Locales.setLocale(userLocaleName) then
16
-    print('Locale ' .. userLocaleName .. ' is not loaded. Using default. ' .. defaultLocaleName)
17
-    if not Locales.setLocale(defaultLocaleName) then
18
-      fatal('Default locale could not be loaded. Re-install the program.')
19
-      return
20
-    end
15
+  if userLocaleName then
16
+    print('Using configurated locale: ' .. userLocaleName)
17
+    Locales.setLocale(userLocaleName)
18
+  else
19
+    print('Using default locale: ' .. defaultLocaleName)
20
+    Locales.setLocale(defaultLocaleName)
21 21
     Settings.set('locale', defaultLocaleName)
22 22
   end
23 23
 
@@ -33,14 +33,8 @@ function Locales.terminate()
33 33
 end
34 34
 
35 35
 function Locales.installLocale(locale)
36
-  if not locale then
37
-    print('Coult not install locale.')
38
-    return false
39
-  end
40
-
41
-  if not locale.name then
42
-    printf('Coult not install locale.')
43
-    return false
36
+  if not locale or not locale.name then
37
+    error('Unable to install locale.')
44 38
   end
45 39
 
46 40
   local installedLocale = installedLocales[locale.name]
@@ -62,13 +56,10 @@ end
62 56
 
63 57
 function Locales.setLocale(name)
64 58
   local locale = installedLocales[name]
65
-  if locale then
66
-    currentLocale = locale
67
-    return true
59
+  if not locale then
60
+    error("Locale " .. name .. ' does not exist.')
68 61
   end
69
-
70
-  print("Locale " .. name .. ' does not exist.')
71
-  return false
62
+  currentLocale = locale
72 63
 end
73 64
 
74 65
 function tr(text, ...)
@@ -86,12 +77,14 @@ function tr(text, ...)
86 77
       return out:reverse()
87 78
     elseif tostring(text) then
88 79
       local translation = currentLocale.translation[text]
89
-      if translation then
90
-        return string.format(translation, ...)
91
-      elseif currentLocale.name ~= defaultLocaleName then
92
-        print('WARNING: \"' .. text .. '\" could not be translated.')
80
+      if not translation then
81
+        if currentLocale.name ~= defaultLocaleName then
82
+          warning('Unable to translate: \"' .. text .. '\"')
83
+        end
84
+        translation = text
93 85
       end
86
+      return string.format(translation, ...)
94 87
     end
95 88
   end
96 89
   return text
97
-end
90
+end

+ 193
- 20
modules/client_locales/locales/pt-br.lua View File

@@ -1,26 +1,199 @@
1
+-- to find all possible translations in the source code use the following command:
2
+-- find \( -name '*.lua' -o -name '*.otui' \) -exec grep -oE "tr\\('(\\\\'|[^'])*'" {} \; -exec grep -oE "tr\\(\"(\\\\\"|[^\"])*\nil {} \; | sort | uniq | sed "s/^tr(.\(.*\).$/[\"\1\"] = nil,/"
3
+
1 4
 locale = {
2
-	name = 'pt-br',
5
+  name = 'pt-br',
3 6
 
4
-	-- As traduções devem vir sempre em ordem alfabética.
5
-	translation = {
6
-		['Account name'] = 'Nome da conta',
7
-		['Account Status:\nFree Account'] = 'Estado da Conta:\nGrátis',
8
-		['Auto login'] = 'Entrar automaticamente',
9
-		['Cancel'] = 'Cancelar',
10
-		['Character List'] = 'Lista de Personagens',
11
-		['Enter Game'] = 'Entrar no Jogo',
12
-		['Make sure that your client uses\nthe correct game protocol version'] = 'Tenha certeza de que o cliente usa\na versão correta do protocolo do jogo',
13
-		['Ok'] = 'Ok',
14
-		['Open charlist automatically when starting otclient'] = 'Abrir a lista de personagens automaticamente ao iniciar o otclient',
15
-		['Options'] = 'Opções',
16
-		['Password'] = 'Senha',
17
-		['Port'] = 'Porta',
18
-		['Remember account and password when starts otclient'] = 'Lembrar conta e senha ao iniciar o otclient',
19
-		['Remember password'] = 'Lembrar senha',
20
-		['Server'] = 'Servidor'
21
-	}
7
+  -- As traduções devem vir sempre em ordem alfabética.
8
+  translation = {
9
+    ["Account name"] = "Nome da conta",
10
+    ["Account Status:\nFree Account"] = "Estado da conta:\nGratís",
11
+    ["Account Status:\nPremium Account (%s) days left"] = "Estado da conta:\nConta premium (%s) dias faltando",
12
+    ["Add"] = "Adicionar",
13
+    ["Add new VIP"] = "Adicionar nova VIP",
14
+    ["Addon 1"] = "Addon 1",
15
+    ["Addon 2"] = "Addon 2",
16
+    ["Addon 3"] = "Addon 3",
17
+    ["Add to VIP list"] = "Adicionar a lista VIP",
18
+    ["Adjust volume"] = "Ajustar volume",
19
+    ["All modules and scripts were reloaded."] = "Todos modules e scripts foram recarregados.",
20
+    ["Amount:"] = "Quantidade:",
21
+    ["Attack"] = "Atacar",
22
+    ["Author"] = "Autor",
23
+    ["Autoload"] = "Carregar automaticamente",
24
+    ["Autoload priority"] = "Prioridade de carregamento",
25
+    ["Auto login"] = "Entrar automaticamente",
26
+    ["Auto login selected character on next charlist load"] = "Entrar automaticamente com o personagem quando reabrir a lista de personagens",
27
+    ["Axe Fighting"] = "Machado",
28
+    ["Battle"] = "Batalha",
29
+    ["Button Assign"] = "Selecionar botão",
30
+    ["Buy"] = "Comprar",
31
+    ["Buy no backpack"] = "Comprar na backpack",
32
+    ["Buy with backpack"] = "Comprar com backpack",
33
+    ["Cancel"] = "Cancelar",
34
+    ["Capacity:"] = "Capacidade:",
35
+    ["Capacity"] = "Capacidade",
36
+    ["Channels"] = "Canais",
37
+    ["Character List"] = "Lista de personagens",
38
+    ["Classic control"] = "Controle clássico",
39
+    ["Clear object"] = "Limpar objeto",
40
+    ["Close"] = "Fechar",
41
+    ["Close this channel"] = "Fechar esse canal",
42
+    ["Club Fighting"] = "Porrete",
43
+    ["Combat Controls"] = nil,
44
+    ["Connecting to game server..."] = "Conectando no servidor do jogo...",
45
+    ["Connecting to login server..."] = "Conectando no servidor de autenticação...",
46
+    ["Consider capacity"] = "Considerar capacidade",
47
+    ["Consider equipped"] = "Considerar equipado",
48
+    ["Copy Name"] = "Copiar Nome",
49
+    ["Current hotkeys:"] = "Atalhos atuais",
50
+    ["Current hotkey to add: %s"] = "Atalho atual para adicionar: %s",
51
+    ["Default"] = "Default",
52
+    ["Description"] = "Descrição",
53
+    ["Detail"] = "Detalhe",
54
+    ["Disable Shared Experience"] = "Desativar experiência compartilhada",
55
+    ["Distance Fighting"] = "Flecha",
56
+    ["Edit hotkey text:"] = "Editar texto do atalho",
57
+    ["Edit Text"] = "Editar Texto",
58
+    ["Enable Shared Experience"] = "Ativar experiência compartilhada",
59
+    ["Enable vertical synchronization"] = "Ativar sincronização vertical",
60
+    ["Enter Game"] = "Entrar no jogo",
61
+    ["Error"] = "Erro",
62
+    ["Exclude from private chat"] = "Excluir do canal privado",
63
+    ["Experience"] = "Experiência",
64
+    ["Fishing"] = "Pesca",
65
+    ["Fist Fighting"] = "Porrada",
66
+    ["Follow"] = "Seguir",
67
+    ["Frame rate limit"] = "Limite de FPS",
68
+    ["Fullscreen"] = "Tela cheia",
69
+    ["Head"] = "Cabeça",
70
+    ["Health Bar"] = "Barra de Vida",
71
+    ["Hide monsters"] = "Esconder montros",
72
+    ["Hide non-skull players"] = "Esconder jogadores sem caveira",
73
+    ["Hide Npcs"] = "Esconder NPCs",
74
+    ["Hide party members"] = "Esconder membros do grupo",
75
+    ["Hide players"] = "Esconder jogadores",
76
+    ["Hit Points"] = "Vida",
77
+    ["Hotkeys"] = "Atalhos",
78
+    ["Ignore capacity"] = "Ignorar capacidade",
79
+    ["Ignore equipped"] = "Ignorar equipado",
80
+    ["Inventory"] = "Inventário",
81
+    ["Invite to Party"] = "Convidar para o grupo",
82
+    ["Invite to private chat"] = "Convidar para canal privado",
83
+    ["Join %s\'s Party"] = "Entrar no grupo do %s",
84
+    ["Leave Party"] = "Sair do grupo",
85
+    ["Level"] = "Nível",
86
+    ["Limits FPS to 60"] = "Limita o FPS para 60",
87
+    ["List of items that you're able to buy"] = "Listar itens que você não pode comprar",
88
+    ["List of items that you're able to sell"] = "Listar itens que você pode comprar",
89
+    ["Load"] = "Carregar",
90
+    ["Loggin out..."] = "Saindo...",
91
+    ["Login"] = "Entrar",
92
+    ["Login Error"] = "Erro de Autenticação",
93
+    ["Look"] = "Olhar",
94
+    ["Magic Level"] = "Nível Mágico",
95
+    ["Make sure that your client uses\nthe correct game protocol version"] = "Tenha certeza que o seu cliente use\no mesmo protocolo do server do jogo",
96
+    ["Mana"] = "Mana",
97
+    ["Manage hotkeys:"] = "Configurar atalhos:",
98
+    ["Message of the day"] = "Mensagem do dia",
99
+    ["Message to %s"] = "Mandar mensagem para %s",
100
+    ["Minimap"] = "Minimapa",
101
+    ["Module Manager"] = "Gerenciador de Módulos",
102
+    ["Module name"] = "Nomo do módulo",
103
+    ["Money:"] = "Dinheiro:",
104
+    ["Move Stackable Item"] = "Move item contável",
105
+    ["Move up"] = "Mover para cima",
106
+    ["Name:"] = "Nome:",
107
+    ["NPC Trade"] = "Troca com NPC",
108
+    ["Ok"] = "Ok",
109
+    ["Open"] = "Abrir",
110
+    ["Open a private message channel:"] = "Abrir um canal privado:",
111
+    ["Open charlist automatically when starting otclient"] = "Abrir lista de personágens",
112
+    ["Open in new window"] = nil,
113
+    ["Open new channel"] = nil,
114
+    ["Options"] = nil,
115
+    ["Outfit Name"] = nil,
116
+    ["Pass Leadership to %s"] = nil,
117
+    ["Password"] = nil,
118
+    ["Please enter a character name:"] = nil,
119
+    ["Please, press the key you wish to add onto your hotkeys manager"] = nil,
120
+    ["Please wait"] = nil,
121
+    ["Port"] = nil,
122
+    ["Price:"] = nil,
123
+    ["Primary"] = nil,
124
+    ["Quantity:"] = nil,
125
+    ["Refresh"] = nil,
126
+    ["Reload All"] = nil,
127
+    ["Remember account and password when starts otclient"] = nil,
128
+    ["Remember password"] = nil,
129
+    ["Remove"] = nil,
130
+    ["Remove %s"] = nil,
131
+    ["Revoke %s\'s Invitation"] = nil,
132
+    ["Rotate"] = nil,
133
+    ["Search:"] = nil,
134
+    ["Secondary"] = nil,
135
+    ["Select object"] = nil,
136
+    ["Select Outfit"] = nil,
137
+    ["Sell"] = nil,
138
+    ["Send automatically"] = nil,
139
+    ["Server"] = nil,
140
+    ["Server Log"] = nil,
141
+    ["Set Outfit"] = nil,
142
+    ["Shielding"] = nil,
143
+    ["Show all items"] = nil,
144
+    ["Show event messages in console"] = nil,
145
+    ["Show frame rate"] = nil,
146
+    ["Show info messages in console"] = nil,
147
+    ["Show levels in console"] = nil,
148
+    ["Show only holding items"] = nil,
149
+    ["Show private messages in console"] = nil,
150
+    ["Show status messages in console"] = nil,
151
+    ["Show timestamps in console"] = nil,
152
+    ["Skills"] = nil,
153
+    ["Soul Points"] = nil,
154
+    ["Stamina"] = nil,
155
+    ["Stop Attack"] = nil,
156
+    ["Stop Follow"] = nil,
157
+    ["%s: (use object)"] = nil,
158
+    ["%s: (use object on target)"] = nil,
159
+    ["%s: (use object on yourself)"] = nil,
160
+    ["%s: (use object with crosshair)"] = nil,
161
+    ["Sword Fighting"] = nil,
162
+    ["Terminal"] = nil,
163
+    ["There is no way."] = nil,
164
+    ["Trade with ..."] = nil,
165
+    ["Unable to logout."] = nil,
166
+    ["Unload"] = nil,
167
+    ["Use"] = nil,
168
+    ["Use on target"] = nil,
169
+    ["Use on yourself"] = nil,
170
+    ["Use with ..."] = nil,
171
+    ["Version"] = nil,
172
+    ["VIP list"] = nil,
173
+    ["VIP List"] = nil,
174
+    ["Website"] = nil,
175
+    ["Weight:"] = nil,
176
+    ["With crosshair"] = nil,
177
+    ["You are burning"] = nil,
178
+    ["You are cursed"] = nil,
179
+    ["You are dazzled"] = nil,
180
+    ["You are drowing"] = nil,
181
+    ["You are electrified"] = nil,
182
+    ["You are freezing"] = nil,
183
+    ["You are hasted"] = nil,
184
+    ["You are paralysed"] = nil,
185
+    ["You are poisoned"] = nil,
186
+    ["You are protected by a magic shield"] = nil,
187
+    ["You are strengthened"] = nil,
188
+    ["You are within a protection zone"] = nil,
189
+    ["You have %s percent"] = nil,
190
+    ["You have %s percent to go"] = nil,
191
+    ["You may not logout during a fight"] = nil,
192
+    ["You may not logout or enter a protection zone"] = nil,
193
+    ["You must select a character to login!"] = nil,
194
+  }
22 195
 
23
-	-- Adicionar informações de números. 1.000  100,00  1.000,00 etc.
196
+  -- Adicionar informações de números. 1.000  100,00  1.000,00 etc.
24 197
 }
25 198
 
26 199
 Locales.installLocale(locale)

+ 1
- 1
modules/client_modulemanager/modulemanager.lua View File

@@ -16,7 +16,7 @@ function ModuleManager.init()
16 16
   Keyboard.bindKeyPress('Up', function() moduleList:focusPreviousChild(KeyboardFocusReason) end, moduleManagerWindow)
17 17
   Keyboard.bindKeyPress('Down', function() moduleList:focusNextChild(KeyboardFocusReason) end, moduleManagerWindow)
18 18
 
19
-  moduleManagerButton = TopMenu.addLeftButton('moduleManagerButton', 'Module manager', 'modulemanager.png', ModuleManager.toggle)
19
+  moduleManagerButton = TopMenu.addLeftButton('moduleManagerButton', tr('Module Manager'), 'modulemanager.png', ModuleManager.toggle)
20 20
 
21 21
   -- refresh modules only after all modules are loaded
22 22
   addEvent(ModuleManager.listModules)

+ 13
- 13
modules/client_modulemanager/modulemanager.otui View File

@@ -34,7 +34,7 @@ ModuleValueLabel < UILabel
34 34
 MainWindow
35 35
   id: moduleManagerWindow
36 36
   size: 480 450
37
-  text: Module Manager
37
+  !text: tr('Module Manager')
38 38
 
39 39
   @onEscape: ModuleManager.hide()
40 40
 
@@ -54,7 +54,7 @@ MainWindow
54 54
     anchors.left: moduleList.left
55 55
     margin-top: 8
56 56
     width: 80
57
-    text: Refresh
57
+    !text: tr('Refresh')
58 58
     @onClick: ModuleManager.refreshModules()
59 59
 
60 60
   Button
@@ -63,7 +63,7 @@ MainWindow
63 63
     anchors.right: moduleList.right
64 64
     margin-top: 8
65 65
     width: 80
66
-    text: Reload All
66
+    !text: tr('Reload All')
67 67
     @onClick: ModuleManager.reloadAllModules()
68 68
 
69 69
   Panel
@@ -76,40 +76,40 @@ MainWindow
76 76
     height: 265
77 77
 
78 78
     ModuleInfoLabel
79
-      text: Module name
79
+      !text: tr('Module name')
80 80
     ModuleValueLabel
81 81
       id: moduleName
82 82
 
83 83
     ModuleInfoLabel
84
-      text: Description
84
+      !text: tr('Description')
85 85
     ModuleValueLabel
86 86
       id: moduleDescription
87 87
       height: 100
88 88
       text-wrap: true
89 89
 
90 90
     //ModuleInfoLabel
91
-    //  text: Autoload
91
+    //  !text: tr('Autoload')
92 92
     //ModuleValueLabel
93 93
     //  id: moduleAutoload
94 94
 
95 95
     //ModuleInfoLabel
96
-    //  text: Autoload priority
96
+    //  !text: tr('Autoload priority')
97 97
     //ModuleValueLabel
98 98
     //  id: moduleLoadPriority
99 99
     //  text: 1000
100 100
 
101 101
     ModuleInfoLabel
102
-      text: Author
102
+      !text: tr('Author')
103 103
     ModuleValueLabel
104 104
       id: moduleAuthor
105 105
 
106 106
     ModuleInfoLabel
107
-      text: Website
107
+      !text: tr('Website')
108 108
     ModuleValueLabel
109 109
       id: moduleWebsite
110 110
 
111 111
     ModuleInfoLabel
112
-      text: Version
112
+      !text: tr('Version')
113 113
     ModuleValueLabel
114 114
       id: moduleVersion
115 115
 
@@ -118,7 +118,7 @@ MainWindow
118 118
     anchors.top: moduleInfo.bottom
119 119
     anchors.left: moduleInfo.left
120 120
     margin-top: 8
121
-    text: Load
121
+    !text: tr('Load')
122 122
     enabled: false
123 123
     @onClick: ModuleManager.reloadCurrentModule()
124 124
 
@@ -128,7 +128,7 @@ MainWindow
128 128
     anchors.right: moduleInfo.right
129 129
     margin-left: 10
130 130
     margin-top: 8
131
-    text: Unload
131
+    !text: tr('Unload')
132 132
     enabled: false
133 133
     @onClick: ModuleManager.unloadCurrentModule()
134 134
 
@@ -136,7 +136,7 @@ MainWindow
136 136
     id: closeButton
137 137
     anchors.bottom: parent.bottom
138 138
     anchors.right: parent.right
139
-    text: Close
139
+    !text: tr('Close')
140 140
     width: 60
141 141
     @onClick: ModuleManager.hide()
142 142
 

+ 7
- 7
modules/client_options/general.otui View File

@@ -1,28 +1,28 @@
1 1
 Panel
2 2
   OptionCheckBox
3 3
     id: classicControl
4
-    text: Classic control
4
+    !text: tr('Classic control')
5 5
 
6 6
   OptionCheckBox
7 7
     id: showInfoMessagesInConsole
8
-    text: Show info messages in console
8
+    !text: tr('Show info messages in console')
9 9
 
10 10
   OptionCheckBox
11 11
     id: showEventMessagesInConsole
12
-    text: Show event messages in console
12
+    !text: tr('Show event messages in console')
13 13
 
14 14
   OptionCheckBox
15 15
     id: showStatusMessagesInConsole
16
-    text: Show status messages in console
16
+    !text: tr('Show status messages in console')
17 17
 
18 18
   OptionCheckBox
19 19
     id: showTimestampsInConsole
20
-    text: Show timestamps in console
20
+    !text: tr('Show timestamps in console')
21 21
 
22 22
   OptionCheckBox
23 23
     id: showLevelsInConsole
24
-    text: Show levels in console
24
+    !text: tr('Show levels in console')
25 25
 
26 26
   OptionCheckBox
27 27
     id: showPrivateMessagesInConsole
28
-    text: Show private messages in console
28
+    !text: tr('Show private messages in console')

+ 5
- 5
modules/client_options/graphics.otui View File

@@ -1,19 +1,19 @@
1 1
 Panel
2 2
   OptionCheckBox
3 3
     id: vsync
4
-    text: Enable vertical synchronization
5
-    tooltip: Limits FPS to 60
4
+    !text: tr('Enable vertical synchronization')
5
+    !tooltip: tr('Limits FPS to 60')
6 6
 
7 7
   OptionCheckBox
8 8
     id: showfps
9
-    text: Show frame rate
9
+    !text: tr('Show frame rate')
10 10
 
11 11
   OptionCheckBox
12 12
     id: fullscreen
13
-    text: Fullscreen
13
+    !text: tr('Fullscreen')
14 14
 
15 15
   Label
16
-    text: Frame rate limit
16
+    !text: tr('Frame rate limit')
17 17
     anchors.left: parent.left
18 18
     anchors.right: parent.right
19 19
     anchors.top: prev.bottom

+ 2
- 5
modules/client_options/options.lua View File

@@ -28,7 +28,7 @@ function Options.init()
28 28
 
29 29
   optionsWindow = displayUI('options.otui')
30 30
   optionsWindow:hide()
31
-  optionsButton = TopMenu.addLeftButton('optionsButton', tr('Options') .. ' (Ctrl+O)', 'options.png', Options.toggle)
31
+  optionsButton = TopMenu.addLeftButton('optionsButton', tr('Options'), 'options.png', Options.toggle)
32 32
   optionsTabBar = optionsWindow:getChildById('optionsTabBar')
33 33
   optionsTabBar:setContentWidget(optionsWindow:getChildById('optionsTabContent'))
34 34
   optionsTabBar:addTab('General', loadUI('general.otui'))
@@ -37,6 +37,7 @@ end
37 37
 
38 38
 function Options.terminate()
39 39
   Keyboard.unbindKeyDown('Ctrl+P')
40
+  Keyboard.unbindKeyDown('Ctrl+F')
40 41
   optionsWindow:destroy()
41 42
   optionsWindow = nil
42 43
   optionsButton:destroy()
@@ -63,10 +64,6 @@ function Options.hide()
63 64
   optionsWindow:hide()
64 65
 end
65 66
 
66
-function Options.openWebpage()
67
-  displayErrorBox("Error", "Not implemented yet")
68
-end
69
-
70 67
 function Options.toggleOption(key)
71 68
   Options.setOption(key, not Options.getOption(key))
72 69
 end

+ 2
- 2
modules/client_options/options.otui View File

@@ -16,7 +16,7 @@ OptionCheckBox < CheckBox
16 16
 
17 17
 MainWindow
18 18
   id: optionsWindow
19
-  text: Options
19
+  !text: tr('Options')
20 20
   size: 286 230
21 21
 
22 22
   @onEnter: Options.hide()
@@ -37,7 +37,7 @@ MainWindow
37 37
     margin-top: 10
38 38
 
39 39
   Button
40
-    text: Ok
40
+    !text: tr('Ok')
41 41
     width: 64
42 42
     anchors.right: parent.right
43 43
     anchors.bottom: parent.bottom

+ 1
- 1
modules/client_terminal/terminal.lua View File

@@ -127,7 +127,7 @@ function Terminal.init()
127 127
     end
128 128
   end
129 129
 
130
-  terminalButton = TopMenu.addLeftButton('terminalButton', 'Terminal (Ctrl + T)', 'terminal.png', Terminal.toggle)
130
+  terminalButton = TopMenu.addLeftButton('terminalButton', tr('Terminal') .. ' (Ctrl + T)', 'terminal.png', Terminal.toggle)
131 131
   Keyboard.bindKeyDown('Ctrl+T', Terminal.toggle)
132 132
 
133 133
   commandHistory = Settings.getList('terminal-history')

+ 5
- 1
modules/core_lib/util.lua View File

@@ -1,11 +1,15 @@
1 1
 function print(...)
2 2
   local msg = ""
3
-  for i,v in ipairs(arg) do
3
+  for i,v in ipairs({...}) do
4 4
     msg = msg .. tostring(v) .. "\t"
5 5
   end
6 6
   g_logger.log(LogInfo, msg)
7 7
 end
8 8
 
9
+function warning(msg)
10
+  g_logger.log(LogWarning, msg)
11
+end
12
+
9 13
 function fatal(msg)
10 14
   g_logger.log(LogFatal, msg)
11 15
 end

+ 28
- 28
modules/game/gameinterface.lua View File

@@ -161,40 +161,40 @@ function GameInterface.createThingMenu(menuPosition, lookThing, useThing, creatu
161 161
   local menu = createWidget('PopupMenu')
162 162
 
163 163
   if lookThing then
164
-    menu:addOption('Look', function() g_game.look(lookThing) end)
164
+    menu:addOption(tr('Look'), function() g_game.look(lookThing) end)
165 165
   end
166 166
 
167 167
   if useThing then
168 168
     if useThing:isContainer() then
169 169
       if useThing:getParentContainer() then
170
-        menu:addOption('Open', function() g_game.open(useThing, useThing:getParentContainer()) end)
171
-        menu:addOption('Open in new window', function() g_game.open(useThing, nil) end)
170
+        menu:addOption(tr('Open'), function() g_game.open(useThing, useThing:getParentContainer()) end)
171
+        menu:addOption(tr('Open in new window'), function() g_game.open(useThing, nil) end)
172 172
       else
173
-        menu:addOption('Open', function() g_game.open(useThing, nil) end)
173
+        menu:addOption(tr('Open'), function() g_game.open(useThing, nil) end)
174 174
       end
175 175
     else
176 176
       if useThing:isMultiUse() then
177
-        menu:addOption('Use with ...', function() GameInterface.startUseWith(useThing) end)
177
+        menu:addOption(tr('Use with ...'), function() GameInterface.startUseWith(useThing) end)
178 178
       else
179
-        menu:addOption('Use', function() g_game.use(useThing) end)
179
+        menu:addOption(tr('Use'), function() g_game.use(useThing) end)
180 180
       end
181 181
     end
182 182
 
183 183
     if useThing:isRotateable() then
184
-      menu:addOption('Rotate', function() g_game.rotate(useThing) end)
184
+      menu:addOption(tr('Rotate'), function() g_game.rotate(useThing) end)
185 185
     end
186 186
 
187 187
   end
188 188
 
189 189
   if lookThing and not lookThing:asCreature() and not lookThing:isNotMoveable() and lookThing:isPickupable() then
190 190
     menu:addSeparator()
191
-    menu:addOption('Trade with ...', function() GameInterface.startTradeWith(lookThing) end)
191
+    menu:addOption(tr('Trade with ...'), function() GameInterface.startTradeWith(lookThing) end)
192 192
   end
193 193
 
194 194
   if lookThing then
195 195
     local parentContainer = lookThing:getParentContainer()
196 196
     if parentContainer and parentContainer:hasParent() then
197
-      menu:addOption('Move up', function() g_game.moveToParentContainer(lookThing, lookThing:getCount()) end)
197
+      menu:addOption(tr('Move up'), function() g_game.moveToParentContainer(lookThing, lookThing:getCount()) end)
198 198
     end
199 199
   end
200 200
 
@@ -202,64 +202,64 @@ function GameInterface.createThingMenu(menuPosition, lookThing, useThing, creatu
202 202
     menu:addSeparator()
203 203
 
204 204
     if creatureThing:asLocalPlayer() then
205
-      menu:addOption('Set Outfit', function() g_game.requestOutfit() end)
205
+      menu:addOption(tr('Set Outfit'), function() g_game.requestOutfit() end)
206 206
 
207 207
       if creatureThing:isPartyMember() --[[and not fighting]] then
208 208
         if creatureThing:isPartyLeader() then
209 209
           if creatureThing:isPartySharedExperienceActive() then
210
-            menu:addOption('Disable Shared Experience', function() g_game.partyShareExperience(false) end)
210
+            menu:addOption(tr('Disable Shared Experience'), function() g_game.partyShareExperience(false) end)
211 211
           else
212
-            menu:addOption('Enable Shared Experience', function() g_game.partyShareExperience(true) end)
212
+            menu:addOption(tr('Enable Shared Experience'), function() g_game.partyShareExperience(true) end)
213 213
           end
214 214
         end
215
-        menu:addOption('Leave Party', function() g_game.partyLeave() end)
215
+        menu:addOption(tr('Leave Party'), function() g_game.partyLeave() end)
216 216
       end
217 217
 
218 218
     else
219 219
       local localPlayer = g_game.getLocalPlayer()
220 220
       if localPlayer then
221 221
         if g_game.getAttackingCreature() ~= creatureThing then
222
-          menu:addOption('Attack', function() g_game.attack(creatureThing) end)
222
+          menu:addOption(tr('Attack'), function() g_game.attack(creatureThing) end)
223 223
         else
224
-          menu:addOption('Stop Attack', function() g_game.cancelAttack() end)
224
+          menu:addOption(tr('Stop Attack'), function() g_game.cancelAttack() end)
225 225
         end
226 226
 
227 227
         if g_game.getFollowingCreature() ~= creatureThing then
228
-          menu:addOption('Follow', function() g_game.follow(creatureThing) end)
228
+          menu:addOption(tr('Follow'), function() g_game.follow(creatureThing) end)
229 229
         else
230
-          menu:addOption('Stop Follow', function() g_game.cancelFollow() end)
230
+          menu:addOption(tr('Stop Follow'), function() g_game.cancelFollow() end)
231 231
         end
232 232
 
233 233
         if creatureThing:asPlayer() then
234 234
           menu:addSeparator()
235 235
           local creatureName = creatureThing:getName()
236
-          menu:addOption('Message to ' .. creatureName, function() g_game.openPrivateChannel(creatureName) end)
236
+          menu:addOption(tr('Message to %s', creatureName), function() g_game.openPrivateChannel(creatureName) end)
237 237
           if Console.getOwnPrivateTab() then
238
-            menu:addOption('Invite to private chat', function() g_game.inviteToOwnChannel(creatureName) end)
239
-            menu:addOption('Exclude from private chat', function() g_game.excludeFromOwnChannel(creatureName) end) -- [TODO] must be removed after message's popup labels been implemented
238
+            menu:addOption(tr('Invite to private chat'), function() g_game.inviteToOwnChannel(creatureName) end)
239
+            menu:addOption(tr('Exclude from private chat'), function() g_game.excludeFromOwnChannel(creatureName) end) -- [TODO] must be removed after message's popup labels been implemented
240 240
           end
241
-          menu:addOption('Add to VIP list', function() g_game.addVip(creatureName) end)
241
+          menu:addOption(tr('Add to VIP list'), function() g_game.addVip(creatureName) end)
242 242
 
243 243
           local localPlayerShield = localPlayer:asCreature():getShield()
244 244
           local creatureShield = creatureThing:getShield()
245 245
 
246 246
           if localPlayerShield == ShieldNone or localPlayerShield == ShieldWhiteBlue then
247 247
             if creatureShield == ShieldWhiteYellow then
248
-              menu:addOption('Join ' .. creatureThing:getName() .. '\'s Party', function() g_game.partyJoin(creatureThing:getId()) end)
248
+              menu:addOption(tr('Join %s\'s Party', creatureThing:getName()), function() g_game.partyJoin(creatureThing:getId()) end)
249 249
             else
250
-              menu:addOption('Invite to Party', function() g_game.partyInvite(creatureThing:getId()) end)
250
+              menu:addOption(tr('Invite to Party'), function() g_game.partyInvite(creatureThing:getId()) end)
251 251
             end
252 252
           elseif localPlayerShield == ShieldWhiteYellow then
253 253
             if creatureShield == ShieldWhiteBlue then
254
-              menu:addOption('Revoke ' .. creatureThing:getName() .. '\'s Invitation', function() g_game.partyRevokeInvitation(creatureThing:getId()) end)
254
+              menu:addOption(tr('Revoke %s\'s Invitation', creatureThing:getName()), function() g_game.partyRevokeInvitation(creatureThing:getId()) end)
255 255
             end
256 256
           elseif localPlayerShield == ShieldYellow or localPlayerShield == ShieldYellowSharedExp or localPlayerShield == ShieldYellowNoSharedExpBlink or localPlayerShield == ShieldYellowNoSharedExp then
257 257
             if creatureShield == ShieldWhiteBlue then
258
-              menu:addOption('Revoke ' .. creatureThing:getName() .. '\'s Invitation', function() g_game.partyRevokeInvitation(creatureThing:getId()) end)
258
+              menu:addOption(tr('Revoke %s\'s Invitation', creatureThing:getName()), function() g_game.partyRevokeInvitation(creatureThing:getId()) end)
259 259
             elseif creatureShield == ShieldBlue or creatureShield == ShieldBlueSharedExp or creatureShield == ShieldBlueNoSharedExpBlink or creatureShield == ShieldBlueNoSharedExp then
260
-              menu:addOption('Pass Leadership to ' .. creatureThing:getName(), function() g_game.partyPassLeadership(creatureThing:getId()) end)
260
+              menu:addOption(tr('Pass Leadership to %s'), function() g_game.partyPassLeadership(creatureThing:getId()) end)
261 261
             else
262
-              menu:addOption('Invite to Party', function() g_game.partyInvite(creatureThing:getId()) end)
262
+              menu:addOption(tr('Invite to Party'), function() g_game.partyInvite(creatureThing:getId()) end)
263 263
             end
264 264
           end
265 265
         end
@@ -267,7 +267,7 @@ function GameInterface.createThingMenu(menuPosition, lookThing, useThing, creatu
267 267
     end
268 268
 
269 269
     menu:addSeparator()
270
-    menu:addOption('Copy Name', function() g_window.setClipboardText(creatureThing:getName()) end)
270
+    menu:addOption(tr('Copy Name'), function() g_window.setClipboardText(creatureThing:getName()) end)
271 271
 
272 272
   end
273 273
 

+ 4
- 4
modules/game/styles/countwindow.otui View File

@@ -1,11 +1,11 @@
1 1
 CountWindow < MainWindow
2 2
   id: countWindow
3
-  text: Move Stackable Item
3
+  !text: tr('Move Stackable Item')
4 4
   size: 196 112
5 5
   @onEscape: self:destroy()
6 6
 
7 7
   Label
8
-    text: Amount:
8
+    !text: tr('Amount:')
9 9
     width: 64
10 10
     anchors.left: parent.left
11 11
     anchors.top: parent.top
@@ -26,7 +26,7 @@ CountWindow < MainWindow
26 26
 
27 27
   Button
28 28
     id: buttonOk
29
-    text: Ok
29
+    !text: tr('Ok')
30 30
     width: 64
31 31
     anchors.right: next.left
32 32
     anchors.bottom: parent.bottom
@@ -34,7 +34,7 @@ CountWindow < MainWindow
34 34
 
35 35
   Button
36 36
     id: buttonCancel
37
-    text: Cancel
37
+    !text: tr('Cancel')
38 38
     width: 64
39 39
     anchors.right: parent.right
40 40
     anchors.bottom: parent.bottom

+ 0
- 1
modules/game/styles/miniwindow.otui View File

@@ -6,7 +6,6 @@ MiniWindow < UIMiniWindow
6 6
   text-offset: 24 5
7 7
   text-align: topLeft
8 8
   margin-bottom: 2
9
-  move-policy: free updated
10 9
   image-source: /game/images/miniwindow.png
11 10
   image-border: 4
12 11
   image-border-top: 23

+ 1
- 1
modules/game/widgets/uigamemap.lua View File

@@ -68,7 +68,7 @@ function UIGameMap:onMouseRelease(mousePosition, mouseButton)
68 68
   elseif mouseButton == MouseLeftButton and self:isPressed() then
69 69
     local dirs = g_map.findPath(g_game.getLocalPlayer():getPosition(), tile:getPosition(), 255)
70 70
     if #dirs == 0 then
71
-      TextMessage.displayStatus('There is no way.')
71
+      TextMessage.displayStatus(tr('There is no way.'))
72 72
       return true
73 73
     end
74 74
     g_game.autoWalk(dirs)

+ 1
- 1
modules/game_battle/battle.lua View File

@@ -37,7 +37,7 @@ table.insert(lifeBarColors, {percentAbove = -1, color = '#4F0000' } )
37 37
 -- public functions
38 38
 function Battle.init()
39 39
   battleWindow = displayUI('battle.otui', GameInterface.getLeftPanel())
40
-  battleButton = TopMenu.addGameToggleButton('battleButton', 'Battle (Ctrl+B)', 'battle.png', Battle.toggle)
40
+  battleButton = TopMenu.addGameToggleButton('battleButton', tr('Battle') .. ' (Ctrl+B)', 'battle.png', Battle.toggle)
41 41
   battleButton:setOn(true)
42 42
   Keyboard.bindKeyDown('Ctrl+B', Battle.toggle)
43 43
 

+ 6
- 6
modules/game_battle/battle.otui View File

@@ -38,7 +38,7 @@ BattleParty < BattleIcon
38 38
 
39 39
 MiniWindow
40 40
   id: battleWindow
41
-  text: Battle
41
+  !text: tr('Battle')
42 42
   height: 166
43 43
   icon: battle.png
44 44
   @onClose: Battle.toggle()
@@ -46,34 +46,34 @@ MiniWindow
46 46
   MiniWindowContents
47 47
     BattlePlayers
48 48
       id: hidePlayers
49
-      tooltip: Hide players
49
+      !tooltip: tr('Hide players')
50 50
       anchors.top: parent.top
51 51
       anchors.right: next.left
52 52
       margin-right: 5
53 53
 
54 54
     BattleNPCs
55 55
       id: hideNPCs
56
-      tooltip: Hide Npc's
56
+      !tooltip: tr('Hide Npcs')
57 57
       anchors.top: parent.top
58 58
       anchors.right: next.left
59 59
       margin-right: 5
60 60
 
61 61
     BattleMonsters
62 62
       id: hideMonsters
63
-      tooltip: Hide monsters
63
+      !tooltip: tr('Hide monsters')
64 64
       anchors.top: parent.top
65 65
       anchors.horizontalCenter: parent.horizontalCenter
66 66
 
67 67
     BattleSkulls
68 68
       id: hideSkulls
69
-      tooltip: Hide non-skull players
69
+      !tooltip: tr('Hide non-skull players')
70 70
       anchors.top: prev.top
71 71
       anchors.left: prev.right
72 72
       margin-left: 5
73 73
 
74 74
     BattleParty
75 75
       id: hideParty
76
-      tooltip: Hide party members
76
+      !tooltip: tr('Hide party members')
77 77
       anchors.top: prev.top
78 78
       anchors.left: prev.right
79 79
       margin-left: 5

+ 1
- 1
modules/game_combatcontrols/combatcontrols.lua View File

@@ -48,7 +48,7 @@ end
48 48
 
49 49
 -- public functions
50 50
 function CombatControls.init()
51
-  combatControlsButton = TopMenu.addGameToggleButton('combatControlsButton', 'Combat Controls', 'combatcontrols.png', CombatControls.toggle)
51
+  combatControlsButton = TopMenu.addGameToggleButton('combatControlsButton', tr('Combat Controls'), 'combatcontrols.png', CombatControls.toggle)
52 52
   combatControlsButton:setOn(true)
53 53
   combatControlsWindow = loadUI('combatcontrols.otui', GameInterface.getRightPanel())
54 54
 

+ 1
- 1
modules/game_combatcontrols/combatcontrols.otui View File

@@ -20,7 +20,7 @@ SafeFightBox < CombatBox
20 20
   image-source: /game_combatcontrols/icons/safefight.png
21 21
 
22 22
 MiniWindow
23
-  text: Combat Controls
23
+  !text: tr('Combat Controls')
24 24
   icon: combatcontrols.png
25 25
   height: 64
26 26
   @onClose: CombatControls.toggle()

+ 4
- 4
modules/game_console/channelswindow.otui View File

@@ -10,7 +10,7 @@ ChannelListLabel < Label
10 10
 
11 11
 MainWindow
12 12
   id: channelsWindow
13
-  text: Channels
13
+  !text: tr('Channels')
14 14
   size: 250 238
15 15
   @onEscape: self:destroy()
16 16
 
@@ -25,7 +25,7 @@ MainWindow
25 25
 
26 26
   Label
27 27
     id: openPrivateChannelWithLabel
28
-    text: Open a private message channel:
28
+    !text: tr('Open a private message channel:')
29 29
     anchors.left: parent.left
30 30
     anchors.right: parent.right
31 31
     anchors.bottom: next.top
@@ -41,7 +41,7 @@ MainWindow
41 41
 
42 42
   Button
43 43
     id: buttonOpen
44
-    text: Open
44
+    !text: tr('Open')
45 45
     width: 64
46 46
     anchors.right: next.left
47 47
     anchors.bottom: parent.bottom
@@ -50,7 +50,7 @@ MainWindow
50 50
 
51 51
   Button
52 52
     id: buttonCancel
53
-    text: Cancel
53
+    !text: tr('Cancel')
54 54
     width: 64
55 55
     anchors.right: parent.right
56 56
     anchors.bottom: parent.bottom

+ 15
- 15
modules/game_console/console.lua View File

@@ -91,7 +91,7 @@ local function onCreatureSpeak(name, level, speaktype, message, channelId, creat
91 91
   if speaktype.private then
92 92
     Console.addPrivateText(message, speaktype, name, false)
93 93
   else
94
-    local channel = 'Default'
94
+    local channel = tr('Default')
95 95
     if not defaultMessage then
96 96
       channel = channels[channelId]
97 97
     end
@@ -177,7 +177,7 @@ local function onChannelList(channelList)
177 177
 end
178 178
 
179 179
 local function onGameStart()
180
-  local tab = Console.getTab('Default')
180
+  local tab = Console.getTab(tr('Default'))
181 181
   if tab then
182 182
     addEvent(function() consoleTabBar:selectTab(tab) end, false)
183 183
   end
@@ -201,8 +201,8 @@ function Console.init()
201 201
   consoleTabBar:setContentWidget(consoleContentPanel)
202 202
   channels = {}
203 203
 
204
-  Console.addTab('Default', true)
205
-  Console.addTab('Server Log', false)
204
+  Console.addTab(tr('Default'), true)
205
+  Console.addTab(tr('Server Log'), false)
206 206
 
207 207
   Keyboard.bindKeyPress('Shift+Up', function() navigateMessageHistory(1) end, consolePanel)
208 208
   Keyboard.bindKeyPress('Shift+Down', function() navigateMessageHistory(-1) end, consolePanel)
@@ -265,8 +265,8 @@ function Console.clear()
265 265
   
266 266
   channels = {}
267 267
 
268
-  consoleTabBar:getTab('Default').tabPanel:getChildById('consoleBuffer'):destroyChildren()
269
-  consoleTabBar:getTab('Server Log').tabPanel:getChildById('consoleBuffer'):destroyChildren()
268
+  consoleTabBar:getTab(tr('Default')).tabPanel:getChildById('consoleBuffer'):destroyChildren()
269
+  consoleTabBar:getTab(tr('Server Log')).tabPanel:getChildById('consoleBuffer'):destroyChildren()
270 270
 
271 271
   local npcTab = consoleTabBar:getTab('NPCs')
272 272
   if npcTab then
@@ -289,14 +289,14 @@ function Console.addTab(name, focus)
289 289
   local tab = consoleTabBar:addTab(name)
290 290
   if focus then
291 291
     consoleTabBar:selectTab(tab)
292
-  elseif name ~= 'Server Log' then
292
+  elseif name ~= tr('Server Log') then
293 293
     consoleTabBar:blinkTab(tab)
294 294
   end
295 295
   return tab
296 296
 end
297 297
 
298 298
 function Console.onTabChange(tabBar, tab)
299
-  if tab:getText() == "Default" or tab:getText() == "Server Log" then
299
+  if tab:getText() == tr('Default') or tab:getText() == tr('Server Log') then
300 300
     consolePanel:getChildById('closeChannelButton'):disable()
301 301
   else
302 302
     consolePanel:getChildById('closeChannelButton'):enable()
@@ -305,7 +305,7 @@ end
305 305
 
306 306
 function Console.removeCurrentTab()
307 307
   local tab = consoleTabBar:getCurrentTab()
308
-  if tab:getText() == "Default" or tab:getText() == "Server Log" then return end
308
+  if tab:getText() == tr('Default') or tab:getText() == tr('Server Log') then return end
309 309
 
310 310
   -- notificate the server that we are leaving the channel
311 311
   if tab.channelId then
@@ -342,7 +342,7 @@ function Console.addPrivateText(text, speaktype, name, isPrivateCommand)
342 342
   local privateTab = Console.getTab(name)
343 343
   if privateTab == nil then
344 344
     if Options['showPrivateMessagesInConsole'] or (isPrivateCommand and not privateTab) then
345
-      privateTab = Console.getTab('Default')
345
+      privateTab = Console.getTab(tr('Default'))
346 346
     else
347 347
       privateTab = Console.addTab(name, focus)
348 348
     end
@@ -424,14 +424,14 @@ function Console.sendCurrentMessage()
424 424
 
425 425
   -- when talking on server log, the message goes to default channel
426 426
   local name = tab:getText()
427
-  if name == 'Server Log' then
428
-    tab = Console.getTab('Default')
429
-    name = 'Default'
427
+  if name == tr('Server Log') then
428
+    tab = Console.getTab(tr('Default'))
429
+    name = tr('Default')
430 430
   end
431 431
   
432 432
   local speaktypedesc
433
-  if (tab.channelId or name == 'Default') and not chatCommandPrivateReady then
434
-    if name == 'Default' then
433
+  if (tab.channelId or name == tr('Default')) and not chatCommandPrivateReady then
434
+    if name == tr('Default') then
435 435
       speaktypedesc = chatCommandSayMode or SayModes[consolePanel:getChildById('sayModeButton').sayMode].speakTypeDesc
436 436
       if speaktypedesc ~= 'say' then Console.sayModeChange(2) end -- head back to say mode
437 437
     else

+ 3
- 3
modules/game_console/console.otui View File

@@ -64,7 +64,7 @@ Panel
64 64
 
65 65
   TabButton
66 66
     id: closeChannelButton
67
-    tooltip: Close this channel (Ctrl+E)
67
+    !tooltip: tr('Close this channel') .. ' (Ctrl+E)'
68 68
     icon: /core_styles/icons/closechannel.png
69 69
     anchors.right: next.left
70 70
     anchors.top: parent.top
@@ -75,7 +75,7 @@ Panel
75 75
 
76 76
   TabButton
77 77
     id: channelsButton
78
-    tooltip: Open new channel (Ctrl+O)
78
+    !tooltip: tr('Open new channel') .. ' (Ctrl+O)'
79 79
     icon: /core_styles/icons/channels.png
80 80
     anchors.right: parent.right
81 81
     anchors.top: parent.top
@@ -99,7 +99,7 @@ Panel
99 99
   TabButton
100 100
     id: sayModeButton
101 101
     icon: /core_styles/icons/say.png
102
-    tooltip: Adjust volume
102
+    !tooltip: tr('Adjust volume')
103 103
     &sayMode: 2
104 104
     size: 20 20
105 105
     anchors.left: parent.left

+ 16
- 16
modules/game_healthbar/healthbar.lua View File

@@ -2,21 +2,21 @@ HealthBar = {}
2 2
 
3 3
 -- constants
4 4
 local Icons = {}
5
-Icons[1] = { tooltip = 'You are poisoned', path = '/game_healthbar/icons/poisoned.png', id = 'condition_poisoned' }
6
-Icons[2] = { tooltip = 'You are burning', path = '/game_healthbar/icons/burning.png', id = 'condition_burning' }
7
-Icons[4] = { tooltip = 'You are electrified', path = '/game_healthbar/icons/electrified.png', id = 'condition_electrified' }
8
-Icons[8] = { tooltip = 'You are freezing', path = '/game_healthbar/icons/drunk.png', id = 'condition_drunk' }
9
-Icons[16] = { tooltip = 'You are protected by a magic shield', path = '/game_healthbar/icons/magic_shield.png', id = 'condition_magic_shield' }
10
-Icons[32] = { tooltip = 'You are paralysed', path = '/game_healthbar/icons/slowed.png', id = 'condition_slowed' }
11
-Icons[64] = { tooltip = 'You are hasted', path = '/game_healthbar/icons/haste.png', id = 'condition_haste' }
12
-Icons[128] = { tooltip = 'You may not logout during a fight', path = '/game_healthbar/icons/logout_block.png', id = 'condition_logout_block' }
13
-Icons[256] = { tooltip = 'You are drowing', path = '/game_healthbar/icons/drowning.png', id = 'condition_drowning' }
14
-Icons[512] = { tooltip = 'You are freezing', path = '/game_healthbar/icons/freezing.png', id = 'condition_freezing' }
15
-Icons[1024] = { tooltip = 'You are dazzled', path = '/game_healthbar/icons/dazzled.png', id = 'condition_dazzled' }
16
-Icons[2048] = { tooltip = 'You are cursed', path = '/game_healthbar/icons/cursed.png', id = 'condition_cursed' }
17
-Icons[4096] = { tooltip = 'You are strengthened', path = '/game_healthbar/icons/strengthened.png', id = 'condition_strengthened' }
18
-Icons[8192] = { tooltip = 'You may not logout or enter a protection zone', path = '/game_healthbar/icons/protection_zone_block.png', id = 'condition_protection_zone_block' }
19
-Icons[16384] = { tooltip = 'You are within a protection zone', path = '/game_healthbar/icons/protection_zone.png', id = 'condition_protection_zone' }
5
+Icons[1] = { tooltip = tr('You are poisoned'), path = '/game_healthbar/icons/poisoned.png', id = 'condition_poisoned' }
6
+Icons[2] = { tooltip = tr('You are burning'), path = '/game_healthbar/icons/burning.png', id = 'condition_burning' }
7
+Icons[4] = { tooltip = tr('You are electrified'), path = '/game_healthbar/icons/electrified.png', id = 'condition_electrified' }
8
+Icons[8] = { tooltip = tr('You are freezing'), path = '/game_healthbar/icons/drunk.png', id = 'condition_drunk' }
9
+Icons[16] = { tooltip = tr('You are protected by a magic shield'), path = '/game_healthbar/icons/magic_shield.png', id = 'condition_magic_shield' }
10
+Icons[32] = { tooltip = tr('You are paralysed'), path = '/game_healthbar/icons/slowed.png', id = 'condition_slowed' }
11
+Icons[64] = { tooltip = tr('You are hasted'), path = '/game_healthbar/icons/haste.png', id = 'condition_haste' }
12
+Icons[128] = { tooltip = tr('You may not logout during a fight'), path = '/game_healthbar/icons/logout_block.png', id = 'condition_logout_block' }
13
+Icons[256] = { tooltip = tr('You are drowing'), path = '/game_healthbar/icons/drowning.png', id = 'condition_drowning' }
14
+Icons[512] = { tooltip = tr('You are freezing'), path = '/game_healthbar/icons/freezing.png', id = 'condition_freezing' }
15
+Icons[1024] = { tooltip = tr('You are dazzled'), path = '/game_healthbar/icons/dazzled.png', id = 'condition_dazzled' }
16
+Icons[2048] = { tooltip = tr('You are cursed'), path = '/game_healthbar/icons/cursed.png', id = 'condition_cursed' }
17
+Icons[4096] = { tooltip = tr('You are strengthened'), path = '/game_healthbar/icons/strengthened.png', id = 'condition_strengthened' }
18
+Icons[8192] = { tooltip = tr('You may not logout or enter a protection zone'), path = '/game_healthbar/icons/protection_zone_block.png', id = 'condition_protection_zone_block' }
19
+Icons[16384] = { tooltip = tr('You are within a protection zone'), path = '/game_healthbar/icons/protection_zone.png', id = 'condition_protection_zone' }
20 20
 
21 21
 -- private variables
22 22
 local healthBarWindow
@@ -34,7 +34,7 @@ function HealthBar.init()
34 34
   connect(g_game, { onGameEnd = HealthBar.offline })
35 35
 
36 36
   healthBarWindow = displayUI('healthbar.otui', GameInterface.getLeftPanel())
37
-  healthBarButton = TopMenu.addGameToggleButton('healthBarButton', 'Healh Bar', 'healthbar.png', HealthBar.toggle)
37
+  healthBarButton = TopMenu.addGameToggleButton('healthBarButton', tr('Health Bar'), 'healthbar.png', HealthBar.toggle)
38 38
   healthBarButton:setOn(true)
39 39
   healthBar = healthBarWindow:recursiveGetChildById('healthBar')
40 40
   manaBar = healthBarWindow:recursiveGetChildById('manaBar')

+ 1
- 1
modules/game_healthbar/healthbar.otui View File

@@ -42,7 +42,7 @@ ConditionWidget < UIWidget
42 42
 MiniWindow
43 43
   icon: healthbar.png
44 44
   id: healthBarWindow
45
-  text: Health Bar
45
+  !text: tr('Health Bar')
46 46
   height: 86
47 47
   @onClose: HealthBar.toggle()
48 48
 

+ 11
- 11
modules/game_hotkeys/hotkeys_manager.lua View File

@@ -37,7 +37,7 @@ function HotkeysManager.init()
37 37
   hotkeysWindow = displayUI('hotkeys_manager.otui')
38 38
 
39 39
   hotkeysWindow:setVisible(false)
40
-  hotkeysButton = TopMenu.addGameButton('hotkeysButton', 'Hotkeys (Ctrl+K)', '/game_hotkeys/icon.png', HotkeysManager.toggle)
40
+  hotkeysButton = TopMenu.addGameButton('hotkeysButton', tr('Hotkeys') .. ' (Ctrl+K)', '/game_hotkeys/icon.png', HotkeysManager.toggle)
41 41
   Keyboard.bindKeyDown('Ctrl+K', HotkeysManager.toggle)
42 42
 
43 43
   currentHotkeysList = hotkeysWindow:getChildById('currentHotkeys')
@@ -201,20 +201,20 @@ function HotkeysManager.addHotkey()
201 201
   messageBox = createWidget('MainWindow', rootWidget)
202 202
   messageBox:grabKeyboard()
203 203
   messageBox:setId('assignWindow')
204
-  messageBox:setText('Button Assign')
204
+  messageBox:setText(tr('Button Assign'))
205 205
   messageBox:setWidth(420)
206 206
   messageBox:setHeight(140)
207 207
   messageBox:setDragable(false)
208 208
 
209 209
   widget = createWidget('Label', messageBox)
210
-  widget:setText('Please, press the key you wish to add onto your hotkeys manager')
210
+  widget:setText(tr('Please, press the key you wish to add onto your hotkeys manager'))
211 211
   widget:resizeToText()
212 212
   widget:addAnchor(AnchorHorizontalCenter, 'parent', AnchorHorizontalCenter)
213 213
   widget:addAnchor(AnchorTop, 'parent', AnchorTop)
214 214
 
215 215
   widget = createWidget('Label', messageBox)
216 216
   widget:setId('comboPreview')
217
-  widget:setText('Current hotkey to add: None')
217
+  widget:setText(tr('Current hotkey to add: %s', 'none'))
218 218
   widget.keyCombo = ''
219 219
   widget:resizeToText()
220 220
   widget:addAnchor(AnchorHorizontalCenter, 'parent', AnchorHorizontalCenter)
@@ -223,7 +223,7 @@ function HotkeysManager.addHotkey()
223 223
 
224 224
   widget = createWidget('Button', messageBox)
225 225
   widget:setId('cancelButton')
226
-  widget:setText('Cancel')
226
+  widget:setText(tr('Cancel'))
227 227
   widget:setWidth(64)
228 228
   widget:addAnchor(AnchorBottom, 'parent', AnchorBottom)
229 229
   widget:addAnchor(AnchorRight, 'parent', AnchorRight)
@@ -234,7 +234,7 @@ function HotkeysManager.addHotkey()
234 234
 
235 235
   widget = createWidget('Button', messageBox)
236 236
   widget:setId('addButton')
237
-  widget:setText('Add')
237
+  widget:setText(tr('Add'))
238 238
   widget:setWidth(64)
239 239
   widget:disable()
240 240
   widget:addAnchor(AnchorBottom, 'cancelButton', AnchorBottom)
@@ -372,19 +372,19 @@ function HotkeysManager.changeUseType(useType, checked)
372 372
       useWith:enable()
373 373
 
374 374
       if useType == HOTKEY_MANAGER_USEONSELF then
375
-        hotkeyLabelSelectedOnList:setText(hotkeyLabelSelectedOnList.keyCombo .. ': (use object on yourself)')
375
+        hotkeyLabelSelectedOnList:setText(tr('%s: (use object on yourself)', hotkeyLabelSelectedOnList.keyCombo))
376 376
         hotkeyLabelSelectedOnList:setColor(hotkeyColors.itemUseSelf)
377 377
         useOnSelf:setChecked(true)
378 378
         useOnTarget:setChecked(false)
379 379
         useWith:setChecked(false)
380 380
       elseif useType == HOTKEY_MANAGER_USEONTARGET then
381
-        hotkeyLabelSelectedOnList:setText(hotkeyLabelSelectedOnList.keyCombo .. ': (use object on target)')
381
+        hotkeyLabelSelectedOnList:setText(tr('%s: (use object on target)', hotkeyLabelSelectedOnList.keyCombo))
382 382
         hotkeyLabelSelectedOnList:setColor(hotkeyColors.itemUseTarget)
383 383
         useOnSelf:setChecked(false)
384 384
         useOnTarget:setChecked(true)
385 385
         useWith:setChecked(false)
386 386
       elseif useType == HOTKEY_MANAGER_USEWITH then
387
-        hotkeyLabelSelectedOnList:setText(hotkeyLabelSelectedOnList.keyCombo .. ': (use object with crosshair)')
387
+        hotkeyLabelSelectedOnList:setText(tr('%s: (use object with crosshair)', hotkeyLabelSelectedOnList.keyCombo))
388 388
         hotkeyLabelSelectedOnList:setColor(hotkeyColors.itemUseWith)
389 389
 
390 390
         useOnSelf:setChecked(false)
@@ -396,7 +396,7 @@ function HotkeysManager.changeUseType(useType, checked)
396 396
       useOnTarget:disable()
397 397
       useWith:disable()
398 398
 
399
-      hotkeyLabelSelectedOnList:setText(hotkeyLabelSelectedOnList.keyCombo .. ': (use object)')
399
+      hotkeyLabelSelectedOnList:setText(tr('%s: (use object)', hotkeyLabelSelectedOnList.keyCombo))
400 400
       hotkeyLabelSelectedOnList:setColor(hotkeyColors.itemUse)
401 401
 
402 402
       useOnSelf:setChecked(false)
@@ -448,7 +448,7 @@ end
448 448
 function HotkeysManager.hotkeyCapture(widget, keyCode, keyboardModifiers)
449 449
   local keyCombo = determineKeyComboDesc(keyCode, keyboardModifiers)
450 450
   local comboPreview = rootWidget:getChildById('assignWindow'):getChildById('comboPreview')
451
-  comboPreview:setText('Current hotkey to add: '.. keyCombo)
451
+  comboPreview:setText(tr('Current hotkey to add: %s', keyCombo))
452 452
   comboPreview.keyCombo = keyCombo
453 453
   comboPreview:resizeToText()
454 454
   rootWidget:getChildById('assignWindow'):getChildById('addButton'):enable()

+ 15
- 15
modules/game_hotkeys/hotkeys_manager.otui View File

@@ -10,7 +10,7 @@ HotkeyListLabel < UILabel
10 10
 
11 11
 MainWindow
12 12
   id: hotkeysWindow
13
-  text: Hotkeys
13
+  !text: tr('Hotkeys')
14 14
   size: 340 460
15 15
 
16 16
   @onEnter: HotkeysManager.hide()
@@ -18,11 +18,11 @@ MainWindow
18 18
 
19 19
   Label
20 20
     id: currentHotkeysLabel
21
-    text: Current hotkeys:
21
+    !text: tr('Current hotkeys:')
22 22
     anchors.left: parent.left
23 23
     anchors.right: parent.right
24 24
     anchors.top: parent.top
25
-    
25
+
26 26
   VerticalScrollBar
27 27
     id: currentHotkeysScrollBar
28 28
     height: 150
@@ -30,7 +30,7 @@ MainWindow
30 30
     anchors.right: parent.right
31 31
     step: 14
32 32
     pixels-scroll: true
33
-    
33
+
34 34
   TextList
35 35
     id: currentHotkeys
36 36
     vertical-scrollbar: currentHotkeysScrollBar    
@@ -43,7 +43,7 @@ MainWindow
43 43
     focusable: false
44 44
 
45 45
   Label
46
-    text: Manage hotkeys:
46
+    !text: tr('Manage hotkeys:')
47 47
     anchors.left: parent.left
48 48
     anchors.right: parent.right
49 49
     anchors.top: prev.bottom
@@ -51,7 +51,7 @@ MainWindow
51 51
 
52 52
   Button
53 53
     id: addHotkey
54
-    text: Add
54
+    !text: tr('Add')
55 55
     width: 64
56 56
     anchors.left: parent.left
57 57
     anchors.top: prev.bottom
@@ -60,7 +60,7 @@ MainWindow
60 60
 
61 61
   Button
62 62
     id: removeHotkey
63
-    text: Remove
63
+    !text: tr('Remove')
64 64
     width: 64
65 65
     enabled: false
66 66
     anchors.left: prev.right
@@ -70,7 +70,7 @@ MainWindow
70 70
 
71 71
   Label
72 72
     id: hotKeyTextLabel
73
-    text: Edit hotkey text:
73
+    !text: tr('Edit hotkey text:')
74 74
     enable: false
75 75
     anchors.left: parent.left
76 76
     anchors.right: parent.right
@@ -88,7 +88,7 @@ MainWindow
88 88
 
89 89
   CheckBox
90 90
     id: sendAutomatically
91
-    text: Send automatically
91
+    !text: tr('Send automatically')
92 92
     anchors.left: parent.left
93 93
     anchors.right: parent.right
94 94
     anchors.top: prev.bottom
@@ -105,7 +105,7 @@ MainWindow
105 105
 
106 106
   Button
107 107
     id: selectObjectButton
108
-    text: Select object
108
+    !text: tr('Select object')
109 109
     width: 128
110 110
     enabled: false
111 111
     anchors.left: prev.right
@@ -115,7 +115,7 @@ MainWindow
115 115
 
116 116
   Button
117 117
     id: clearObjectButton
118
-    text: Clear object
118
+    !text: tr('Clear object')
119 119
     width: 128
120 120
     enabled: false
121 121
     anchors.left: prev.left
@@ -126,7 +126,7 @@ MainWindow
126 126
 
127 127
   ButtonBox
128 128
     id: useOnSelf
129
-    text: Use on yourself
129
+    !text: tr('Use on yourself')
130 130
     width: 128
131 131
     enabled: false
132 132
     anchors.left: selectObjectButton.right
@@ -138,7 +138,7 @@ MainWindow
138 138
 
139 139
   ButtonBox
140 140
     id: useOnTarget
141
-    text: Use on target
141
+    !text: tr('Use on target')
142 142
     width: 128
143 143
     enabled: false
144 144
     anchors.left: prev.left
@@ -150,7 +150,7 @@ MainWindow
150 150
 
151 151
   ButtonBox
152 152
     id: useWith
153
-    text: With crosshair
153
+    !text: tr('With crosshair')
154 154
     width: 128
155 155
     enabled: false
156 156
     anchors.left: prev.left
@@ -161,7 +161,7 @@ MainWindow
161 161
     @onCheckChange: HotkeysManager.changeUseType(HOTKEY_MANAGER_USEWITH, self:isChecked())
162 162
 
163 163
   Button
164
-    text: Close
164
+    !text: tr('Close')
165 165
     width: 64
166 166
     anchors.right: parent.right
167 167
     anchors.bottom: parent.bottom

+ 1
- 1
modules/game_inventory/inventory.lua View File

@@ -17,7 +17,7 @@ function Inventory.init()
17 17
   inventoryWindow = displayUI('inventory.otui', GameInterface.getRightPanel())
18 18
   inventoryWindow.onClose = Inventory.toggle
19 19
   inventoryPanel = inventoryWindow:getChildById('contentsPanel')
20
-  inventoryButton = TopMenu.addGameToggleButton('inventoryButton', 'Inventory (Ctrl+I)', 'inventory.png', Inventory.toggle)
20
+  inventoryButton = TopMenu.addGameToggleButton('inventoryButton', tr('Inventory') .. ' (Ctrl+I)', 'inventory.png', Inventory.toggle)
21 21
   inventoryButton:setOn(true)
22 22
 
23 23
   if g_game.isOnline() then

+ 1
- 1
modules/game_inventory/inventory.otui View File

@@ -1,6 +1,6 @@
1 1
 MiniWindow
2 2
   id: inventoryMiniWindow
3
-  text: Inventory
3
+  !text: tr('Inventory')
4 4
   icon: inventory.png
5 5
   height: 180
6 6
   @onClose: Inventory.toggle()

+ 2
- 2
modules/game_minimap/minimap.lua View File

@@ -10,7 +10,7 @@ function onMinimapMouseRelease(self, mousePosition, mouseButton)
10 10
   if tile and mouseButton == MouseLeftButton and self:isPressed() then
11 11
     local dirs = g_map.findPath(g_game.getLocalPlayer():getPosition(), tile:getPosition(), 255)
12 12
     if #dirs == 0 then
13
-      TextMessage.displayStatus('There is no way.')
13
+      TextMessage.displayStatus(tr('There is no way.'))
14 14
       return true
15 15
     end
16 16
     g_game.autoWalk(dirs)
@@ -33,7 +33,7 @@ function Minimap.init()
33 33
   connect(g_game, { onLogin = Minimap.reset })
34 34
   Keyboard.bindKeyDown('Ctrl+M', Minimap.toggle)
35 35
 
36
-  minimapButton = TopMenu.addGameToggleButton('minimapButton', 'Minimap (Ctrl+M)', 'minimap.png', Minimap.toggle)
36
+  minimapButton = TopMenu.addGameToggleButton('minimapButton', tr('Minimap') .. ' (Ctrl+M)', 'minimap.png', Minimap.toggle)
37 37
   minimapButton:setOn(false)
38 38
 
39 39
   minimapWidget = loadUI('minimap.otui', GameInterface.getMapPanel())

+ 11
- 11
modules/game_npctrade/npctrade.lua View File

@@ -132,7 +132,7 @@ end
132 132
 function NPCTrade.updateSetup()
133 133
   if offerSelected then
134 134
     if radioItems.selectedWidget:isEnabled() then
135
-      if setupButton:getText() == 'Buy' then
135
+      if setupButton:getText() == tr('Buy') then
136 136
         local capacityMaxCount = math.floor(100*g_game.getLocalPlayer():getFreeCapacity()/offerSelected[3])
137 137
         local priceMaxCount = math.floor(moneyGoods/NPCTrade.getOfferPrice(offerSelected))
138 138
         quantityScroll:setMaximum(math.max(0, math.min(100, math.min(priceMaxCount, capacityMaxCount))))
@@ -148,7 +148,7 @@ function NPCTrade.updateSetup()
148 148
 end
149 149
 
150 150
 function NPCTrade.getOfferPrice(offer)
151
-  if setupButton:getText() == 'Buy' then
151
+  if setupButton:getText() == tr('Buy') then
152 152
     local price = offer[4]
153 153
     if buyWithBackpack then
154 154
       if offer[1]:isStackable() then
@@ -225,14 +225,14 @@ end
225 225
 function NPCTrade.itemPopup(self, mousePosition, mouseButton)
226 226
   if mouseButton == MouseRightButton then
227 227
     local menu = createWidget('PopupMenu')
228
-    menu:addOption('Look', function() return g_game.inspectNpcTrade(self.offer[1]) end)
228
+    menu:addOption(tr('Look'), function() return g_game.inspectNpcTrade(self.offer[1]) end)
229 229
     menu:addSeparator()
230
-    if setupButton:getText() == 'Buy' then
231
-      menu:addOption((buyWithBackpack and 'Buy no backpack' or 'Buy with backpack'), NPCTrade.switchBuyWithBackpack)
232
-      menu:addOption((ignoreCapacity and 'Consider capacity' or 'Ignore capacity'), function() ignoreCapacity = not ignoreCapacity return true end)
230
+    if setupButton:getText() == tr('Buy') then
231
+      menu:addOption((buyWithBackpack and tr('Buy no backpack') or tr('Buy with backpack')), NPCTrade.switchBuyWithBackpack)
232
+      menu:addOption((ignoreCapacity and tr('Consider capacity') or tr('Ignore capacity')), function() ignoreCapacity = not ignoreCapacity return true end)
233 233
     else
234
-      menu:addOption((ignoreEquipped and 'Consider equipped' or 'Ignore equipped'), function() ignoreEquipped = not ignoreEquipped return true end)
235
-      menu:addOption((showOnlyHolding and 'Show all items' or 'Show only holding items'), function() showOnlyHolding = not showOnlyHolding NPCTrade.refreshFilters() return true end)
234
+      menu:addOption((ignoreEquipped and tr('Consider equipped') or tr('Ignore equipped')), function() ignoreEquipped = not ignoreEquipped return true end)
235
+      menu:addOption((showOnlyHolding and tr('Show all items') or tr('Show only holding items')), function() showOnlyHolding = not showOnlyHolding NPCTrade.refreshFilters() return true end)
236 236
     end
237 237
     menu:display(mousePosition)
238 238
   end
@@ -274,7 +274,7 @@ function NPCTrade.createItemsOnPanel()
274 274
 end
275 275
 
276 276
 function NPCTrade.extraFilters(widget, showOnlyHolding)
277
-  if setupButton:getText() == 'Sell' then    
277
+  if setupButton:getText() == tr('Sell') then    
278 278
     if not showOnlyHolding or cacheGoods[widget.offer[1]:getId()] then
279 279
       return true
280 280
     else
@@ -306,8 +306,8 @@ function NPCTrade.refreshFilters()
306 306
   end
307 307
 end
308 308
 
309
-function NPCTrade.refreshItemsPanel()  
310
-  if setupButton:getText() == 'Buy' then
309
+function NPCTrade.refreshItemsPanel()
310
+  if setupButton:getText() == tr('Buy') then
311 311
     local items = itemsPanel:getChildCount()
312 312
     for i = 1, items do
313 313
       local itemWidget = itemsPanel:getChildByIndex(i)

+ 39
- 39
modules/game_npctrade/npctrade.otui View File

@@ -7,19 +7,19 @@ NPCOfferLabel < Label
7 7
 NPCPanel < ScrollablePanel
8 8
   image-source: /core_styles/styles/images/panel_flat.png
9 9
   image-border: 1
10
-  
11
-NPCItemBox < UICheckBox  
10
+
11
+NPCItemBox < UICheckBox
12 12
   border-width: 1
13 13
   border-color: #000000 
14 14
   @onCheckChange: NPCTrade.setItem(self)
15
-  
15
+
16 16
   Item
17 17
     id: item
18 18
     phantom: true
19 19
     anchors.top: parent.top
20 20
     anchors.horizontalCenter: parent.horizontalCenter
21 21
     margin-top: 2
22
-    
22
+
23 23
   Label
24 24
     id: nameLabel
25 25
     phantom: true
@@ -27,7 +27,7 @@ NPCItemBox < UICheckBox
27 27
     anchors.horizontalCenter: parent.horizontalCenter
28 28
     text-auto-resize: true
29 29
     margin-top: 5
30
-    
30
+
31 31
   Label
32 32
     id: weightLabel
33 33
     phantom: true
@@ -35,7 +35,7 @@ NPCItemBox < UICheckBox
35 35
     anchors.horizontalCenter: parent.horizontalCenter
36 36
     text-auto-resize: true
37 37
     margin-top: 5
38
-    
38
+
39 39
   Label
40 40
     id: priceLabel
41 41
     phantom: true
@@ -46,21 +46,21 @@ NPCItemBox < UICheckBox
46 46
 
47 47
   $checked:    
48 48
     border-color: #FFFFFF 
49
-    
49
+
50 50
   $hover !checked:
51 51
     border-color: #AAAAAA  
52 52
 
53 53
 MainWindow
54 54
   id: npcWindow
55
-  text: NPC Trade
55
+  !text: tr('NPC Trade')
56 56
   size: 550 550
57 57
 
58 58
   @onEscape: NPCTrade.hide()
59 59
 
60 60
   TabButton
61 61
     id: buyTab
62
-    tooltip: List of items that you're able to buy
63
-    text: Buy
62
+    !tooltip: tr("List of items that you're able to buy")
63
+    !text: tr('Buy')
64 64
     checked: true
65 65
     on: true
66 66
     anchors.left: parent.left
@@ -71,23 +71,23 @@ MainWindow
71 71
 
72 72
   TabButton
73 73
     id: sellTab
74
-    tooltip: List of items that you're able to sell
75
-    text: Sell
74
+    !tooltip: tr("List of items that you're able to sell")
75
+    !text: tr('Sell')
76 76
     anchors.left: parent.horizontalCenter
77 77
     anchors.right: parent.right
78 78
     anchors.top: parent.top
79 79
     margin-left: 5
80 80
     margin-top: 5
81
-    
81
+
82 82
   Label
83 83
     id: searchLabel
84
-    text: Search:
84
+    !text: tr('Search:')
85 85
     anchors.left: parent.left
86 86
     anchors.top: prev.bottom
87 87
     text-auto-resize: true
88 88
     margin-top: 7
89 89
     margin-left: 2
90
-    
90
+
91 91
   TextEdit
92 92
     id: searchText
93 93
     width: 200
@@ -96,14 +96,14 @@ MainWindow
96 96
     margin-top: -2
97 97
     margin-left: 5
98 98
     @onTextChange: NPCTrade.refreshFilters()
99
-    
99
+
100 100
   NPCPanel
101 101
     height: 250
102 102
     anchors.left: parent.left
103 103
     anchors.right: parent.right
104 104
     anchors.top: prev.bottom
105 105
     margin-top: 5 
106
-      
106
+
107 107
     VerticalScrollBar
108 108
       id: itemsPanelListScrollBar
109 109
       anchors.top: parent.top
@@ -111,7 +111,7 @@ MainWindow
111 111
       anchors.right: parent.right
112 112
       step: 14
113 113
       pixels-scroll: true
114
-      
114
+
115 115
     NPCPanel
116 116
       id: itemsPanel
117 117
       height: 250
@@ -125,7 +125,7 @@ MainWindow
125 125
         cell-size: 160 90
126 126
         flow: true
127 127
         auto-spacing: true   
128
-  
128
+
129 129
   FlatPanel
130 130
     id: setupPanel
131 131
     height: 150
@@ -134,10 +134,10 @@ MainWindow
134 134
     anchors.right: parent.right
135 135
     anchors.top: prev.bottom
136 136
     margin-top: 5
137
-  
137
+
138 138
     Label
139 139
       id: quantityLabel
140
-      text: Quantity:
140
+      !text: tr('Quantity:')
141 141
       anchors.left: parent.left
142 142
       anchors.top: parent.top
143 143
       text-auto-resize: true
@@ -146,7 +146,7 @@ MainWindow
146 146
 
147 147
     NPCOfferLabel
148 148
       id: quantity
149
-  
149
+
150 150
     HorizontalScrollBar
151 151
       id: quantityScroll
152 152
       anchors.left: parent.left
@@ -161,74 +161,74 @@ MainWindow
161 161
 
162 162
     Label
163 163
       id: nameLabel
164
-      text: Name:
164
+      !text: tr('Name:')
165 165
       anchors.left: parent.left
166 166
       anchors.top: prev.bottom
167 167
       margin-top: 5
168 168
       margin-left: 2
169 169
       width: 64
170
-      
170
+
171 171
     NPCOfferLabel
172 172
       id: name
173 173
 
174 174
     Label
175 175
       id: priceLabel
176
-      text: Price:
176
+      !text: tr('Price:')
177 177
       anchors.left: parent.left
178 178
       anchors.top: prev.bottom
179 179
       margin-top: 5
180 180
       margin-left: 2
181 181
       width: 64
182
-      
182
+
183 183
     NPCOfferLabel
184 184
       id: price
185
-      
185
+
186 186
     Label
187 187
       id: moneyLabel
188
-      text: Money:
188
+      !text: tr('Money:')
189 189
       anchors.left: parent.left
190 190
       anchors.top: prev.bottom
191 191
       margin-top: 5
192 192
       margin-left: 2
193 193
       width: 64
194
-      
194
+
195 195
     NPCOfferLabel
196 196
       id: money
197
-      
197
+
198 198
     Label
199 199
       id: weightLabel
200
-      text: Weight:
200
+      !text: tr('Weight:')
201 201
       anchors.left: parent.left
202 202
       anchors.top: prev.bottom
203 203
       margin-top: 5
204 204
       margin-left: 2
205 205
       width: 64
206
-      
206
+
207 207
     NPCOfferLabel
208 208
       id: weight
209
-  
209
+
210 210
     Label
211 211
       id: capacityLabel
212
-      text: Capacity:
212
+      !text: tr('Capacity:')
213 213
       anchors.left: parent.left
214 214
       anchors.top: prev.bottom
215 215
       margin-top: 5
216 216
       margin-left: 2
217 217
       width: 64
218
-      
218
+
219 219
     NPCOfferLabel
220 220
       id: capacity
221
-      
221
+
222 222
     Button
223 223
       id: setupButton
224
-      text: Buy
224
+      !text: tr('Buy')
225 225
       width: 64
226 226
       anchors.horizontalCenter: parent.horizontalCenter
227 227
       anchors.top: prev.bottom
228 228
       @onClick: NPCTrade.setupButton()
229
-  
229
+
230 230
   Button
231
-    text: Close
231
+    !text: tr('Close')
232 232
     width: 64
233 233
     anchors.right: parent.right
234 234
     anchors.bottom: parent.bottom

+ 11
- 11
modules/game_outfit/outfit.otui View File

@@ -1,5 +1,5 @@
1 1
 Window
2
-  text: Select Outfit
2
+  !text: tr('Select Outfit')
3 3
   size: 550 280
4 4
   padding: 0 0 0 0
5 5
 
@@ -11,7 +11,7 @@ Window
11 11
 
12 12
   Label
13 13
     id: outfitName
14
-    text: Outfit Name
14
+    !text: tr('Outfit Name')
15 15
     width: 100
16 16
     anchors.top: parent.top
17 17
     anchors.left: parent.left
@@ -43,7 +43,7 @@ Window
43 43
 
44 44
   ButtonBox
45 45
     id: head
46
-    text: Head
46
+    !text: tr('Head')
47 47
     anchors.top: outfitCreatureBox.top
48 48
     anchors.left: outfitCreatureBox.right
49 49
     margin-left: 10
@@ -52,21 +52,21 @@ Window
52 52
 
53 53
   ButtonBox
54 54
     id: primary
55
-    text: Primary
55
+    !text: tr('Primary')
56 56
     anchors.top: prev.bottom
57 57
     anchors.left: prev.left
58 58
     width: 90
59 59
 
60 60
   ButtonBox
61 61
     id: secondary
62
-    text: Secondary
62
+    !text: tr('Secondary')
63 63
     anchors.top: prev.bottom
64 64
     anchors.left: prev.left
65 65
     width: 90
66 66
 
67 67
   ButtonBox
68 68
     id: detail
69
-    text: Detail
69
+    !text: tr('Detail')
70 70
     anchors.top: prev.bottom
71 71
     anchors.left: prev.left
72 72
     width: 90
@@ -91,7 +91,7 @@ Window
91 91
 
92 92
   CheckBox
93 93
     id: addon1
94
-    text: Addon 1
94
+    !text: tr('Addon 1')
95 95
     enabled: false
96 96
     margin-top: 6
97 97
     width: 100
@@ -100,7 +100,7 @@ Window
100 100
 
101 101
   CheckBox
102 102
     id: addon2
103
-    text: Addon 2
103
+    !text: tr('Addon 2')
104 104
     enabled: false
105 105
     margin-top: 2
106 106
     width: 100
@@ -109,7 +109,7 @@ Window
109 109
 
110 110
   CheckBox
111 111
     id: addon3
112
-    text: Addon 3
112
+    !text: tr('Addon 3')
113 113
     enabled: false
114 114
     margin-top: 2
115 115
     width: 100
@@ -126,7 +126,7 @@ Window
126 126
 
127 127
   Button
128 128
     id: outfitOkButton
129
-    text: Ok
129
+    !text: tr('Ok')
130 130
     width: 64
131 131
     anchors.right: next.left
132 132
     anchors.bottom: parent.bottom
@@ -136,7 +136,7 @@ Window
136 136
 
137 137
   Button
138 138
     id: outfitCancelButton
139
-    text: Cancel
139
+    !text: tr('Cancel')
140 140
     width: 64
141 141
     anchors.right: parent.right
142 142
     anchors.bottom: parent.bottom

+ 5
- 5
modules/game_skills/skills.lua View File

@@ -36,7 +36,7 @@ function Skills.init()
36 36
   })
37 37
 
38 38
   skillsWindow = displayUI('skills.otui', GameInterface.getLeftPanel())
39
-  skillsButton = TopMenu.addGameToggleButton('skillsButton', 'Skills (Ctrl+S)', 'skills.png', Skills.toggle)
39
+  skillsButton = TopMenu.addGameToggleButton('skillsButton', tr('Skills') .. ' (Ctrl+S)', 'skills.png', Skills.toggle)
40 40
   skillsButton:setOn(true)
41 41
   Keyboard.bindKeyDown('Ctrl+S', Skills.toggle)
42 42
 end
@@ -86,7 +86,7 @@ end
86 86
 
87 87
 function Skills.onLevelChange(localPlayer, value, percent)
88 88
   setSkillValue('level', tr(value))
89
-  setSkillPercent('level', percent, 'You have ' .. (100 - percent) .. ' percent to go')
89
+  setSkillPercent('level', percent, tr('You have %s percent to go', 100 - percent))
90 90
 end
91 91
 
92 92
 function Skills.onHealthChange(localPlayer, health, maxHealth)
@@ -114,16 +114,16 @@ function Skills.onStaminaChange(localPlayer, stamina)
114 114
   local percent = 100 * stamina / (42 * 60) -- max is 42 hours
115 115
 
116 116
   setSkillValue('stamina', hours .. ":" .. minutes)
117
-  setSkillPercent('stamina', percent, 'You have ' .. percent .. ' percent')
117
+  setSkillPercent('stamina', percent, tr('You have %s percent', percent))
118 118
 end
119 119
 
120 120
 function Skills.onMagicLevelChange(localPlayer, value, percent)
121 121
   setSkillValue('magiclevel', value)
122
-  setSkillPercent('magiclevel', percent, 'You have ' .. (100 - percent) .. ' percent to go')
122
+  setSkillPercent('magiclevel', percent, tr('You have %s percent to go', 100 - percent))
123 123
 end
124 124
 
125 125
 function Skills.onSkillChange(localPlayer, id, level, percent)
126 126
   setSkillValue('skillId' .. id, level)
127
-  setSkillPercent('skillId' .. id, percent, 'You have ' .. (100 - percent) .. ' percent to go')
127
+  setSkillPercent('skillId' .. id, percent, tr('You have %s percent to go', 100 - percent))
128 128
 end
129 129
 

+ 16
- 16
modules/game_skills/skills.otui View File

@@ -32,7 +32,7 @@ SkillPercentPanel < ProgressBar
32 32
 
33 33
 MiniWindow
34 34
   id: skillWindow
35
-  text: Skills
35
+  !text: tr('Skills')
36 36
   height: 350
37 37
   icon: skills.png
38 38
   @onClose: Skills.toggle()
@@ -45,13 +45,13 @@ MiniWindow
45 45
       id: experience
46 46
       height: 15
47 47
       SkillNameLabel
48
-        text: Experience
48
+        !text: tr('Experience')
49 49
       SkillValueLabel
50 50
 
51 51
     SkillButton
52 52
       id: level
53 53
       SkillNameLabel
54
-        text: Level
54
+        !text: tr('Level')
55 55
       SkillValueLabel
56 56
       SkillPercentPanel
57 57
         background-color: red
@@ -60,41 +60,41 @@ MiniWindow
60 60
       id: health
61 61
       height: 15
62 62
       SkillNameLabel
63
-        text: Hit Points
63
+        !text: tr('Hit Points')
64 64
       SkillValueLabel
65 65
 
66 66
     SkillButton
67 67
       id: mana
68 68
       height: 15
69 69
       SkillNameLabel
70
-        text: Mana
70
+        !text: tr('Mana')
71 71
       SkillValueLabel
72 72
 
73 73
     SkillButton
74 74
       id: soul
75 75
       height: 15
76 76
       SkillNameLabel
77
-        text: Soul Points
77
+        !text: tr('Soul Points')
78 78
       SkillValueLabel
79 79
 
80 80
     SkillButton
81 81
       id: capacity
82 82
       height: 15
83 83
       SkillNameLabel
84
-        text: Capacity
84
+        !text: tr('Capacity')
85 85
       SkillValueLabel
86 86
 
87 87
     SkillButton
88 88
       id: stamina
89 89
       SkillNameLabel
90
-        text: Stamina
90
+        !text: tr('Stamina')
91 91
       SkillValueLabel
92 92
       SkillPercentPanel
93 93
 
94 94
     SkillButton
95 95
       id: magiclevel
96 96
       SkillNameLabel
97
-        text: Magic Level
97
+        !text: tr('Magic Level')
98 98
       SkillValueLabel
99 99
       SkillPercentPanel
100 100
         background-color: red
@@ -102,14 +102,14 @@ MiniWindow
102 102
     SkillButton
103 103
       id: skillId0
104 104
       SkillNameLabel
105
-        text: Fist Fighting
105
+        !text: tr('Fist Fighting')
106 106
       SkillValueLabel
107 107
       SkillPercentPanel
108 108
 
109 109
     SkillButton
110 110
       id: skillId1
111 111
       SkillNameLabel
112
-        text: Club Fighting
112
+        !text: tr('Club Fighting')
113 113
       SkillValueLabel
114 114
       SkillPercentPanel
115 115
 
@@ -117,35 +117,35 @@ MiniWindow
117 117
       id: skillId2
118 118
 
119 119
       SkillNameLabel
120
-        text: Sword Fighting
120
+        !text: tr('Sword Fighting')
121 121
       SkillValueLabel
122 122
       SkillPercentPanel
123 123
 
124 124
     SkillButton
125 125
       id: skillId3
126 126
       SkillNameLabel
127
-        text: Axe Fighting
127
+        !text: tr('Axe Fighting')
128 128
       SkillValueLabel
129 129
       SkillPercentPanel
130 130
 
131 131
     SkillButton
132 132
       id: skillId4
133 133
       SkillNameLabel
134
-        text: Distance Fighting
134
+        !text: tr('Distance Fighting')
135 135
       SkillValueLabel
136 136
       SkillPercentPanel
137 137
 
138 138
     SkillButton
139 139
       id: skillId5
140 140
       SkillNameLabel
141
-        text: Shielding
141
+        !text: tr('Shielding')
142 142
       SkillValueLabel
143 143
       SkillPercentPanel
144 144
 
145 145
     SkillButton
146 146
       id: skillId6
147 147
       SkillNameLabel
148
-        text: Fishing
148
+        !text: tr('Fishing')
149 149
       SkillValueLabel
150 150
       SkillPercentPanel
151 151
 

+ 8
- 8
modules/game_textmessage/textmessage.lua View File

@@ -5,14 +5,14 @@ importStyle 'textmessage.otui'
5 5
 
6 6
 -- private variables
7 7
 local MessageTypes = {
8
-  consoleRed      = { color = '#F55E5E', consoleTab = 'Default' },
9
-  consoleOrange   = { color = '#FE6500', consoleTab = 'Default' },
10
-  consoleBlue     = { color = '#9F9DFD', consoleTab = 'Default' },
11
-  warning         = { color = '#F55E5E', consoleTab = 'Server Log', labelId = 'centerWarning', wrap = true },
12
-  infoDescription = { color = '#00EB00', consoleTab = 'Server Log', labelId = 'centerInfo', consoleOption = 'showInfoMessagesInConsole', wrap = true },
13
-  eventAdvance    = { color = '#FFFFFF', consoleTab = 'Server Log', labelId = 'centerAdvance', consoleOption = 'showEventMessagesInConsole', wrap = true },
14
-  eventDefault    = { color = '#FFFFFF', consoleTab = 'Server Log', labelId = 'bottomStatus', consoleOption = 'showEventMessagesInConsole' },
15
-  statusDefault   = { color = '#FFFFFF', consoleTab = 'Server Log', labelId = 'bottomStatus', consoleOption = 'showStatusMessagesInConsole' },
8
+  consoleRed      = { color = '#F55E5E', consoleTab = tr('Default') },
9
+  consoleOrange   = { color = '#FE6500', consoleTab = tr('Default') },
10
+  consoleBlue     = { color = '#9F9DFD', consoleTab = tr('Default') },
11
+  warning         = { color = '#F55E5E', consoleTab = tr('Server Log'), labelId = 'centerWarning', wrap = true },
12
+  infoDescription = { color = '#00EB00', consoleTab = tr('Server Log'), labelId = 'centerInfo', consoleOption = 'showInfoMessagesInConsole', wrap = true },
13
+  eventAdvance    = { color = '#FFFFFF', consoleTab = tr('Server Log'), labelId = 'centerAdvance', consoleOption = 'showEventMessagesInConsole', wrap = true },
14
+  eventDefault    = { color = '#FFFFFF', consoleTab = tr('Server Log'), labelId = 'bottomStatus', consoleOption = 'showEventMessagesInConsole' },
15
+  statusDefault   = { color = '#FFFFFF', consoleTab = tr('Server Log'), labelId = 'bottomStatus', consoleOption = 'showStatusMessagesInConsole' },
16 16
   statusSmall     = { color = '#FFFFFF', labelId = 'bottomStatus' },
17 17
 }
18 18
 

+ 2
- 2
modules/game_tibiafiles/tibiafiles.otmod View File

@@ -5,8 +5,8 @@ Module
5 5
 
6 6
   @onLoad: |
7 7
     if not g_thingsType.load('/game_tibiafiles/Tibia.dat') then
8
-      fatal("Unable to load dat file, please place a valid Tibia dat in modules/game_tibiafiles/Tibia.dat")
8
+      fatal(tr("Unable to load dat file, please place a valid Tibia dat in modules/game_tibiafiles/Tibia.dat"))
9 9
     end
10 10
     if not g_sprites.load('/game_tibiafiles/Tibia.spr') then
11
-      fatal("Unable to load spr file, please place a valid Tibia spr in modules/game_tibiafiles/Tibia.spr")
11
+      fatal(tr("Unable to load spr file, please place a valid Tibia spr in modules/game_tibiafiles/Tibia.spr"))
12 12
     end

+ 4
- 4
modules/game_viplist/addvip.otui View File

@@ -1,11 +1,11 @@
1 1
 MainWindow
2 2
   size: 256 128
3
-  text: Add to VIP list
3
+  !text: tr('Add to VIP list')
4 4
   @onEnter: VipList.addVip()
5 5
   @onEscape: VipList.destroyAddWindow()
6 6
 
7 7
   Label
8
-    text: Please enter a character name:
8
+    !text: tr('Please enter a character name:')
9 9
     anchors.top: parent.top
10 10
     anchors.left: parent.left
11 11
     anchors.right: parent.right
@@ -24,7 +24,7 @@ MainWindow
24 24
     margin-bottom: 10
25 25
 
26 26
   Button
27
-    text: Ok
27
+    !text: tr('Ok')
28 28
     width: 64
29 29
     anchors.right: next.left
30 30
     anchors.bottom: parent.bottom
@@ -32,7 +32,7 @@ MainWindow
32 32
     @onClick: VipList.addVip()
33 33
 
34 34
   Button
35
-    text: Cancel
35
+    !text: tr('Cancel')
36 36
     width: 64
37 37
     anchors.right: parent.right
38 38
     anchors.bottom: parent.bottom

+ 4
- 4
modules/game_viplist/viplist.lua View File

@@ -13,7 +13,7 @@ function VipList.init()
13 13
 
14 14
 
15 15
   vipWindow = displayUI('viplist.otui', GameInterface.getLeftPanel())
16
-  vipButton = TopMenu.addGameToggleButton('vipListButton', 'VIP list', 'viplist.png', VipList.toggle)
16
+  vipButton = TopMenu.addGameToggleButton('vipListButton', tr('VIP list'), 'viplist.png', VipList.toggle)
17 17
   vipButton:setOn(true)
18 18
 end
19 19
 
@@ -127,10 +127,10 @@ function VipList.onVipListLabelMousePress(widget, mousePos, mouseButton)
127 127
   local vipList = vipWindow:getChildById('contentsPanel')
128 128
 
129 129
   local menu = createWidget('PopupMenu')
130
-  menu:addOption('Add new VIP', function() VipList.createAddWindow() end)
131
-  menu:addOption('Remove ' .. widget:getText(), function() if widget then g_game.removeVip(widget:getId():sub(4)) vipList:removeChild(widget) end end)
130
+  menu:addOption(tr('Add new VIP'), function() VipList.createAddWindow() end)
131
+  menu:addOption(tr('Remove %s', widget:getText()), function() if widget then g_game.removeVip(widget:getId():sub(4)) vipList:removeChild(widget) end end)
132 132
   menu:addSeparator()
133
-  menu:addOption('Copy Name', function() g_window.setClipboardText(widget:getText()) end)
133
+  menu:addOption(tr('Copy Name'), function() g_window.setClipboardText(widget:getText()) end)
134 134
   menu:display(mousePos)
135 135
 
136 136
   return true

+ 1
- 1
modules/game_viplist/viplist.otui View File

@@ -5,7 +5,7 @@ VipListLabel < GameLabel
5 5
 
6 6
 MiniWindow
7 7
   id: vipWindow
8
-  text: VIP List
8
+  !text: tr('VIP List')
9 9
   height: 100
10 10
   icon: viplist.png
11 11
   @onClose: VipList.toggle()

+ 4
- 3
src/otclient/core/mapview.cpp View File

@@ -89,16 +89,17 @@ void MapView::draw(const Rect& rect)
89 89
         for(int z=m_cachedLastVisibleFloor;z>=m_cachedFirstVisibleFloor;--z) {
90 90
             while(it != end) {
91 91
                 const TilePtr& tile = *it;
92
-                if(tile->getPosition().z != z)
92
+                Position tilePos = tile->getPosition();
93
+                if(tilePos.z != z)
93 94
                     break;
94 95
                 else
95 96
                     ++it;
96 97
 
97 98
                 if(!m_drawMinimapColors)
98
-                    tile->draw(transformPositionTo2D(tile->getPosition()), scaleFactor, drawFlags);
99
+                    tile->draw(transformPositionTo2D(tilePos), scaleFactor, drawFlags);
99 100
                 else {
100 101
                     g_painter->setColor(tile->getMinimapColor());
101
-                    g_painter->drawFilledRect(Rect(transformPositionTo2D(tile->getPosition()), tileSize));
102
+                    g_painter->drawFilledRect(Rect(transformPositionTo2D(tilePos), tileSize));
102 103
                 }
103 104
             }
104 105
 

Loading…
Cancel
Save