You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+17-5Lines changed: 17 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -301,6 +301,14 @@ For example to check if all Japanese translation keys are up-to-date, run:
301
301
pnpm i18n:check ja-JP
302
302
```
303
303
304
+
To automatically add missing keys with English placeholders, use `--fix`:
305
+
306
+
```bash
307
+
pnpm i18n:check:fix fr-FR
308
+
```
309
+
310
+
This will add missing keys with `"EN TEXT TO REPLACE: {english text}"` as placeholder values, making it easier to see what needs translation.
311
+
304
312
#### Country variants (advanced)
305
313
306
314
Most languages only need a single locale file. Country variants are only needed when you want to support regional differences (e.g., `es-ES` for Spain vs `es-419` for Latin America).
@@ -361,13 +369,17 @@ We recommend the [i18n-ally](https://marketplace.visualstudio.com/items?itemName
361
369
362
370
The extension is included in our workspace recommendations, so VSCode should prompt you to install it.
363
371
364
-
### Formatting with locale
372
+
### Formatting numbers and dates
365
373
366
-
When formatting numbers or dates that should respect the user's locale, pass the locale:
374
+
Use vue-i18n's built-in formatters for locale-aware formatting:
367
375
368
-
```typescript
369
-
const { locale } =useI18n()
370
-
const formatted =formatNumber(12345, locale.value) // "12,345" in en-US
0 commit comments