The problem has been detected with the french equivalent of the tomeshell: "tome-carapace"
The hyphen character (-) is used in the lua pattern matching. The method string.find uses pattern matching by default.
local str = "tome-carapace"
local pos = str:find(str) -- pos is nil
There is (at least) three solutions :
1) Only replace the calls to the string.find function in tomeCheck() with equals
if ((targetName == tomeName) or (sourceName == tomeName) then
2) Escape the hyphen character in the translated strings when used : "tome%-carapace" (maybe with a comment in the languages files to warn future translators)
local str = "tome%-carapace"
local pos = str:find(str) -- pos is 1
3) Change to exact matching everywhere string.find is used, to be safe whatever the translations in the future.
local str = "tome-carapace"
local pos = str:find(str, 1, true) -- pos is 1
The problem has been detected with the french equivalent of the tomeshell: "tome-carapace"
The hyphen character (-) is used in the lua pattern matching. The method string.find uses pattern matching by default.
local str = "tome-carapace" local pos = str:find(str) -- pos is nil
There is (at least) three solutions :
1) Only replace the calls to the string.find function in tomeCheck() with equals
if ((targetName == tomeName) or (sourceName == tomeName) then
2) Escape the hyphen character in the translated strings when used : "tome%-carapace" (maybe with a comment in the languages files to warn future translators)
local str = "tome%-carapace" local pos = str:find(str) -- pos is 1
3) Change to exact matching everywhere string.find is used, to be safe whatever the translations in the future.
local str = "tome-carapace" local pos = str:find(str, 1, true) -- pos is 1
What is your preference ?