Skip to content

Add localization support with plugin-local gettext#34

Open
Cusanity wants to merge 1 commit into
gitalexcampos:masterfrom
Cusanity:pr/localization
Open

Add localization support with plugin-local gettext#34
Cusanity wants to merge 1 commit into
gitalexcampos:masterfrom
Cusanity:pr/localization

Conversation

@Cusanity
Copy link
Copy Markdown
Contributor

@Cusanity Cusanity commented May 2, 2026

Adds a custom gettext module (highlightsync_gettext) so the plugin can ship its own translations independently of KOReader's built-in l10n/ directory. This follows the same pattern used by assistant.koplugin.

Changes

  • highlightsync_gettext.lua: Pure Lua gettext subset that loads .po files from highlightsync.koplugin/l10n/
  • l10n/zh_CN/koreader.po + l10n/zh_TW/koreader.po: Chinese Simplified and Traditional translations
  • _meta.lua: Use plugin gettext for name/description
  • main.lua: Switch from require("gettext") to require("highlightsync_gettext")

- Custom gettext module for plugin-local translations
- Chinese (Simplified/Traditional) translation files
- Wire up _meta.lua and main.lua to use plugin gettext
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant