Skip to content

Commit

Permalink
Use translations in js
Browse files Browse the repository at this point in the history
  • Loading branch information
rahearn committed Oct 16, 2024
1 parent ba8d76a commit a4f347c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions app/javascript/application.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// Entry point for the build script in your package.json

import "@uswds/uswds"

import { i18n } from './i18n';

console.log(i18n.t('shared.banner.official_site'));
2 changes: 1 addition & 1 deletion config/i18n-js.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
translations:
- file: "app/javascript/generated/translations.json"
patterns:
- "*.js.*"
- "*"

0 comments on commit a4f347c

Please sign in to comment.