mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-20 22:42:53 -05:00
Subscribers: Error message improvements
This commit is contained in:
parent
f93405288a
commit
4571a40f2a
2 changed files with 6 additions and 6 deletions
|
@ -105,12 +105,12 @@ subscribers = {
|
|||
// we don't expose this information
|
||||
return Promise.resolve(subscriber);
|
||||
} else if (subscriber) {
|
||||
return Promise.reject(new errors.ValidationError(i18n.t('errors.api.subscribers.subscriberAlreadyExist')));
|
||||
return Promise.reject(new errors.ValidationError(i18n.t('errors.api.subscribers.subscriberAlreadyExists')));
|
||||
}
|
||||
|
||||
return dataProvider.Subscriber.add(options.data.subscribers[0], _.omit(options, ['data'])).catch(function (error) {
|
||||
if (error.code && error.message.toLowerCase().indexOf('unique') !== -1) {
|
||||
return Promise.reject(new errors.ValidationError(i18n.t('errors.api.subscribers.subscriberAlreadyExist')));
|
||||
return Promise.reject(new errors.ValidationError(i18n.t('errors.api.subscribers.subscriberAlreadyExists')));
|
||||
}
|
||||
|
||||
return Promise.reject(error);
|
||||
|
|
|
@ -333,12 +333,12 @@
|
|||
"couldNotGenerateSlug": "Could not generate slug.",
|
||||
"unknownSlugType": "Unknown slug type '{type}'."
|
||||
},
|
||||
"tags": {
|
||||
"tagNotFound": "Tag not found."
|
||||
},
|
||||
"subscribers": {
|
||||
"subscriberNotFound": "Subscriber not found.",
|
||||
"subscriberAlreadyExist": "Email already exist."
|
||||
"subscriberAlreadyExists": "Email address is already subscribed."
|
||||
},
|
||||
"tags": {
|
||||
"tagNotFound": "Tag not found."
|
||||
},
|
||||
"themes": {
|
||||
"noPermissionToBrowseThemes": "You do not have permission to browse themes.",
|
||||
|
|
Loading…
Add table
Reference in a new issue