foundryvtt-wh4-lang-fr-fr/tools/detect_missing_strings.lua

22 lines
520 B
Lua
Raw Permalink Normal View History

2020-05-31 10:10:58 +02:00
package.path = package.path .. ";luajson/?.lua"
local JSON = require"json"
2020-06-17 08:42:58 +02:00
local enjsonf = "../../WFRP-4th-Edition-FoundryVTT_SLADECRAVEN/lang/en.json"
2020-05-31 10:10:58 +02:00
local frjsonf = "../fr.json"
local fp = io.open(enjsonf, "r")
local entags = JSON.decode( fp:read("*a") )
fp:close()
fp = io.open(frjsonf, "r")
local frtags = JSON.decode( fp:read("*a") )
fp:close()
for tag, value in pairs(entags) do
if not frtags[tag] then
print("Missing tag not found", tag, value)
end
end