Skip to content

Commit aa3fa06

Browse files
committed
style: adjust wc-styling messages to make translation easier
1 parent 042d4f9 commit aa3fa06

File tree

2 files changed

+11
-14
lines changed

2 files changed

+11
-14
lines changed

packages/studio-web/src/app/shared/wc-styling/wc-styling.component.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ <h1 i18n="Title for style box" class="title">
6060
<div class="d-flex flex-row justify-content-between p-0">
6161
<span class="p-0"
6262
><h2 i18n="Title for style writing box" class="subtitle">
63-
Write or paste your style here
63+
Write or paste your style sheet here
6464
</h2></span
6565
>
6666
<button mat-button (click)="updateStyle()">
@@ -87,7 +87,7 @@ <h1 i18n="Title for style box" class="title">
8787
i18n="Instructions for uploading font"
8888
for="defaultFont"
8989
class="form-label"
90-
>Select an optional font (.woff2)</label
90+
>Optional: use a custom font (.woff2)</label
9191
>
9292
<input
9393
#fontInputElement

packages/studio-web/src/app/shared/wc-styling/wc-styling.component.ts

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,8 @@ export class WcStylingComponent implements OnDestroy, OnInit {
3636
if (file.size > 10048576) {
3737
//10MB
3838
this.toastr.error(
39-
$localize`File
40-
${file.name} could not be processed `,
41-
$localize`File is too big`,
39+
$localize`File ` + file.name + $localize` could not be processed.`,
40+
$localize`File is too big.`,
4241
{ timeOut: 2000 },
4342
);
4443

@@ -55,15 +54,14 @@ export class WcStylingComponent implements OnDestroy, OnInit {
5554
);
5655
this.updateStyle();
5756
this.toastr.success(
58-
$localize`File ` + file.name + $localize` processed. `,
57+
$localize`File ` + file.name + $localize` processed.`,
5958
$localize`Great!`,
6059
{ timeOut: 10000 },
6160
);
6261
})
6362
.catch((err) => {
6463
this.toastr.error(
65-
$localize`Font
66-
${file.name} could not be processed `,
64+
$localize`File ` + file.name + $localize` could not be processed.`,
6765
err,
6866
{ timeOut: 2000 },
6967
);
@@ -75,9 +73,8 @@ export class WcStylingComponent implements OnDestroy, OnInit {
7573
if (file.size > 1048576) {
7674
//1MB
7775
this.toastr.error(
78-
$localize`File
79-
${file.name} could not be processed `,
80-
$localize`File is too big`,
76+
$localize`File ` + file.name + $localize` could not be processed.`,
77+
$localize`File is too big.`,
8178
{ timeOut: 2000 },
8279
);
8380

@@ -93,15 +90,15 @@ export class WcStylingComponent implements OnDestroy, OnInit {
9390
this.toastr.success(
9491
$localize`File ` +
9592
file.name +
96-
$localize` processed. Content added to the text box.`,
93+
$localize` processed.` +
94+
$localize` Content loaded in the text box.`,
9795
$localize`Great!`,
9896
{ timeOut: 10000 },
9997
);
10098
})
10199
.catch((err) => {
102100
this.toastr.error(
103-
$localize`File
104-
${file.name} could not be processed `,
101+
$localize`File ` + file.name + $localize` could not be processed.`,
105102
err,
106103
{ timeOut: 2000 },
107104
);

0 commit comments

Comments
 (0)