Skip to content

✨ Add I18n support for all UI strings#78

Merged
fusion94 merged 1 commit intomasterfrom
feat/69-i18n
Mar 18, 2026
Merged

✨ Add I18n support for all UI strings#78
fusion94 merged 1 commit intomasterfrom
feat/69-i18n

Conversation

@fusion94
Copy link
Copy Markdown
Collaborator

Summary

Replace all hardcoded English strings with I18n.t calls.

Changes

  • config/locales/en.yml: Default English translations (30 keys)
  • lib/paper_trail_manager.rb: Register locale files in engine initializer
  • changes_controller.rb: 8 flash messages → I18n
  • index.html.erb: Title, labels, filter UI, empty state → I18n
  • show.html.erb: Title, headers → I18n
  • _version.html.erb: Change ID, roll back, confirm, 'by' → I18n

How to Override

Host apps can override any key in their locale files:

# config/locales/en.yml
en:
  paper_trail_manager:
    changes:
      index:
        title: "Audit Log"

Test Results

  • 50 examples, 0 failures

Closes #69

All hardcoded English strings replaced with I18n.t calls:
- Controller: 8 flash messages
- Index view: title, labels, filter UI, empty state
- Show view: title, column headers
- Version partial: change ID, roll back button, confirm dialog, 'by'

Default English locale at config/locales/en.yml.
Host apps can override any key in their own locale files.

50 examples, 0 failures.

Closes #69
@fusion94 fusion94 merged commit 6ea3ed4 into master Mar 18, 2026
18 checks passed
@fusion94 fusion94 deleted the feat/69-i18n branch March 18, 2026 18:48
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.

Add I18n support for all UI strings

1 participant