summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/context/modules/mkiv/s-setups-missing.mkiv
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/context/modules/mkiv/s-setups-missing.mkiv')
-rw-r--r--Master/texmf-dist/tex/context/modules/mkiv/s-setups-missing.mkiv14
1 files changed, 9 insertions, 5 deletions
diff --git a/Master/texmf-dist/tex/context/modules/mkiv/s-setups-missing.mkiv b/Master/texmf-dist/tex/context/modules/mkiv/s-setups-missing.mkiv
index 53037a78db4..ab18631fa4f 100644
--- a/Master/texmf-dist/tex/context/modules/mkiv/s-setups-missing.mkiv
+++ b/Master/texmf-dist/tex/context/modules/mkiv/s-setups-missing.mkiv
@@ -1,6 +1,10 @@
% show missing translations
\startluacode
+local gsub = string.gsub
+local find = string.find
+local context = context
+
function interfaces.show_missing(whatinterfaces)
whatinterfaces = whatinterfaces or interfaces.interfaces
local list = dofile(resolvers.find_file("mult-def.lua"))
@@ -14,7 +18,7 @@ function interfaces.show_missing(whatinterfaces)
end
NC() NR() HL()
for kk, vv in next, v do
- if not string.find(kk,"subsub") then
+ if not find(kk,"subsub") then
local okay = true
for i=1,#whatinterfaces do
local int = whatinterfaces[i]
@@ -27,9 +31,9 @@ function interfaces.show_missing(whatinterfaces)
if not okay then
for i=1,#whatinterfaces do
local int = whatinterfaces[i]
- local str = vv[int]
+ local str = context.ctxescape(vv[int] or "")
context.NC()
- if not str then
+ if str == "" then
-- nothing
elseif int == "en" then
context.color( { "darkgreen" }, str )
@@ -81,9 +85,9 @@ function interfaces.show_missing_messages(whatinterfaces)
context(kk)
for i=1,#whatinterfaces do
local int = whatinterfaces[i]
- local str = vv[int]
+ local str = context.ctxescape(vv[int] or "")
NC()
- if not str then
+ if str == "" then
-- nothing
elseif int == "en" then
context.color( { "darkgreen" }, str )