feat: internationalization (#518)

Adds `languages` option to specify localization language priority.
Built in languages can be found in `scripts/uosc_shared/intl`.
This commit is contained in:
natural-harmonia-gropius
2023-04-24 17:37:58 +08:00
committed by GitHub
parent f274101fbd
commit 3c70ffd927
7 changed files with 156 additions and 34 deletions

View File

@@ -799,7 +799,7 @@ function Menu:render()
if draw_title then
local title_ay = ay - self.item_height
local title_height = self.item_height - 3
menu.ass_safe_title = menu.ass_safe_title or ass_escape(menu.title)
menu.ass_safe_title = t(menu.ass_safe_title or ass_escape(menu.title))
-- Background
ass:rect(ax + 2, title_ay, bx - 2, title_ay + title_height, {