Skip to content

Commit 938c1da

Browse files
authored
🎨 [Frontend] Enh: Wording and .po file (#7418)
1 parent 7b26c6f commit 938c1da

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+4533
-110
lines changed

services/static-webserver/client/.gitignore

-3
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,3 @@ source/resource/iconfont/material
1414
# generator outputs
1515
/api/
1616
/test/
17-
18-
# translations for the moment ignored
19-
*.po

services/static-webserver/client/Makefile

+11
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,17 @@ serve: compile ## serves site compiled in image in 127.0.0.1:8080
8888
docker run --rm -p 8080:8080 $(docker_image) $(qx_serve) --target=build
8989

9090

91+
# qx translate --------------------------
92+
93+
define qx_translate_extract =
94+
qx compile --update-po-files
95+
endef
96+
97+
.PHONY: translate-extract
98+
translate-extract: translate-extract ## the generated .po files goes to source/translation https://qooxdoo.org/documentation/v7.8/#/development/howto/internationalization?id=translation
99+
# qx compile --update-po-files
100+
$(docker_compose) run $(if $(detached),--detach --name=$(detached),--rm) qooxdoo-kit $(qx_translate_extract)
101+
91102

92103
# misc --------------------------
93104
.PHONY: shell

services/static-webserver/client/source/class/osparc/Application.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ qx.Class.define("osparc.Application", {
7474
const webSocket = osparc.wrapper.WebSocket.getInstance();
7575
webSocket.addListener("connect", () => osparc.WatchDog.getInstance().setOnline(true));
7676
webSocket.addListener("disconnect", () => osparc.WatchDog.getInstance().setOnline(false));
77-
webSocket.addListener("logout", () => this.logout(qx.locale.Manager.tr("You were logged out")));
77+
webSocket.addListener("logout", () => this.logout(qx.locale.Manager.tr("You have been logged out")));
7878
// alert the users that they are about to navigate away
7979
// from osparc. unfortunately it is not possible
8080
// to provide our own message here
@@ -371,7 +371,7 @@ qx.Class.define("osparc.Application", {
371371
__checkNewRelease: function() {
372372
if (osparc.NewRelease.firstTimeISeeThisFrontend()) {
373373
const newRelease = new osparc.NewRelease();
374-
const title = this.tr("New Release");
374+
const title = this.tr("New Version Released");
375375
const win = osparc.ui.window.Window.popUpInWindow(newRelease, title, 350, 135).set({
376376
clickAwayClose: false,
377377
resizable: false,
@@ -563,7 +563,7 @@ qx.Class.define("osparc.Application", {
563563
if (forcedReason) {
564564
osparc.FlashMessenger.logAs(forcedReason, "WARNING", 0);
565565
} else {
566-
osparc.FlashMessenger.logAs(this.tr("You are logged out"), "INFO");
566+
osparc.FlashMessenger.logAs(this.tr("You have been logged out"), "INFO");
567567
}
568568
this.__closeAllAndToLoginPage();
569569
},

services/static-webserver/client/source/class/osparc/CookieExpirationTracker.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ qx.Class.define("osparc.CookieExpirationTracker", {
112112
// /FLASH MESSAGE //
113113

114114
__logoutUser: function() {
115-
const reason = qx.locale.Manager.tr("Session expired");
115+
const reason = qx.locale.Manager.tr("Your session has expired");
116116
qx.core.Init.getApplication().logout(reason);
117117
}
118118
}

services/static-webserver/client/source/class/osparc/MaintenanceTracker.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ qx.Class.define("osparc.MaintenanceTracker", {
166166
end: null,
167167
reason: null
168168
});
169-
const reason = qx.locale.Manager.tr("We are under maintenance. Please check back later");
169+
const reason = qx.locale.Manager.tr("The service is under maintenance. Please check back later");
170170
qx.core.Init.getApplication().logout(reason);
171171
},
172172

services/static-webserver/client/source/class/osparc/TooSmallDialog.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ qx.Class.define("osparc.TooSmallDialog", {
1919
extend: osparc.ui.window.SingletonWindow,
2020

2121
construct: function() {
22-
this.base(arguments, "too-small-logout", this.tr("Window too small"));
22+
this.base(arguments, "too-small-logout", this.tr("Window size too small"));
2323

2424
this.set({
2525
layout: new qx.ui.layout.VBox(10),

services/static-webserver/client/source/class/osparc/auth/ui/Login2FAValidationCodeView.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ qx.Class.define("osparc.auth.ui.Login2FAValidationCodeView", {
9797
alignY: "middle"
9898
}));
9999
const resendCodeDesc = new qx.ui.basic.Label().set({
100-
value: this.tr("Didn't receive the code? Resend code")
100+
value: this.tr("Didn't receive the code? Click to resend")
101101
});
102102
resendLayout.add(resendCodeDesc);
103103

services/static-webserver/client/source/class/osparc/auth/ui/RequestAccount.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -408,7 +408,7 @@ qx.Class.define("osparc.auth.ui.RequestAccount", {
408408
};
409409
osparc.data.Resources.fetch("auth", "postRequestAccount", params)
410410
.then(() => {
411-
const msg = this.tr("The request is being processed, you will hear from us in the coming hours");
411+
const msg = this.tr("Your request is being processed. You will hear from us soon");
412412
osparc.FlashMessenger.logAs(msg, "INFO");
413413
this.fireDataEvent("done");
414414
})

services/static-webserver/client/source/class/osparc/auth/ui/VerifyPhoneNumberView.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ qx.Class.define("osparc.auth.ui.VerifyPhoneNumberView", {
6161
this.add(verificationInfoTitle);
6262

6363
const verificationInfoDesc = new qx.ui.basic.Label().set({
64-
value: this.tr("We will send you a text message to your mobile phone to authenticate you each time you log in."),
64+
value: this.tr("A text message will be sent to your mobile phone for authentication each time you log in."),
6565
rich: true,
6666
wrap: true
6767
});

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

+4-2
Original file line numberDiff line numberDiff line change
@@ -2141,16 +2141,18 @@ qx.Class.define("osparc.dashboard.StudyBrowser", {
21412141
if (msg) {
21422142
osparc.FlashMessenger.logAs(msg, msgLevel);
21432143
}
2144+
osparc.store.PollTasks.getInstance().removeTask(task);
21442145
osparc.task.TasksContainer.getInstance().removeTaskUI(taskUI);
21452146
this._resourcesContainer.removeNonResourceCard(duplicatingStudyCard);
21462147
};
21472148

21482149
task.addListener("taskAborted", () => {
21492150
const msg = this.tr("Duplication cancelled");
2150-
finished(msg, "INFO");
2151+
finished(msg, "WARNING");
21512152
});
21522153
task.addListener("resultReceived", e => {
2153-
finished();
2154+
const msg = this.tr("Duplication completed");
2155+
finished(msg, "INFO");
21542156
const duplicatedStudyData = e.getData();
21552157
this._updateStudyData(duplicatedStudyData);
21562158
});

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

+25-23
Original file line numberDiff line numberDiff line change
@@ -346,18 +346,40 @@ qx.Class.define("osparc.dashboard.TemplateBrowser", {
346346
// MENU //
347347

348348
// TASKS //
349+
__tasksToCards: function() {
350+
const tasks = osparc.store.PollTasks.getInstance().getPublishTemplateTasks();
351+
tasks.forEach(task => {
352+
const studyName = "";
353+
this.taskToTemplateReceived(task, studyName);
354+
});
355+
},
356+
357+
taskToTemplateReceived: function(task, studyName) {
358+
const toTemplateTaskUI = new osparc.task.ToTemplate(studyName);
359+
toTemplateTaskUI.setTask(task);
360+
361+
osparc.task.TasksContainer.getInstance().addTaskUI(toTemplateTaskUI);
362+
363+
const cardTitle = this.tr("Publishing ") + studyName;
364+
const toTemplateCard = this._addTaskCard(task, cardTitle, osparc.task.ToTemplate.ICON);
365+
if (toTemplateCard) {
366+
this.__attachToTemplateEventHandler(task, toTemplateTaskUI, toTemplateCard);
367+
}
368+
},
369+
349370
__attachToTemplateEventHandler: function(task, taskUI, toTemplateCard) {
350371
const finished = (msg, msgLevel) => {
351372
if (msg) {
352373
osparc.FlashMessenger.logAs(msg, msgLevel);
353374
}
375+
osparc.store.PollTasks.getInstance().removeTask(task);
354376
osparc.task.TasksContainer.getInstance().removeTaskUI(taskUI);
355377
this._resourcesContainer.removeNonResourceCard(toTemplateCard);
356378
};
357379

358380
task.addListener("taskAborted", () => {
359381
const msg = this.tr("Study to Template cancelled");
360-
finished(msg, "INFO");
382+
finished(msg, "WARNING");
361383
});
362384
task.addListener("updateReceived", e => {
363385
const updateData = e.getData();
@@ -372,7 +394,8 @@ qx.Class.define("osparc.dashboard.TemplateBrowser", {
372394
}
373395
}, this);
374396
task.addListener("resultReceived", e => {
375-
finished();
397+
const msg = this.tr("Template created");
398+
finished(msg, "INFO");
376399
this.reloadResources();
377400
});
378401
task.addListener("pollingError", e => {
@@ -381,27 +404,6 @@ qx.Class.define("osparc.dashboard.TemplateBrowser", {
381404
finished(msg, "ERROR");
382405
});
383406
},
384-
385-
__tasksToCards: function() {
386-
const tasks = osparc.store.PollTasks.getInstance().getPublishTemplateTasks();
387-
tasks.forEach(task => {
388-
const studyName = "";
389-
this.taskToTemplateReceived(task, studyName);
390-
});
391-
},
392-
393-
taskToTemplateReceived: function(task, studyName) {
394-
const toTemplateTaskUI = new osparc.task.ToTemplate(studyName);
395-
toTemplateTaskUI.setTask(task);
396-
397-
osparc.task.TasksContainer.getInstance().addTaskUI(toTemplateTaskUI);
398-
399-
const cardTitle = this.tr("Publishing ") + studyName;
400-
const toTemplateCard = this._addTaskCard(task, cardTitle, osparc.task.ToTemplate.ICON);
401-
if (toTemplateCard) {
402-
this.__attachToTemplateEventHandler(task, toTemplateTaskUI, toTemplateCard);
403-
}
404-
},
405407
// TASKS //
406408
}
407409
});

services/static-webserver/client/source/class/osparc/data/Resources.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1491,7 +1491,7 @@ qx.Class.define("osparc.data.Resources", {
14911491
if ("status" in err && err.status === 401) {
14921492
// Unauthorized again, the cookie might have expired.
14931493
// We can assume that all calls after this will respond with 401, so bring the user ot the login page.
1494-
qx.core.Init.getApplication().logout(qx.locale.Manager.tr("You were logged out. Your cookie might have expired."));
1494+
qx.core.Init.getApplication().logout(qx.locale.Manager.tr("You have been logged out. Your cookie might have expired."));
14951495
}
14961496
});
14971497
}

services/static-webserver/client/source/class/osparc/data/model/NodeProgressSequence.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ qx.Class.define("osparc.data.model.NodeProgressSequence", {
123123

124124
createDisclaimerText: function() {
125125
const disclaimerText = new qx.ui.basic.Atom().set({
126-
label: qx.locale.Manager.tr("Please be patient, this process can take a few minutes ..."),
126+
label: qx.locale.Manager.tr("Please wait, this process may take a few minutes ..."),
127127
padding: [20, 10],
128128
gap: 15,
129129
icon: "@FontAwesome5Solid/exclamation-triangle/16",
@@ -187,10 +187,10 @@ qx.Class.define("osparc.data.model.NodeProgressSequence", {
187187
getProgress: function(report) {
188188
if (report.unit) {
189189
const attempt = ("attempt" in report && report["attempt"] > 1) ? `(attempt ${report["attempt"]}) ` : "";
190-
const current_value = osparc.utils.Utils.bytesToSize(report["actual_value"], 1, false);
191-
const total_value = osparc.utils.Utils.bytesToSize(report["total"], 1, false)
190+
const currentValue = osparc.utils.Utils.bytesToSize(report["actual_value"], 1, false);
191+
const totalValue = osparc.utils.Utils.bytesToSize(report["total"], 1, false)
192192
return {
193-
progressLabel: `${attempt}${current_value} / ${total_value}`,
193+
progressLabel: `${attempt}${currentValue} / ${totalValue}`,
194194
value: report["actual_value"] / report["total"]
195195
}
196196
}

services/static-webserver/client/source/class/osparc/desktop/MainPage.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,7 @@ qx.Class.define("osparc.desktop.MainPage", {
304304
osparc.data.Resources.fetch("snapshots", "checkout", params)
305305
.then(snapshotResp => {
306306
if (!snapshotResp) {
307-
const msg = this.tr("Snapshot not found");
307+
const msg = this.tr("No snapshot found");
308308
throw new Error(msg);
309309
}
310310
const params2 = {

services/static-webserver/client/source/class/osparc/desktop/account/ProfilePage.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ qx.Class.define("osparc.desktop.account.ProfilePage", {
142142
expirationLayout.add(expirationDateLabel);
143143
const expirationDate = new qx.ui.basic.Label();
144144
expirationLayout.add(expirationDate);
145-
const infoLabel = this.tr("Please contact us by email:<br>");
145+
const infoLabel = this.tr("Please contact us via email:<br>");
146146
const infoExtension = new osparc.ui.hint.InfoHint(infoLabel);
147147
const supportEmail = osparc.store.VendorInfo.getInstance().getSupportEmail();
148148
infoExtension.setHintText(infoLabel + supportEmail);
@@ -348,7 +348,7 @@ qx.Class.define("osparc.desktop.account.ProfilePage", {
348348
});
349349

350350
const optOutMessage = new qx.ui.basic.Atom().set({
351-
label: this.tr("If all searchable fields are hidden, you will not be findable."),
351+
label: this.tr("If all searchable fields are hidden, you will not be discoverable."),
352352
icon: "@FontAwesome5Solid/exclamation-triangle/14",
353353
gap: 8,
354354
allowGrowX: false,
@@ -381,7 +381,7 @@ qx.Class.define("osparc.desktop.account.ProfilePage", {
381381
},
382382

383383
__create2FASection: function() {
384-
const box = osparc.ui.window.TabbedView.createSectionBox(this.tr("2 Factor Authentication"));
384+
const box = osparc.ui.window.TabbedView.createSectionBox(this.tr("Two-Factor Authentication"));
385385

386386
const label = osparc.ui.window.TabbedView.createHelpLabel(this.tr("Set your preferred method to use for two-factor authentication when signing in:"));
387387
box.add(label);
@@ -419,7 +419,7 @@ qx.Class.define("osparc.desktop.account.ProfilePage", {
419419
if (selectedId === "DISABLED") {
420420
const discourageTitle = this.tr("You are about to disable the 2FA");
421421
const discourageText = this.tr("\
422-
The 2 Factor Authentication is one more measure to prevent hackers from accessing your account with an additional layer of security. \
422+
The Two-Factor Authentication is one more measure to prevent hackers from accessing your account with an additional layer of security. \
423423
When you sign in, 2FA helps make sure that your resources and personal information stays private, safe and secure.\
424424
");
425425
const win = new osparc.ui.window.Confirmation(discourageTitle).set({

services/static-webserver/client/source/class/osparc/desktop/credits/CreditsPerService.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ qx.Class.define("osparc.desktop.credits.CreditsPerService", {
8989
this._add(uiEntry);
9090
});
9191
} else {
92-
const nothingFound = new qx.ui.basic.Label(this.tr("No usage found")).set({
92+
const nothingFound = new qx.ui.basic.Label(this.tr("No usage records found")).set({
9393
font: "text-14",
9494
padding: 20,
9595
});

services/static-webserver/client/source/class/osparc/desktop/organizations/MembersList.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -243,8 +243,8 @@ qx.Class.define("osparc.desktop.organizations.MembersList", {
243243
const canIDelete = organization.getAccessRights()["delete"];
244244

245245
const introText = canIWrite ?
246-
this.tr("You can add new members and change their roles.") :
247-
this.tr("You can't add new members to this Organization. Please contact an Administrator or Manager.");
246+
this.tr("You can add new members and assign roles.") :
247+
this.tr("You cannot add new members to this Organization. Please contact an Administrator or Manager.");
248248
this.__introLabel.setValue(introText);
249249

250250
this.__addMembersButton.set({
@@ -508,7 +508,7 @@ qx.Class.define("osparc.desktop.organizations.MembersList", {
508508
} else if (isThereAnyManager) {
509509
rUSure += `<br>There is no ${osparc.data.Roles.ORG[3].label} in this Organization.`;
510510
}
511-
rUSure += "<br><br>" + this.tr("If you Leave, the page will be reloaded.");
511+
rUSure += "<br><br>" + this.tr("If you leave, the page will reload.");
512512
const confirmationWin = new osparc.ui.window.Confirmation(rUSure).set({
513513
caption: this.tr("Leave Organization"),
514514
confirmText: this.tr("Leave"),

services/static-webserver/client/source/class/osparc/desktop/organizations/OrganizationDetails.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ qx.Class.define("osparc.desktop.organizations.OrganizationDetails", {
7171
const titleLayout = this.__titleLayout = new qx.ui.container.Composite(new qx.ui.layout.HBox(5));
7272

7373
const prevBtn = new qx.ui.form.Button().set({
74-
toolTipText: this.tr("Back to Organizations list"),
74+
toolTipText: this.tr("Return to Organizations list"),
7575
icon: "@FontAwesome5Solid/arrow-left/20",
7676
backgroundColor: "transparent"
7777
});

services/static-webserver/client/source/class/osparc/desktop/paymentMethods/PaymentMethodDetails.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ qx.Class.define("osparc.desktop.paymentMethods.PaymentMethodDetails", {
4747
members: {
4848
__buildLayout: function(paymentMethodData) {
4949
[
50-
[this.tr("Holder name"), paymentMethodData["cardHolderName"]],
50+
[this.tr("Card Holder name"), paymentMethodData["cardHolderName"]],
5151
[this.tr("Type"), paymentMethodData["cardType"]],
5252
[this.tr("Number"), paymentMethodData["cardNumberMasked"]],
5353
[this.tr("Expiration date"), paymentMethodData["expirationMonth"] + "/" + paymentMethodData["expirationYear"]]

services/static-webserver/client/source/class/osparc/desktop/paymentMethods/PaymentMethodListItem.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ qx.Class.define("osparc.desktop.paymentMethods.PaymentMethodListItem", {
182182
},
183183

184184
__deletePressed: function() {
185-
const msg = this.tr("Are you sure you want to delete the Payment Method?");
185+
const msg = this.tr("Are you sure you want to delete this Payment Method?");
186186
const win = new osparc.ui.window.Confirmation(msg).set({
187187
caption: this.tr("Delete Payment Method"),
188188
confirmText: this.tr("Delete"),

services/static-webserver/client/source/class/osparc/desktop/preferences/pages/TokensPage.js

+6-6
Original file line numberDiff line numberDiff line change
@@ -173,12 +173,12 @@ qx.Class.define("osparc.desktop.preferences.pages.TokensPage", {
173173

174174
__createTokensSection: function() {
175175
// layout
176-
const box = osparc.ui.window.TabbedView.createSectionBox(this.tr("External Service Tokens"));
176+
const box = osparc.ui.window.TabbedView.createSectionBox(this.tr("API Tokens for External Services"));
177177

178-
const label = osparc.ui.window.TabbedView.createHelpLabel(this.tr("Enter the API tokens to access external services."));
178+
const label = osparc.ui.window.TabbedView.createHelpLabel(this.tr("Provide the API tokens needed to access external services."));
179179
box.add(label);
180180

181-
const validTokensGB = this.__validTokensGB = osparc.ui.window.TabbedView.createSectionBox(this.tr("Existing Tokens"));
181+
const validTokensGB = this.__validTokensGB = osparc.ui.window.TabbedView.createSectionBox(this.tr("Current Tokens"));
182182
box.add(validTokensGB);
183183

184184
const supportedExternalsGB = this.__supportedExternalsGB = osparc.ui.window.TabbedView.createSectionBox(this.tr("Supported services")).set({
@@ -280,7 +280,7 @@ qx.Class.define("osparc.desktop.preferences.pages.TokensPage", {
280280
return;
281281
}
282282

283-
const msg = this.tr("Do you want to delete the Token?");
283+
const msg = this.tr("Are you sure you want to delete this token?");
284284
const win = new osparc.ui.window.Confirmation(msg).set({
285285
caption: this.tr("Delete Token"),
286286
confirmText: this.tr("Delete"),
@@ -326,13 +326,13 @@ qx.Class.define("osparc.desktop.preferences.pages.TokensPage", {
326326

327327
const newTokenKey = new qx.ui.form.TextField();
328328
newTokenKey.set({
329-
placeholder: this.tr("Input your token key")
329+
placeholder: this.tr("Enter your token key")
330330
});
331331
form.add(newTokenKey, this.tr("Key"));
332332

333333
const newTokenSecret = new qx.ui.form.TextField();
334334
newTokenSecret.set({
335-
placeholder: this.tr("Input your token secret")
335+
placeholder: this.tr("Enter your token secret")
336336
});
337337
form.add(newTokenSecret, this.tr("Secret"));
338338

services/static-webserver/client/source/class/osparc/desktop/preferences/window/CreateAPIKey.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ qx.Class.define("osparc.desktop.preferences.window.CreateAPIKey", {
1717
extend: osparc.desktop.preferences.window.APIKeyBase,
1818

1919
construct: function() {
20-
const caption = this.tr("Create API Key");
20+
const caption = this.tr("Generate API Key");
2121
const infoText = this.tr("Key names must be unique.");
2222
this.base(arguments, caption, infoText);
2323

@@ -48,7 +48,7 @@ qx.Class.define("osparc.desktop.preferences.window.CreateAPIKey", {
4848
if (date) {
4949
// allow only future dates
5050
if (new Date() > new Date(date)) {
51-
const msg = this.tr("Choose a future date");
51+
const msg = this.tr("Select a future date");
5252
osparc.FlashMessenger.logAs(msg, "WARNING");
5353
expirationDate.resetValue();
5454
} else {

0 commit comments

Comments
 (0)