Skip to content

feat: add Nepali language support and fix link preview test - #1

Merged
eramitgupta merged 1 commit into
eramitgupta:feat/multi-languagefrom
prateekbhujel:feat/nepali-language
Oct 17, 2026
Merged

eramitgupta merged 1 commit into
eramitgupta:feat/multi-languagefrom
prateekbhujel:feat/nepali-language

Conversation

@prateekbhujel

Copy link
Copy Markdown

Hey @eramitgupta! 👋

This PR adds complete Nepali (ne / नेपाली) language support to your multi-language system on dev-null-sh#357, and fixes the CI test failure in CommitControllerTest.

1. What's Included

  1. Locale Enum & Label:

    • Added case Nepali = 'ne' to App\Enums\Locale with native label नेपाली.
    • Updated tests/Unit/Enums/LocaleTest.php to test both enum case resolution and native label representation.
  2. Full Translation Group Parity (8/8 Groups):

    • Created all 8 groups in lang/ne/*.php with 100% key and :placeholder parity:
      • lang/ne/nav.php
      • lang/ne/log.php
      • lang/ne/search.php
      • lang/ne/notifications.php
      • lang/ne/composer.php
      • lang/ne/commits.php
      • lang/ne/users.php
      • lang/ne/settings.php
    • Preserved git/brand tokens (/dev/null, devnull, HEAD, stash@{0}, fatal:, keyboard keys, @usernames).
  3. Frontend JSON Synchronization:

    • Ran php artisan erag:generate-lang to generate all 8 corresponding JSON files in resources/js/lang/ne/*.json.
    • Verified that resources/js/lang/ne/*.json matches lang/ne/*.php with byte-for-byte exactness.
  4. CI Test Fix in tests/Feature/Controllers/CommitControllerTest.php:

    • In it('does not mention an unavailable parent in the link preview'), the test asserted ->assertDontSee('replying to').
    • Since commits.card.replying_to ('replying to @:username') is shared into Inertia's data-page payload via lang, the raw HTML response body matched the translation key substring.
    • Refined the assertion to ->assertDontSee('replying to @taylorotwell') (matching the approved preview test on line 798), preserving the exact test intent while resolving the CI failure.

Quality Verification

  • bun run test:lint: 0 warnings, 0 errors.
  • bun run test:types: 0 type errors.
  • bun run build: built clean in 3.97s.
  • ./vendor/bin/pint --test: passed.
  • ./vendor/bin/rector --dry-run: 0 errors.
  • ./vendor/bin/phpstan analyse: 0 errors (level: max).
  • ./vendor/bin/pest --type-coverage --min=100: 100.0% type coverage.
  • TranslationsTest assertions: 11/11 locales pass across all 8 groups.

@eramitgupta
eramitgupta merged commit 72ad0fa into eramitgupta:feat/multi-language Oct 17, 2026
@prateekbhujel
prateekbhujel deleted the feat/nepali-language branch October 17, 2026 18: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