⚡ Add autocompletion for i18n keys in script sections of Vue files (#3133)
* 📘 Type `baseText()` to i18n keys * 📘 Adjust `baseText()` signature * 👕 Except JSON files from Vue ESLint * 🐛 Fix errors surfaced by `baseText()` typing * ⚡ Pluralize keys * 📘 Add typing for category names * ⚡ Mark internal keys * ✏️ Update docs references * 🎨 Prettify syntax * 🐛 Fix leftover internal key references
This commit is contained in:
@@ -34,14 +34,14 @@ When translating a string containing an interpolated variable, leave the variabl
|
||||
|
||||
### Reusable base text
|
||||
|
||||
As a convenience, the base text file may contain the special key `reusableBaseText`, which defines strings that can be shared among other strings with the syntax `@:reusableBaseText.key`, as follows:
|
||||
As a convenience, the base text file may contain the special key `_reusableBaseText`, which defines strings that can be shared among other strings with the syntax `@:_reusableBaseText.key`, as follows:
|
||||
|
||||
```json
|
||||
{
|
||||
"reusableBaseText.save": "🇩🇪 Save",
|
||||
"_reusableBaseText.save": "🇩🇪 Save",
|
||||
"duplicateWorkflowDialog.enterWorkflowName": "🇩🇪 Enter workflow name",
|
||||
"duplicateWorkflowDialog.save": "@:reusableBaseText.save",
|
||||
"saveButton.save": "@:reusableBaseText.save",
|
||||
"duplicateWorkflowDialog.save": "@:_reusableBaseText.save",
|
||||
"saveButton.save": "@:_reusableBaseText.save",
|
||||
"saveButton.saving": "🇩🇪 Saving",
|
||||
"saveButton.saved": "🇩🇪 Saved",
|
||||
}
|
||||
@@ -92,8 +92,8 @@ Currently only the keys `oauth.clientId` and `oauth.clientSecret` are supported
|
||||
|
||||
```json
|
||||
{
|
||||
"reusableDynamicText.oauth2.clientId": "🇩🇪 Client ID",
|
||||
"reusableDynamicText.oauth2.clientSecret": "🇩🇪 Client Secret",
|
||||
"_reusableDynamicText.oauth2.clientId": "🇩🇪 Client ID",
|
||||
"_reusableDynamicText.oauth2.clientSecret": "🇩🇪 Client Secret",
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
Reference in New Issue
Block a user