rename(bookerly): display as Bookerly Font instead of Bookerly Plugin on Plugins page

This commit is contained in:
Justin Oros
2026-04-22 19:31:45 -07:00
parent 0b1da901f1
commit 40270bb6d9
3 changed files with 5 additions and 5 deletions
+3 -3
View File
@@ -277,7 +277,7 @@ def patch_settings_activity_cpp(repo_dir):
path = find_first("SettingsActivity.cpp", repo_dir)
content = read_file(path)
if '"Bookerly Plugin"' in content:
if '"Bookerly Font"' in content:
print(" SettingsActivity.cpp already patched, skipping.")
return
@@ -295,13 +295,13 @@ def patch_settings_activity_cpp(repo_dir):
' ));\n'
)
if '"Bookerly Plugin"' not in content:
if '"Bookerly Font"' not in content:
content = content.replace(
' [&settings](int index) { return std::string(I18N.get(settings[index].nameId)); }, nullptr, nullptr,',
' [&settings, this](int index) -> std::string {\n'
' if (selectedCategoryIndex == 4) {\n'
' const auto& s = settings[index];\n'
' if (s.type == SettingType::ACTION && s.action == SettingAction::BookerlyInstalled) return "Bookerly Plugin";\n'
' if (s.type == SettingType::ACTION && s.action == SettingAction::BookerlyInstalled) return "Bookerly Font";\n'
' }\n'
' return std::string(I18N.get(settings[index].nameId));\n'
' }, nullptr, nullptr,'
+1 -1
View File
@@ -219,7 +219,7 @@ def patch_settings_cpp(repo_dir):
for first_key_line in [
' if (s.key && std::string(s.key) == "darkModeState") return "Dark Mode";\n',
' if (s.key && std::string(s.key) == "smallerFontsMode") return "Smaller Fonts";\n',
' if (s.type == SettingType::ACTION && s.action == SettingAction::BookerlyInstalled) return "Bookerly Plugin";\n',
' if (s.type == SettingType::ACTION && s.action == SettingAction::BookerlyInstalled) return "Bookerly Font";\n',
' return std::string(I18N.get(settings[index].nameId));\n',
]:
if first_key_line in content:
+1 -1
View File
@@ -293,7 +293,7 @@ def patch_settings_cpp(repo_dir):
' if (s.key && std::string(s.key) == "smallerFontsMode") return "Smaller Fonts";\n',
' if (s.key && std::string(s.key) == "darkModeState") return "Dark Mode";\n',
' s.action == SettingAction::GitHubSync) return "GitHub Sync";\n',
' s.action == SettingAction::BookerlyInstalled) return "Bookerly Plugin";\n',
' s.action == SettingAction::BookerlyInstalled) return "Bookerly Font";\n',
]:
for cl in [closing, closing_bookerly]:
anchor = last_key_line + cl