Skip to content

Port openfang PR #502 i18n infrastructure to LibreFang #28

@houko

Description

@houko

Summary

Port the i18n work from RightNow-AI/openfang PR #502 into LibreFang, adapting branding, paths, and current repo layout.

Upstream reference: RightNow-AI/openfang#502

Scope

  • Add CLI i18n foundation (fluent-based language bundles, runtime bootstrap from config.language)
  • Add initial en and zh-CN locale packs for CLI
  • Add dashboard i18n loader and served locale JSON files
  • Expose locale routes from librefang-api
  • Add dashboard language switcher and localized labels for key nav/status surfaces
  • Adapt copied strings from OpenFang to LibreFang and repo-specific paths such as ~/.librefang/config.toml

Notes

  • LibreFang already has a language field in KernelConfig, so the port should use that instead of introducing a new config concept.
  • The upstream PR appears to localize only part of the CLI output; remaining CLI/TUI strings can be follow-up work if needed.
  • Keep the first port conservative: avoid broad unrelated refactors while transplanting the i18n foundation.

Acceptance Criteria

  • librefang initializes i18n from config at startup
  • Dashboard serves locale JSON and can switch between en and zh-CN
  • Core nav/status/auth strings update when language changes
  • Build passes for librefang-cli and librefang-api

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions