Gathering detailed insights and metrics for @yfwz100/vite-plugin-vue2-i18n
Gathering detailed insights and metrics for @yfwz100/vite-plugin-vue2-i18n
Gathering detailed insights and metrics for @yfwz100/vite-plugin-vue2-i18n
Gathering detailed insights and metrics for @yfwz100/vite-plugin-vue2-i18n
npm install @yfwz100/vite-plugin-vue2-i18n
Module System
Min. Node Version
Typescript Support
Node Version
NPM Version
6 Stars
24 Commits
4 Forks
2 Watching
1 Branches
3 Contributors
Updated on 31 Jan 2023
TypeScript (52.31%)
Vue (20.31%)
JavaScript (16.02%)
HTML (11.37%)
Cumulative downloads
Total Downloads
Last day
538.9%
115
Compared to previous day
Last week
557.8%
842
Compared to previous week
Last month
73.9%
1,678
Compared to previous month
Last year
-37.7%
13,785
Compared to previous year
1
6
The missing vue 2 SFC version of vite plugin for vue-i18n, inspired by the rollup one.
You need to install the follwoing:
npm:
1$ npm i --save-dev @rollup/plugin-json 2$ npm i --save-dev @rollup/plugin-yaml # if you use locale messages with YAML format 3$ npm i --save-dev @yfwz100/vite-plugin-vue2-i18n
Say we have configured the vite via vite.config.js
and have a sample index.html (see the vite guide):
1import { defineConfig } from 'vite'; 2import { createVuePlugin } from '@yfwz100/vite-plugin-vue2'; 3import { createI18nPlugin } from '@yfwz100/vite-plugin-vue2-i18n'; 4 5export default defineConfig({ 6 plugins: [createVuePlugin(), createI18nPlugin()], 7});
Then, we can write the i18n blocks in the vue component file:
1<template> 2 <p>{{ $t('hello') }}</p> 3</template> 4 5<i18n> 6{ 7 "en": { 8 "hello": "Hello World!" 9 }, 10 "zh": { 11 "hello": "你好,世界!" 12 } 13} 14</i18n>
Finally, just run vite
and see the component with i18n enabled.
We have tested the following formats:
See more in the playground
folder.
See CHANGELOG.md.
No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
Found 2/20 approved changesets -- score normalized to 1
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
license file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
26 existing vulnerabilities detected
Details
Score
Last Scanned on 2024-11-18
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More