Skip to content

Commit ac2395f

Browse files
committed
Localise error
1 parent e78254e commit ac2395f

2 files changed

Lines changed: 4 additions & 1 deletion

File tree

plugins/content/bower/index.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -818,7 +818,9 @@ function addPackage (plugin, packageInfo, options, cb) {
818818
}
819819

820820
if (targetAttributeExists) {
821-
return addCb(new PluginPackageError(`Can't add plugin: targetAttribute already exists!`));
821+
return addCb(new PluginPackageError(app.polyglot.t('app.targetattributeexists', {
822+
targetAttribute
823+
})));
822824
}
823825

824826
// don't duplicate component.name, component.version

routes/lang/en-application.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -415,6 +415,7 @@
415415
"app.unrecognisedplugin": "Unrecognised plugin - a plugin should have a bower.json file.",
416416
"app.unrecognisedpluginforpackage": "Unrecognised plugin type for package %{package}.",
417417
"app.incompatibleframework": "This plugin is incompatible with version %{framework} of the Adapt framework.",
418+
"app.targetattributeexists": "There is a plugin already installed with a target attribute of '%{targetAttribute}'.",
418419
"app.versionexists": "You already have this version of the plugin installed.",
419420
"app.unknownuser": "Unknown User"
420421
}

0 commit comments

Comments
 (0)