Merge pull request #3698 from troyjfarrell/grain_client_i18n
I18n for grain renaming and grain deletion prompt
This commit is contained in:
2 files changed
+10
-3
No files matched your search
@@ -177,10 +177,17 @@
|
||||
"was": "was: %s",
|
||||
"renamedFrom": "renamed from: %s"
|
||||
},
|
||||
"grainTitlePopup": {
|
||||
"prompt": "Set new title:",
|
||||
"promptNotOwner": "Set a new personal title: (does not change the owner's title for this grain)"
|
||||
},
|
||||
"grainDeleteButton": {
|
||||
"hint": "Move to trash",
|
||||
"text": "Move to trash"
|
||||
},
|
||||
"grainDeletePopup": {
|
||||
"confirmationMessage": "Really move this grain to your trash?"
|
||||
},
|
||||
"grainDebugLogButton": {
|
||||
"hint": "Show Debug Log",
|
||||
"text": "Log"
|
||||
|
||||
@@ -51,9 +51,9 @@ GrainLog = new Mongo.Collection("grainLog");
|
||||
|
||||
const promptNewTitle = function (grain) {
|
||||
if (grain) {
|
||||
let prompt = "Set new title:";
|
||||
let prompt = TAPi18n.__('grains.grainTitlePopup.prompt');
|
||||
if (!grain.isOwner()) {
|
||||
prompt = "Set a new personal title: (does not change the owner's title for this grain)";
|
||||
prompt = TAPi18n.__('grains.grainTitlePopup.promptNotOwner');
|
||||
}
|
||||
|
||||
const title = window.prompt(prompt, grain.title());
|
||||
@@ -159,7 +159,7 @@ Template.grainDeleteButton.events({
|
||||
"click button": function (event) {
|
||||
const activeGrain = globalGrains.getActive();
|
||||
const grainId = activeGrain.grainId();
|
||||
let confirmationMessage = "Really move this grain to your trash?";
|
||||
let confirmationMessage = TAPi18n.__("grains.grainDeletePopup.confirmationMessage");
|
||||
if (window.confirm(confirmationMessage)) {
|
||||
Meteor.call("moveGrainsToTrash", [grainId]);
|
||||
globalGrains.remove(grainId, true);
|
||||
|
||||
Reference in new issue
Block a user