Skip to content

Commit

Permalink
fix(ui): more strings now localized
Browse files Browse the repository at this point in the history
  • Loading branch information
Guillaume Chau committed May 11, 2018
1 parent 6661a13 commit 69a817e
Show file tree
Hide file tree
Showing 5 changed files with 99 additions and 40 deletions.
8 changes: 4 additions & 4 deletions packages/@vue/cli-plugin-e2e-cypress/ui.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
module.exports = api => {
api.describeTask({
match: /vue-cli-service test:e2e/,
description: 'Run e2e tests with `cypress run`',
description: 'cypress.tasks.test.description',
link: 'https://github.com/vuejs/vue-cli/tree/dev/packages/%40vue/cli-plugin-e2e-cypress#injected-commands',
prompts: [
{
name: 'headless',
type: 'confirm',
default: false,
description: 'Run in headless mode without GUI'
description: 'cypress.tasks.test.headless'
},
{
name: 'mode',
Expand All @@ -28,13 +28,13 @@ module.exports = api => {
value: 'test'
}
],
description: 'Specify the mode the dev server should run in'
description: 'cypress.tasks.test.mode'
},
{
name: 'url',
type: 'input',
default: '',
description: 'Run e2e tests against given url instead of auto-starting dev server'
description: 'cypress.tasks.test.url'
}
],
onBeforeRun: ({ answers, args }) => {
Expand Down
6 changes: 3 additions & 3 deletions packages/@vue/cli-plugin-eslint/ui.js
Original file line number Diff line number Diff line change
Expand Up @@ -190,8 +190,8 @@ module.exports = api => {
{
name: 'lintOnSave',
type: 'confirm',
message: 'Lint on save',
description: 'Automatically lint source files when saved',
message: 'eslint.config.eslint-extra.lintOnSave.message',
description: 'eslint.config.eslint-extra.lintOnSave.description',
link: 'https://github.com/vuejs/vue-cli/tree/dev/packages/%40vue/cli-plugin-eslint#configuration',
default: false,
value: data.lintOnSave
Expand All @@ -217,7 +217,7 @@ module.exports = api => {
name: 'noFix',
type: 'confirm',
default: false,
description: 'Do not fix errors'
description: 'eslint.tasks.lint.noFix'
}
],
onBeforeRun: ({ answers, args }) => {
Expand Down
24 changes: 12 additions & 12 deletions packages/@vue/cli-plugin-pwa/ui.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ module.exports = api => {
{
name: 'workboxPluginMode',
type: 'list',
message: 'Plugin mode',
description: 'This allows you to the choose between the two modes supported by the underlying `workbox-webpack-plugin`',
message: 'pwa.config.pwa.workboxPluginMode.message',
description: 'pwa.config.pwa.workboxPluginMode.description',
link: 'https://developers.google.com/web/tools/workbox/modules/workbox-webpack-plugin#which_plugin_to_use',
default: 'GenerateSW',
value: data.pwa && data.pwa.workboxPluginMode,
Expand All @@ -62,40 +62,40 @@ module.exports = api => {
{
name: 'name',
type: 'input',
message: 'App name',
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.',
message: 'pwa.config.pwa.name.message',
description: 'pwa.config.pwa.name.description',
value: data.pwa && data.pwa.name
},
{
name: 'themeColor',
type: 'color',
message: 'Theme color',
description: 'Color used to theme the browser',
message: 'pwa.config.pwa.themeColor.message',
description: 'pwa.config.pwa.themeColor.description',
default: '#4DBA87',
value: data.pwa && data.pwa.themeColor
},
{
name: 'backgroundColor',
type: 'color',
message: 'Splash background color',
description: 'Background color used for the app splash screen',
message: 'pwa.config.pwa.backgroundColor.message',
description: 'pwa.config.pwa.backgroundColor.description',
default: '#000000',
value: manifest && manifest.background_color,
skipSave: true
},
{
name: 'msTileColor',
type: 'color',
message: 'Windows app tile color',
description: 'Color used for the app tile on Windows',
message: 'pwa.config.pwa.msTileColor.message',
description: 'pwa.config.pwa.msTileColor.description',
default: '#000000',
value: data.pwa && data.pwa.msTileColor
},
{
name: 'appleMobileWebAppStatusBarStyle',
type: 'input',
message: 'Apple mobile status bar style',
description: 'Style for the web app status bar on iOS',
message: 'pwa.config.pwa.appleMobileWebAppStatusBarStyle.message',
description: 'pwa.config.pwa.appleMobileWebAppStatusBarStyle.description',
default: 'default',
value: data.pwa && data.pwa.appleMobileWebAppStatusBarStyle
}
Expand Down
32 changes: 16 additions & 16 deletions packages/@vue/cli-service/ui.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ module.exports = api => {
name: 'open',
type: 'confirm',
default: false,
description: 'Open browser on server start'
description: 'vue-webpack.tasks.serve.open'
},
{
name: 'mode',
Expand All @@ -75,25 +75,25 @@ module.exports = api => {
value: 'test'
}
],
description: 'Specify env mode'
description: 'vue-webpack.tasks.serve.mode'
},
{
name: 'host',
type: 'input',
default: '0.0.0.0',
description: 'Specify host'
description: 'vue-webpack.tasks.serve.host'
},
{
name: 'port',
type: 'input',
default: 8080,
description: 'Specify port'
description: 'vue-webpack.tasks.serve.port'
},
{
name: 'https',
type: 'confirm',
default: false,
description: 'Use HTTPS'
description: 'vue-webpack.tasks.serve.https'
}
],
onBeforeRun: ({ answers, args }) => {
Expand Down Expand Up @@ -141,43 +141,43 @@ module.exports = api => {
value: 'test'
}
],
description: 'Specify env mode'
description: 'vue-webpack.tasks.build.mode'
},
{
name: 'dest',
type: 'input',
default: 'dist',
description: 'Output directory'
description: 'vue-webpack.tasks.build.dest'
},
{
name: 'target',
type: 'list',
default: 'app',
choices: [
{
name: 'Web app',
name: 'vue-webpack.tasks.build.target.app',
value: 'app'
},
{
name: 'Library',
name: 'vue-webpack.tasks.build.target.lib',
value: 'lib'
},
{
name: 'Web component',
name: 'vue-webpack.tasks.build.target.wc',
value: 'wc'
},
{
name: 'Async web component',
name: 'vue-webpack.tasks.build.wc-async',
value: 'wc-async'
}
],
description: 'Build target'
description: 'vue-webpack.tasks.build.description'
},
{
name: 'name',
type: 'input',
default: '',
description: 'Name for library or web-component mode (default: "name" in package.json or entry filename)'
description: 'vue-webpack.tasks.build.name'
}
],
onBeforeRun: ({ answers, args }) => {
Expand All @@ -203,7 +203,7 @@ module.exports = api => {
api.addTask({
name: 'inspect',
command: 'vue-cli-service inspect',
description: 'Inspect the resolved webpack config',
description: 'vue-webpack.tasks.inspect.description',
link: 'https://github.com/vuejs/vue-cli/blob/dev/docs/webpack.md#inspecting-the-projects-webpack-config',
prompts: [
{
Expand All @@ -224,13 +224,13 @@ module.exports = api => {
value: 'test'
}
],
description: 'Specify env mode'
description: 'vue-webpack.tasks.inspect.mode'
},
{
name: 'verbose',
type: 'confirm',
default: false,
description: 'Show full function definitions in output'
description: 'vue-webpack.tasks.inspect.verbose'
}
],
onBeforeRun: ({ answers, args }) => {
Expand Down
69 changes: 64 additions & 5 deletions packages/@vue/cli/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -362,11 +362,31 @@
},
"tasks": {
"serve": {
"description": "Compiles and hot-reloads for development"
"description": "Compiles and hot-reloads for development",
"open": "Open browser on server start",
"mode": "Specify env mode",
"host": "Specify host",
"port": "Specify port",
"https": "Use HTTPS"
},
"build": {
"description": "Compiles and minifies for production"
"description": "Compiles and minifies for production",
"mode": "Specify env mode",
"dest": "Output directory",
"target": {
"description": "Build target",
"app": "Web app",
"lib": "Library",
"wc": "Web component",
"wc-async": "Async web component"
},
"name": "Name for library or web-component mode (default: 'name' in package.json or entry filename)"
}
},
"inspect": {
"description": "Inspect the resolved webpack config",
"mode": "Specify env mode",
"verbose": "Show full function definitions in output"
}
},
"eslint": {
Expand All @@ -379,19 +399,58 @@
}
},
"eslint-extra": {
"description": "Extra ESLint settings"
"description": "Extra ESLint settings",
"lintOnSave": {
"message": "Lint on save",
"description": "Automatically lint source files when saved"
}
}
},
"tasks": {
"lint": {
"description": "Lints and fixes files"
"description": "Lints and fixes files",
"noFix": "Do not fix errors"
}
}
},
"pwa": {
"config": {
"pwa": {
"description": "Progressive Web App"
"description": "Progressive Web App",
"workboxPluginMode": {
"message": "Plugin mode",
"description": "This allows you to the choose between the two modes supported by the underlying `workbox-webpack-plugin`"
},
"name": {
"message": "App name",
"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."
},
"themeColor": {
"message": "Theme color",
"description": "Color used to theme the browser"
},
"backgroundColor": {
"message": "Splash background color",
"description": "Background color used for the app splash screen"
},
"msTileColor": {
"message": "Windows app tile color",
"description": "Color used for the app tile on Windows"
},
"appleMobileWebAppStatusBarStyle": {
"message": "Apple mobile status bar style",
"description": "Style for the web app status bar on iOS"
}
}
}
},
"cypress": {
"tasks": {
"test": {
"description": "Run e2e tests with `cypress run`",
"headless": "Run in headless mode without GUI",
"mode": "Specify the mode the dev server should run in",
"url": "Run e2e tests against given url instead of auto-starting dev server"
}
}
}
Expand Down

0 comments on commit 69a817e

Please sign in to comment.