-
Notifications
You must be signed in to change notification settings - Fork 390
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: update readme after extractor changes that removes limitations
- Loading branch information
Christoffer Jahren
committed
Apr 21, 2023
1 parent
e23cbc0
commit 74dee23
Showing
7 changed files
with
84 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# Vue.js Extractor | ||
|
||
The `@lingui/extractor-vue` package provides a custom extractor that handles Vue.js files. | ||
|
||
## Installation | ||
|
||
```bash npm2yarn | ||
npm install --save-dev @lingui/extractor-vue | ||
``` | ||
|
||
## Usage | ||
|
||
It is required that you use JavaScript for your Lingui configuration. | ||
|
||
```js title="lingui.config.{js,ts}" | ||
import { vueExtractor } from "@lingui/extractor-vue" | ||
import babel from "@lingui/cli/api/extractors/babel" | ||
|
||
const linguiConfig = { | ||
locales: ["en", "nb"], | ||
sourceLocale: "en", | ||
catalogs: [ | ||
{ | ||
path: "<rootDir>/src/{locale}", | ||
include: ["<rootDir>/src"], | ||
}, | ||
], | ||
extractors: [babel, vueExtractor], | ||
} | ||
|
||
export default linguiConfig | ||
``` | ||
|
||
## Further reading | ||
|
||
- [Message Extraction](/docs/guides/message-extraction.md) | ||
- [Custom Extractor](/docs/guides/custom-extractor.md) | ||
- [GitHub Repository](https://github.com/lingui/js-lingui/tree/main/packages/extractor-vue) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters