Skip to content
Snippets Groups Projects
Commit eebcfb21 authored by Otowa Kotori's avatar Otowa Kotori
Browse files

clearly I used tformat wrongly

parent a735d963
No related branches found
No related tags found
No related merge requests found
Showing
with 14 additions and 14 deletions
......@@ -763,7 +763,7 @@ function _M:saveScreenshot()
if core.steam then
local desc = self:getSaveDescription()
core.steam.screenshot(file, self.w, self.h, desc.description)
Dialog:simpleLongPopup(_t"Screenshot taken!", "Screenshot should appear in your Steam client's #LIGHT_GREEN#Screenshots Library#LAST#.\nAlso available on disk: %s":tformat(fs.getRealPath(file)), 600)
Dialog:simpleLongPopup(_t"Screenshot taken!", ("Screenshot should appear in your Steam client's #LIGHT_GREEN#Screenshots Library#LAST#.\nAlso available on disk: %s"):tformat(fs.getRealPath(file)), 600)
else
Dialog:simplePopup(_t"Screenshot taken!", _t"File: "..fs.getRealPath(file))
end
......
......@@ -79,7 +79,7 @@ function _M:use(item)
-- Make a dialog to ask for the key
--
if curcol == 1 or curcol == 2 then
local title = " Press a key (escape to cancel, backspace to remove) for: %s":tformat(tostring(t.name))
local title = (" Press a key (escape to cancel, backspace to remove) for: %s"):tformat(tostring(t.name))
local font = self.font
local w, h = font:size(title:removeColorCodes())
local d = engine.Dialog.new(title, w + 20, h + 25, nil, nil, nil, font)
......@@ -132,7 +132,7 @@ function _M:use(item)
end
game:registerDialog(d)
elseif curcol == 3 then
local title = "Make gesture (using right mouse button) or type it (or escape) for: %s":tformat(tostring(t.name))
local title = ("Make gesture (using right mouse button) or type it (or escape) for: %s"):tformat(tostring(t.name))
local font = self.font
local w, h = font:size(title)
local d = GetText.new(title, _t"Gesture", 0, 10,
......
......@@ -38,7 +38,7 @@ function _M:init(title, player)
local nb = 0
for id, data in pairs(world.achieved) do nb = nb + 1 end
Dialog.init(self, (title or _t"Achievements(%s/%s)":tformat(nb, total) , game.w * 0.8, game.h * 0.8)
Dialog.init(self, (title or _t("Achievements(%s/%s)"):tformat(nb, total) , game.w * 0.8, game.h * 0.8)
self.c_self = Checkbox.new{title=_t"Yours only", default=false, fct=function() end, on_change=function(s) if s then self:switchTo("self") end end}
self.c_main = Checkbox.new{title=_t"All achieved", default=true, fct=function() end, on_change=function(s) if s then self:switchTo("main") end end}
......
......@@ -104,7 +104,7 @@ function _M:defineHotkey(id)
if not item or not item.object then return end
self.actor.hotkey[id] = {"inventory", item.object:getName{no_add_name=true, no_count=true}}
self:simplePopup("Hotkey %s assigned":tformat(id), "%s assigned to hotkey %s":tformat(item.object:getName{no_add_name=true, no_count=true}:capitalize(), id)
self:simplePopup(("Hotkey %s assigned"):tformat(id), ("%s assigned to hotkey %s"):tformat(item.object:getName{no_add_name=true, no_count=true}:capitalize(), id)
self.actor.changed = true
end
......
......@@ -79,7 +79,7 @@ function _M:defineHotkey(id)
if not item or not item.talent then return end
self.actor.hotkey[id] = {"talent", item.talent}
self:simplePopup("Hotkey %s assigned":tformat(id), "%s assigned to hotkey %s":tformat(self.actor:getTalentFromId(item.talent).name:capitalize(), id)
self:simplePopup(("Hotkey %s assigned"):tformat(id), ("%s assigned to hotkey %s"):tformat(self.actor:getTalentFromId(item.talent).name:capitalize(), id)
self.actor.changed = true
end
......
......@@ -27,7 +27,7 @@ module(..., package.seeall, class.inherit(Dialog))
_M.force_ui_inside = "microtxn"
function _M:init(mode)
self.base_title_text = "%s #GOLD#Purchasables#LAST#":tformat(game.__mod_info.long_name)
self.base_title_text = ("%s #GOLD#Purchasables#LAST#"):tformat(game.__mod_info.long_name)
Dialog.init(self, self.base_title_text, 200, game.h * 0.8)
local do_purchase = ButtonImage.new{alpha_unfocus=1, file="microtxn-ui/action_purchase.png", fct=function() game:unregisterDialog(self) game.key:triggerVirtual("MTXN_PURCHASE") end}
......
......@@ -331,7 +331,7 @@ You can fix that by manually downloading the shimmer addon from https://te4.org/
local co co = coroutine.create(function()
local filename = ("/addons/%s-cosmetic-%s.teaa"):format(game.__mod_info.short_name, item.effect)
print("==> downloading", "https://te4.org/download-mtx/"..item.id_purchasable, filename)
local d = Downloader.new{title="Downloading cosmetic pack: #LIGHT_GREEN#%s":tformat(item.name), co=co, dest=filename..".tmp", url="https://te4.org/download-mtx/"..item.id_purchasable, allow_downloads={addons=true}}
local d = Downloader.new{title=("Downloading cosmetic pack: #LIGHT_GREEN#%s"):tformat(item.name), co=co, dest=filename..".tmp", url="https://te4.org/download-mtx/"..item.id_purchasable, allow_downloads={addons=true}}
local ok = d:start()
if ok then
local wdir = fs.getWritePath()
......
......@@ -35,7 +35,7 @@ function _M:init(mode)
self.cart = {}
self.base_title_text = "%s #GOLD#Purchased Options#LAST#":tformat(game.__mod_info.long_name)
self.base_title_text = ("%s #GOLD#Purchased Options#LAST#"):tformat(game.__mod_info.long_name)
Dialog.init(self, self.base_title_text, 600, game.h * 0.8)
self.categories_icons = {
......
......@@ -425,12 +425,12 @@ function _M:canWearObject(o, try_slot)
if type(flag) == "table" then
if not self:attr(flag[1]) or self:attr(flag[1]) < flag[2] then
local name = o.requirement_flags_names and o.requirement_flags_names[flag[1]] or flag[1]
return nil, "missing %s (level %s )":tformat(tostring(name), tostring(flag[2]))
return nil, ("missing %s (level %s )"):tformat(tostring(name), tostring(flag[2]))
end
else
if not self:attr(flag) then
local name = o.requirement_flags_names and o.requirement_flags_names[flag] or flag
return nil, "missing %s":tformat(tostring(name))
return nil, ("missing %s"):tformat(tostring(name))
end
end
end
......
......@@ -34,7 +34,7 @@ function _M:restInit(turns, what, past, on_end, on_very_end)
on_end = on_end,
on_very_end = on_very_end,
cnt = 0,
dialog = Dialog:simplePopup(what:capitalize().."...", "You are %s, press Enter to stop.":tformat(what), function()
dialog = Dialog:simplePopup(what:capitalize().."...", ("You are %s, press Enter to stop."):tformat(what), function()
self:restStop()
end),
}
......
......@@ -196,7 +196,7 @@ function _M:onDownload(handlers)
if path then
local name = file
if self._next_download_name and os.time() - self._next_download_name.time <= 3 then name = self._next_download_name.name self._next_download_name = nil end
Dialog:yesnoPopup(_t"Confirm addon install/update", _t"Are you sure you want to install this addon: #LIGHT_GREEN##{bold}#%s#{normal}##LAST# ?":tformat(name), function(ret)
Dialog:yesnoPopup(_t"Confirm addon install/update", _t("Are you sure you want to install this addon: #LIGHT_GREEN##{bold}#%s#{normal}##LAST# ?"):tformat(name), function(ret)
if ret then
print("Accepting addon download to:", path..file)
self.download_dialog = self:makeDownloadbox(downid, file)
......@@ -214,7 +214,7 @@ function _M:onDownload(handlers)
if path then
local name = file
if self._next_download_name and os.time() - self._next_download_name.time <= 3 then name = self._next_download_name.name self._next_download_name = nil end
Dialog:yesnoPopup(_t"Confirm module install/update", "Are you sure you want to install this module: #LIGHT_GREEN##{bold}#%s""#{normal}##LAST# ?":tformat(name), function(ret)
Dialog:yesnoPopup(_t"Confirm module install/update", ("Are you sure you want to install this module: #LIGHT_GREEN##{bold}#%s#{normal}##LAST#?"):tformat(name), function(ret)
if ret then
print("Accepting module download to:", path..file)
self.download_dialog = self:makeDownloadbox(downid, file)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment