Skip to content

feat: Add i18n support and adapt for Headscale v0.28 (with ACL management)#98

Open
serein-213 wants to merge 14 commits into
GoodiesHQ:mainfrom
serein-213:pr-2-features
Open

feat: Add i18n support and adapt for Headscale v0.28 (with ACL management)#98
serein-213 wants to merge 14 commits into
GoodiesHQ:mainfrom
serein-213:pr-2-features

Conversation

@serein-213
Copy link
Copy Markdown

Description

This PR integrates Internationalization (i18n) support and updates the admin panel to fully support Headscale v0.28.0 features, including a new ACL management interface.

I have organized the changes into two clean commits for easier review:

  1. i18n: Infrastructure setup and translation extraction.
  2. Features: Headscale v0.28 adaption and ACL UI implementation.

Key Changes

🌐 Internationalization (i18n)

  • Added svelte-i18n to handle localization.
  • Included English (en) and Chinese Simplified (zh) locales.
  • Extracted hardcoded UI strings to locale files.

🚀 Headscale v0.28 Features

  • New ACL Management UI: Added capability to manage Policies, SSH Rules, Groups, and Tag Owners.
  • API Updates: Aligned API services with Headscale v0.27/v0.28 response structures.
  • State Management: Refactored core state using States.svelte.ts for improved reactivity.

Motivation

To make the tool accessible to non-English speakers and to expose the powerful ACL configuration features available in newer Headscale versions.

Testing

  • Verified en/zh language switching.
  • Tested CRUD operations for ACL Policies and Groups against Headscale v0.28.

- Integrated svelte-i18n for localization.

- Extracted hardcoded strings to locale files.

- Added English (en) and Chinese Simplified (zh) localizations.
- Updated API integration for Headscale v0.27/v0.28 changes.

- Added ACL management UI (Policies, SSH Rules, Groups, Tag Owners).

- Refactored state management using States.svelte.ts.
serein-213 and others added 6 commits February 14, 2026 22:56
…icies

- Implemented ExportModal for exporting data in JSON and CSV formats.
- Added BatchOperationsBar for batch actions on nodes including delete and tag operations.
- Enhanced nodes, routes, settings, and users pages with export buttons.
- Created export utility functions for various data types.
- Introduced a new page for displaying individual node details.
- Updated Svelte configuration for base path handling.
- Added support for batch operations in the nodes view.
@ch604
Copy link
Copy Markdown

ch604 commented Apr 29, 2026

many of the ui features reference cards.* for which there is no match in the english localization file (though they are in general). how are new localizations generated or updated, and how are the json keys kept in order?

Align Headscale 0.28 API and add first-run language gate
@serein-213
Copy link
Copy Markdown
Author

many of the ui features reference cards.* for which there is no match in the english localization file (though they are in general). how are new localizations generated or updated, and how are the json keys kept in order?

Good catch. At the moment, localizations in this project are maintained manually rather than generated automatically. We load the locale files directly through svelte-i18n, and there is currently no extraction/sync script in the project to generate missing keys or enforce key ordering.

So in practice, new localization entries are added by hand to src/lib/locales/en.json and src/lib/locales/zh.json, and the JSON key order is also maintained manually to match the existing structure.

In this PR, I missed syncing several cards.* entries into the English locale file. Those keys do exist in zh.json, and some of them are already referenced by the UI, but they were not added to en.json. I’ll follow up by syncing the missing English keys and aligning the ordering with the existing locale structure.

Longer term, I agree it would be better to add a small validation or sync step so missing localization keys and ordering drift can be caught automatically.

@ch604
Copy link
Copy Markdown

ch604 commented Apr 30, 2026

awesome, just tested 07cf626 and locale is now looking great! long term, it would be no small feat to add community translation through something like tolgee. now, just waiting on @GoodiesHQ ...

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.

3 participants