diff --git a/.gitignore b/.gitignore index cf496ad60c..6f30373755 100644 --- a/.gitignore +++ b/.gitignore @@ -119,6 +119,7 @@ packages/fxa-content-server/locale/*/*/*.po packages/fxa-content-server/rerun.txt packages/fxa-content-server/.tmp packages/fxa-content-server/.tscompiled +packages/fxa-content-server/public/locales # fxa-customs-server packages/fxa-customs-server/test/mocks/temp.netset diff --git a/packages/fxa-auth-server/package.json b/packages/fxa-auth-server/package.json index a8e17072a2..3a01870015 100644 --- a/packages/fxa-auth-server/package.json +++ b/packages/fxa-auth-server/package.json @@ -39,8 +39,8 @@ "audit-orphaned-stripe-accounts": "CONFIG_FILES='config/secrets.json' node -r esbuild-register ./scripts/audit-orphaned-customers.ts", "remove-unverified-accounts": "CONFIG_FILES='config/secrets.json' node -r esbuild-register ./scripts/remove-unverified-accounts.ts", "emails-scss": "node -r esbuild-register ./lib/senders/emails/sass-compile-files.ts", - "storybook": "npm run install-ejs && yarn emails-scss && NODE_OPTIONS=--openssl-legacy-provider start-storybook -p 6010 --no-version-updates -s ./", - "build-storybook": "npm run install-ejs && yarn emails-scss && NODE_OPTIONS=--openssl-legacy-provider build-storybook && yarn build-storybook:copy-locales && yarn build-storybook:copy-templates", + "storybook": "yarn l10n-prime && npm run install-ejs && yarn emails-scss && NODE_OPTIONS=--openssl-legacy-provider start-storybook -p 6010 --no-version-updates -s ./", + "build-storybook": "yarn l10n-prime && npm run install-ejs && yarn emails-scss && NODE_OPTIONS=--openssl-legacy-provider build-storybook && yarn build-storybook:copy-locales && yarn build-storybook:copy-templates", "build-storybook:copy-locales": "mkdir -p ./storybook-static/public/locales && cp -R ./public/locales ./storybook-static/public", "build-storybook:copy-templates": "mkdir -p ./storybook-static/lib/senders/emails/templates && cp -R ./lib/senders/emails ./storybook-static/lib/senders", "install-ejs": "./scripts/install-ejs.sh", diff --git a/packages/fxa-content-server/package.json b/packages/fxa-content-server/package.json index 5fe3a8f4bf..b666c2724f 100644 --- a/packages/fxa-content-server/package.json +++ b/packages/fxa-content-server/package.json @@ -3,14 +3,15 @@ "version": "1.253.4", "description": "Firefox Accounts Content Server", "scripts": { - "build": "tsc --build ../fxa-react && npm run build-css && NODE_ENV=production NODE_OPTIONS=--openssl-legacy-provider grunt build", + "build": "tsc --build ../fxa-react && yarn l10n-prime && npm run build-css && NODE_ENV=production NODE_OPTIONS=--openssl-legacy-provider grunt build", "build-css": "tailwindcss --postcss -i ./app/styles/tailwind.css -o ./app/styles/tailwind.out.css", "compile": "tsc --noEmit", "clean": "git clean -fXd", "postinstall": "cp server/config/local.json-dist server/config/local.json", "audit": "npm audit --json | audit-filter --nsp-config=.nsprc --audit=-", + "l10n-prime": "yarn l10n:prime fxa-content-server", "lint": "eslint app server tests --cache", - "start": "node scripts/check-local-config && NODE_OPTIONS=--openssl-legacy-provider grunt l10n-create-json l10n-generate-tos-pp:app && pm2 start pm2.config.js && ../../_scripts/check-url.sh localhost:3030/bundle/app.bundle.js && npm run build-css", + "start": "node scripts/check-local-config && yarn l10n-prime && NODE_OPTIONS=--openssl-legacy-provider grunt l10n-create-json l10n-generate-tos-pp:app && pm2 start pm2.config.js && ../../_scripts/check-url.sh localhost:3030/bundle/app.bundle.js && npm run build-css", "stop": "pm2 stop pm2.config.js", "restart": "pm2 restart pm2.config.js && npm run build-css", "delete": "pm2 delete pm2.config.js", diff --git a/packages/fxa-content-server/server/lib/version.js b/packages/fxa-content-server/server/lib/version.js index b1e8d9fe20..e91d5aaa25 100644 --- a/packages/fxa-content-server/server/lib/version.js +++ b/packages/fxa-content-server/server/lib/version.js @@ -78,7 +78,8 @@ function getL10nVersion() { __dirname, '..', '..', - 'fxa-content-server-l10n', + 'public', + 'locales', 'git-head.txt' ); return fs.readFileSync(gitShaPath, 'utf8').trim();