Skip to content

Commit 1ed0135

Browse files
committed
Trash -> Bin
1 parent 56fa881 commit 1ed0135

File tree

5 files changed

+26
-25
lines changed

5 files changed

+26
-25
lines changed

services/static-webserver/client/source/class/osparc/dashboard/FolderButtonItem.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@ qx.Class.define("osparc.dashboard.FolderButtonItem", {
271271

272272
menu.addSeparator();
273273

274-
const trashButton = new qx.ui.menu.Button(this.tr("Trash"), "@FontAwesome5Solid/trash/12");
274+
const trashButton = new qx.ui.menu.Button(this.tr("Move to Bin"), "@FontAwesome5Solid/trash/12");
275275
trashButton.addListener("execute", () => this.fireDataEvent("trashFolderRequested", this.getFolderId()), this);
276276
menu.add(trashButton);
277277
} else if (studyBrowserContext === "trash") {

services/static-webserver/client/source/class/osparc/dashboard/ResourceFilter.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ qx.Class.define("osparc.dashboard.ResourceFilter", {
105105
const trashButton = this.__trashButton = new qx.ui.toolbar.RadioButton().set({
106106
value: false,
107107
appearance: "filter-toggle-button",
108-
label: this.tr("Trash"),
108+
label: this.tr("Bin"),
109109
paddingLeft: 10, // align it with the context
110110
});
111111
trashButton.addListener("changeValue", e => {

services/static-webserver/client/source/class/osparc/dashboard/StudyBrowser.js

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -470,7 +470,7 @@ qx.Class.define("osparc.dashboard.StudyBrowser", {
470470
osparc.store.Workspaces.getInstance().trashWorkspace(workspaceId)
471471
.then(() => {
472472
this.__reloadWorkspaces();
473-
const msg = this.tr("Successfully moved to Trash");
473+
const msg = this.tr("Successfully moved to the Bin");
474474
osparc.FlashMessenger.getInstance().logAs(msg, "INFO");
475475
this._resourceFilter.setTrashEmpty(false);
476476
})
@@ -608,7 +608,7 @@ qx.Class.define("osparc.dashboard.StudyBrowser", {
608608
osparc.store.Folders.getInstance().trashFolder(folderId, this.getCurrentWorkspaceId())
609609
.then(() => {
610610
this.__reloadFolders();
611-
const msg = this.tr("Successfully moved to Trash");
611+
const msg = this.tr("Successfully moved to Bin");
612612
osparc.FlashMessenger.getInstance().logAs(msg, "INFO");
613613
this._resourceFilter.setTrashEmpty(false);
614614
})
@@ -620,11 +620,11 @@ qx.Class.define("osparc.dashboard.StudyBrowser", {
620620

621621
_trashFolderRequested: function(folderId) {
622622
const trashDays = osparc.store.StaticInfo.getInstance().getTrashRetentionDays();
623-
let msg = this.tr("Are you sure you want to move the Folder and all its content to the trash?");
623+
let msg = this.tr("Are you sure you want to move the Folder and all its content to the Bin?");
624624
msg += "<br><br>" + this.tr("It will be permanently deleted after ") + trashDays + " days.";
625625
const confirmationWin = new osparc.ui.window.Confirmation(msg).set({
626-
caption: this.tr("Move to Trash"),
627-
confirmText: this.tr("Move to Trash"),
626+
caption: this.tr("Move to Bin"),
627+
confirmText: this.tr("Move to Bin"),
628628
confirmAction: "warning",
629629
});
630630
confirmationWin.center();
@@ -764,6 +764,7 @@ qx.Class.define("osparc.dashboard.StudyBrowser", {
764764
// loose equality: will do a Number to String conversion if necessary
765765
sameContext &= key in currentParams && currentParams[key] == value;
766766
});
767+
console.log("sameContext", sameContext, reqParams, currentParams);
767768
return !sameContext;
768769
},
769770

@@ -1051,17 +1052,17 @@ qx.Class.define("osparc.dashboard.StudyBrowser", {
10511052

10521053
studiesMoveButton.set({
10531054
visibility: selection.length && currentContext === "studiesAndFolders" ? "visible" : "excluded",
1054-
label: selection.length > 1 ? this.tr("Move selected")+" ("+selection.length+")" : this.tr("Move")
1055+
label: this.tr("Move") + (selection.length > 1 ? this.tr(" selected ") + `(${selection.length})` : ""),
10551056
});
10561057

10571058
studiesTrashButton.set({
10581059
visibility: selection.length && currentContext === "studiesAndFolders" ? "visible" : "excluded",
1059-
label: selection.length > 1 ? this.tr("Trash selected")+" ("+selection.length+")" : this.tr("Trash")
1060+
label: this.tr("Move to Bin") + (selection.length > 1 ? this.tr(" selected ") + `(${selection.length})` : ""),
10601061
});
10611062

10621063
studiesDeleteButton.set({
10631064
visibility: selection.length && currentContext === "trash" ? "visible" : "excluded",
1064-
label: selection.length > 1 ? this.tr("Delete selected")+" ("+selection.length+")" : this.tr("Delete")
1065+
label: this.tr("Delete permamently") + (selection.length > 1 ? this.tr(" selected ") + `(${selection.length})` : ""),
10651066
});
10661067
});
10671068

@@ -1320,8 +1321,8 @@ qx.Class.define("osparc.dashboard.StudyBrowser", {
13201321
},
13211322

13221323
__createTrashStudiesButton: function() {
1323-
const trashButton = new qx.ui.form.Button(this.tr("Trash"), "@FontAwesome5Solid/trash/14").set({
1324-
appearance: "danger-button",
1324+
const trashButton = new qx.ui.form.Button(this.tr("Move to Bin"), "@FontAwesome5Solid/trash/14").set({
1325+
appearance: "warning-button",
13251326
visibility: "excluded"
13261327
});
13271328
osparc.utils.Utils.setIdToWidget(trashButton, "deleteStudiesBtn");
@@ -1828,7 +1829,7 @@ qx.Class.define("osparc.dashboard.StudyBrowser", {
18281829
},
18291830

18301831
__getTrashStudyMenuButton: function(studyData) {
1831-
const trashButton = new qx.ui.menu.Button(this.tr("Trash"), "@FontAwesome5Solid/trash/12");
1832+
const trashButton = new qx.ui.menu.Button(this.tr("Move to Bin"), "@FontAwesome5Solid/trash/12");
18321833
trashButton["trashButton"] = true;
18331834
trashButton.set({
18341835
appearance: "menu-button"
@@ -2029,7 +2030,7 @@ qx.Class.define("osparc.dashboard.StudyBrowser", {
20292030
osparc.store.Store.getInstance().trashStudy(studyData.uuid)
20302031
.then(() => {
20312032
this.__removeFromStudyList(studyData.uuid);
2032-
const msg = this.tr("Successfully moved to Trash");
2033+
const msg = this.tr("Successfully moved to Bin");
20332034
osparc.FlashMessenger.getInstance().logAs(msg, "INFO");
20342035
this._resourceFilter.setTrashEmpty(false);
20352036
})
@@ -2089,12 +2090,12 @@ qx.Class.define("osparc.dashboard.StudyBrowser", {
20892090
} else {
20902091
msg += ` '${studyNames[0]}' `;
20912092
}
2092-
msg += this.tr("to the Trash?");
2093+
msg += this.tr("to the Bin?");
20932094
const trashDays = osparc.store.StaticInfo.getInstance().getTrashRetentionDays();
20942095
msg += "<br><br>" + (studyNames.length > 1 ? "They" : "It") + this.tr(` will be permanently deleted after ${trashDays} days.`);
20952096
const confirmationWin = new osparc.ui.window.Confirmation(msg).set({
2096-
caption: this.tr("Move to Trash"),
2097-
confirmText: this.tr("Move to Trash"),
2097+
caption: this.tr("Move to Bin"),
2098+
confirmText: this.tr("Move to Bin"),
20982099
confirmAction: "warning",
20992100
});
21002101
osparc.utils.Utils.setIdToWidget(confirmationWin.getConfirmButton(), "confirmDeleteStudyBtn");

services/static-webserver/client/source/class/osparc/dashboard/StudyBrowserHeader.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ qx.Class.define("osparc.dashboard.StudyBrowserHeader", {
193193
break;
194194
}
195195
case "empty-trash-button": {
196-
control = new qx.ui.form.Button(this.tr("Empty Trash"), "@FontAwesome5Solid/trash/14").set({
196+
control = new qx.ui.form.Button(this.tr("Empty Bin"), "@FontAwesome5Solid/trash/14").set({
197197
appearance: "danger-button",
198198
allowGrowY: false,
199199
alignY: "middle",
@@ -233,7 +233,7 @@ qx.Class.define("osparc.dashboard.StudyBrowserHeader", {
233233
const roleWorkspaceLayout = this.getChildControl("role-layout").set({
234234
visibility: "excluded"
235235
});
236-
236+
237237
const description = this.getChildControl("description").set({
238238
visibility: "excluded"
239239
});
@@ -275,10 +275,10 @@ qx.Class.define("osparc.dashboard.StudyBrowserHeader", {
275275
break;
276276
case "trash": {
277277
this.__setIcon("@FontAwesome5Solid/trash/20");
278-
title.setValue(this.tr("Trash"));
278+
title.setValue(this.tr("Bin"));
279279
const trashDays = osparc.store.StaticInfo.getInstance().getTrashRetentionDays();
280280
description.set({
281-
value: this.tr(`Items in the bin will be permanently deleted after ${trashDays} days.`),
281+
value: this.tr(`Items in the Bin will be permanently deleted after ${trashDays} days.`),
282282
visibility: "visible",
283283
});
284284
break;

services/static-webserver/client/source/class/osparc/dashboard/WorkspaceButtonItem.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ qx.Class.define("osparc.dashboard.WorkspaceButtonItem", {
210210

211211
menu.addSeparator();
212212

213-
const trashButton = new qx.ui.menu.Button(this.tr("Trash"), "@FontAwesome5Solid/trash/12");
213+
const trashButton = new qx.ui.menu.Button(this.tr("Move to Bin"), "@FontAwesome5Solid/trash/12");
214214
trashButton.addListener("execute", () => this.__trashWorkspaceRequested(), this);
215215
menu.add(trashButton);
216216
} else if (studyBrowserContext === "trash") {
@@ -270,11 +270,11 @@ qx.Class.define("osparc.dashboard.WorkspaceButtonItem", {
270270

271271
__trashWorkspaceRequested: function() {
272272
const trashDays = osparc.store.StaticInfo.getInstance().getTrashRetentionDays();
273-
let msg = this.tr("Are you sure you want to move the Workspace and all its content to the trash?");
273+
let msg = this.tr("Are you sure you want to move the Workspace and all its content to the Bin?");
274274
msg += "<br><br>" + this.tr("It will be permanently deleted after ") + trashDays + " days.";
275275
const confirmationWin = new osparc.ui.window.Confirmation(msg).set({
276-
caption: this.tr("Move to Trash"),
277-
confirmText: this.tr("Move to Trash"),
276+
caption: this.tr("Move to Bin"),
277+
confirmText: this.tr("Move to Bin"),
278278
confirmAction: "delete"
279279
});
280280
confirmationWin.center();

0 commit comments

Comments
 (0)