<commit_before>local InputContainer = require("ui/widget/container/inputcontainer")
local UIManager = require("ui/uimanager")
local InfoMessage = require("ui/widget/infomessage")
local _ = require("gettext")

local ReaderHyphenation = InputContainer:new{
    hyph_menu_title = _("Hyphenation"),
    hyph_table = nil,
    cur_hyph_idx = nil,
}

function ReaderHyphenation:_changeSel(k)
    if self.cur_hyph_idx then
        self.hyph_table[self.cur_hyph_idx].selected = false
    end
    self.hyph_table[k].selected = true
    self.cur_hyph_idx = k
end<commit_msg>Show current hyphenation dictionary in menu.<commit_after>local InputContainer = require("ui/widget/container/inputcontainer")
local UIManager = require("ui/uimanager")
local InfoMessage = require("ui/widget/infomessage")
local _ = require("gettext")

local ReaderHyphenation = InputContainer:new{
    hyph_menu_title = _("Hyphenation"),
    hyph_table = nil,
    cur_hyph_idx = nil,
}

function ReaderHyphenation:_changeSel(k)
    if self.cur_hyph_idx then
        self.hyph_table[self.cur_hyph_idx].checked = false
    end
    self.hyph_table[k].checked = true
    self.cur_hyph_idx = k
end
{'fraction_non_alphanumeric': 0.10476190476190476, 'fraction_numerical': 0.0, 'mean_word_length': 4.809045226130653, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4933454', 'n_tokens_mistral': 394, 'n_tokens_neox': 385, 'n_words': 70}