Skip to content

Commit 32be3f7

Browse files
authored
Restructure description locale (#95)
* Initial cleanup * String redo attempt * Attempt * Replace loop with individual markup * Format tuning * Link format
1 parent a714d30 commit 32be3f7

File tree

4 files changed

+163
-98
lines changed

4 files changed

+163
-98
lines changed

app.scss

+20
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,15 @@ html.dark .link-rows a {
108108
color: var(--color-brand-dark) !important;
109109
}
110110

111+
.markdown-body p {
112+
line-height: 1.5;
113+
padding: 0;
114+
}
115+
116+
.feature-block h1{
117+
padding-top: 0.5em;
118+
}
119+
111120
.centered-hero {
112121
// Center everything along a column.
113122
display: flex;
@@ -137,3 +146,14 @@ html.dark .link-rows a {
137146
margin-bottom: 0.5rem;
138147
color: var(--color-base);
139148
}
149+
150+
a {
151+
color: var(--color-brand); text-decoration: none;
152+
}
153+
html.dark a {
154+
color: var(--color-brand-dark);
155+
}
156+
157+
a:hover {
158+
text-decoration: underline;
159+
}

lang/en.json

+19-8
Original file line numberDiff line numberDiff line change
@@ -32,22 +32,33 @@
3232
"content.home.features.title": "Why should you use Fabulously Optimized?",
3333
"content.home.features.videoID": "bb8G9X5Q_4I",
3434
"feature.performance.title": "Performance",
35-
"feature.performance.desc": "Fabulously Optimized is faster than competing game clients, thanks to [modern performance mods][1] like Sodium, Lithium, and others. The bundled mods have been carefully selected to be safe in your worlds and provide noticeable speed benefits on any device.",
35+
"feature.performance.desc": "Fabulously Optimized is faster than competing game clients, thanks to {0} like Sodium, Lithium, and others. The bundled mods have been carefully selected to be safe in your worlds and provide noticeable speed benefits on any device.",
36+
"feature.performance.desc.0": "modern performance mods",
3637
"feature.optifine-parity.title": "OptiFine parity",
37-
"feature.optifine-parity.desc": "Fabulously Optimized [supports most OptiFine features][2], including shaders, connected textures, and zoom. If your resource pack states \"OptiFine required,\" it will probably function here as well. [You can even get your own free cape!][3]",
38+
"feature.optifine-parity.desc": "Fabulously Optimized {0}, including shaders, connected textures, and zoom. If your resource pack states \"OptiFine required,\" it will probably function here as well. {1}",
39+
"feature.optifine-parity.desc.0": "supports most OptiFine features",
40+
"feature.optifine-parity.desc.1": "You can even get your own free cape!",
3841
"feature.feels-familiar.title": "Feels familiar",
39-
"feature.feels-familiar.desc": "Fabulously Optimized includes features that allow you to experience Minecraft just as you remember it, no matter what version you've used before. This means you can [use game controllers, play local worlds with friends, view advancements in a large window, and much more][4].",
42+
"feature.feels-familiar.desc": "Fabulously Optimized includes features that allow you to experience Minecraft just as you remember it, no matter what version you've used before. This means you can {0}.",
43+
"feature.feels-familiar.desc.0": "use game controllers, play local worlds with friends, view advancements in a large window, and much more",
4044
"feature.works-anywhere.title": "Works anywhere",
41-
"feature.works-anywhere.desc": "Fabulously Optimized does not include content mods, so you can play on any world or server. While you can use any game launcher to play the pack, [we recommend and provide support for specific ones that offer the best experience][5].",
45+
"feature.works-anywhere.desc": "Fabulously Optimized does not include content mods, so you can play on any world or server. While you can use any game launcher to play the pack, {0}.",
46+
"feature.works-anywhere.desc.0": "we recommend and provide support for specific ones that offer the best experience",
4247
"feature.up-to-date.title": "Up to date",
43-
"feature.up-to-date.desc": "Fabulously Optimized [receives fast updates][6] and stands as one of the first modpacks to upgrade to newer Minecraft versions. [Updating the modpack is easy][7] and will preserve your mod settings, where possible.",
48+
"feature.up-to-date.desc": "Fabulously Optimized {0} and stands as one of the first modpacks to upgrade to newer Minecraft versions. {1} and will preserve your mod settings, where possible.",
49+
"feature.up-to-date.desc.0": "receives fast updates",
50+
"feature.up-to-date.desc.1": "Updating the modpack is easy",
4451
"feature.built-on-fabric.title": "Built on Fabric",
45-
"feature.built-on-fabric.desc": "Fabulously Optimized uses the Fabric mod loader, which is lightweight, fast, and supports a lot of mods. [You can use the modpack as a base to add your favorite mods to.][8]",
52+
"feature.built-on-fabric.desc": "Fabulously Optimized uses the Fabric mod loader, which is lightweight, fast, and supports a lot of mods. {0}",
53+
"feature.built-on-fabric.desc.0": "You can use the modpack as a base to add your favorite mods to.",
4654
"feature.open-development.title": "Open development",
47-
"feature.open-development.desc": "Fabulously Optimized [is open-source][9], and so are most of its mods. We welcome user suggestions and collaborate with mod developers to create a better user experience for everyone.",
55+
"feature.open-development.desc": "Fabulously Optimized {0}, and so are most of its mods. We welcome user suggestions and collaborate with mod developers to create a better user experience for everyone.",
56+
"feature.open-development.desc.0": "is open-source",
4857
"feature.open-development.btn": "View Contributors",
4958
"feature.helpful-community.title": "Helpful community",
50-
"feature.helpful-community.desc": "We have a growing community of friendly members who enjoy discussing the pack, [translating its content][10], and helping each other. [Join us today!][11]",
59+
"feature.helpful-community.desc": "We have a growing community of friendly members who enjoy discussing the pack, {0}, and helping each other. {1}",
60+
"feature.helpful-community.desc.0": "translating its content",
61+
"feature.helpful-community.desc.1": "Join us today!",
5162
"content.vanilla.title": "Download for Minecraft Launcher",
5263
"content.vanilla.title.installer": "Automatic installer",
5364
"content.vanilla.title.manual": "Manual ZIP-archive",

pages/contribute.vue

-10
Original file line numberDiff line numberDiff line change
@@ -133,14 +133,4 @@ body {
133133
li img {
134134
width: 1em; height: 1em; margin-right: 0.5em;
135135
}
136-
a {
137-
color: var(--color-brand); text-decoration: none;
138-
}
139-
html.dark a {
140-
color: var(--color-brand-dark);
141-
}
142-
143-
a:hover {
144-
text-decoration: underline;
145-
}
146136
</style>

pages/index.vue

+124-80
Original file line numberDiff line numberDiff line change
@@ -8,31 +8,12 @@ import {
88
LightBulbIcon,
99
VersionIcon,
1010
PaintBrushIcon,
11-
renderHighlightedString,
1211
UpdatedIcon,
1312
DiscordIcon,
1413
} from "omorphia";
1514
1615
import FabricIcon from "../components/FabricIcon.vue";
1716
18-
const featureLinks =
19-
ref(`\n\n[1]: https://github.com/Fabulously-Optimized/fabulously-optimized/blob/main/INCLUDED-MODS.md#smooth
20-
[2]: https://wiki.download.fo/readme/give-up-optifine
21-
[3]: https://wiki.download.fo/readme/free-cape
22-
[4]: https://github.com/Fabulously-Optimized/fabulously-optimized/blob/main/INCLUDED-MODS.md#functional
23-
[5]: https://github.com/Fabulously-Optimized/fabulously-optimized#downloads
24-
[6]: https://download.fo/changelog
25-
[7]: https://wiki.download.fo/readme/update-instructions
26-
[8]: https://wiki.download.fo/readme/adding-more-mods
27-
[9]: https://download.fo/github
28-
[10]: https://download.fo/translate
29-
[11]: https://download.fo/discord
30-
[12]: https://wiki.download.fo
31-
[13]: https://download.fo/thanks
32-
[14]: https://wiki.download.fo/readme/server-setup
33-
[15]: https://download.fo/host
34-
[16]: https://download.fo/terms`);
35-
3617
useSeoMeta({
3718
title: "Fabulously Optimized",
3819
ogTitle: "Fabulously Optimized",
@@ -43,46 +24,6 @@ useSeoMeta({
4324
twitterImage: "/icon.png",
4425
themeColor: "#d19321",
4526
});
46-
47-
interface FeatureItem {
48-
id: string;
49-
icon: any;
50-
}
51-
52-
const features: any = ref([
53-
{
54-
id: "performance",
55-
icon: ChartIcon,
56-
},
57-
{
58-
id: "optifine-parity",
59-
icon: PaintBrushIcon,
60-
},
61-
{
62-
id: "feels-familiar",
63-
icon: LightBulbIcon,
64-
},
65-
{
66-
id: "works-anywhere",
67-
icon: ClientIcon,
68-
},
69-
{
70-
id: "up-to-date",
71-
icon: UpdatedIcon,
72-
},
73-
{
74-
id: "built-on-fabric",
75-
icon: FabricIcon,
76-
},
77-
{
78-
id: "open-development",
79-
icon: VersionIcon,
80-
},
81-
{
82-
id: "helpful-community",
83-
icon: UsersIcon,
84-
},
85-
]);
8627
</script>
8728

8829
<template>
@@ -149,31 +90,134 @@ const features: any = ref([
14990
'content.home.features.videoID'
15091
)}`" title="YouTube video player" frameborder="0" allowfullscreen></iframe>
15192
<div class="features">
152-
<div v-for=" feature in features" class="feature-block">
93+
<div class="feature-block">
94+
<div>
95+
<h1>
96+
<ChartIcon class="feature-icon" />
97+
<span>{{ $t("feature.performance.title") }}</span>
98+
</h1>
99+
<div class="markdown-body">
100+
<i18n-t keypath="feature.performance.desc" tag="p">
101+
<a href="https://github.com/Fabulously-Optimized/fabulously-optimized/blob/main/INCLUDED-MODS.md#smooth">
102+
{{ $t("feature.performance.desc.0") }}
103+
</a>
104+
</i18n-t>
105+
</div>
106+
</div>
107+
</div>
108+
<div class="feature-block">
109+
<div>
110+
<h1>
111+
<PaintBrushIcon class="feature-icon" />
112+
<span>{{ $t("feature.optifine-parity.title") }}</span>
113+
</h1>
114+
<div class="markdown-body">
115+
<i18n-t keypath="feature.optifine-parity.desc" tag="p">
116+
<a href="https://wiki.download.fo/readme/give-up-optifine">
117+
{{ $t("feature.optifine-parity.desc.0") }}
118+
</a>
119+
<a href="https://wiki.download.fo/readme/free-cape">
120+
{{ $t("feature.optifine-parity.desc.1") }}
121+
</a>
122+
</i18n-t>
123+
</div>
124+
</div>
125+
</div>
126+
<div class="feature-block">
127+
<div>
128+
<h1>
129+
<LightBulbIcon class="feature-icon" />
130+
<span>{{ $t("feature.feels-familiar.title") }}</span>
131+
</h1>
132+
<div class="markdown-body">
133+
<i18n-t keypath="feature.feels-familiar.desc" tag="p">
134+
<a href="https://github.com/Fabulously-Optimized/fabulously-optimized/blob/main/INCLUDED-MODS.md#functional">
135+
{{ $t("feature.feels-familiar.desc.0") }}
136+
</a>
137+
</i18n-t>
138+
</div>
139+
</div>
140+
</div>
141+
<div class="feature-block">
153142
<div>
154143
<h1>
155-
<component class="feature-icon" :is="feature.icon"></component><span>{{ $t(`feature.${feature.id}.title`)
156-
}}</span>
144+
<ClientIcon class="feature-icon" />
145+
<span>{{ $t("feature.works-anywhere.title") }}</span>
157146
</h1>
158-
<div class="markdown-body" v-html="renderHighlightedString(
159-
$t(`feature.${feature.id}.desc`) + featureLinks
160-
)
161-
"></div>
162-
<br />
163-
<Button v-if="feature.button" :large="true" :color="feature.button.color" @click="
164-
navigateTo(feature.button.href, {
165-
external: feature.button.external,
166-
})
167-
">
168-
<component :is="feature.button.icon" v-if="feature.button.icon != undefined"></component>
169-
{{ $t(`feature.${feature.id}.btn`) }}
170-
</Button>
147+
<div class="markdown-body">
148+
<i18n-t keypath="feature.works-anywhere.desc" tag="p">
149+
<a href="https://github.com/Fabulously-Optimized/fabulously-optimized?tab=readme-ov-file#download">
150+
{{ $t("feature.works-anywhere.desc.0") }}
151+
</a>
152+
</i18n-t>
153+
</div>
154+
</div>
155+
</div>
156+
<div class="feature-block">
157+
<div>
158+
<h1>
159+
<UpdatedIcon class="feature-icon" />
160+
<span>{{ $t("feature.up-to-date.title") }}</span>
161+
</h1>
162+
<div class="markdown-body">
163+
<i18n-t keypath="feature.up-to-date.desc" tag="p">
164+
<a href="https://download.fo/changelog">
165+
{{ $t("feature.up-to-date.desc.0") }}
166+
</a>
167+
<a href="https://wiki.download.fo/readme/update-instructions">
168+
{{ $t("feature.up-to-date.desc.1") }}
169+
</a>
170+
</i18n-t>
171+
</div>
172+
</div>
173+
</div>
174+
<div class="feature-block">
175+
<div>
176+
<h1>
177+
<FabricIcon class="feature-icon" />
178+
<span>{{ $t("feature.built-on-fabric.title") }}</span>
179+
</h1>
180+
<div class="markdown-body">
181+
<i18n-t keypath="feature.built-on-fabric.desc" tag="p">
182+
<a href="https://wiki.download.fo/readme/adding-more-mods">
183+
{{ $t("feature.built-on-fabric.desc.0") }}
184+
</a>
185+
</i18n-t>
186+
</div>
187+
</div>
188+
</div>
189+
<div class="feature-block">
190+
<div>
191+
<h1>
192+
<VersionIcon class="feature-icon" />
193+
<span>{{ $t("feature.open-development.title") }}</span>
194+
</h1>
195+
<div class="markdown-body">
196+
<i18n-t keypath="feature.open-development.desc" tag="p">
197+
<a href="https://download.fo/github">
198+
{{ $t("feature.open-development.desc.0") }}
199+
</a>
200+
</i18n-t>
201+
</div>
202+
</div>
203+
</div>
204+
<div class="feature-block">
205+
<div>
206+
<h1>
207+
<UsersIcon class="feature-icon" />
208+
<span>{{ $t("feature.helpful-community.title") }}</span>
209+
</h1>
210+
<div class="markdown-body">
211+
<i18n-t keypath="feature.helpful-community.desc" tag="p">
212+
<a href="https://download.fo/translate">
213+
{{ $t("feature.helpful-community.desc.0") }}
214+
</a>
215+
<a href="https://download.fo/discord">
216+
{{ $t("feature.helpful-community.desc.1") }}
217+
</a>
218+
</i18n-t>
219+
</div>
171220
</div>
172-
<!-- <img
173-
v-if="features.indexOf(feature) % 2 === 0"
174-
:src="`/features/${feature.id}.webp`"
175-
class="dramatic-screenshot"
176-
/> -->
177221
</div>
178222
</div>
179223
</div>

0 commit comments

Comments
 (0)