From b2235e724443f86716694f4e45df9f1261873069 Mon Sep 17 00:00:00 2001 From: Philipp Gesang Date: Tue, 16 Jul 2013 21:30:48 +0200 Subject: adapt strings for 20th century OS Windows appears to still lack a unicode capable terminal emulator. http://tug.org/pipermail/luatex/2013-July/004547.html No comment. --- luaotfload-colors.lua | 2 +- luaotfload-database.lua | 28 ++++++++++++++-------------- luaotfload-features.lua | 10 +++++----- luaotfload-tool.lua | 32 ++++++++++++++++---------------- luaotfload.dtx | 19 +++++++++---------- 5 files changed, 45 insertions(+), 46 deletions(-) diff --git a/luaotfload-colors.lua b/luaotfload-colors.lua index b95e836..ac9291d 100644 --- a/luaotfload-colors.lua +++ b/luaotfload-colors.lua @@ -87,7 +87,7 @@ local sanitize_color_expression = function (digits) local sanitized = lpegmatch(valid_digits, digits) if not sanitized then luaotfload.warning( - "“%s” is not a valid rgb[a] color expression", digits) + "%q is not a valid rgb[a] color expression", digits) return nil end return sanitized diff --git a/luaotfload-database.lua b/luaotfload-database.lua index e0b977b..0997a46 100644 --- a/luaotfload-database.lua +++ b/luaotfload-database.lua @@ -643,7 +643,7 @@ end resolve_cached = function (_, _, specification) if not names.lookups then names.lookups = load_lookups() end local request = hash_request(specification) - report("both", 4, "cache", "Looking for “%s” in cache ...", + report("both", 4, "cache", "Looking for %q in cache ...", request) local found = names.lookups[request] @@ -927,7 +927,7 @@ resolve = function (_, _, specification) -- the 1st two parameters are used by C if not fonts_reloaded then --- last straw: try reloading the database return reload_db( - "unresolved font name: ‘" .. name .. "’", + "unresolved font name: '" .. name .. "'", resolve, nil, nil, specification ) end @@ -954,7 +954,7 @@ end --- string -> ('a -> 'a) -> 'a list -> 'a reload_db = function (why, caller, ...) - report("both", 1, "db", "Reload initiated; reason: “%s”", why) + report("both", 1, "db", "Reload initiated; reason: %q", why) names.data = update_names(names.data, false, false) local success = save_names() if success then @@ -1056,7 +1056,7 @@ find_closest = function (name, limit) local dist = distances[i] local namelst = by_distance[dist] report(false, 0, "query", - "Distance from “" .. name .. "”: " .. dist + "Distance from \"" .. name .. "\": " .. dist .. "\n " .. tableconcat(namelst, "\n ") ) end @@ -1174,7 +1174,7 @@ local load_font = function (fullname, fontnames, newfontnames, texmf) if names.blacklist[fullname] or names.blacklist[basename] then report("log", 2, "db", - "Ignoring blacklisted font “%s”", fullname) + "Ignoring blacklisted font %q", fullname) return false end @@ -1205,7 +1205,7 @@ local load_font = function (fullname, fontnames, newfontnames, texmf) newmappings[location] = fullinfo --- keep newentrystatus.index[index+1] = location --- is this actually used anywhere? end - report("log", 2, "db", "Font “%s” already indexed", basename) + report("log", 2, "db", "Font %q already indexed", basename) return false end @@ -1238,7 +1238,7 @@ local load_font = function (fullname, fontnames, newfontnames, texmf) end else --- missing info - report("log", 1, "db", "Failed to load “%s”", basename) + report("log", 1, "db", "Failed to load %q", basename) return false end return true @@ -1319,7 +1319,7 @@ local create_blacklist = function (blacklist, whitelist) local result = { } local dirs = { } - report("info", 2, "db", "Blacklisting “%d” files and directories", + report("info", 2, "db", "Blacklisting %q files and directories", #blacklist) for i=1, #blacklist do local entry = blacklist[i] @@ -1330,7 +1330,7 @@ local create_blacklist = function (blacklist, whitelist) end end - report("info", 2, "db", "Whitelisting “%d” files", #whitelist) + report("info", 2, "db", "Whitelisting %q files", #whitelist) for i=1, #whitelist do result[whitelist[i]] = nil end @@ -1379,7 +1379,7 @@ read_blacklist = function () line = stringsub(line, 1, cmt - 1) end line = stringstrip(line) - report("log", 2, "db", "Blacklisted file “%s”", line) + report("log", 2, "db", "Blacklisted file %q", line) blacklist[#blacklist+1] = line end end @@ -1467,7 +1467,7 @@ local scan_dir = function (dirname, fontnames, newfontnames, local found = find_font_files (dirname) if not found then report ("both", 3, "db", - "No such directory: “%s”; skipping.", dirname) + "No such directory: %q; skipping.", dirname) return 0, 0 end report ("both", 3, "db", "Scanning directory %s", dirname) @@ -1481,10 +1481,10 @@ local scan_dir = function (dirname, fontnames, newfontnames, local new if dry_run == true then report ("both", 1, "db", - "Would have been loading “%s”", fullname) + "Would have been loading %q", fullname) else report ("both", 4, "db", - "Loading font “%s”", fullname) + "Loading font %q", fullname) local new = load_font (fullname, fontnames, newfontnames, texmf) if new == true then @@ -1841,7 +1841,7 @@ local gen_fast_lookups = function (fontnames) local known = filenames.base[base] or filenames.bare[bare] if known then --- known report("both", 3, "db", - "Font file “%s” already indexed (%d)", + "Font file %q already indexed (%d)", base, idx) report("both", 3, "db", "> old location: %s", (filenames.full[known] or "texmf")) diff --git a/luaotfload-features.lua b/luaotfload-features.lua index a07992b..4088379 100644 --- a/luaotfload-features.lua +++ b/luaotfload-features.lua @@ -778,7 +778,7 @@ local set_default_features = function (speclist) if support_incomplete[script] then report("log", 0, "load", "support for the requested script: " - .. "“%s” may be incomplete", script) + .. "%q may be incomplete", script) end else script = "dflt" @@ -792,7 +792,7 @@ local set_default_features = function (speclist) local requested = defaults[script] if not requested then report("log", 0, "load", - "no defaults for script “%s”, falling back to “dflt”", + "no defaults for script %q, falling back to \"dflt\"", script) requested = defaults.dflt end @@ -924,7 +924,7 @@ end --doc]]-- local handle_invalid_option = function (opt) - report("log", 0, "load", "font option “%s” unknown.", opt) + report("log", 0, "load", "font option %q unknown.", opt) return "", false end @@ -942,7 +942,7 @@ local check_garbage = function (_,i, garbage) "warning: path in file: lookups is deprecated; ") report("log", 0, "load", "use bracket syntax instead!") report("log", 0, "load", - "position: %d; full match: “%s”", + "position: %d; full match: %q", i, garbage) return true end @@ -1134,7 +1134,7 @@ local handle_request = function (specification) --- in an anonymous lookup; --- we try to behave as friendly as possible --- just go with it ... - report("log", 1, "load", "invalid request “%s” of type anon", + report("log", 1, "load", "invalid request %q of type anon", specification.specification) report("log", 1, "load", "use square bracket syntax or consult the documentation.") diff --git a/luaotfload-tool.lua b/luaotfload-tool.lua index 21f73d1..f7558e8 100755 --- a/luaotfload-tool.lua +++ b/luaotfload-tool.lua @@ -190,11 +190,11 @@ This tool is part of the luaotfload package. Valid options are: -V --version print version and exit -h --help print this message - --diagnose=CHECK run a self test procedure; one of “files”, - “permissions”, or “repository” + --diagnose=CHECK run a self test procedure; one of "files", + "permissions", or "repository" - --alias= force behavior of “luaotfload-tool” or legacy - “mkluatexfontdb” + --alias= force behavior of "luaotfload-tool" or legacy + "mkluatexfontdb" ------------------------------------------------------------------------------- DATABASE @@ -228,7 +228,7 @@ The font database will be saved to FONT CACHE --cache= operate on font cache, where is - “show”, “purge”, or “erase” + "show", "purge", or "erase" The font cache will be written to %s @@ -248,8 +248,8 @@ Valid options: -vvv print all steps of directory searching -V --version print version and exit -h --help print this message - --alias= force behavior of “luaotfload-tool” or legacy - “mkluatexfontdb” + --alias= force behavior of "luaotfload-tool" or legacy + "mkluatexfontdb" The font database will be saved to %s @@ -280,9 +280,9 @@ end local version_msg = function ( ) texiowrite_nl(stringformat( - "%s version “%s”\n" .. -- no \z due to 5.1 compatibility - "database version “%s”\n" .. - "Lua interpreter: %s; version “%s”\n", + "%s version %q\n" .. -- no \z due to 5.1 compatibility + "database version %q\n" .. + "Lua interpreter: %s; version %q\n", config.luaotfload.self, version, names.version, @@ -776,21 +776,21 @@ actions.query = function (job) if success then logs.names_report(false, 0, - "resolve", "Font “%s” found!", query) + "resolve", "Font %q found!", query) if subfont then logs.names_report(false, 0, "resolve", - "Resolved file name “%s”, subfont nr. “%s”", + "Resolved file name %q, subfont nr. %q", foundname, subfont) else logs.names_report(false, 0, "resolve", - "Resolved file name “%s”", foundname) + "Resolved file name %q", foundname) end if job.show_info then show_font_info(foundname, query, job.full_info, job.warnings) end else logs.names_report(false, 0, - "resolve", "Cannot find “%s”.", query) + "resolve", "Cannot find %q.", query) if job.fuzzy == true then logs.names_report(false, 0, "resolve", "Looking for close matches, this may take a while ...") @@ -1303,7 +1303,7 @@ do release_url) return true else - out "There weren’t any new releases in the meantime." + out "There weren't any new releases in the meantime." out "Luaotfload is up to date." end return false @@ -1360,7 +1360,7 @@ do local rest = next (asked) if rest ~= nil then --> something unknown - out ("Unknown diagnostic “%s”.", rest) + out ("Unknown diagnostic %q.", rest) end if errcnt == 0 then --> success out ("Everything appears to be in order, \z diff --git a/luaotfload.dtx b/luaotfload.dtx index 2344a19..954234f 100644 --- a/luaotfload.dtx +++ b/luaotfload.dtx @@ -1712,14 +1712,13 @@ loadmodule"merged.lua" if fonts then if not fonts._merge_loaded_message_done_ then - --- a program talking first person -- HH sure believes in strong AI ... - log[[“I am using the merged version of 'luaotfload.lua' here. If]] - log[[ you run into problems or experience unexpected behaviour,]] - log[[ and if you have ConTeXt installed you can try to delete the]] - log[[ file 'luaotfload-font-merged.lua' as I might then use the]] - log[[ possibly updated libraries. The merged version is not]] - log[[ supported as it is a frozen instance. Problems can be]] - log[[ reported to the ConTeXt mailing list.”]] + log [["I am using the merged version of 'luaotfload.lua' here.]] + log [[ If you run into problems or experience unexpected]] + log [[ behaviour, and if you have ConTeXt installed you can try]] + log [[ to delete the file 'luaotfload-merged.lua' as I might]] + log [[ then use the possibly updated libraries. The merged]] + log [[ version is not supported as it is a frozen instance.]] + log [[ Problems can be reported to the ConTeXt mailing list."]] end fonts._merge_loaded_message_done_ = true @@ -1911,7 +1910,7 @@ request_resolvers.anon = function (specification) local exists, _ = lfsisfile(name) if exists then --- garbage; we do this because we are nice, --- not because it is correct - logs.names_report("log", 1, "load", "file “%s” exists", name) + logs.names_report("log", 1, "load", "file %q exists", name) logs.names_report("log", 1, "load", "... overriding borked anon: lookup with path: lookup") specification.name = name @@ -1935,7 +1934,7 @@ request_resolvers.path = function (specification) local exists, _ = lfsisfile(name) if not exists then -- resort to file: lookup logs.names_report("log", 1, "load", - "path lookup of “%s” unsuccessful, falling back to file:", + "path lookup of %q unsuccessful, falling back to file:", name) request_resolvers.file(specification) else -- cgit v1.2.3