Skip to content

Commit

Permalink
fix(ui): more strings localized
Browse files Browse the repository at this point in the history
  • Loading branch information
Guillaume Chau committed May 12, 2018
1 parent e011bc0 commit 7f7374b
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 11 deletions.
5 changes: 3 additions & 2 deletions packages/@vue/cli-ui/src/components/ProjectFeatureItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,15 @@
:class="{
selected: feature.enabled
}"
:data-id="feature.id"
>
<VueSwitch
:value="feature.enabled"
class="extend-left"
>
<ListItemInfo
:name="feature.name"
:description="feature.description"
:name="$t(feature.name)"
:description="$t(feature.description)"
:link="feature.link"
:selected="feature.enabled"
/>
Expand Down
5 changes: 3 additions & 2 deletions packages/@vue/cli-ui/src/components/ProjectPresetItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
:class="{
selected
}"
:data-id="preset.id"
>
<div class="content">
<div
Expand All @@ -16,8 +17,8 @@
</div>

<ListItemInfo
:name="preset.name"
:description="preset.description"
:name="$t(preset.name)"
:description="$t(preset.description)"
:link="preset.link"
:selected="selected"
/>
Expand Down
12 changes: 6 additions & 6 deletions packages/@vue/cli-ui/src/graphql-api/connectors/projects.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ function getLast (context) {
}

function generatePresetDescription (preset) {
let description = `Features: ${preset.features.join(', ')}`
let description = preset.features.join(', ')
if (preset.raw.useConfigFiles) {
description += ` (Use config files)`
}
Expand Down Expand Up @@ -94,7 +94,7 @@ async function initCreator (context) {
)
const info = {
id: key,
name: key === 'default' ? 'Default preset' : key,
name: key === 'default' ? 'views.project-create.tabs.presets.default-preset' : key,
features,
link: null,
raw: preset
Expand All @@ -105,8 +105,8 @@ async function initCreator (context) {
),
{
id: '__manual__',
name: 'Manual',
description: 'Manually select features',
name: 'views.project-create.tabs.presets.manual.name',
description: 'views.project-create.tabs.presets.manual.description',
link: null,
features: []
}
Expand All @@ -127,8 +127,8 @@ async function initCreator (context) {
),
{
id: 'use-config-files',
name: 'Use config files',
description: `Use specific configuration files (like '.babelrc') instead of using 'package.json'.`,
name: 'views.project-create.tabs.features.userConfigFiles.name',
description: 'views.project-create.tabs.features.userConfigFiles.description',
link: null,
plugins: null,
enabled: false
Expand Down
15 changes: 14 additions & 1 deletion packages/@vue/cli/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,16 @@
"modal": {
"title": "Configure Remote preset",
"body": "Available soon..."
}
},
"manual": {
"name": "Manual",
"description": "Manually select features"
},
"remote": {
"name": "Remote preset",
"description": "Fetch a preset from a git repository"
},
"default-preset": "Default preset"
},
"features": {
"title": "Features",
Expand All @@ -220,6 +229,10 @@
"previous": "Previous",
"next": "Next",
"create": "Create Project"
},
"userConfigFiles": {
"name": "Use config files",
"description": "Use specific configuration files (like '.babelrc') instead of using 'package.json'."
}
},
"configuration": {
Expand Down

0 comments on commit 7f7374b

Please sign in to comment.