Skip to content

✨ feat(achievements): localize achievement - #66145

Closed
harukaxxxx wants to merge 1 commit into
NousResearch:mainfrom
harukaxxxx:plugins/hermes-achievements/locale-pipeline
Closed

✨ feat(achievements): localize achievement#66145
harukaxxxx wants to merge 1 commit into
NousResearch:mainfrom
harukaxxxx:plugins/hermes-achievements/locale-pipeline

Conversation

@harukaxxxx

Copy link
Copy Markdown

What does this PR do?

Adds locale-ready rendering for the Hermes Achievements dashboard without changing achievement evaluation or scan semantics.

Achievement metadata is now resolved from the dashboard locale using stable achievement IDs, while the backend continues to provide English fallback data. The change also makes criteria templates, metric labels, and category labels localizable without introducing locale-specific scan caches.

Related Issue

Fixes #66138

Type of Change

  • 🐛 Bug fix (non-breaking change that fixes an issue)
  • ✨ New feature (non-breaking change that adds functionality)
  • 🔒 Security fix
  • 📝 Documentation update
  • ✅ Tests (adding or improving test coverage)
  • ♻️ Refactor (no behavior change)
  • 🎯 New skill (bundled or hub)

Changes Made

  • Added achievements.catalog locale support keyed directly by ACHIEVEMENTS[].id.
  • Added canonical English achievement names and descriptions to web/src/i18n/en.ts.
  • Added locale support for:
    • metric labels (achievements.metrics)
    • criteria templates (achievements.criteria)
    • achievement categories (achievements.categories)
  • Added locale-neutral criteria_spec data to the achievements API while preserving the existing English criteria field as a compatibility fallback.
  • Updated dashboard cards, category filters, recent-unlock summaries, and share cards to use localized achievement/category copy.
  • Added regression coverage for locale-neutral criteria specifications.

How to Test

  1. Run:

    python -m unittest plugins/hermes-achievements/tests/test_achievement_engine.py
    node --check plugins/hermes-achievements/dashboard/dist/index.js
  2. Start the dashboard and open /achievements.

  3. Confirm achievement cards, category pills, recent unlocks, and share cards render normally in English.

  4. Add a temporary locale override under achievements.catalog, metrics, criteria, or categories, then switch dashboard language and confirm the corresponding UI text updates while unlock state and filters continue to work.

Checklist

Code

  • I've read the Contributing Guide
  • My commit messages follow Conventional Commits (fix(scope):, feat(scope):, etc.)
  • I searched for existing PRs to make sure this isn't a duplicate
  • My PR contains only changes related to this fix/feature (no unrelated commits)
  • I've run pytest tests/ -q and all tests pass
  • I've added tests for my changes (required for bug fixes, strongly encouraged for features)
  • I've tested on my platform: Windows 11

Documentation & Housekeeping

  • I've updated relevant documentation (README, docs/, docstrings) — or N/A
  • I've updated cli-config.yaml.example if I added/changed config keys — or N/A
  • I've updated CONTRIBUTING.md or AGENTS.md if I changed architecture or workflows — or N/A
  • I've considered cross-platform impact (Windows, macOS) per the compatibility guide — or N/A
  • I've updated tool descriptions/schemas if I changed tool behavior — or N/A

Screenshots / Logs

image

achievement locale pipeline for catalog, criteria, metrics, and categories

Co-authored-by: GPT 5.6 Terra <codex@openai.com>
@alt-glitch alt-glitch added type/feature New feature or request P3 Low — cosmetic, nice to have comp/plugins Plugin system and bundled plugins comp/dashboard Web dashboard / control panel UI (dashboard/, landing) labels Jul 17, 2026
@alt-glitch

Copy link
Copy Markdown
Collaborator

This was generated by AI during triage.

Related: implements the feature-spec #66138 and overlaps #23476's achievements i18n work through a broader locale-neutral API/dashboard approach.

@teknium1

Copy link
Copy Markdown
Contributor

Thanks for implementing the locale-neutral route described in #66138. The premise is verified on current main: the backend still returns English criteria at plugins/hermes-achievements/dashboard/plugin_api.py:534-557, and the dashboard directly renders API-provided achievement copy at plugins/hermes-achievements/dashboard/dist/index.js:523-542.

The PR adds optional i18n types, stable-ID catalog/category/metric resolution, and a criteria_spec payload while retaining the existing English fallback. That keeps locale presentation out of evaluation and snapshot-cache selection, consistent with the issue's stated design. I found no substantive correctness issue in the changed code.

PR #66153 is a related follow-up that includes the same pipeline surface plus zh-Hant strings; coordinate the two pieces during salvage.

Automated hermes-sweeper review.

@teknium1 teknium1 added sweeper:risk-compatibility Sweeper risk: may break existing users, config, migrations, defaults, or upgrades sweeper:blast-moderate Sweeper blast radius: moderate — a subsystem or single platform labels Jul 18, 2026
@harukaxxxx

Copy link
Copy Markdown
Author

This PR provides the shared achievement-localization pipeline: stable-ID catalog lookup, locale-neutral criteria metadata, and localized metric/category support.

PR #66153 includes the same pipeline together with the Traditional Chinese (zh-Hant) translations, so it is the intended consolidated PR moving forward.

To avoid merging two overlapping implementations, I’m closing this PR in favor of #66153. The remaining work, including the secret-achievement visibility fix and its regression coverage, will be handled there.

@harukaxxxx harukaxxxx closed this Jul 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/dashboard Web dashboard / control panel UI (dashboard/, landing) comp/plugins Plugin system and bundled plugins P3 Low — cosmetic, nice to have sweeper:blast-moderate Sweeper blast radius: moderate — a subsystem or single platform sweeper:risk-compatibility Sweeper risk: may break existing users, config, migrations, defaults, or upgrades type/feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: Localize Hermes Achievements dashboard content

3 participants