summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/polyglossia/polyglossia.lua
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/polyglossia/polyglossia.lua')
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/polyglossia.lua26
1 files changed, 17 insertions, 9 deletions
diff --git a/Master/texmf-dist/tex/latex/polyglossia/polyglossia.lua b/Master/texmf-dist/tex/latex/polyglossia/polyglossia.lua
index bd1afa5e912..463b3d2fe3b 100644
--- a/Master/texmf-dist/tex/latex/polyglossia/polyglossia.lua
+++ b/Master/texmf-dist/tex/latex/polyglossia/polyglossia.lua
@@ -3,8 +3,9 @@ require('luatex-hyphen')
local luatexhyphen = luatexhyphen
local byte = unicode.utf8.byte
+local module_name = "polyglossia"
local polyglossia_module = {
- name = "polyglossia",
+ name = module_name,
version = 1.3,
date = "2013/05/11",
description = "Polyglossia",
@@ -13,8 +14,14 @@ local polyglossia_module = {
license = "CC0"
}
-local error, warning, info, log =
- luatexbase.provides_module(polyglossia_module)
+luatexbase.provides_module(polyglossia_module)
+
+local log_info = function(message)
+ luatexbase.module_info(module_name, message)
+end
+local log_warning = function(message)
+ luatexbase.module_warning(module_name, message)
+end
polyglossia = polyglossia or {}
local polyglossia = polyglossia
@@ -103,7 +110,7 @@ end
local function newloader(langentry)
loaded_language = polyglossia.newloader_loaded_languages[langentry]
if loaded_language then
- texio.write_nl('term and log', 'Language ' .. langentry .. ' already loaded; id is ' .. lang.id(loaded_language))
+ log_info('Language ' .. langentry .. ' already loaded; id is ' .. lang.id(loaded_language))
-- texio.write_nl('term and log', 'Language ' .. langentry .. ' already loaded with patterns ' .. tostring(loaded_language) .. '; id is ' .. lang.id(loaded_language))
-- texio.write_nl('term and log', 'Language ' .. langentry .. ' already loaded with patterns ' .. loaded_language['patterns'] .. '; id is ' .. lang.id(loaded_language))
return lang.id(loaded_language)
@@ -112,15 +119,16 @@ local function newloader(langentry)
if langdata and langdata['special'] == 'language0' then return 0 end
if langdata then
- print("Language data for " .. langentry)
+ local s = "Language data for " .. langentry
for k, v in pairs(langdata) do
- print(k, tostring(v))
+ s = s .. "\n" .. k .. "\t" .. tostring(v)
end
polyglossia.newloader_max_langid = polyglossia.newloader_max_langid + 1
-- langobject = lang.new(newloader_max_langid)
lang.new(); lang.new(); lang.new()
langobject = lang.new()
- texio.write_nl('term and log', langdata.patterns)
+ s = s .. "\npatterns: " .. langdata.patterns
+ log_info(s)
if langdata.patterns and langdata.patterns ~= '' then
pattfilepath = kpse.find_file(langdata.patterns)
if pattfilepath then
@@ -139,10 +147,10 @@ local function newloader(langentry)
end
polyglossia.newloader_loaded_languages[langentry] = langobject
- texio.write_nl('term and log', 'Language ' .. langentry .. ' was not yet loaded; created with id ' .. lang.id(langobject))
+ log_info('Language ' .. langentry .. ' was not yet loaded; created with id ' .. lang.id(langobject))
return lang.id(langobject)
else
- texio.write_nl('term and log', 'Language ' .. langentry .. ' not found in language.dat.lua')
+ log_warning('Language ' .. langentry .. ' not found in language.dat.lua')
return 255
end
end