Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support to Portuguese language #480

Merged
merged 3 commits into from
Sep 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ orbs:
jobs:
test: # this can be any name you choose
docker:
- image: mcr.microsoft.com/playwright:v1.45.3-focal
- image: mcr.microsoft.com/playwright:v1.47.0-focal
resource_class: medium+
parallelism: 10

Expand All @@ -31,7 +31,7 @@ jobs:
pnpm install
- run:
name: Audit
command: pnpm audit --audit-level high && (pnpm audit || exit 0)
command: pnpm audit --audit-level high && pnpm audit || exit 0
- run:
name: Install Playwright
command: |
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,7 @@ The Checkout application language is set by the `language_code` attribute of the
- Spanish
- French
- Hungarian
- Portuguese

> The fallback language is English.

Expand Down
6 changes: 5 additions & 1 deletion components/data/i18n/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,10 @@ import translationFR from "public/static/locales/fr/common.json"
import translationHU from "public/static/locales/hu/common.json"
import translationIT from "public/static/locales/it/common.json"
import translationPL from "public/static/locales/pl/common.json"
import translationPT from "public/static/locales/pt/common.json"
import { initReactI18next } from "react-i18next"

const languages = ["en", "it", "de", "pl", "es", "fr", "hu"]
const languages = ["en", "it", "de", "pl", "es", "fr", "hu", "pt"]

const resources = {
en: {
Expand All @@ -32,6 +33,9 @@ const resources = {
hu: {
translation: translationHU,
},
pt: {
translation: translationPT,
},
}

use(initReactI18next).init({
Expand Down
2 changes: 1 addition & 1 deletion next-env.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
/// <reference types="next/image-types/global" />

// NOTE: This file should not be edited
// see https://nextjs.org/docs/basic-features/typescript for more information.
// see https://nextjs.org/docs/pages/building-your-application/configuring/typescript for more information.
56 changes: 28 additions & 28 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -72,69 +72,69 @@
"commercelayer"
],
"dependencies": {
"@commercelayer/js-auth": "^6.3.1",
"@commercelayer/organization-config": "^1.4.8",
"@commercelayer/react-components": "^4.15.5",
"@commercelayer/sdk": "^6.9.0",
"@faker-js/faker": "^8.4.1",
"@commercelayer/js-auth": "^6.5.0",
"@commercelayer/organization-config": "^1.4.9",
"@commercelayer/react-components": "4.15.7",
"@commercelayer/sdk": "6.11.0",
"@faker-js/faker": "^9.0.0",
"@headlessui/react": "^1.7.19",
"@next/bundle-analyzer": "^14.2.5",
"@next/eslint-plugin-next": "^14.2.5",
"@playwright/test": "1.45.3",
"@next/bundle-analyzer": "^14.2.11",
"@next/eslint-plugin-next": "^14.2.11",
"@playwright/test": "1.47.0",
"@tailwindcss/forms": "^0.5.7",
"@types/async-retry": "1.4.8",
"@types/node": "^22.0.0",
"@types/react": "^18.3.3",
"@types/node": "^22.5.4",
"@types/react": "^18.3.5",
"@types/react-gtm-module": "^2.0.3",
"@types/styled-components": "^5.1.34",
"async-retry": "^1.3.3",
"autoprefixer": "^10.4.19",
"autoprefixer": "^10.4.20",
"babel-plugin-macros": "^3.1.0",
"babel-plugin-styled-components": "^2.1.4",
"classnames": "^2.5.1",
"cron-parser": "^4.9.0",
"cronstrue": "^2.50.0",
"dotenv": "^16.4.5",
"i18next": "^23.12.2",
"next": "^14.2.5",
"i18next": "^23.15.1",
"next": "^14.2.11",
"next-build-id": "^3.0.0",
"next-i18next": "^15.3.1",
"postcss": "^8.4.40",
"postcss": "^8.4.45",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react-gtm-module": "^2.0.11",
"react-i18next": "^15.0.0",
"react-router-dom": "^6.25.1",
"styled-components": "^6.1.12",
"tailwindcss": "^3.4.7",
"react-i18next": "^15.0.1",
"react-router-dom": "^6.26.2",
"styled-components": "^6.1.13",
"tailwindcss": "^3.4.11",
"twin.macro": "^3.4.1",
"typescript": "^5.5.4"
"typescript": "^5.6.2"
},
"devDependencies": {
"@semantic-release/changelog": "^6.0.3",
"@semantic-release/commit-analyzer": "^13.0.0",
"@semantic-release/git": "^10.0.1",
"@semantic-release/github": "^10.1.3",
"@semantic-release/github": "^10.3.3",
"@semantic-release/npm": "^12.0.1",
"@semantic-release/release-notes-generator": "^14.0.1",
"@typescript-eslint/eslint-plugin": "^7.18.0",
"@typescript-eslint/parser": "^7.18.0",
"eslint": "^8.57.0",
"eslint-config-next": "^14.2.5",
"eslint-config-next": "^14.2.11",
"eslint-config-prettier": "^9.1.0",
"eslint-config-standard": "^17.1.0",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-n": "^17.10.1",
"eslint-plugin-import": "^2.30.0",
"eslint-plugin-n": "^17.10.2",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-prettier": "^5.2.1",
"eslint-plugin-promise": "^6.4.0",
"eslint-plugin-react": "^7.35.0",
"eslint-plugin-react": "^7.36.1",
"eslint-plugin-tailwind": "^0.2.1",
"npm-check-updates": "^16.14.20",
"npm-check-updates": "^17.1.1",
"prettier": "^3.3.3",
"semantic-release": "^24.0.0",
"semantic-release": "^24.1.1",
"serve": "^14.2.3",
"stylelint": "^16.8.1",
"stylelint": "^16.9.0",
"stylelint-config-standard": "^36.0.1"
},
"resolutions": {
Expand All @@ -150,4 +150,4 @@
"cacheDirectories": [
".next/cache"
]
}
}
Loading
Loading