Skip to content

Commit 69a817e

Browse files
author
Guillaume Chau
committed
fix(ui): more strings now localized
1 parent 6661a13 commit 69a817e

File tree

5 files changed

+99
-40
lines changed

5 files changed

+99
-40
lines changed

packages/@vue/cli-plugin-e2e-cypress/ui.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
module.exports = api => {
22
api.describeTask({
33
match: /vue-cli-service test:e2e/,
4-
description: 'Run e2e tests with `cypress run`',
4+
description: 'cypress.tasks.test.description',
55
link: 'https://github.com/vuejs/vue-cli/tree/dev/packages/%40vue/cli-plugin-e2e-cypress#injected-commands',
66
prompts: [
77
{
88
name: 'headless',
99
type: 'confirm',
1010
default: false,
11-
description: 'Run in headless mode without GUI'
11+
description: 'cypress.tasks.test.headless'
1212
},
1313
{
1414
name: 'mode',
@@ -28,13 +28,13 @@ module.exports = api => {
2828
value: 'test'
2929
}
3030
],
31-
description: 'Specify the mode the dev server should run in'
31+
description: 'cypress.tasks.test.mode'
3232
},
3333
{
3434
name: 'url',
3535
type: 'input',
3636
default: '',
37-
description: 'Run e2e tests against given url instead of auto-starting dev server'
37+
description: 'cypress.tasks.test.url'
3838
}
3939
],
4040
onBeforeRun: ({ answers, args }) => {

packages/@vue/cli-plugin-eslint/ui.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -190,8 +190,8 @@ module.exports = api => {
190190
{
191191
name: 'lintOnSave',
192192
type: 'confirm',
193-
message: 'Lint on save',
194-
description: 'Automatically lint source files when saved',
193+
message: 'eslint.config.eslint-extra.lintOnSave.message',
194+
description: 'eslint.config.eslint-extra.lintOnSave.description',
195195
link: 'https://github.com/vuejs/vue-cli/tree/dev/packages/%40vue/cli-plugin-eslint#configuration',
196196
default: false,
197197
value: data.lintOnSave
@@ -217,7 +217,7 @@ module.exports = api => {
217217
name: 'noFix',
218218
type: 'confirm',
219219
default: false,
220-
description: 'Do not fix errors'
220+
description: 'eslint.tasks.lint.noFix'
221221
}
222222
],
223223
onBeforeRun: ({ answers, args }) => {

packages/@vue/cli-plugin-pwa/ui.js

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ module.exports = api => {
4343
{
4444
name: 'workboxPluginMode',
4545
type: 'list',
46-
message: 'Plugin mode',
47-
description: 'This allows you to the choose between the two modes supported by the underlying `workbox-webpack-plugin`',
46+
message: 'pwa.config.pwa.workboxPluginMode.message',
47+
description: 'pwa.config.pwa.workboxPluginMode.description',
4848
link: 'https://developers.google.com/web/tools/workbox/modules/workbox-webpack-plugin#which_plugin_to_use',
4949
default: 'GenerateSW',
5050
value: data.pwa && data.pwa.workboxPluginMode,
@@ -62,40 +62,40 @@ module.exports = api => {
6262
{
6363
name: 'name',
6464
type: 'input',
65-
message: 'App name',
66-
description: 'App name displayed on the Splash screen and various other places. Also used as the value for the `apple-mobile-web-app-title` meta tag in the generated HTML.',
65+
message: 'pwa.config.pwa.name.message',
66+
description: 'pwa.config.pwa.name.description',
6767
value: data.pwa && data.pwa.name
6868
},
6969
{
7070
name: 'themeColor',
7171
type: 'color',
72-
message: 'Theme color',
73-
description: 'Color used to theme the browser',
72+
message: 'pwa.config.pwa.themeColor.message',
73+
description: 'pwa.config.pwa.themeColor.description',
7474
default: '#4DBA87',
7575
value: data.pwa && data.pwa.themeColor
7676
},
7777
{
7878
name: 'backgroundColor',
7979
type: 'color',
80-
message: 'Splash background color',
81-
description: 'Background color used for the app splash screen',
80+
message: 'pwa.config.pwa.backgroundColor.message',
81+
description: 'pwa.config.pwa.backgroundColor.description',
8282
default: '#000000',
8383
value: manifest && manifest.background_color,
8484
skipSave: true
8585
},
8686
{
8787
name: 'msTileColor',
8888
type: 'color',
89-
message: 'Windows app tile color',
90-
description: 'Color used for the app tile on Windows',
89+
message: 'pwa.config.pwa.msTileColor.message',
90+
description: 'pwa.config.pwa.msTileColor.description',
9191
default: '#000000',
9292
value: data.pwa && data.pwa.msTileColor
9393
},
9494
{
9595
name: 'appleMobileWebAppStatusBarStyle',
9696
type: 'input',
97-
message: 'Apple mobile status bar style',
98-
description: 'Style for the web app status bar on iOS',
97+
message: 'pwa.config.pwa.appleMobileWebAppStatusBarStyle.message',
98+
description: 'pwa.config.pwa.appleMobileWebAppStatusBarStyle.description',
9999
default: 'default',
100100
value: data.pwa && data.pwa.appleMobileWebAppStatusBarStyle
101101
}

packages/@vue/cli-service/ui.js

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ module.exports = api => {
5555
name: 'open',
5656
type: 'confirm',
5757
default: false,
58-
description: 'Open browser on server start'
58+
description: 'vue-webpack.tasks.serve.open'
5959
},
6060
{
6161
name: 'mode',
@@ -75,25 +75,25 @@ module.exports = api => {
7575
value: 'test'
7676
}
7777
],
78-
description: 'Specify env mode'
78+
description: 'vue-webpack.tasks.serve.mode'
7979
},
8080
{
8181
name: 'host',
8282
type: 'input',
8383
default: '0.0.0.0',
84-
description: 'Specify host'
84+
description: 'vue-webpack.tasks.serve.host'
8585
},
8686
{
8787
name: 'port',
8888
type: 'input',
8989
default: 8080,
90-
description: 'Specify port'
90+
description: 'vue-webpack.tasks.serve.port'
9191
},
9292
{
9393
name: 'https',
9494
type: 'confirm',
9595
default: false,
96-
description: 'Use HTTPS'
96+
description: 'vue-webpack.tasks.serve.https'
9797
}
9898
],
9999
onBeforeRun: ({ answers, args }) => {
@@ -141,43 +141,43 @@ module.exports = api => {
141141
value: 'test'
142142
}
143143
],
144-
description: 'Specify env mode'
144+
description: 'vue-webpack.tasks.build.mode'
145145
},
146146
{
147147
name: 'dest',
148148
type: 'input',
149149
default: 'dist',
150-
description: 'Output directory'
150+
description: 'vue-webpack.tasks.build.dest'
151151
},
152152
{
153153
name: 'target',
154154
type: 'list',
155155
default: 'app',
156156
choices: [
157157
{
158-
name: 'Web app',
158+
name: 'vue-webpack.tasks.build.target.app',
159159
value: 'app'
160160
},
161161
{
162-
name: 'Library',
162+
name: 'vue-webpack.tasks.build.target.lib',
163163
value: 'lib'
164164
},
165165
{
166-
name: 'Web component',
166+
name: 'vue-webpack.tasks.build.target.wc',
167167
value: 'wc'
168168
},
169169
{
170-
name: 'Async web component',
170+
name: 'vue-webpack.tasks.build.wc-async',
171171
value: 'wc-async'
172172
}
173173
],
174-
description: 'Build target'
174+
description: 'vue-webpack.tasks.build.description'
175175
},
176176
{
177177
name: 'name',
178178
type: 'input',
179179
default: '',
180-
description: 'Name for library or web-component mode (default: "name" in package.json or entry filename)'
180+
description: 'vue-webpack.tasks.build.name'
181181
}
182182
],
183183
onBeforeRun: ({ answers, args }) => {
@@ -203,7 +203,7 @@ module.exports = api => {
203203
api.addTask({
204204
name: 'inspect',
205205
command: 'vue-cli-service inspect',
206-
description: 'Inspect the resolved webpack config',
206+
description: 'vue-webpack.tasks.inspect.description',
207207
link: 'https://github.com/vuejs/vue-cli/blob/dev/docs/webpack.md#inspecting-the-projects-webpack-config',
208208
prompts: [
209209
{
@@ -224,13 +224,13 @@ module.exports = api => {
224224
value: 'test'
225225
}
226226
],
227-
description: 'Specify env mode'
227+
description: 'vue-webpack.tasks.inspect.mode'
228228
},
229229
{
230230
name: 'verbose',
231231
type: 'confirm',
232232
default: false,
233-
description: 'Show full function definitions in output'
233+
description: 'vue-webpack.tasks.inspect.verbose'
234234
}
235235
],
236236
onBeforeRun: ({ answers, args }) => {

packages/@vue/cli/locales/en.json

Lines changed: 64 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -362,11 +362,31 @@
362362
},
363363
"tasks": {
364364
"serve": {
365-
"description": "Compiles and hot-reloads for development"
365+
"description": "Compiles and hot-reloads for development",
366+
"open": "Open browser on server start",
367+
"mode": "Specify env mode",
368+
"host": "Specify host",
369+
"port": "Specify port",
370+
"https": "Use HTTPS"
366371
},
367372
"build": {
368-
"description": "Compiles and minifies for production"
373+
"description": "Compiles and minifies for production",
374+
"mode": "Specify env mode",
375+
"dest": "Output directory",
376+
"target": {
377+
"description": "Build target",
378+
"app": "Web app",
379+
"lib": "Library",
380+
"wc": "Web component",
381+
"wc-async": "Async web component"
382+
},
383+
"name": "Name for library or web-component mode (default: 'name' in package.json or entry filename)"
369384
}
385+
},
386+
"inspect": {
387+
"description": "Inspect the resolved webpack config",
388+
"mode": "Specify env mode",
389+
"verbose": "Show full function definitions in output"
370390
}
371391
},
372392
"eslint": {
@@ -379,19 +399,58 @@
379399
}
380400
},
381401
"eslint-extra": {
382-
"description": "Extra ESLint settings"
402+
"description": "Extra ESLint settings",
403+
"lintOnSave": {
404+
"message": "Lint on save",
405+
"description": "Automatically lint source files when saved"
406+
}
383407
}
384408
},
385409
"tasks": {
386410
"lint": {
387-
"description": "Lints and fixes files"
411+
"description": "Lints and fixes files",
412+
"noFix": "Do not fix errors"
388413
}
389414
}
390415
},
391416
"pwa": {
392417
"config": {
393418
"pwa": {
394-
"description": "Progressive Web App"
419+
"description": "Progressive Web App",
420+
"workboxPluginMode": {
421+
"message": "Plugin mode",
422+
"description": "This allows you to the choose between the two modes supported by the underlying `workbox-webpack-plugin`"
423+
},
424+
"name": {
425+
"message": "App name",
426+
"description": "App name displayed on the Splash screen and various other places. Also used as the value for the `apple-mobile-web-app-title` meta tag in the generated HTML."
427+
},
428+
"themeColor": {
429+
"message": "Theme color",
430+
"description": "Color used to theme the browser"
431+
},
432+
"backgroundColor": {
433+
"message": "Splash background color",
434+
"description": "Background color used for the app splash screen"
435+
},
436+
"msTileColor": {
437+
"message": "Windows app tile color",
438+
"description": "Color used for the app tile on Windows"
439+
},
440+
"appleMobileWebAppStatusBarStyle": {
441+
"message": "Apple mobile status bar style",
442+
"description": "Style for the web app status bar on iOS"
443+
}
444+
}
445+
}
446+
},
447+
"cypress": {
448+
"tasks": {
449+
"test": {
450+
"description": "Run e2e tests with `cypress run`",
451+
"headless": "Run in headless mode without GUI",
452+
"mode": "Specify the mode the dev server should run in",
453+
"url": "Run e2e tests against given url instead of auto-starting dev server"
395454
}
396455
}
397456
}

0 commit comments

Comments
 (0)