You've already forked AstralRinth
forked from didirus/AstralRinth
Author Validation Improvements (#3970)
* feat: set up typed nag (validators) system * feat: start on frontend impl * fix: shouldShow issues * feat: continue work * feat: re add submitting/re-submit nags * feat: start work implementing validation checks using new nag system * fix: links page + add more validations * feat: tags validations * fix: lint issues * fix: lint * fix: issues * feat: start on i18nifying nags * feat: impl intl * fix: minecraft title clause update --------- Co-authored-by: Prospector <6166773+Prospector@users.noreply.github.com>
This commit is contained in:
@@ -34,7 +34,7 @@ const enabledLocales: string[] = [];
|
||||
/**
|
||||
* Overrides for the categories of the certain locales.
|
||||
*/
|
||||
const localesCategoriesOverrides: Partial<Record<string, "fun" | "experimental">> = {
|
||||
const localesCategoriesOverrides: Partial = {
|
||||
"en-x-pirate": "fun",
|
||||
"en-x-updown": "fun",
|
||||
"en-x-lolcat": "fun",
|
||||
@@ -260,21 +260,28 @@ export default defineNuxtConfig({
|
||||
const omorphiaLocales: string[] = [];
|
||||
const omorphiaLocaleSets = new Map<string, { files: { from: string }[] }>();
|
||||
|
||||
for await (const localeDir of globIterate("node_modules/@modrinth/ui/src/locales/*", {
|
||||
posix: true,
|
||||
})) {
|
||||
const tag = basename(localeDir);
|
||||
omorphiaLocales.push(tag);
|
||||
const externalLocales = [
|
||||
"node_modules/@modrinth/ui/src/locales/en-US",
|
||||
"node_modules/@modrinth/moderation/locales/en-US",
|
||||
];
|
||||
|
||||
const localeFiles: { from: string; format?: string }[] = [];
|
||||
for (const localePath of externalLocales) {
|
||||
for await (const localeDir of globIterate(localePath, {
|
||||
posix: true,
|
||||
})) {
|
||||
const tag = basename(localeDir);
|
||||
omorphiaLocales.push(tag);
|
||||
|
||||
omorphiaLocaleSets.set(tag, { files: localeFiles });
|
||||
const localeFiles: { from: string; format?: string }[] = [];
|
||||
|
||||
for await (const localeFile of globIterate(`${localeDir}/*`, { posix: true })) {
|
||||
localeFiles.push({
|
||||
from: pathToFileURL(localeFile).toString(),
|
||||
format: "default",
|
||||
});
|
||||
omorphiaLocaleSets.set(tag, { files: localeFiles });
|
||||
|
||||
for await (const localeFile of globIterate(`${localeDir}/*`, { posix: true })) {
|
||||
localeFiles.push({
|
||||
from: pathToFileURL(localeFile).toString(),
|
||||
format: "default",
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -301,7 +308,7 @@ export default defineNuxtConfig({
|
||||
format: "crowdin",
|
||||
});
|
||||
} else if (fileName === "meta.json") {
|
||||
const meta: Record<string, { message: string }> = await fs
|
||||
const meta: Record = await fs
|
||||
.readFile(localeFile, "utf8")
|
||||
.then((date) => JSON.parse(date));
|
||||
const localeMeta = (locale.meta ??= {});
|
||||
|
||||
Reference in New Issue
Block a user