Skip to content

Add Russian localization#29

Open
NaumovSN wants to merge 1 commit into
r6mez:masterfrom
NaumovSN:russian-localization
Open

Add Russian localization#29
NaumovSN wants to merge 1 commit into
r6mez:masterfrom
NaumovSN:russian-localization

Conversation

@NaumovSN

Copy link
Copy Markdown

Russian localization

GTK4 template translatable=yes does not work in GJS because set_translation_domain() is not exposed in GJS bindings. Override this by setting all translatable strings programmatically via _() in JavaScript.

Key changes

  • src/main.js: override imports.package.localedir to ~/.local/share/locale before pkg.initGettext() so translations work from any launcher
  • src/ui/window.js: set all UI strings (title, placeholders, labels, dropdown items, tooltips, menu) via _() in constructor
  • src/managers/index.js: wrap all dialog strings in _()
  • data/ui/window.ui: remove translatable=yes, add widget IDs
  • data/org.ramez.terminator.in: set GETTEXT_PACKAGE, TEXTDOMAINDIR, LANGUAGE in launcher
  • data/org.ramez.terminator.desktop.in: set DBusActivatable=false
  • po/ru.po: full Russian translation (266 lines)
  • po/LINGUAS: add ru
  • po/POTFILES.in: update source file list

GTK4 template translatable=yes does not work in GJS because
set_translation_domain() is not exposed in GJS bindings.
Override this by setting all translatable strings programmatically
via _() in JavaScript.

Key changes:
- src/main.js: override imports.package.localedir to ~/.local/share/locale
  before pkg.initGettext() so translations work from any launcher
- src/ui/window.js: set all UI strings (title, placeholders, labels,
  dropdown items, tooltips, menu) via _() in constructor
- src/managers/index.js: wrap all dialog strings in _()
- data/ui/window.ui: remove translatable=yes, add widget IDs
- data/org.ramez.terminator.in: set GETTEXT_PACKAGE, TEXTDOMAINDIR,
  LANGUAGE in launcher
- data/org.ramez.terminator.desktop.in: set DBusActivatable=false
- po/ru.po: full Russian translation (266 lines)
- po/LINGUAS: add ru
- po/POTFILES.in: update source file list
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.

2 participants