Merge pull request #3698 from troyjfarrell/grain_client_i18n

I18n for grain renaming and grain deletion prompt
This commit is contained in:
Kenton Varda authored and GitHub committed 2023-08-06 13:38:01 -05:00
commit a16f4447c1
2 files changed
+10 -3

No files matched your search

+7
View File
@@ -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"
+3 -3
View File
@@ -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);