Some final fixes in guide text
This commit is contained in:
21
guide.lua
21
guide.lua
@@ -66,9 +66,9 @@ local function createMachineInformationTable(fields,machineName,num)
|
||||
local fieldLabels={
|
||||
inputVoltage="Input voltage level",
|
||||
outputVoltage="Output voltage level",
|
||||
voltage="Voltage",
|
||||
lowVoltage="Low voltage",
|
||||
highVoltage="High voltage",
|
||||
voltage="Voltage level",
|
||||
lowVoltage="Low voltage level",
|
||||
highVoltage="High voltage level",
|
||||
damageRed="Damage reduction",
|
||||
recipe="Recipe type",
|
||||
powerCapacity="Power capacity",
|
||||
@@ -87,7 +87,7 @@ local function createMachineInformationTable(fields,machineName,num)
|
||||
})
|
||||
end
|
||||
|
||||
return createTable(rows,false,string.format("Figure %d. Information for %s",(num or 1),machineName))
|
||||
return createTable(rows,false,S("Figure @1. Information for @2",(num or 1),machineName))
|
||||
end
|
||||
|
||||
local pages={
|
||||
@@ -207,7 +207,7 @@ local pages={
|
||||
[[
|
||||
<big>||Canning Machine||</big>
|
||||
<left>
|
||||
||Canning Machine is used to move certain fluid from one item to another. The common usage is to refill fuel in <item name="industrialtest:jetpack_v" height="{{ITEM_HEIGHT}}"> <b>Jetpack</b> or <item name="industrialtest:fuel_can" height="{{ITEM_HEIGHT}}"> <b>Fuel Can</b>.||
|
||||
||Canning Machine is used to move certain fluid from one item to another. The common usage is to refill fuel in <item name="industrialtest:jetpack_v" height="{{ITEM_HEIGHT}}"> <b>Jetpack</b> or <item name="industrialtest:fuel_can" height="{{ITEM_HEIGHT}}"> <b>Fuel Can</b>.||
|
||||
</left>
|
||||
]],
|
||||
createMachineInformationTable({
|
||||
@@ -1887,7 +1887,16 @@ local pages={
|
||||
local function preprocessHypertext(content,vars)
|
||||
-- Find and replace strings which should be translated, this pattern matches any string that doesn't include | which is contained within || at both ends
|
||||
content=string.gsub(content,"||([^|]+)||",function(sourceString)
|
||||
return S(sourceString)
|
||||
-- Replace all sequences which should be treated as variables inside translation with format string
|
||||
local trFormatIndex=1
|
||||
local trFormatValues={}
|
||||
sourceString=string.gsub(sourceString,"{{([^{}]+)}}",function(var)
|
||||
local result=string.format("@%d",trFormatIndex)
|
||||
trFormatIndex=trFormatIndex+1
|
||||
table.insert(trFormatValues,vars[var] or "nil")
|
||||
return result
|
||||
end)
|
||||
return S(sourceString,unpack(trFormatValues))
|
||||
end)
|
||||
|
||||
-- Replace all sequences which should be treated as variables with values provided in vars
|
||||
|
||||
Reference in New Issue
Block a user