Skip to content

Commit a20374d

Browse files
authored
Fix errors with intl extraction, extract error.vue (#3421)
* Fix errors with intl extraction, extract error.vue * Update changelog and fix lint
1 parent ffc69db commit a20374d

File tree

9 files changed

+117
-18
lines changed

9 files changed

+117
-18
lines changed

apps/app-frontend/src/App.vue

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -521,9 +521,15 @@ function handleAuxClick(e) {
521521
width: 'calc(100% - var(--right-bar-width))',
522522
}"
523523
></div>
524-
<div v-if="criticalErrorMessage" class="m-6 mb-0 flex flex-col border-red bg-bg-red rounded-2xl border-2 border-solid p-4 gap-1 font-semibold text-contrast">
524+
<div
525+
v-if="criticalErrorMessage"
526+
class="m-6 mb-0 flex flex-col border-red bg-bg-red rounded-2xl border-2 border-solid p-4 gap-1 font-semibold text-contrast"
527+
>
525528
<h1 class="m-0 text-lg font-extrabold">{{ criticalErrorMessage.header }}</h1>
526-
<div class="markdown-body text-primary" v-html="renderString(criticalErrorMessage.body ?? '')"></div>
529+
<div
530+
class="markdown-body text-primary"
531+
v-html="renderString(criticalErrorMessage.body ?? '')"
532+
></div>
527533
</div>
528534
<RouterView v-slot="{ Component }">
529535
<template v-if="Component">

apps/app-frontend/src/components/ui/ExportModal.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ const exportPack = async () => {
151151
</div>
152152
</div>
153153
<div v-if="showingFiles" class="table-content">
154-
<div v-for="[path, children] of folders" :key="path.name" class="table-row">
154+
<div v-for="[path, children] in folders" :key="path.name" class="table-row">
155155
<div class="table-cell file-entry">
156156
<div class="file-primary">
157157
<Checkbox

apps/app-frontend/src/pages/project/Gallery.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,10 @@
3131
: 'https://cdn.modrinth.com/placeholder-banner.svg'
3232
"
3333
:alt="expandedGalleryItem.title ? expandedGalleryItem.title : 'gallery-image'"
34-
@click.stop=""
34+
@click.stop="() => {}"
3535
/>
3636

37-
<div class="floating" @click.stop="">
37+
<div class="floating" @click.stop="() => {}">
3838
<div class="text">
3939
<h2 v-if="expandedGalleryItem.title">
4040
{{ expandedGalleryItem.title }}
@@ -99,7 +99,7 @@ import { show_ads_window, hide_ads_window } from '@/helpers/ads.js'
9999
const props = defineProps({
100100
project: {
101101
type: Object,
102-
default: () => {},
102+
default: () => ({}),
103103
},
104104
})
105105

apps/frontend/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"postinstall": "nuxi prepare",
1111
"lint": "eslint . && prettier --check .",
1212
"fix": "eslint . --fix && prettier --write .",
13-
"intl:extract": "formatjs extract \"{,src/components,src/composables,src/layouts,src/middleware,src/modules,src/pages,src/plugins,src/utils}/**/*.{vue,ts,tsx,js,jsx,mts,cts,mjs,cjs}\" --ignore '**/*.d.ts' --ignore 'node_modules' --out-file src/locales/en-US/index.json --format crowdin --preserve-whitespace"
13+
"intl:extract": "formatjs extract \"{,src/components,src/composables,src/layouts,src/middleware,src/modules,src/pages,src/plugins,src/utils}/**/*.{vue,ts,tsx,js,jsx,mts,cts,mjs,cjs}\" \"src/error.vue\" --ignore '**/*.d.ts' --ignore 'node_modules' --out-file src/locales/en-US/index.json --format crowdin --preserve-whitespace"
1414
},
1515
"devDependencies": {
1616
"@formatjs/cli": "^6.2.12",

apps/frontend/src/components/ui/servers/ContentVersionEditModal.vue

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -155,9 +155,11 @@
155155
class="w-full"
156156
:disabled="gameVersions.length < 2 && platforms.length < 2"
157157
@click="
158-
versionFilter = !versionFilter;
159-
setInitialFilters();
160-
updateFiltersToUi();
158+
() => {
159+
versionFilter = !versionFilter;
160+
setInitialFilters();
161+
updateFiltersToUi();
162+
}
161163
"
162164
>
163165
<LockOpenIcon />

apps/frontend/src/components/ui/servers/PlatformMrpackModal.vue

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -105,10 +105,12 @@
105105
<button
106106
:disabled="isLoading"
107107
@click="
108-
if (isMrpackModalSecondPhase) {
109-
isMrpackModalSecondPhase = false;
110-
} else {
111-
hide();
108+
() => {
109+
if (isMrpackModalSecondPhase) {
110+
isMrpackModalSecondPhase = false;
111+
} else {
112+
hide();
113+
}
112114
}
113115
"
114116
>

apps/frontend/src/components/ui/servers/PlatformVersionSelectModal.vue

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -173,10 +173,12 @@
173173
<button
174174
:disabled="isLoading"
175175
@click="
176-
if (isSecondPhase) {
177-
isSecondPhase = false;
178-
} else {
179-
hide();
176+
() => {
177+
if (isSecondPhase) {
178+
isSecondPhase = false;
179+
} else {
180+
hide();
181+
}
180182
}
181183
"
182184
>

apps/frontend/src/locales/en-US/index.json

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -239,6 +239,87 @@
239239
"dashboard.collections.long-title": {
240240
"message": "Your collections"
241241
},
242+
"error.collection.404.list_item.1": {
243+
"message": "You may have mistyped the collection's URL."
244+
},
245+
"error.collection.404.list_item.2": {
246+
"message": "The collection may be private."
247+
},
248+
"error.collection.404.list_item.3": {
249+
"message": "The collection may have been taken down by Modrinth's moderation team for violating our <tou-link>Terms of Use</tou-link>."
250+
},
251+
"error.collection.404.list_title": {
252+
"message": "Why?"
253+
},
254+
"error.collection.404.title": {
255+
"message": "Collection not found"
256+
},
257+
"error.generic.404.subtitle": {
258+
"message": "The page you were looking for doesn't seem to exist."
259+
},
260+
"error.generic.404.title": {
261+
"message": "Page not found"
262+
},
263+
"error.generic.default.list_item.1": {
264+
"message": "Check if Modrinth is down on our <status-link>Status page</status-link>."
265+
},
266+
"error.generic.default.list_item.2": {
267+
"message": "If this keeps happening, you may want to let the Modrinth Team know by joining our <discord-link>Discord server</discord-link>."
268+
},
269+
"error.generic.default.list_title": {
270+
"message": "Please try again in a few minutes."
271+
},
272+
"error.generic.default.subtitle": {
273+
"message": "Something went wrong."
274+
},
275+
"error.generic.default.title": {
276+
"message": "Uh oh!"
277+
},
278+
"error.organization.404.list_item.1": {
279+
"message": "You may have mistyped the organization's URL."
280+
},
281+
"error.organization.404.list_item.2": {
282+
"message": "The organization's owner may have changed the URL or deleted it."
283+
},
284+
"error.organization.404.list_item.3": {
285+
"message": "The organization may have been removed by Modrinth's moderation team for violating our <tou-link>Terms of Use</tou-link>."
286+
},
287+
"error.organization.404.list_title": {
288+
"message": "Why?"
289+
},
290+
"error.organization.404.title": {
291+
"message": "Organization not found"
292+
},
293+
"error.project.404.list_item.1": {
294+
"message": "You may have mistyped the project's URL."
295+
},
296+
"error.project.404.list_item.2": {
297+
"message": "The project's owner may have changed the URL, made the project private, or deleted it."
298+
},
299+
"error.project.404.list_item.3": {
300+
"message": "The project may have been taken down by Modrinth's moderation team for violating our <tou-link>Terms of Use</tou-link>."
301+
},
302+
"error.project.404.list_title": {
303+
"message": "Why?"
304+
},
305+
"error.project.404.title": {
306+
"message": "Project not found"
307+
},
308+
"error.user.404.list_item.1": {
309+
"message": "You may have mistyped the user's username."
310+
},
311+
"error.user.404.list_item.2": {
312+
"message": "The user may have changed their username or deleted their account."
313+
},
314+
"error.user.404.list_item.3": {
315+
"message": "The user's account may have been terminated for violating Modrinth's <tou-link>Terms of Use</tou-link>."
316+
},
317+
"error.user.404.list_title": {
318+
"message": "Why?"
319+
},
320+
"error.user.404.title": {
321+
"message": "User not found"
322+
},
242323
"frog": {
243324
"message": "You've been frogged! 🐸"
244325
},

packages/utils/changelog.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,12 @@ export type VersionEntry = {
1010
}
1111

1212
const VERSIONS: VersionEntry[] = [
13+
{
14+
date: `2025-03-24T22:30:00-08:00`,
15+
product: 'web',
16+
body: `### Improvements
17+
- Fixed error with links on error pages.`,
18+
},
1319
{
1420
date: `2025-03-24T22:30:00-08:00`,
1521
product: 'servers',

0 commit comments

Comments
 (0)