Skip to content

Commit

Permalink
Localise error
Browse files Browse the repository at this point in the history
  • Loading branch information
tomgreenfield committed Oct 16, 2019
1 parent e78254e commit ac2395f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
4 changes: 3 additions & 1 deletion plugins/content/bower/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -818,7 +818,9 @@ function addPackage (plugin, packageInfo, options, cb) {
}

if (targetAttributeExists) {
return addCb(new PluginPackageError(`Can't add plugin: targetAttribute already exists!`));
return addCb(new PluginPackageError(app.polyglot.t('app.targetattributeexists', {
targetAttribute
})));
}

// don't duplicate component.name, component.version
Expand Down
1 change: 1 addition & 0 deletions routes/lang/en-application.json
Original file line number Diff line number Diff line change
Expand Up @@ -415,6 +415,7 @@
"app.unrecognisedplugin": "Unrecognised plugin - a plugin should have a bower.json file.",
"app.unrecognisedpluginforpackage": "Unrecognised plugin type for package %{package}.",
"app.incompatibleframework": "This plugin is incompatible with version %{framework} of the Adapt framework.",
"app.targetattributeexists": "There is a plugin already installed with a target attribute of '%{targetAttribute}'.",
"app.versionexists": "You already have this version of the plugin installed.",
"app.unknownuser": "Unknown User"
}

0 comments on commit ac2395f

Please sign in to comment.