Skip to content

Commit 583e0a3

Browse files
authored
Merge pull request #101 from nyaa8/translatable-releases
Make hardcoded strings translatable
2 parents 7ccf820 + 756dd26 commit 583e0a3

File tree

3 files changed

+31
-33
lines changed

3 files changed

+31
-33
lines changed

layouts/shortcodes/slogan.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
</div>
88
<div class="cta-buttons">
99
<a href="{{ ref . (dict "path" "learn/getting-started.md" "lang" $lang) }}" class="button main" style="margin-bottom: 5px;">{{ .Get "get_started" }}</a>
10-
<span class="slogan-separator" style= "font-size: 0.5em;"> Latest Release: &nbsp; <b>{{ $version }}</b> </span>
10+
<span class="slogan-separator" style= "font-size: 0.5em;"> {{ i18n "slogan" $version | safeHTML }} </span>
1111
<div style="display:flex; flex-direction: row; margin-top: 5px;">
1212
<a href="https://ziglang.org/documentation/{{ $version }}/" class="button" style="flex-grow: 1; margin-top: 0px;">{{ .Get "docs" }}</a>
1313
<a href="https://ziglang.org/download/{{ $version }}/release-notes.html" class="button" style="margin-left:5px; margin-top: 0px;">{{ .Get "notes" }}</a>

themes/ziglang-original/i18n/en.toml

Lines changed: 27 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,50 @@
1+
[slogan]
2+
other = "Latest Release: &nbsp; <b>{{ . }}</b>"
13

2-
[menu-source]
3-
other = "Source Code"
44

5-
[menu-community]
6-
other = "Join a Community"
5+
[back-to-home]
6+
other = "← Back to the <b>Home</b> page"
77

88
[back-to-parent]
99
other = "← Back to the <b>{{ . }}</b> section"
1010

11-
[back-to-home]
12-
other = "← Back to the <b>Home</b> page"
11+
[menu-community]
12+
other = "Join a Community"
1313

14+
[menu-source]
15+
other = "Source Code"
1416

15-
[download-filename]
16-
other = "Filename"
1717

18-
[download-kind]
19-
other = "Kind"
18+
[downloads-heading]
19+
other = "Releases"
2020

21-
[download-size]
22-
other = "Size"
21+
[downloads-install-from-pkg-manager]
22+
other = "You can also <a href=\"https://github.com/ziglang/zig/wiki/Install-Zig-from-a-Package-Manager\"> install Zig from a package manager</a>."
23+
24+
[downloads-json]
25+
other = "There is a <a href=\"https://ziglang.org/download/index.json\">JSON version of this page</a>."
2326

24-
[download-source]
25-
other = "Source"
2627

2728
[download-binary]
2829
other = "Binary"
2930

3031
[download-documentation]
3132
other = "<a href=\"{{ . }}\">Language Reference</a>"
3233

33-
[download-release-notes]
34-
other = "<a href=\"{{ . }}\">Release Notes</a>"
35-
36-
[download-stdlib-docs]
37-
other = "<a href=\"{{ . }}\">Standard Library Documentation</a> (experimental)"
38-
39-
40-
41-
34+
[download-filename]
35+
other = "Filename"
4236

37+
[download-kind]
38+
other = "Kind"
4339

40+
[download-release-notes]
41+
other = "<a href=\"{{ . }}\">Release Notes</a>"
4442

43+
[download-size]
44+
other = "Size"
4545

46+
[download-source]
47+
other = "Source"
4648

49+
[download-stdlib-docs]
50+
other = "<a href=\"{{ . }}\">Standard Library Documentation</a> (experimental)"

themes/ziglang-original/layouts/_default/downloads.html

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,9 @@
33
{{ end }}
44
{{ define "main" }}
55
<div class="container">
6-
<h1>Releases</h1>
7-
<p>You can also
8-
<a href="https://github.com/ziglang/zig/wiki/Install-Zig-from-a-Package-Manager">
9-
install Zig from a package manager</a>.
10-
</p>
11-
<p>There is a
12-
<a href="https://ziglang.org/download/index.json">
13-
JSON version of this page</a>.
14-
</p>
6+
<h1>{{ i18n "downloads-heading" }}</h1>
7+
<p>{{ i18n "downloads-install-from-pkg-manager" | safeHTML }}</p>
8+
<p>{{ i18n "downloads-json" | safeHTML }}</p>
159

1610
<div>
1711
{{ range $release_name := $.Site.Params.downloads_release_order }}

0 commit comments

Comments
 (0)