Skip to content

Commit ef0110f

Browse files
committed
about: Mark strings for translation.
Signed-off-by: Anders Kaseorg <[email protected]>
1 parent b7a7ca3 commit ef0110f

File tree

3 files changed

+31
-17
lines changed

3 files changed

+31
-17
lines changed

app/renderer/about.html

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -6,21 +6,4 @@
66
<div class="about" hidden>
77
<img class="logo" src="../resources/zulip.png" />
88
<p class="detail" id="version"></p>
9-
<div class="maintenance-info">
10-
<p class="detail maintainer">
11-
Maintained by
12-
<a href="https://zulip.com" target="_blank" rel="noopener noreferrer"
13-
>Zulip</a
14-
>
15-
</p>
16-
<p class="detail license">
17-
Available under the
18-
<a
19-
href="https://github.com/zulip/zulip-desktop/blob/main/LICENSE"
20-
target="_blank"
21-
rel="noopener noreferrer"
22-
>Apache 2.0 License</a
23-
>
24-
</p>
25-
</div>
269
</div>

app/renderer/js/pages/about.ts

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
import {app} from "@electron/remote";
22

3+
import {Html, html} from "../../../common/html.js";
34
import {bundleUrl} from "../../../common/paths.js";
5+
import * as t from "../../../common/translation-util.js";
6+
import {generateNodeFromHtml} from "../components/base.js";
47

58
export class AboutView {
69
static async create(): Promise<AboutView> {
@@ -16,6 +19,32 @@ export class AboutView {
1619
const $shadow = this.$view.attachShadow({mode: "open"});
1720
$shadow.innerHTML = templateHtml;
1821
$shadow.querySelector("#version")!.textContent = `v${app.getVersion()}`;
22+
const maintenanceInfoHtml = html`
23+
<div class="maintenance-info">
24+
<p class="detail maintainer">
25+
${new Html({
26+
html: t.__("Maintained by {{{link}}}Zulip{{{endLink}}}", {
27+
link: '<a href="https://zulip.com" target="_blank" rel="noopener noreferrer">',
28+
endLink: "</a>",
29+
}),
30+
})}
31+
</p>
32+
<p class="detail license">
33+
${new Html({
34+
html: t.__(
35+
"Available under the {{{link}}}Apache 2.0 License{{{endLink}}}",
36+
{
37+
link: '<a href="https://github.com/zulip/zulip-desktop/blob/main/LICENSE" target="_blank" rel="noopener noreferrer">',
38+
endLink: "</a>",
39+
},
40+
),
41+
})}
42+
</p>
43+
</div>
44+
`;
45+
$shadow
46+
.querySelector(".about")!
47+
.append(generateNodeFromHtml(maintenanceInfoHtml));
1948
}
2049

2150
destroy() {

public/translations/en.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
"Ask where to save files before downloading": "Ask where to save files before downloading",
1818
"Auto hide Menu bar": "Auto hide Menu bar",
1919
"Auto hide menu bar (Press Alt key to display)": "Auto hide menu bar (Press Alt key to display)",
20+
"Available under the {{{link}}}Apache 2.0 License{{{endLink}}}": "Available under the {{{link}}}Apache 2.0 License{{{endLink}}}",
2021
"Back": "Back",
2122
"Bounce dock on new private message": "Bounce dock on new private message",
2223
"Change": "Change",
@@ -73,6 +74,7 @@
7374
"Log Out": "Log Out",
7475
"Log Out of Organization": "Log Out of Organization",
7576
"Look Up": "Look Up",
77+
"Maintained by {{{link}}}Zulip{{{endLink}}}": "Maintained by {{{link}}}Zulip{{{endLink}}}",
7678
"Manual proxy configuration": "Manual proxy configuration",
7779
"Minimize": "Minimize",
7880
"Mute all sounds from Zulip": "Mute all sounds from Zulip",

0 commit comments

Comments
 (0)