Skip to content

Commit

Permalink
refactor: Adapt our BCP47 language shims to SILE 0.15
Browse files Browse the repository at this point in the history
The variable storing loaded languages was formerly local, but it now is
a scratch variable used by SILE.settings to generate a deprecation
warning.
  • Loading branch information
Omikhleia authored and Didier Willis committed Aug 30, 2024
1 parent 1e8aaf6 commit d9c1215
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions silex/lang.lua
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ SILE.X.forLanguage = forLanguage

-- Now we can patch the language support module, hacking the initial implementation
local icu = require("justenoughicu")
local loadonce = {}
SILE.scratch.loaded_languages = {}
SILE.languageSupport.languages = {}
-- BEGIN OMIKHLEIA HACKLANG
-- BAD CODE SMELL WARNING
Expand Down Expand Up @@ -60,8 +60,8 @@ SILE.languageSupport.loadLanguage = function (language)
end
-- END OMIKHLEIA HACKLANG

if loadonce[language] then return end
loadonce[language] = true
if SILE.scratch.loaded_languages[language] then return end
SILE.scratch.loaded_languages[language] = true

-- BEGIN OMIKHLEIA HACKLANG
-- We need to find language resources for this BCP47 identifier, from the less specific
Expand Down

0 comments on commit d9c1215

Please sign in to comment.