Skip to content

Commit

Permalink
fix: always read romanizations for configured languages (#948)
Browse files Browse the repository at this point in the history
When I originally added this feature, I overlooked that this was actually different from UI localization.
It has different usage scenarios: UI main language and romanization files can be separated
  • Loading branch information
dyphire committed Aug 13, 2024
1 parent fe0d394 commit 8346db4
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions src/uosc/lib/char_conv.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,8 @@ local char_dir = mp.get_script_directory() .. '/char-conv/'
local data = {}

local languages = get_languages()
for i = #languages, 1, -1 do
lang = languages[i]
if (lang == 'en') then
data = {}
else
table_assign(data, get_locale_from_json(char_dir .. lang:lower() .. '.json'))
end
for _, lang in ipairs(languages) do
table_assign(data, get_locale_from_json(char_dir .. lang:lower() .. '.json'))
end

local romanization = {}
Expand Down

0 comments on commit 8346db4

Please # to comment.