Skip to content

[refactor / translation] lightning plugin language#784

Merged
accius merged 1 commit intoaccius:Stagingfrom
MichaelWheeley:feature/lightning_language
Mar 20, 2026
Merged

[refactor / translation] lightning plugin language#784
accius merged 1 commit intoaccius:Stagingfrom
MichaelWheeley:feature/lightning_language

Conversation

@MichaelWheeley
Copy link
Contributor

@MichaelWheeley MichaelWheeley commented Mar 19, 2026

What does this PR do?

Refactored lightning plugin (useLightning.js) to add language formatting from react-i18next lookup.

  • Additional keys in all languages, copied 'en' version as master, updated new keys in 'th' version but not other languages.
  • Previously displayed both imperial and metric, now uses allUnits distance key to display one or the other.
  • Converted use of 'm' for minute to 'min' ('m' has international meaning of metre).
  • Removed auto-pluralization # strike(s), this does not translate well into other languages, replaced with 'Strikes detected: #'.
  • Replaced 'Time:' with 'Age:', eliminated use of word 'ago', does not translate well into other languages.
  • Reformatted unscientific unnecessary extra spacing on variables.
  • note, some languages have specific words for 'min', 'km' and 'mile' however the English names are probably fine.
  • note, on language change the titles of the lightning windows do not update as they are only loaded on start-up, it is necessary to F5 refresh to update them with the new language.

Type of change

  • Bug fix
  • New feature
  • Performance improvement
  • Refactor / code cleanup
  • Documentation
  • Translation
  • Map layer plugin

How to test

  1. from settings enable lightning plugin
  2. choose English or any other language, Thai is complete for lightning keys

Checklist

  • App loads without console errors
  • Tested in Dark, Light, and Retro themes
  • Responsive at different screen sizes (desktop + mobile)
  • If touching server.js: caches have TTLs and size caps (we serve 2,000+ concurrent users)
  • If adding an API route: includes caching and error handling
  • If adding a panel: wired into Modern, Classic, and Dockable layouts
  • No hardcoded colors — uses CSS variables (var(--accent-cyan), etc.)
  • No .bak, .old, console.log debug lines, or test scripts included

Screenshots (if visual change)

Screen shot English imperial
Screen shot English metric
Screen shot Thai imperial
Screen shot Thai metric

@accius accius merged commit 7490492 into accius:Staging Mar 20, 2026
@MichaelWheeley MichaelWheeley deleted the feature/lightning_language branch March 20, 2026 15:00
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