Skip to content

Commit

Permalink
Merge pull request #107 from GSA-TTS/i18n-js
Browse files Browse the repository at this point in the history
Update i18n-js code
  • Loading branch information
rahearn authored Jan 13, 2025
2 parents dce2054 + 7aad128 commit 70d298d
Show file tree
Hide file tree
Showing 9 changed files with 8 additions and 11 deletions.
3 changes: 1 addition & 2 deletions .browserslistrc
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# Supported browsers
> 2%
> 0.2%
last 2 versions
IE 11
not dead
2 changes: 0 additions & 2 deletions .github/actions/compile-assets/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ runs:
path: |
public/assets
app/assets/builds
app/javascript/generated
- name: Precompile assets
env:
Expand All @@ -49,4 +48,3 @@ runs:
path: |
public/assets
app/assets/builds
app/javascript/generated
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ doc/compliance/oscal/.trestle/cache
doc/compliance/oscal/ssp-render/continuous_monitoring_ssp.*

# Generated by i18n-js
/app/javascript/generated
/app/javascript/i18n/translations.json

# Terraform
.terraform.lock.hcl
Expand Down
2 changes: 1 addition & 1 deletion app/javascript/application.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

import "@uswds/uswds"

import { i18n } from './utils/i18n';
import { i18n } from './i18n';

console.log(i18n.t('shared.banner.official_site'));
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { I18n } from 'i18n-js';
import translations from '../generated/translations.json';
import translations from './translations.json';

const userLocale = document.documentElement.lang;

Expand Down
2 changes: 1 addition & 1 deletion config/esbuild-targets.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
chrome130,edge130,firefox132,ios18.1,opera113,safari18.1
chrome109,edge130,firefox115,ios11,opera113,safari16.6
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"
- file: "app/javascript/i18n/translations.json"
patterns:
- "*"
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"private": true,
"dependencies": {
"@uswds/uswds": "^3.8.1",
"i18n-js": "^4.5.0",
"i18n-js": "^4.5.1",
"sass": "^1.83.1"
},
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -676,7 +676,7 @@ https-proxy-agent@^5.0.0:
agent-base "6"
debug "4"

i18n-js@^4.5.0:
i18n-js@^4.5.1:
version "4.5.1"
resolved "https://registry.yarnpkg.com/i18n-js/-/i18n-js-4.5.1.tgz#12ea3d6333552ff75be0904ea50705f5a263d172"
integrity sha512-n7jojFj1WC0tztgr0I8jqTXuIlY1xNzXnC3mjKX/YjJhimdM+jXM8vOmn9d3xQFNC6qDHJ4ovhdrGXrRXLIGkA==
Expand Down

0 comments on commit 70d298d

Please sign in to comment.