Skip to content

Commit 5dba63f

Browse files
committed
Update Qwik to 1.4.3 & docs
1 parent b2d9703 commit 5dba63f

File tree

7 files changed

+851
-767
lines changed

7 files changed

+851
-767
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ export default component$(() => {
3535
);
3636
});
3737
```
38-
You can also avoid handling the keys, and only pass the default values by enabling the automatic key generation option:
38+
You can pass only the default values by enabling the automatic key generation option:
3939
```tsx
4040
import { inlineTranslate } from 'qwik-speak';
4141

docs/extract.md

+10
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,8 @@ Available options:
5151
- `filename` Filename for not scoped translations. Default is `'app'`
5252
- `fallback` Optional function to implement a fallback strategy
5353
- `autoKeys` Automatically handle keys for each string. Default is false
54+
- `unusedKeys` Automatically remove unused keys from assets, except in runtime assets
55+
- `runtimeAssets` Comma-separated list of runtime assets to preserve
5456
- `keySeparator` Separator of nested keys. Default is `'.'`
5557
- `keyValueSeparator` Key-value separator. Default is `'@@'`
5658

@@ -109,3 +111,11 @@ const fallback = (translation) => {
109111
return translation;
110112
};
111113
```
114+
115+
### Automatic removal of unused keys
116+
To remove unused keys from json files, you need to enable the option and provide a comma-separated list of runtime file names:
117+
```json
118+
"scripts": {
119+
"qwik-speak-extract": "qwik-speak-extract --supportedLangs=en-US,it-IT --unusedKeys=true --runtimeAssets=runtime"
120+
}
121+
```

docs/translate.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ If you don't want to handle the keys inside the translation functions, but only
176176

177177
> Note. You can enable this option, even if you use the syntax `key@@[default value]`.
178178
179-
If you enable this option, you can only pass the default value to the translation functions:
179+
If you enable this option, you can pass only the default values to the translation functions:
180180
```tsx
181181
export default component$(() => {
182182
const t = inlineTranslate();

0 commit comments

Comments
 (0)