Fix unit formatting in number input
parent
9cbee7cc89
commit
e4cc4e5ef7
|
@ -206,15 +206,15 @@ jobs:
|
|||
path: |
|
||||
~/.cache/Cypress
|
||||
node_modules
|
||||
key: cypress-cache-${{ runner.os }}-${{ hashFiles('package-lock.json') }}
|
||||
key: cypress-cache-${{ runner.os }}-${{ hashFiles('package-lock.json', 'package.json') }}
|
||||
|
||||
- run: node site/scripts/get-cypress-packages.js | xargs npm i
|
||||
- run: node site/scripts/get-cypress-packages.js | xargs npm i --legacy-peer-deps
|
||||
|
||||
- name: Test e2e mon-entreprise on preview (site=${{ matrix.site }}, browser=${{ matrix.browser}}, viewport=${{ matrix.viewport }})
|
||||
uses: cypress-io/github-action@v2
|
||||
with:
|
||||
install: false
|
||||
working-directory: mon-entreprise
|
||||
working-directory: site
|
||||
record: true
|
||||
tag: ${{ needs.deploy-context.outputs.env-name }}_deploy
|
||||
config: integrationFolder=cypress/integration/${{ matrix.integrationFolder }},baseUrl=${{ matrix.baseUrl }}${{ matrix.viewport == 'small' && ',viewportHeight=740,viewportWidth=360' || '' }}
|
||||
|
@ -272,15 +272,15 @@ jobs:
|
|||
path: |
|
||||
~/.cache/Cypress
|
||||
node_modules
|
||||
key: cypress-cache-${{ runner.os }}-${{ hashFiles('package-lock.json') }}
|
||||
key: cypress-cache-${{ runner.os }}-${{ hashFiles('package-lock.json', 'package.json') }}
|
||||
|
||||
- run: node site/scripts/get-cypress-packages.js | xargs npm i
|
||||
- run: node site/scripts/get-cypress-packages.js | xargs npm i --legacy-peer-deps
|
||||
|
||||
- name: Test e2e mon-entreprise on production (site=${{ matrix.site }}, browser=${{ matrix.browser}}, viewport=${{ matrix.viewport }})
|
||||
uses: cypress-io/github-action@v2
|
||||
with:
|
||||
install: false
|
||||
working-directory: mon-entreprise
|
||||
working-directory: site
|
||||
record: true
|
||||
tag: ${{ needs.deploy-context.outputs.env-name }}_deploy
|
||||
config: integrationFolder=cypress/integration/${{ matrix.integrationFolder }},baseUrl=${{ matrix.baseUrl }}${{ matrix.viewport == 'small' && ',viewportHeight=740,viewportWidth=360' || '' }}
|
||||
|
|
|
@ -19,9 +19,9 @@ jobs:
|
|||
path: |
|
||||
~/.cache/Cypress
|
||||
node_modules
|
||||
key: cypress-cache-${{ runner.os }}-${{ hashFiles('package-lock.json') }}
|
||||
key: cypress-cache-${{ runner.os }}-${{ hashFiles('package-lock.json', 'package.json') }}
|
||||
|
||||
- run: node site/scripts/get-cypress-packages.js | xargs npm i
|
||||
- run: node site/scripts/get-cypress-packages.js | xargs npm i --legacy-peer-deps
|
||||
|
||||
- name: Test external integration
|
||||
uses: cypress-io/github-action@v2
|
||||
|
|
|
@ -64,7 +64,7 @@
|
|||
"eslint-config-prettier": "^4.0.0",
|
||||
"eslint-plugin-mocha": "^8.0.0",
|
||||
"eslint-plugin-react": "^7.12.4",
|
||||
"eslint-plugin-react-hooks": "^2.0.1",
|
||||
"eslint-plugin-react-hooks": "^4.3.0",
|
||||
"express": "^4.16.3",
|
||||
"file-loader": "^1.1.11",
|
||||
"html-loader": "^0.5.5",
|
||||
|
|
|
@ -110,7 +110,13 @@ function getSerializedUnit(
|
|||
|
||||
const formatUnit = getFormatUnit(unit)
|
||||
if (!formatUnit) {
|
||||
return t(serializeUnit(unit)?.replace('/', 'par')) ?? ''
|
||||
return (
|
||||
t(
|
||||
serializeUnit(unit)
|
||||
?.replace(/\/([^\s])/, '/ $1')
|
||||
.replace('/', 'par')
|
||||
) ?? ''
|
||||
)
|
||||
}
|
||||
return (
|
||||
Intl.NumberFormat(locale, {
|
||||
|
|
|
@ -6466,10 +6466,10 @@ eslint-plugin-mocha@^8.0.0:
|
|||
eslint-utils "^2.1.0"
|
||||
ramda "^0.27.1"
|
||||
|
||||
eslint-plugin-react-hooks@^2.0.1:
|
||||
version "2.5.1"
|
||||
resolved "https://registry.npmjs.org/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-2.5.1.tgz"
|
||||
integrity sha512-Y2c4b55R+6ZzwtTppKwSmK/Kar8AdLiC2f9NADCuxbcTgPPg41Gyqa6b9GppgXSvCtkRw43ZE86CT5sejKC6/g==
|
||||
eslint-plugin-react-hooks@^4.3.0:
|
||||
version "4.3.0"
|
||||
resolved "https://registry.npmjs.org/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-4.3.0.tgz"
|
||||
integrity sha512-XslZy0LnMn+84NEG9jSGR6eGqaZB3133L8xewQo3fQagbQuGt7a63gf+P1NGKZavEYEC3UXaWEAA/AqDkuN6xA==
|
||||
|
||||
eslint-plugin-react@^7.12.4:
|
||||
version "7.27.1"
|
||||
|
|
Loading…
Reference in New Issue