Skip to content

Commit c2106f9

Browse files
i18n: new crowdin translations (#2158)
Co-authored-by: Crowdin Bot <support+bot@crowdin.com>
1 parent f31a7d4 commit c2106f9

9 files changed

Lines changed: 397 additions & 154 deletions

File tree

de/guide/migrating-5.md

Lines changed: 44 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -28,16 +28,16 @@ To help you migrate your express server, we have created a set of codemods that
2828
Run the following command for run all the codemods available:
2929

3030
```sh
31-
npx @expressjs/codemod upgrade
31+
npx codemod@latest @expressjs/v5-migration-recipe
3232
```
3333

3434
If you want to run a specific codemod, you can run the following command:
3535

3636
```sh
37-
npx @expressjs/codemod name-of-the-codemod
37+
npx codemod@latest @expressjs/name-of-the-codemod
3838
```
3939

40-
You can find the list of available codemods [here](https://github.com/expressjs/codemod?tab=readme-ov-file#available-codemods).
40+
You can find the list of available codemods [here](https://codemod.link/express).
4141

4242
<h2 id="changes">Änderungen in Express 5</h2>
4343

@@ -96,16 +96,16 @@ Express 5 unterstützt die Funktion `app.del()` nicht mehr. Wenn Sie diese Funkt
9696

9797
Anfänglich wurde `del` statt `delete` verwendet, weil `delete` in JavaScript ein reserviertes Schlüsselwort ist. Ab ECMAScript 6 jedoch können `delete` und andere reservierte Schlüsselwörter legal als Eigenschaftsnamen verwendet werden.
9898

99-
{% capture codemod-deprecated-signatures %}
99+
{% capture codemod-route-del-to-delete %}
100100
You can replace the deprecated signatures with the following command:
101101

102102
```plain-text
103-
npx @expressjs/codemod v4-deprecated-signatures
103+
npx codemod@latest @expressjs/route-del-to-delete
104104
```
105105

106106
{% endcapture %}
107107

108-
{% include admonitions/note.html content=codemod-deprecated-signatures %}
108+
{% include admonitions/note.html content=codemod-route-del-to-delete %}
109109

110110
```js
111111
// v4
@@ -137,7 +137,7 @@ Die folgenden Methodennamen wurden pluralisiert. In Express 4 wurde bei Verwendu
137137
You can replace the deprecated signatures with the following command:
138138

139139
```plain-text
140-
npx @expressjs/codemod pluralized-methods
140+
npx codemod@latest @expressjs/pluralize-method-names
141141
```
142142

143143
{% endcapture %}
@@ -178,7 +178,7 @@ Dieses potenziell verwirrende und durchaus riskante Verfahren des Abrufens von F
178178
You can replace the deprecated signatures with the following command:
179179

180180
```plain-text
181-
npx @expressjs/codemod req-param
181+
npx codemod@latest @expressjs/explicit-request-params
182182
```
183183

184184
{% endcapture %}
@@ -209,7 +209,16 @@ app.post('/user', (req, res) => {
209209

210210
Express 5 unterstützt die Signatur `res.json(obj, status)` nicht mehr. Stattdessen müssen Sie den Status festlegen und diesen dann mit `res.json()`-Methoden wie dieser verketten: `res.status(status).json(obj)`.
211211

212-
{% include admonitions/note.html content=codemod-deprecated-signatures %}
212+
{% capture codemod-status-send-order %}
213+
You can replace the deprecated signatures with the following command:
214+
215+
```plain-text
216+
npx codemod@latest @expressjs/status-send-order
217+
```
218+
219+
{% endcapture %}
220+
221+
{% include admonitions/note.html content=codemod-status-send-order %}
213222

214223
```js
215224
// v4
@@ -227,7 +236,7 @@ app.post('/user', (req, res) => {
227236

228237
Express 5 unterstützt die Signatur `res.jsonp(obj, status)` nicht mehr. Stattdessen müssen Sie den Status festlegen und diesen dann mit `res.jsonp()`-Methoden wie dieser verketten: `res.status(status).jsonp(obj)`.
229238

230-
{% include admonitions/note.html content=codemod-deprecated-signatures %}
239+
{% include admonitions/note.html content=codemod-status-send-order %}
231240

232241
```js
233242
// v4
@@ -245,7 +254,16 @@ app.post('/user', (req, res) => {
245254

246255
Express 5 unterstützt die Signatur `res.send(obj, status)` nicht mehr. Stattdessen müssen Sie den Status festlegen und diesen dann mit `res.send()`-Methoden wie dieser verketten: `res.status(status).send(obj)`.
247256

248-
{% include admonitions/note.html content=codemod-deprecated-signatures %}
257+
{% capture codemod-redirect-arg-order %}
258+
You can replace the deprecated signatures with the following command:
259+
260+
```plain-text
261+
npx codemod@latest @expressjs/redirect-arg-order
262+
```
263+
264+
{% endcapture %}
265+
266+
{% include admonitions/note.html content=codemod-redirect-arg-order %}
249267

250268
```js
251269
// v4
@@ -263,16 +281,16 @@ app.get('/user', (req, res) => {
263281

264282
Express 5 no longer supports the magic string `back` in the `res.redirect()` and `res.location()` methods. Instead, use the `req.get('Referrer') || '/'` value to redirect back to the previous page. In Express 4, the `res.redirect('back')` and `res.location('back')` methods were deprecated.
265283

266-
{% capture codemod-magic-redirect %}
284+
{% capture codemod-back-redirect-deprecated %}
267285
You can replace the deprecated signatures with the following command:
268286

269287
```plain-text
270-
npx @expressjs/codemod magic-redirect
288+
npx codemod@latest @expressjs/back-redirect-deprecated
271289
```
272290

273291
{% endcapture %}
274292

275-
{% include admonitions/note.html content=codemod-magic-redirect %}
293+
{% include admonitions/note.html content=codemod-back-redirect-deprecated %}
276294

277295
```js
278296
// v4
@@ -290,7 +308,7 @@ app.get('/user', (req, res) => {
290308

291309
Express 5 no longer supports the signature `res.send(obj, status)`. Instead, set the status and then chain it to the `res.send()` method like this: `res.status(status).send(obj)`.
292310

293-
{% include admonitions/note.html content=codemod-deprecated-signatures %}
311+
{% include admonitions/note.html content=codemod-status-send-order %}
294312

295313
```js
296314
// v4
@@ -309,7 +327,7 @@ app.get('/user', (req, res) => {
309327
Express 5 unterstützt die Signatur <code>res.send(<em>status</em>)</code>, nicht mehr, wobei _`status`_ für eine Zahl steht. Verwenden Sie stattdessen die Funktion `res.sendStatus(statusCode)`, mit der der Statuscode für den HTTP-Antwort-Header festgelegt und die Textversion des Codes gesendet wird: "Not Found" (Nicht gefunden), "Internal Server Error" (Interner Serverfehler) usw.
310328
Wenn Sie eine Zahl senden und hierfür die Funktion `res.send()` verwenden müssen, müssen Sie die Zahl in Anführungszeichen setzen, um diese in eine Zeichenfolge zu konvertieren. Dadurch interpretiert Express diese Zahl nicht als Versuch, die nicht mehr unterstützte alte Signatur zu verwenden.
311329

312-
{% include admonitions/note.html content=codemod-deprecated-signatures %}
330+
{% include admonitions/note.html content=codemod-status-send-order %}
313331

314332
```js
315333
// v4
@@ -336,7 +354,16 @@ Die Funktion `res.sendfile()` wurde durch eine Version in Camel-Schreibweise von
336354
- Font files (.woff): now "font/woff" instead of "application/font-woff"
337355
- SVG files (.svg): now "image/svg+xml" instead of "application/svg+xml"
338356

339-
{% include admonitions/note.html content=codemod-deprecated-signatures %}
357+
{% capture codemod-camelcase-sendfile %}
358+
You can replace the deprecated signatures with the following command:
359+
360+
```plain-text
361+
npx codemod@latest @expressjs/camelcase-sendfile
362+
```
363+
364+
{% endcapture %}
365+
366+
{% include admonitions/note.html content=codemod-camelcase-sendfile %}
340367

341368
```js
342369
// v4

es/guide/migrating-5.md

Lines changed: 44 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -28,16 +28,16 @@ To help you migrate your express server, we have created a set of codemods that
2828
Run the following command for run all the codemods available:
2929

3030
```sh
31-
npx @expressjs/codemod upgrade
31+
npx codemod@latest @expressjs/v5-migration-recipe
3232
```
3333

3434
If you want to run a specific codemod, you can run the following command:
3535

3636
```sh
37-
npx @expressjs/codemod name-of-the-codemod
37+
npx codemod@latest @expressjs/name-of-the-codemod
3838
```
3939

40-
You can find the list of available codemods [here](https://github.com/expressjs/codemod?tab=readme-ov-file#available-codemods).
40+
You can find the list of available codemods [here](https://codemod.link/express).
4141

4242
<h2 id="changes">Changes in Express 5</h2>
4343

@@ -96,16 +96,16 @@ Express 5 ya no da soporte a la función `app.del()`. Si utiliza esta función,
9696

9797
Inicialmente, se utilizaba `del` en lugar de `delete`, porque `delete` es una palabra clave reservada en JavaScript. No obstante, a partir de ECMAScript 6, `delete` y otras palabras clave reservadas pueden utilizarse correctamente como nombres de propiedad.
9898

99-
{% capture codemod-deprecated-signatures %}
99+
{% capture codemod-route-del-to-delete %}
100100
You can replace the deprecated signatures with the following command:
101101

102102
```plain-text
103-
npx @expressjs/codemod v4-deprecated-signatures
103+
npx codemod@latest @expressjs/route-del-to-delete
104104
```
105105

106106
{% endcapture %}
107107

108-
{% include admonitions/note.html content=codemod-deprecated-signatures %}
108+
{% include admonitions/note.html content=codemod-route-del-to-delete %}
109109

110110
```js
111111
// v4
@@ -137,7 +137,7 @@ Los siguientes nombres de métodos se han pluralizado. En Express 4, el uso de l
137137
You can replace the deprecated signatures with the following command:
138138

139139
```plain-text
140-
npx @expressjs/codemod pluralized-methods
140+
npx codemod@latest @expressjs/pluralize-method-names
141141
```
142142

143143
{% endcapture %}
@@ -178,7 +178,7 @@ Este método potencialmente confuso y peligroso de recuperar datos de formulario
178178
You can replace the deprecated signatures with the following command:
179179

180180
```plain-text
181-
npx @expressjs/codemod req-param
181+
npx codemod@latest @expressjs/explicit-request-params
182182
```
183183

184184
{% endcapture %}
@@ -209,7 +209,16 @@ app.post('/user', (req, res) => {
209209

210210
Express 5 ya no da soporte a la firma `res.json(obj, status)`. En su lugar, establezca el estado y encadénelo al método `res.json()` de la siguiente manera: `res.status(status).json(obj)`.
211211

212-
{% include admonitions/note.html content=codemod-deprecated-signatures %}
212+
{% capture codemod-status-send-order %}
213+
You can replace the deprecated signatures with the following command:
214+
215+
```plain-text
216+
npx codemod@latest @expressjs/status-send-order
217+
```
218+
219+
{% endcapture %}
220+
221+
{% include admonitions/note.html content=codemod-status-send-order %}
213222

214223
```js
215224
// v4
@@ -227,7 +236,7 @@ app.post('/user', (req, res) => {
227236

228237
Express 5 ya no da soporte a la firma `res.jsonp(obj, status)`. En su lugar, establezca el estado y encadénelo al método `res.jsonp()` de la siguiente manera: `res.status(status).jsonp(obj)`.
229238

230-
{% include admonitions/note.html content=codemod-deprecated-signatures %}
239+
{% include admonitions/note.html content=codemod-status-send-order %}
231240

232241
```js
233242
// v4
@@ -245,7 +254,16 @@ app.post('/user', (req, res) => {
245254

246255
Express 5 ya no da soporte a la firma `res.send(obj, status)`. En su lugar, establezca el estado y encadénelo al método `res.send()` de la siguiente manera: `res.status(status).send(obj)`.
247256

248-
{% include admonitions/note.html content=codemod-deprecated-signatures %}
257+
{% capture codemod-redirect-arg-order %}
258+
You can replace the deprecated signatures with the following command:
259+
260+
```plain-text
261+
npx codemod@latest @expressjs/redirect-arg-order
262+
```
263+
264+
{% endcapture %}
265+
266+
{% include admonitions/note.html content=codemod-redirect-arg-order %}
249267

250268
```js
251269
// v4
@@ -263,16 +281,16 @@ app.get('/user', (req, res) => {
263281

264282
Express 5 no longer supports the magic string `back` in the `res.redirect()` and `res.location()` methods. Instead, use the `req.get('Referrer') || '/'` value to redirect back to the previous page. In Express 4, the `res.redirect('back')` and `res.location('back')` methods were deprecated.
265283

266-
{% capture codemod-magic-redirect %}
284+
{% capture codemod-back-redirect-deprecated %}
267285
You can replace the deprecated signatures with the following command:
268286

269287
```plain-text
270-
npx @expressjs/codemod magic-redirect
288+
npx codemod@latest @expressjs/back-redirect-deprecated
271289
```
272290

273291
{% endcapture %}
274292

275-
{% include admonitions/note.html content=codemod-magic-redirect %}
293+
{% include admonitions/note.html content=codemod-back-redirect-deprecated %}
276294

277295
```js
278296
// v4
@@ -290,7 +308,7 @@ app.get('/user', (req, res) => {
290308

291309
Express 5 no longer supports the signature `res.send(obj, status)`. Instead, set the status and then chain it to the `res.send()` method like this: `res.status(status).send(obj)`.
292310

293-
{% include admonitions/note.html content=codemod-deprecated-signatures %}
311+
{% include admonitions/note.html content=codemod-status-send-order %}
294312

295313
```js
296314
// v4
@@ -309,7 +327,7 @@ app.get('/user', (req, res) => {
309327
Express 5 ya no da soporte a la firma <code>res.send(<em>status</em>)</code>, donde _`status`_ es un número. En su lugar, utilice la función `res.sendStatus(statusCode)`, que establece el código de estado de la cabecera de respuesta HTTP y envía la versión de texto del código: "Not Found", "Internal Server Error", etc.
310328
Si necesita enviar un número utilizando la función `res.send()`, escríbalo entre comillas para convertirlo en una serie, para que Express no lo interprete como un intento de utilizar la firma antigua no soportada.
311329

312-
{% include admonitions/note.html content=codemod-deprecated-signatures %}
330+
{% include admonitions/note.html content=codemod-status-send-order %}
313331

314332
```js
315333
// v4
@@ -336,7 +354,16 @@ La función `res.sendfile()` se ha sustituido por una versión de la función `r
336354
- Font files (.woff): now "font/woff" instead of "application/font-woff"
337355
- SVG files (.svg): now "image/svg+xml" instead of "application/svg+xml"
338356

339-
{% include admonitions/note.html content=codemod-deprecated-signatures %}
357+
{% capture codemod-camelcase-sendfile %}
358+
You can replace the deprecated signatures with the following command:
359+
360+
```plain-text
361+
npx codemod@latest @expressjs/camelcase-sendfile
362+
```
363+
364+
{% endcapture %}
365+
366+
{% include admonitions/note.html content=codemod-camelcase-sendfile %}
340367

341368
```js
342369
// v4

0 commit comments

Comments
 (0)