Skip to content

Commit c6478c2

Browse files
i18n: new crowdin translations (#2138)
Co-authored-by: Crowdin Bot <support+bot@crowdin.com>
1 parent 7fb7fe1 commit c6478c2

11 files changed

Lines changed: 412 additions & 16 deletions

File tree

_data/fr/footer.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
terms_of_use: Terms of Use
2-
privacy_policy: Privacy Policy
3-
coc: Code of Conduct
4-
trademark_policy: Trademark Policy
5-
security_policy: Security Policy
6-
license: License
1+
terms_of_use: Conditions d’utilisation
2+
privacy_policy: Politique de Confidentialité
3+
coc: Code de Conduite
4+
trademark_policy: Politique de Marque
5+
security_policy: Politique de Sécurité
6+
license: Licence

de/guide/migrating-5.md

Lines changed: 45 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ You can find the list of available codemods [here](https://github.com/expressjs/
7272
<li><a href="#app.router">app.router</a></li>
7373
<li><a href="#req.body">req.body</a></li>
7474
<li><a href="#req.host">req.host</a></li>
75+
<li><a href="#req.params">req.params</a></li>
7576
<li><a href="#req.query">req.query</a></li>
7677
<li><a href="#res.clearCookie">res.clearCookie</a></li>
7778
<li><a href="#res.status">res.status</a></li>
@@ -512,14 +513,57 @@ const server = app.listen(8080, '0.0.0.0', (error) => {
512513

513514
Das Objekt `app.router`, das in Express 4 entfernt wurde, ist in Express 5 wieder verfügbar. In der neuen Version fungiert dieses Objekt nur als Referenz zum Express-Basisrouter – im Gegensatz zu Express 3, wo die Anwendung dieses Objekt explizit laden musste.
514515

515-
<h3 id="req.body">req.body</h3>
516+
<h3 id="req.body">req.body</h3>
516517

517518
The `req.body` property returns `undefined` when the body has not been parsed. In Express 4, it returns `{}` by default.
518519

519520
<h3 id="req.host">req.host</h3>
520521

521522
In Express 4 übergab die Funktion `req.host` nicht ordnungsgemäß eine eventuell vorhandene Portnummer. In Express 5 wird die Portnummer beibehalten.
522523

524+
<h3 id="req.params">req.params</h3>
525+
526+
The `req.params` object now has a **null prototype** when using string paths. However, if the path is defined with a regular expression, `req.params` remains a standard object with a normal prototype. Additionally, there are two important behavioral changes:
527+
528+
**Wildcard parameters are now arrays:**
529+
530+
Wildcards (e.g., `/*splat`) capture path segments as an array instead of a single string.
531+
532+
```js
533+
app.get('/*splat', (req, res) => {
534+
// GET /foo/bar
535+
console.dir(req.params)
536+
// => [Object: null prototype] { splat: [ 'foo', 'bar' ] }
537+
})
538+
```
539+
540+
**Unmatched parameters are omitted:**
541+
542+
In Express 4, unmatched wildcards were empty strings (`''`) and optional `:` parameters (using `?`) had a key with value `undefined`. In Express 5, unmatched parameters are completely omitted from `req.params`.
543+
544+
```js
545+
// v4: unmatched wildcard is empty string
546+
app.get('/*', (req, res) => {
547+
// GET /
548+
console.dir(req.params)
549+
// => { '0': '' }
550+
})
551+
552+
// v4: unmatched optional param is undefined
553+
app.get('/:file.:ext?', (req, res) => {
554+
// GET /image
555+
console.dir(req.params)
556+
// => { file: 'image', ext: undefined }
557+
})
558+
559+
// v5: unmatched optional param is omitted
560+
app.get('/:file{.:ext}', (req, res) => {
561+
// GET /image
562+
console.dir(req.params)
563+
// => [Object: null prototype] { file: 'image' }
564+
})
565+
```
566+
523567
<h3 id="req.query">req.query</h3>
524568

525569
The `req.query` property is no longer a writable property and is instead a getter. The default query parser has been changed from "extended" to "simple".

es/guide/migrating-5.md

Lines changed: 45 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ You can find the list of available codemods [here](https://github.com/expressjs/
7272
<li><a href="#app.router">app.router</a></li>
7373
<li><a href="#req.body">req.body</a></li>
7474
<li><a href="#req.host">req.host</a></li>
75+
<li><a href="#req.params">req.params</a></li>
7576
<li><a href="#req.query">req.query</a></li>
7677
<li><a href="#res.clearCookie">res.clearCookie</a></li>
7778
<li><a href="#res.status">res.status</a></li>
@@ -512,14 +513,57 @@ const server = app.listen(8080, '0.0.0.0', (error) => {
512513

513514
El objeto `app.router`, que se ha eliminado en Express 4, ha vuelto en Express 5. En la nueva versión, este objeto es sólo una referencia al direccionador de Express base, a diferencia de en Express 3, donde una aplicación debía cargarlo explícitamente.
514515

515-
<h3 id="req.body">req.body</h3>
516+
<h3 id="req.body">req.body</h3>
516517

517518
The `req.body` property returns `undefined` when the body has not been parsed. In Express 4, it returns `{}` by default.
518519

519520
<h3 id="req.host">req.host</h3>
520521

521522
En Express 4, la función `req.host` fragmentaba incorrectamente el número de puerto si estaba presente. In Express 5, the port number is maintained.
522523

524+
<h3 id="req.params">req.params</h3>
525+
526+
The `req.params` object now has a **null prototype** when using string paths. However, if the path is defined with a regular expression, `req.params` remains a standard object with a normal prototype. Additionally, there are two important behavioral changes:
527+
528+
**Wildcard parameters are now arrays:**
529+
530+
Wildcards (e.g., `/*splat`) capture path segments as an array instead of a single string.
531+
532+
```js
533+
app.get('/*splat', (req, res) => {
534+
// GET /foo/bar
535+
console.dir(req.params)
536+
// => [Object: null prototype] { splat: [ 'foo', 'bar' ] }
537+
})
538+
```
539+
540+
**Unmatched parameters are omitted:**
541+
542+
In Express 4, unmatched wildcards were empty strings (`''`) and optional `:` parameters (using `?`) had a key with value `undefined`. In Express 5, unmatched parameters are completely omitted from `req.params`.
543+
544+
```js
545+
// v4: unmatched wildcard is empty string
546+
app.get('/*', (req, res) => {
547+
// GET /
548+
console.dir(req.params)
549+
// => { '0': '' }
550+
})
551+
552+
// v4: unmatched optional param is undefined
553+
app.get('/:file.:ext?', (req, res) => {
554+
// GET /image
555+
console.dir(req.params)
556+
// => { file: 'image', ext: undefined }
557+
})
558+
559+
// v5: unmatched optional param is omitted
560+
app.get('/:file{.:ext}', (req, res) => {
561+
// GET /image
562+
console.dir(req.params)
563+
// => [Object: null prototype] { file: 'image' }
564+
})
565+
```
566+
523567
<h3 id="req.query">req.query</h3>
524568

525569
The `req.query` property is no longer a writable property and is instead a getter. The default query parser has been changed from "extended" to "simple".

fr/guide/migrating-5.md

Lines changed: 45 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ nom pour app.param(name, fn)</a></li>
8181
<li><a href="#app.router">app.router</a></li>
8282
<li><a href="#req.body">req.body</a></li>
8383
<li><a href="#req.host">req.host</a></li>
84+
<li><a href="#req.params">req.params</a></li>
8485
<li><a href="#req.query">req.query</a></li>
8586
<li><a href="#res.clearCookie">res.clearCookie</a></li>
8687
<li><a href="#res.status">res.status</a></li>
@@ -567,7 +568,7 @@ const server = app.listen(8080, '0.0.0.0', (error) => {
567568
L'objet `app.router`, qui a été supprimé dans Express 4, est revenu dans Express 5. Dans la version, cet objet
568569
n'est qu'une référence dans le routeur Express de base, contrairement à Express 3, où une application devait le charger explicitement.
569570

570-
<h3 id="req.body">req.body</h3>
571+
<h3 id="req.body">req.body</h3>
571572

572573
The `req.body` property returns `undefined` when the body has not been parsed. In Express 4, it returns `{}` by default.
573574

@@ -576,6 +577,49 @@ The `req.body` property returns `undefined` when the body has not been parsed. I
576577
Dans Express 4, la `req.host` retirait de
577578
manière incorrecte le numéro de port s'il était présent. Dans Express 5, ce numéro de port est conservé.
578579

580+
<h3 id="req.params">req.params</h3>
581+
582+
The `req.params` object now has a **null prototype** when using string paths. However, if the path is defined with a regular expression, `req.params` remains a standard object with a normal prototype. Additionally, there are two important behavioral changes:
583+
584+
**Wildcard parameters are now arrays:**
585+
586+
Wildcards (e.g., `/*splat`) capture path segments as an array instead of a single string.
587+
588+
```js
589+
app.get('/*splat', (req, res) => {
590+
// GET /foo/bar
591+
console.dir(req.params)
592+
// => [Object: null prototype] { splat: [ 'foo', 'bar' ] }
593+
})
594+
```
595+
596+
**Unmatched parameters are omitted:**
597+
598+
In Express 4, unmatched wildcards were empty strings (`''`) and optional `:` parameters (using `?`) had a key with value `undefined`. In Express 5, unmatched parameters are completely omitted from `req.params`.
599+
600+
```js
601+
// v4: unmatched wildcard is empty string
602+
app.get('/*', (req, res) => {
603+
// GET /
604+
console.dir(req.params)
605+
// => { '0': '' }
606+
})
607+
608+
// v4: unmatched optional param is undefined
609+
app.get('/:file.:ext?', (req, res) => {
610+
// GET /image
611+
console.dir(req.params)
612+
// => { file: 'image', ext: undefined }
613+
})
614+
615+
// v5: unmatched optional param is omitted
616+
app.get('/:file{.:ext}', (req, res) => {
617+
// GET /image
618+
console.dir(req.params)
619+
// => [Object: null prototype] { file: 'image' }
620+
})
621+
```
622+
579623
<h3 id="req.query">req.query</h3>
580624

581625
The `req.query` property is no longer a writable property and is instead a getter. The default query parser has been changed from "extended" to "simple".

fr/guide/routing.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ _Routage_ fait référence à la définition de points finaux d'application (URI
1313
Pour une introduction au routage, voir [Basic routing](/{{ page.lang }}/starter/basic-routing.html).
1414

1515
Vous définissez le routage à l’aide des méthodes de l’objet app d’Express correspondant aux méthodes HTTP :
16-
par exemple, `app.get()` pour les requêtes GET et \`app.post pour les requêtes POST. Pour la liste complète,
16+
par exemple, `app.get()` pour les requêtes GET et `app.post` pour les requêtes POST. Pour la liste complète,
1717
voir [app.METHOD](/{{ page.lang }}/5x/api.html#app.METHOD). Vous pouvez également utiliser [app.all()](/{{ page.lang }}/5x/api.html#app.all) pour gérer toutes les méthodes HTTP et [app.use()](/{{ page.lang }}/5x/api.html#app.use) spécifier le middleware comme fonction de rappel (Voir [Utilisation du middleware](/{{ page.lang }}/guide/using-middleware.html) pour plus de détails).
1818

1919
Ces méthodes de routage spécifient une fonction de rappel (parfois "appelée fonction de gestion") qui est appelée lorsque l'application reçoit une requête correspondant à la route (point de terminaison) et à la méthode HTTP spécifiées. Autrement dit, l'application "écoute" les requêtes qui correspondent à la ou aux routes et à la ou aux méthodes spécifiées, et lorsqu'une correspondance est détectée, elle appelle la fonction de rappel définie.

it/guide/migrating-5.md

Lines changed: 45 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ You can find the list of available codemods [here](https://github.com/expressjs/
7272
<li><a href="#app.router">app.router</a></li>
7373
<li><a href="#req.body">req.body</a></li>
7474
<li><a href="#req.host">req.host</a></li>
75+
<li><a href="#req.params">req.params</a></li>
7576
<li><a href="#req.query">req.query</a></li>
7677
<li><a href="#res.clearCookie">res.clearCookie</a></li>
7778
<li><a href="#res.status">res.status</a></li>
@@ -512,14 +513,57 @@ const server = app.listen(8080, '0.0.0.0', (error) => {
512513

513514
L'oggetto `app.router`, che era stato rimosso in Express 4, è ritornato in Express 5. Nella nuova versione, questo oggetto è solo un riferimento al router Express di base, diversamente da Express 3, in cui un'applicazione aveva il compito esplicito di caricarlo.
514515

515-
<h3 id="req.body">req.body</h3>
516+
<h3 id="req.body">req.body</h3>
516517

517518
The `req.body` property returns `undefined` when the body has not been parsed. In Express 4, it returns `{}` by default.
518519

519520
<h3 id="req.host">req.host</h3>
520521

521522
In Express 4, la funzione `req.host` andava a rimuovere in modo non corretto il numero porta nel caso fosse stato presente. In Express 5 il numero porta viene conservato.
522523

524+
<h3 id="req.params">req.params</h3>
525+
526+
The `req.params` object now has a **null prototype** when using string paths. However, if the path is defined with a regular expression, `req.params` remains a standard object with a normal prototype. Additionally, there are two important behavioral changes:
527+
528+
**Wildcard parameters are now arrays:**
529+
530+
Wildcards (e.g., `/*splat`) capture path segments as an array instead of a single string.
531+
532+
```js
533+
app.get('/*splat', (req, res) => {
534+
// GET /foo/bar
535+
console.dir(req.params)
536+
// => [Object: null prototype] { splat: [ 'foo', 'bar' ] }
537+
})
538+
```
539+
540+
**Unmatched parameters are omitted:**
541+
542+
In Express 4, unmatched wildcards were empty strings (`''`) and optional `:` parameters (using `?`) had a key with value `undefined`. In Express 5, unmatched parameters are completely omitted from `req.params`.
543+
544+
```js
545+
// v4: unmatched wildcard is empty string
546+
app.get('/*', (req, res) => {
547+
// GET /
548+
console.dir(req.params)
549+
// => { '0': '' }
550+
})
551+
552+
// v4: unmatched optional param is undefined
553+
app.get('/:file.:ext?', (req, res) => {
554+
// GET /image
555+
console.dir(req.params)
556+
// => { file: 'image', ext: undefined }
557+
})
558+
559+
// v5: unmatched optional param is omitted
560+
app.get('/:file{.:ext}', (req, res) => {
561+
// GET /image
562+
console.dir(req.params)
563+
// => [Object: null prototype] { file: 'image' }
564+
})
565+
```
566+
523567
<h3 id="req.query">req.query</h3>
524568

525569
The `req.query` property is no longer a writable property and is instead a getter. The default query parser has been changed from "extended" to "simple".

ja/guide/migrating-5.md

Lines changed: 45 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ You can find the list of available codemods [here](https://github.com/expressjs/
7272
<li><a href="#app.router">app.router</a></li>
7373
<li><a href="#req.body">req.body</a></li>
7474
<li><a href="#req.host">req.host</a></li>
75+
<li><a href="#req.params">req.params</a></li>
7576
<li><a href="#req.query">req.query</a></li>
7677
<li><a href="#res.clearCookie">res.clearCookie</a></li>
7778
<li><a href="#res.status">res.status</a></li>
@@ -512,14 +513,57 @@ const server = app.listen(8080, '0.0.0.0', (error) => {
512513

513514
`app.router` オブジェクトは、Express 4 で削除されましたが、Express 5 で復帰しました。アプリケーションが明示的にロードする必要があった Express 3 とは異なり、新しいバージョンでは、このオブジェクトは基本の Express ルーターの単なる参照です。 In the new version, this object is a just a reference to the base Express router, unlike in Express 3, where an app had to explicitly load it.
514515

515-
<h3 id="req.body">req.body</h3>
516+
<h3 id="req.body">req.body</h3>
516517

517518
The `req.body` property returns `undefined` when the body has not been parsed. In Express 4, it returns `{}` by default.
518519

519520
<h3 id="req.host">req.host</h3>
520521

521522
Express 4 では、`req.host` 関数は、ポート番号が存在する場合に、ポート番号を誤って削除していました。Express 5 では、ポート番号は維持されます。 In Express 5, the port number is maintained.
522523

524+
<h3 id="req.params">req.params</h3>
525+
526+
The `req.params` object now has a **null prototype** when using string paths. However, if the path is defined with a regular expression, `req.params` remains a standard object with a normal prototype. Additionally, there are two important behavioral changes:
527+
528+
**Wildcard parameters are now arrays:**
529+
530+
Wildcards (e.g., `/*splat`) capture path segments as an array instead of a single string.
531+
532+
```js
533+
app.get('/*splat', (req, res) => {
534+
// GET /foo/bar
535+
console.dir(req.params)
536+
// => [Object: null prototype] { splat: [ 'foo', 'bar' ] }
537+
})
538+
```
539+
540+
**Unmatched parameters are omitted:**
541+
542+
In Express 4, unmatched wildcards were empty strings (`''`) and optional `:` parameters (using `?`) had a key with value `undefined`. In Express 5, unmatched parameters are completely omitted from `req.params`.
543+
544+
```js
545+
// v4: unmatched wildcard is empty string
546+
app.get('/*', (req, res) => {
547+
// GET /
548+
console.dir(req.params)
549+
// => { '0': '' }
550+
})
551+
552+
// v4: unmatched optional param is undefined
553+
app.get('/:file.:ext?', (req, res) => {
554+
// GET /image
555+
console.dir(req.params)
556+
// => { file: 'image', ext: undefined }
557+
})
558+
559+
// v5: unmatched optional param is omitted
560+
app.get('/:file{.:ext}', (req, res) => {
561+
// GET /image
562+
console.dir(req.params)
563+
// => [Object: null prototype] { file: 'image' }
564+
})
565+
```
566+
523567
<h3 id="req.query">req.query</h3>
524568

525569
The `req.query` property is no longer a writable property and is instead a getter. The default query parser has been changed from "extended" to "simple".

0 commit comments

Comments
 (0)