Fix missing translations #36 and #35

This commit is contained in:
2021-05-10 19:41:24 +02:00
parent 50a694a5b7
commit 03a4f31141
5 changed files with 43 additions and 23 deletions

View File

@ -2,7 +2,13 @@ package.path = package.path .. ";luajson/?.lua"
local JSON = require"json"
local lfs = require"lfs"
local path = "../../WFRP4e-FoundryVTT/"
local pathTab = {
"../../WFRP4e-FoundryVTT/",
"/home/morr/.local/share/FoundryVTT/Data/modules/wfrp4e-core",
"/home/morr/.local/share/FoundryVTT/Data/modules/wfrp4e-eis",
"/home/morr/.local/share/FoundryVTT/Data/modules/wfrp4e-rnhd",
"/home/morr/.local/share/FoundryVTT/Data/modules/wfrp4e-dotr"
}
local frjsonf = "../fr.json"
fp = io.open(frjsonf, "r")
@ -25,14 +31,14 @@ local function parse_folder( mypath )
for match in html:gmatch( "{{localize \"([%w%.]*)\"") do
--print(match)
if not frtags[match] then
print("MATCH not found !!!", match)
print("MATCH not found !!!", match,mypath .."/".. file)
end
end
-- Template case
for match in html:gmatch( "game.i18n.localize%(%s*\"([%w%.]*)\"") do -- .localize(%s*"
for match in html:gmatch( "game.i18n.localize%(%s*\"([%w%.%d%-]*)\"") do -- .localize(%s*"
--print(match)
if not frtags[match] then
print("MATCH not found !!!", match)
print("MATCH not found !!!", match, mypath .."/".. file)
end
end
fp:close()
@ -42,4 +48,6 @@ local function parse_folder( mypath )
end
end
parse_folder( path )
for _, path in pairs(pathTab) do
parse_folder( path )
end