From 6a174171e7ac29a9de69829bdb123482b9affaf1 Mon Sep 17 00:00:00 2001 From: natural-harmonia-gropius <50797982+natural-harmonia-gropius@users.noreply.github.com> Date: Tue, 25 Apr 2023 16:17:06 +0800 Subject: [PATCH] fix: translate topbar when no file --- scripts/uosc_shared/elements/TopBar.lua | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scripts/uosc_shared/elements/TopBar.lua b/scripts/uosc_shared/elements/TopBar.lua index 514def21..4effc190 100644 --- a/scripts/uosc_shared/elements/TopBar.lua +++ b/scripts/uosc_shared/elements/TopBar.lua @@ -85,6 +85,10 @@ function TopBar:decide_titles() self.alt_title = state.alt_title ~= '' and state.alt_title or nil self.main_title = state.title ~= '' and state.title or nil + if (self.main_title == 'No file') then + self.main_title = t('No file') + end + -- Fall back to alt title if main is empty if not self.main_title then self.main_title, self.alt_title = self.alt_title, nil