Skip to content

Commit

Permalink
more translations
Browse files Browse the repository at this point in the history
  • Loading branch information
Zbizu committed Jan 28, 2025
1 parent cba91e7 commit 0706331
Show file tree
Hide file tree
Showing 10 changed files with 45 additions and 37 deletions.
8 changes: 8 additions & 0 deletions data/locales/en.lua
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,9 @@ locale:translate("ThereIsNoWay", "There is no way.")
locale:translate("DebugInfoTitle", "Debug Info")
locale:translate("DebugInfoProxies", "Proxies")

-- blessings
locale:translate("BlessingsLongTextPlaceholder", "This is a placeholder for a very long text.")

-- chat
locale:translate("ChatChannelNameDefault", "Local Chat")
locale:translate("ChatChannelNameServerLog", "Server Log")
Expand Down Expand Up @@ -351,6 +354,7 @@ locale:translate("StoreButtonTransactionHistory", "History")
locale:translate("StoreButtonTransferCoins", "Transfer Coins")
locale:translate("StoreButtonSellCharacter", "Setup up an auction to sell you currents characters.")
locale:translate("StoreWindowTitleGiftTc", "Gift Tibia Coins")
locale:translate("StoreWindowLabelGiftAmount", "Amount to gift")
locale:translate("StoreItemStats", "General Stats")
locale:translate("StoreTransferableTc", "Transferable Tibia Coins")
locale:translate("StoreTcToTransfer", "Amount to transfer")
Expand All @@ -367,6 +371,10 @@ locale:translate("StoreMessageConfirmBuy", "Do you want to buy the product \"%1\
locale:translate("StoreMessageNotEnoughCoins", "You don't have enough coins")
locale:translate("StoreCurrencyTcRegular", "regular coins")
locale:translate("StoreCurrencyTcTransferable", "transferable coins")
locale:translate("StoreTitleBuyItem", "Buying from shop")
locale:translate("StoreMessageBuyItem", "Do you want to buy %1 for %2 premium points?"")
locale:translate("StoreCoinBalanceLabel", "Points")
locale:translate("StoreButton", "Store")

-- tasks
locale:translate("TaskSystemWindowTitle", "Tasks")
Expand Down
2 changes: 1 addition & 1 deletion modules/client_options/styles/controls/preset.otui
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ MainWindow
SmallButton
id: ok
width: 40
!text: tr("Ok")
!text: localize('UIButtonOk')

SmallButton
id: cancel
Expand Down
6 changes: 3 additions & 3 deletions modules/game_blessing/style.otui
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ historyData < UIWidget
anchors.bottom : parent.bottom
id: rank
width: 150
!text: tr('1')
!text: '1'
text-align: center
color: #dfdfdfcf
phantom: false
Expand All @@ -27,7 +27,7 @@ historyData < UIWidget
anchors.bottom : parent.bottom
id: name
width: 216
!text: tr('-')
!text: '-'
text-align: left
color: #ff0000cf
phantom: true
Expand All @@ -47,7 +47,7 @@ blessingTEST < UIWidget
margin-left: 3
Label
id: text
!text: tr('loooooong text')
!text: localize('BlessingsLongTextPlaceholder')
text-align: center
margin-top: 5
width: 65
Expand Down
12 changes: 6 additions & 6 deletions modules/game_cyclopedia/tab/bestiary/bestiary.otui
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ UIWidget
anchors.left: BonusIcon.right
margin-left: 5
text-auto-resize: true
!text: tr('?')
!text: '?'
color: #C7C7C7
UIWidget
id: CharmBase
Expand Down Expand Up @@ -343,7 +343,7 @@ UIWidget
margin-left: 5
margin-bottom: 1
text-auto-resize: true
!text: tr('?')
!text: '?'
color: #C7C7C7
UIWidget
id: Icon2
Expand All @@ -359,7 +359,7 @@ UIWidget
margin-left: 5
margin-bottom: 1
text-auto-resize: true
!text: tr('?')
!text: '?'
color: #C7C7C7
UIWidget
id: Icon3
Expand All @@ -375,7 +375,7 @@ UIWidget
margin-left: 5
margin-bottom: 1
text-auto-resize: true
!text: tr('?')
!text: '?'
color: #C7C7C7
UIWidget
id: Icon4
Expand All @@ -391,7 +391,7 @@ UIWidget
margin-left: 5
margin-bottom: 1
text-auto-resize: true
!text: tr('?')
!text: '?'
color: #C7C7C7
UIWidget
id: Icon5
Expand All @@ -407,7 +407,7 @@ UIWidget
margin-left: 5
margin-bottom: 1
text-auto-resize: true
!text: tr('?')
!text: '?'
color: #C7C7C7
UIWidget
id: LocationField
Expand Down
2 changes: 1 addition & 1 deletion modules/game_cyclopedia/tab/bosstiary/bosstiary.otui
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ UIWidget
margin-bottom: 5
size: 60 20
text-align: center
!text: tr('1 / 1')
!text: '1 / 1'
color: #C2C2C2
Button
id: NextPageButton
Expand Down
16 changes: 8 additions & 8 deletions modules/game_cyclopedia/tab/house/house.lua
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ function Cyclopedia.houseMessage(houseId, type, message)
confirmWindow = displayGeneralBox(tr("Summary"), tr(
"Your bid was successfull. You are currently holding the highest bid."), {
{
text = tr("Ok"),
text = localize('UIButtonOk'),
callback = yesCallback
},
anchor = AnchorHorizontalCenter
Expand All @@ -188,7 +188,7 @@ function Cyclopedia.houseMessage(houseId, type, message)
"Bid failed.\nYour character's bank acocunt balance is too low to pay the bid and the rent for the first month."),
{
{
text = tr("Ok"),
text = localize('UIButtonOk'),
callback = yesCallback
},
anchor = AnchorHorizontalCenter
Expand All @@ -202,7 +202,7 @@ function Cyclopedia.houseMessage(houseId, type, message)
if message == 0 then
confirmWindow = displayGeneralBox(tr("Summary"), tr("You have sucessfully iniated your move out."), {
{
text = tr("Ok"),
text = localize('UIButtonOk'),
callback = yesCallback
},
anchor = AnchorHorizontalCenter
Expand All @@ -217,7 +217,7 @@ function Cyclopedia.houseMessage(houseId, type, message)
confirmWindow = displayGeneralBox(tr("Summary"),
tr("You have sucessfully initiated the transfer of your house."), {
{
text = tr("Ok"),
text = localize('UIButtonOk'),
callback = yesCallback
},
anchor = AnchorHorizontalCenter
Expand All @@ -230,7 +230,7 @@ function Cyclopedia.houseMessage(houseId, type, message)
confirmWindow = displayGeneralBox(tr("Summary"), tr(
"Setting up a house transfer failed.\nA character with this name does not exist."), {
{
text = tr("Ok"),
text = localize('UIButtonOk'),
callback = yesCallback
},
anchor = AnchorHorizontalCenter
Expand All @@ -245,7 +245,7 @@ function Cyclopedia.houseMessage(houseId, type, message)
confirmWindow = displayGeneralBox(tr("Summary"), tr(
"You have sucessfully cancelled the transfer. You will keep the house."), {
{
text = tr("Ok"),
text = localize('UIButtonOk'),
callback = yesCallback
},
anchor = AnchorHorizontalCenter
Expand All @@ -259,7 +259,7 @@ function Cyclopedia.houseMessage(houseId, type, message)
if message == 0 then
confirmWindow = displayGeneralBox(tr("Summary"), tr("You have sucessfully accepted the transfer."), {
{
text = tr("Ok"),
text = localize('UIButtonOk'),
callback = yesCallback
},
anchor = AnchorHorizontalCenter
Expand All @@ -273,7 +273,7 @@ function Cyclopedia.houseMessage(houseId, type, message)
confirmWindow = displayGeneralBox(tr("Summary"), tr(
"You jected the house transfer sucessfully. The old owner will keep the house."), {
{
text = tr("Ok"),
text = localize('UIButtonOk'),
callback = yesCallback
},
anchor = AnchorHorizontalCenter
Expand Down
4 changes: 2 additions & 2 deletions modules/game_quickloot/quickloot.lua
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ function QuickLoot.Define()
QuickLoot.ErrorWindow = displayGeneralBox(tr("Invalid Loot Container"), tr(
"You can only select containers you carry in your inventory."), {
{
text = tr("Ok"),
text = localize('UIButtonOk'),
callback = QuickLoot.confirmError
},
anchor = AnchorHorizontalCenter
Expand All @@ -357,7 +357,7 @@ function QuickLoot.Define()
QuickLoot.ErrorWindow = displayGeneralBox(tr("Invalid Loot Container"), tr(
"You can only select containers you carry in your inventory."), {
{
text = tr("Ok"),
text = localize('UIButtonOk'),
callback = QuickLoot.confirmError
},
anchor = AnchorHorizontalCenter
Expand Down
18 changes: 9 additions & 9 deletions modules/game_shop/shop.lua
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ function createShop()
end
shop = g_ui.displayUI('shop')
shop:hide()
-- shopButton = modules.game_mainpanel.addStoreButton('store', tr('Shop'), '/images/options/store_large', toggle,false, 8) -- \game_mainpanel\mainpanel.lua
-- shopButton = modules.game_mainpanel.addStoreButton('store', localize('StoreButton'), '/images/options/store_large', toggle,false, 8) -- \game_mainpanel\mainpanel.lua
shopButton = nil

connect(shop.categories, {
Expand Down Expand Up @@ -311,8 +311,8 @@ function onCoinBalance(coins, transferableCoins)
if not shop or otcv8shop then
return
end
shop.infoPanel.points:setText(tr("Points:") .. " " .. coins)
transferWindow.coinsBalance:setText(tr('Transferable Tibia Coins: ') .. coins)
shop.infoPanel.points:setText(localize('StoreCoinBalanceLabel') .. ": " .. coins)
transferWindow.coinsBalance:setText(localize('StoreTransferableTc') .. ": " .. coins)
transferWindow.coinsAmount:setMaximum(coins)
shop.infoPanel.buy:hide()
shop.infoPanel:setHeight(20)
Expand Down Expand Up @@ -411,7 +411,7 @@ function processMessage(data)
msgWindow:destroy()
end

local title = tr(data["title"])
local title = localize(data["title"])
local msg = data["msg"]
msgWindow = displayInfoBox(title, msg)
msgWindow.onDestroy = function(widget)
Expand Down Expand Up @@ -440,7 +440,7 @@ function processStatus(data)
processAd(data['ad'])
end
if data['points'] then
shop.infoPanel.points:setText(tr("Points:") .. " " .. formatNumberWithCommas(data['points']))
shop.infoPanel.points:setText(localize('StoreCoinBalanceLabel') .. ": " .. formatNumberWithCommas(data['points']))
end
if data['buyUrl'] and data['buyUrl']:sub(1, 4):lower() == "http" then
shop.infoPanel.buy:show()
Expand Down Expand Up @@ -642,15 +642,15 @@ function buyOffer(widget)
msgWindow:destroy()
end

local title = tr("Buying from shop")
local msg = "Do you want to buy " .. item.title .. " for " .. item.cost .. " premium points?"
local title = localize("StoreTitleBuyItem")
local msg = localize('StoreMessageBuyItem', item.title, item.cost)
msgWindow = displayGeneralBox(title, msg, {
{
text = tr('Yes'),
text = localize('UIButtonYes'),
callback = buyConfirmed
},
{
text = tr('No'),
text = localize('UIButtonNo'),
callback = buyCanceled
},
anchor = AnchorHorizontalCenter
Expand Down
2 changes: 1 addition & 1 deletion modules/game_shop/shop.otui
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ MainWindow

Label
id: transferOpen
!text: tr('by kondra ([email protected])')
!text: 'by kondra ([email protected])'
width: 450
anchors.left: prev. right
margin-left: 45
Expand Down
12 changes: 6 additions & 6 deletions modules/game_shop/transfer.otui
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MainWindow
id: transferWindow
!text: tr('Gift Tibia Coins')
!text: localize('StoreWindowTitleGiftTc')
size: 280 240
@onEscape: modules.game_shop.hideTransfer()

Expand All @@ -10,13 +10,13 @@ MainWindow
anchors.right: parent.right
text-wrap: true
height: 56
!text: tr('Please select the amount of Tibia Coins you would like to gift and enter the name of the character that should receive the Tibia Coins.')
!text: localize('StoreMessageTcTransfer')

Label
anchors.top: prev.bottom
anchors.left: parent.left
margin-top: 20
!text: tr('Reciepient:')
!text: localize('StoreTcRecipient') .. ":"

TextEdit
id: recipient
Expand All @@ -32,14 +32,14 @@ MainWindow
anchors.right: parent.right
margin-top: 10
text-align: center
!text: tr('Transferable Tibia Coins:')
!text: localize('StoreTransferableTc') .. ":"

Label
id: coinsAmountLabel
anchors.top: prev.bottom
anchors.left: parent.left
margin-top: 20
!text: tr('Amount to gift: ')
!text: localize('StoreWindowLabelGiftAmount') .. ": "

SpinBox
id: coinsAmount
Expand Down Expand Up @@ -71,7 +71,7 @@ MainWindow

Button
id: giftButton
!text: tr('Gift')
!text: localize('StoreButtonGiftTc')
font: cipsoftFont
size: 45 21
anchors.verticalCenter: prev.verticalCenter
Expand Down

0 comments on commit 0706331

Please sign in to comment.