wip: Continued string-only-ifying locales
This commit is contained in:
parent
3c26238ca4
commit
4d875b1416
4 changed files with 12 additions and 12 deletions
|
|
@ -24,7 +24,7 @@ defineProps<{
|
||||||
:style="{ width: 'fit-content', display: 'inline-block' }">
|
:style="{ width: 'fit-content', display: 'inline-block' }">
|
||||||
<li :style="{ width: 'fit-content' }">
|
<li :style="{ width: 'fit-content' }">
|
||||||
<RichTemplate :template="overview.text" />
|
<RichTemplate :template="overview.text" />
|
||||||
<ul v-if="overview.subtext !== null" class="mt-0 w-fit">
|
<ul v-if="overview.subtext.parts.length > 0" class="mt-0 w-fit">
|
||||||
<RichTemplate
|
<RichTemplate
|
||||||
tag="li"
|
tag="li"
|
||||||
:style="{ width: 'fit-content' }"
|
:style="{ width: 'fit-content' }"
|
||||||
|
|
|
||||||
|
|
@ -80,7 +80,7 @@ export type DiscordRule = {
|
||||||
|
|
||||||
export type DiscordRuleOverview = {
|
export type DiscordRuleOverview = {
|
||||||
text: RichTemplate<never>;
|
text: RichTemplate<never>;
|
||||||
subtext: RichTemplate<never> | null;
|
subtext: RichTemplate<never>;
|
||||||
};
|
};
|
||||||
|
|
||||||
export type DiscordRuleSection = {
|
export type DiscordRuleSection = {
|
||||||
|
|
|
||||||
|
|
@ -57,7 +57,7 @@ export default {
|
||||||
text: richT(
|
text: richT(
|
||||||
"No translation! Do not translate to/from Viossa on the server, except the big four translatables (you can learn in hard mode without them!)",
|
"No translation! Do not translate to/from Viossa on the server, except the big four translatables (you can learn in hard mode without them!)",
|
||||||
),
|
),
|
||||||
subtext: null,
|
subtext: richT(),
|
||||||
},
|
},
|
||||||
section: {
|
section: {
|
||||||
header: ({ ruleNumber }) =>
|
header: ({ ruleNumber }) =>
|
||||||
|
|
@ -99,7 +99,7 @@ export default {
|
||||||
lfsv: {
|
lfsv: {
|
||||||
overview: {
|
overview: {
|
||||||
text: richT("If it's understood, it's Viossa."),
|
text: richT("If it's understood, it's Viossa."),
|
||||||
subtext: null,
|
subtext: richT(),
|
||||||
},
|
},
|
||||||
section: {
|
section: {
|
||||||
header: ({ ruleNumber }) =>
|
header: ({ ruleNumber }) =>
|
||||||
|
|
@ -125,7 +125,7 @@ export default {
|
||||||
text: richT(
|
text: richT(
|
||||||
"The chats in the Viossa Only category are Viossa only.",
|
"The chats in the Viossa Only category are Viossa only.",
|
||||||
),
|
),
|
||||||
subtext: null,
|
subtext: richT(),
|
||||||
},
|
},
|
||||||
section: {
|
section: {
|
||||||
header: ({ ruleNumber }) =>
|
header: ({ ruleNumber }) =>
|
||||||
|
|
@ -153,7 +153,7 @@ export default {
|
||||||
text: richT(
|
text: richT(
|
||||||
"This server is SFW. No sexually explicit, gory, or violent content.",
|
"This server is SFW. No sexually explicit, gory, or violent content.",
|
||||||
),
|
),
|
||||||
subtext: null,
|
subtext: richT(),
|
||||||
},
|
},
|
||||||
section: {
|
section: {
|
||||||
header: ({ ruleNumber }) =>
|
header: ({ ruleNumber }) =>
|
||||||
|
|
@ -183,7 +183,7 @@ export default {
|
||||||
text: richT(
|
text: richT(
|
||||||
"Don't use hate speech, and respect each other.",
|
"Don't use hate speech, and respect each other.",
|
||||||
),
|
),
|
||||||
subtext: null,
|
subtext: richT(),
|
||||||
},
|
},
|
||||||
section: {
|
section: {
|
||||||
header: ({ ruleNumber }) =>
|
header: ({ ruleNumber }) =>
|
||||||
|
|
@ -207,7 +207,7 @@ export default {
|
||||||
boldT("@Yewaldnen"),
|
boldT("@Yewaldnen"),
|
||||||
").",
|
").",
|
||||||
),
|
),
|
||||||
subtext: null,
|
subtext: richT(),
|
||||||
},
|
},
|
||||||
section: {
|
section: {
|
||||||
header: ({ ruleNumber }) =>
|
header: ({ ruleNumber }) =>
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@ import { computed } from "vue";
|
||||||
const locale = useLocale();
|
const locale = useLocale();
|
||||||
|
|
||||||
const pageI18n = computed(() => locale.value.discord.rulesPage);
|
const pageI18n = computed(() => locale.value.discord.rulesPage);
|
||||||
const rules = computed(() => pageI18n.value.rules);
|
const rulesI18n = computed(() => pageI18n.value.rules);
|
||||||
|
|
||||||
const RULE_ORDER = [
|
const RULE_ORDER = [
|
||||||
"noTranslation",
|
"noTranslation",
|
||||||
|
|
@ -17,7 +17,7 @@ const RULE_ORDER = [
|
||||||
"respectOthers",
|
"respectOthers",
|
||||||
"respectStaff",
|
"respectStaff",
|
||||||
"controversialTopics",
|
"controversialTopics",
|
||||||
] as const satisfies (keyof typeof pageI18n.value.rules)[];
|
] as const satisfies (keyof typeof rulesI18n.value)[];
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
|
@ -37,13 +37,13 @@ const RULE_ORDER = [
|
||||||
v-for="(id, index) in RULE_ORDER"
|
v-for="(id, index) in RULE_ORDER"
|
||||||
:key="index"
|
:key="index"
|
||||||
:rule-number="index + 1"
|
:rule-number="index + 1"
|
||||||
:overview="rules[id].overview" />
|
:overview="rulesI18n[id].overview" />
|
||||||
</ol>
|
</ol>
|
||||||
</section>
|
</section>
|
||||||
<DiscordRuleSection
|
<DiscordRuleSection
|
||||||
v-for="(id, index) in RULE_ORDER"
|
v-for="(id, index) in RULE_ORDER"
|
||||||
:key="index"
|
:key="index"
|
||||||
:section="rules[id].section"
|
:section="rulesI18n[id].section"
|
||||||
:rule-number="index + 1" />
|
:rule-number="index + 1" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue