Skip to content

Commit

Permalink
added error variable in i18
Browse files Browse the repository at this point in the history
  • Loading branch information
ashwaniYDV committed Feb 3, 2020
1 parent c3ecb40 commit 24cc1a6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
8 changes: 4 additions & 4 deletions app/message-pin/client/pinMessage.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ import { ChatMessage, Subscriptions } from '../../models';
Meteor.methods({
pinMessage(message) {
if (!Meteor.userId()) {
toastr.error(TAPi18n.__('error-pinning-message'));
toastr.error(TAPi18n.__('error-not-authorized'));
return false;
}
if (!settings.get('Message_AllowPinning')) {
toastr.error(TAPi18n.__('error-pinning-message'));
toastr.error(TAPi18n.__('pinning-not-allowed'));
return false;
}
if (Subscriptions.findOne({ rid: message.rid }) == null) {
Expand All @@ -30,11 +30,11 @@ Meteor.methods({
},
unpinMessage(message) {
if (!Meteor.userId()) {
toastr.error(TAPi18n.__('error-unpinning-message'));
toastr.error(TAPi18n.__('error-not-authorized'));
return false;
}
if (!settings.get('Message_AllowPinning')) {
toastr.error(TAPi18n.__('error-unpinning-message'));
toastr.error(TAPi18n.__('unpinning-not-allowed'));
return false;
}
if (Subscriptions.findOne({ rid: message.rid }) == null) {
Expand Down
2 changes: 2 additions & 0 deletions packages/rocketchat-i18n/i18n/en.i18n.json
Original file line number Diff line number Diff line change
Expand Up @@ -2461,6 +2461,7 @@
"Pin_Message": "Pin Message",
"Pinned_a_message": "Pinned a message:",
"Pinned_Messages": "Pinned Messages",
"pinning-not-allowed": "Pinning is not allowed",
"PiwikAdditionalTrackers": "Additional Piwik Sites",
"PiwikAdditionalTrackers_Description": "Enter addtitional Piwik website URLs and SiteIDs in the following format, if you wnat to track the same data into different websites: [ { \"trackerURL\" : \"https://my.piwik.domain2/\", \"siteId\" : 42 }, { \"trackerURL\" : \"https://my.piwik.domain3/\", \"siteId\" : 15 } ]",
"PiwikAnalytics_cookieDomain": "All Subdomains",
Expand Down Expand Up @@ -3223,6 +3224,7 @@
"Unnamed": "Unnamed",
"Unpin": "Unpin",
"Unpin_Message": "Unpin Message",
"unpinning-not-allowed": "Unpinning is not allowed",
"Unread": "Unread",
"Unread_Count": "Unread Count",
"Unread_Count_DM": "Unread Count for Direct Messages",
Expand Down

0 comments on commit 24cc1a6

Please sign in to comment.