mod: Phase 2a - add mod settings, I18n strings, and main.cpp integration

CrossPointSettings: Add mod-specific enums and fields:
- Clock: CLOCK_FORMAT, CLOCK_SIZE, TIMEZONE, clockFormat, clockSize,
  timezone, timezoneOffsetHours, autoNtpSync
- Sleep: SLEEP_SCREEN_LETTERBOX_FILL, sleepScreenLetterboxFill
- Reader: preferredPortrait, preferredLandscape
- Indexing: INDEXING_DISPLAY, indexingDisplay
- getTimezonePosixStr() for POSIX TZ string generation

main.cpp: Integrate mod initialization:
- OPDS store loading, boot NTP sync, timezone application
- Clock refresh loop (re-render on minute change)
- RTC time logging on boot

SettingsList.h: Add clock, timezone, and letterbox fill settings
JsonSettingsIO.cpp: Handle int8_t timezoneOffsetHours separately
I18n: Add ~80 mod string keys (english.yaml + regenerated I18nKeys.h)

Made-with: Cursor
This commit is contained in:
cottongin
2026-03-07 15:14:35 -05:00
parent dfbc931c14
commit 66a754dabd
6 changed files with 232 additions and 0 deletions

View File

@@ -341,3 +341,81 @@ STR_LINK: "[link]"
STR_SCREENSHOT_BUTTON: "Take screenshot"
STR_AUTO_TURN_ENABLED: "Auto Turn Enabled: "
STR_AUTO_TURN_PAGES_PER_MIN: "Auto Turn (Pages Per Minute)"
STR_CAT_CLOCK: "Clock"
STR_CLOCK: "Clock"
STR_CLOCK_AMPM: "AM/PM"
STR_CLOCK_24H: "24 Hour"
STR_SET_TIME: "Set Time"
STR_CLOCK_SIZE: "Clock Size"
STR_CLOCK_SIZE_SMALL: "Small"
STR_CLOCK_SIZE_MEDIUM: "Medium"
STR_CLOCK_SIZE_LARGE: "Large"
STR_TIMEZONE: "Timezone"
STR_TZ_UTC: "UTC"
STR_TZ_EASTERN: "Eastern"
STR_TZ_CENTRAL: "Central"
STR_TZ_MOUNTAIN: "Mountain"
STR_TZ_PACIFIC: "Pacific"
STR_TZ_ALASKA: "Alaska"
STR_TZ_HAWAII: "Hawaii"
STR_TZ_CUSTOM: "Custom"
STR_SET_UTC_OFFSET: "Set UTC Offset"
STR_SYNC_CLOCK: "Sync Clock"
STR_TIME_SYNCED: "Time synced!"
STR_AUTO_NTP_SYNC: "Auto Sync on Boot"
STR_LETTERBOX_FILL: "Letterbox Fill"
STR_DITHERED: "Dithered"
STR_SOLID: "Solid"
STR_ADD_BOOKMARK: "Add Bookmark"
STR_REMOVE_BOOKMARK: "Remove Bookmark"
STR_LOOKUP_WORD: "Lookup Word"
STR_LOOKUP_HISTORY: "Lookup Word History"
STR_GO_TO_BOOKMARK: "Go to Bookmark"
STR_CLOSE_BOOK: "Close Book"
STR_DELETE_DICT_CACHE: "Delete Dictionary Cache"
STR_DEFAULT_OPTION: "Default"
STR_BOOKMARK_ADDED: "Bookmark added"
STR_BOOKMARK_REMOVED: "Bookmark removed"
STR_DICT_CACHE_DELETED: "Dictionary cache deleted"
STR_NO_CACHE_TO_DELETE: "No cache to delete"
STR_TABLE_OF_CONTENTS: "Table of Contents"
STR_TOGGLE_ORIENTATION: "Toggle Portrait/Landscape"
STR_TOGGLE_FONT_SIZE: "Toggle Font Size"
STR_OVERRIDE_LETTERBOX_FILL: "Override Letterbox Fill"
STR_PREFERRED_PORTRAIT: "Preferred Portrait"
STR_PREFERRED_LANDSCAPE: "Preferred Landscape"
STR_CHOOSE_SOMETHING: "Choose something to read"
STR_INDEXING_DISPLAY: "Indexing Display"
STR_INDEXING_POPUP: "Popup"
STR_INDEXING_STATUS_TEXT: "Status Bar Text"
STR_INDEXING_STATUS_ICON: "Status Bar Icon"
STR_MANAGE_BOOK: "Manage Book"
STR_ARCHIVE_BOOK: "Archive Book"
STR_UNARCHIVE_BOOK: "Unarchive Book"
STR_DELETE_BOOK: "Delete Book"
STR_DELETE_CACHE_ONLY: "Delete Cache Only"
STR_REINDEX_BOOK: "Reindex Book"
STR_BROWSE_ARCHIVE: "Browse Archive"
STR_BOOK_ARCHIVED: "Book archived"
STR_BOOK_UNARCHIVED: "Book unarchived"
STR_BOOK_DELETED: "Book deleted"
STR_CACHE_DELETED: "Cache deleted"
STR_BOOK_REINDEXED: "Book reindexed"
STR_ACTION_FAILED: "Action failed"
STR_BACK_TO_BEGINNING: "Back to Beginning"
STR_CLOSE_MENU: "Close Menu"
STR_ADD_SERVER: "Add Server"
STR_SERVER_NAME: "Server Name"
STR_NO_SERVERS: "No OPDS servers configured"
STR_DELETE_SERVER: "Delete Server"
STR_DELETE_CONFIRM: "Delete this server?"
STR_OPDS_SERVERS: "OPDS Servers"
STR_SAVE_HERE: "Save Here"
STR_SELECT_FOLDER: "Select Folder"
STR_DOWNLOAD_PATH: "Download Path"
STR_POSITION: "Position"
STR_DOWNLOAD_COMPLETE: "Download Complete!"
STR_OPEN_BOOK: "Open Book"
STR_BACK_TO_LISTING: "Back to Listing"
STR_AFTER_DOWNLOAD: "After Download"