Skip to content

Commit b33c885

Browse files
authored
Merge branch 'main' into cal/dev-237
Signed-off-by: Calum H. <contact@cal.engineer>
2 parents 42c7af1 + 26feaf7 commit b33c885

File tree

962 files changed

+88276
-17631
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

962 files changed

+88276
-17631
lines changed

.cargo/config.toml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
# Windows has stack overflows when calling from Tauri, so we increase the default stack size used by the compiler
22
[target.'cfg(windows)']
3-
rustflags = ["-C", "link-args=/STACK:16777220", "--cfg", "tokio_unstable"]
3+
rustflags = ["-C", "link-args=/STACK:16777220"]
44

55
[target.x86_64-pc-windows-msvc]
66
linker = "rust-lld"
7-
8-
[build]
9-
rustflags = ["--cfg", "tokio_unstable"]

.github/ISSUE_TEMPLATE/1-app-bug.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
name: 🎮 Modrinth App bug
2-
description: Report an issue in the Modrinth Launcher.
3-
labels: [bug, app]
1+
name: 🎮 Bug with Modrinth App
2+
description: For issues with Modrinth App.
3+
labels: [app]
4+
type: 'bug'
45
body:
56
- type: checkboxes
67
attributes:

.github/ISSUE_TEMPLATE/2-web-bug.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
name: 🌐 Website bug (modrinth.com)
2-
description: Report an issue on the Modrinth website.
3-
labels: [bug, web]
1+
name: 🌐 Bug with Modrinth.com
2+
description: For issues with the Modrinth website.
3+
labels: [website]
4+
type: 'bug'
45
body:
56
- type: checkboxes
67
attributes:
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
name: 👥 Bug with Modrinth Servers
2+
description: For issues with a Modrinth Servers product.
3+
labels: [servers]
4+
type: 'bug'
5+
body:
6+
- type: checkboxes
7+
attributes:
8+
label: Please confirm the following.
9+
options:
10+
- label: I checked the [existing issues](https://github.com/modrinth/code/issues?q=is%3Aissue) for duplicate problems
11+
required: true
12+
- label: I have tried resolving the issue using the [support portal](https://support.modrinth.com)
13+
required: true
14+
- type: dropdown
15+
id: issue-location
16+
attributes:
17+
label: Is this an issue in the control panel or with the Minecraft server itself?
18+
options:
19+
- Control panel (on Modrinth.com)
20+
- Minecraft server
21+
validations:
22+
required: true
23+
- type: dropdown
24+
id: browsers
25+
attributes:
26+
label: What browsers are you seeing the problem on? (if a panel issue)
27+
multiple: true
28+
options:
29+
- N/A
30+
- Chrome (including Arc, Brave, Opera, Vivaldi)
31+
- Microsoft Edge
32+
- Firefox
33+
- Safari
34+
- Other (please specify)
35+
- type: textarea
36+
attributes:
37+
label: Describe the bug
38+
description: A clear and concise description of what the bug is. Include screenshots if applicable.
39+
validations:
40+
required: false
41+
- type: textarea
42+
attributes:
43+
label: Steps to reproduce
44+
description: Steps to reproduce the behavior.
45+
placeholder: |
46+
1. Go to '...'
47+
2. Click on '...'
48+
3. Scroll down to '...'
49+
4. See error
50+
validations:
51+
required: false
52+
- type: textarea
53+
attributes:
54+
label: Expected behavior
55+
description: A clear and concise description of what you expected to happen.
56+
validations:
57+
required: false
58+
- type: textarea
59+
attributes:
60+
label: Additional context
61+
description: Add any other context about the problem here.
62+
validations:
63+
required: false

.github/ISSUE_TEMPLATE/3-api-bug.yml renamed to .github/ISSUE_TEMPLATE/4-api-bug.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
name: 🛠️ API issue (api.modrinth.com)
2-
description: Report an issue regarding the Modrinth API.
3-
labels: [bug, backend]
1+
name: 🛠 Bug with Modrinth API
2+
description: For issues with the Modrinth API for developers.
3+
labels: [api, backend]
4+
type: 'bug'
45
body:
56
- type: checkboxes
67
attributes:

.github/ISSUE_TEMPLATE/4-feature-request.yml renamed to .github/ISSUE_TEMPLATE/5-feature-request.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
name: 💡 Feature Request
1+
name: 💡 Feature request
22
description: Suggest an idea
3-
labels: [enhancement]
3+
type: 'feature'
44

55
body:
66
- type: checkboxes
@@ -17,9 +17,10 @@ body:
1717
label: What parts of Modrinth is your feature request related too?
1818
multiple: true
1919
options:
20-
- App
21-
- Website
22-
- API
20+
- Modrinth App
21+
- Modrinth.com website
22+
- Modrinth Servers
23+
- Modrinth API for developers
2324
- type: textarea
2425
attributes:
2526
label: Is your suggested feature related to a problem? Please describe.

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,8 @@
1-
blank_issues_enabled: true
1+
blank_issues_enabled: false
22
contact_links:
3-
- name: 🫶 Support Portal
4-
about: Get support using through our portal.
3+
- name: 🫶 Support portal
4+
about: Get support using through our support website.
55
url: https://support.modrinth.com
6-
- name: 💬 Chat
6+
- name: 💬 Chat on Discord
77
about: Join our Discord server to chat about Modrinth.
88
url: https://discord.modrinth.com
9-
- name: 🛣️ Roadmap
10-
about: View our Roadmap. Please do not open issues for items on our roadmap.
11-
url: https://roadmap.modrinth.com
12-
- name: 📚 Documentation
13-
about: Useful documentation about Modrinth's API
14-
url: https://docs.modrinth.com
Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
---
2+
applyTo: '**/*.vue'
3+
---
4+
5+
You are given a Nuxt/Vue single-file component (.vue). Your task is to convert every hard-coded natural-language string in the <template> into our localization system using @vintl/vintl-nuxt (which wraps FormatJS).
6+
7+
Please follow these rules precisely:
8+
9+
1. Identify translatable strings
10+
11+
- Scan the <template> for all user-visible strings (inner text, alt attributes, placeholders, button labels, etc.). Do not extract dynamic expressions (like {{ user.name }}) or HTML tags. Only extract static human-readable text.
12+
- There may be strings within the <script> block, e.g dropdown option labels, notifications etc.
13+
14+
2. Create message definitions
15+
16+
- In the <script setup> block, import `defineMessage` or `defineMessages` from `@vintl/vintl`.
17+
- For each extracted string, define a message with a unique `id` (use a descriptive prefix based on the component path, e.g. `auth.welcome.long-title`) and a `defaultMessage` equal to the original English string.
18+
Example:
19+
const messages = defineMessages({
20+
welcomeTitle: { id: 'auth.welcome.title', defaultMessage: 'Welcome' },
21+
welcomeDescription: { id: 'auth.welcome.description', defaultMessage: 'You’re now part of the community…' },
22+
})
23+
24+
3. Handle variables and ICU formats
25+
26+
- Replace dynamic parts with ICU placeholders: "Hello, ${user.name}!" → `{name}` and defaultMessage: 'Hello, {name}!'
27+
- For numbers/dates/times, use ICU/FormatJS options (e.g., currency): `{price, number, ::currency/USD}`
28+
- For plurals/selects, use ICU: `'{count, plural, one {# message} other {# messages}}'`
29+
30+
4. Rich-text messages (links/markup)
31+
32+
- In `defaultMessage`, wrap link/markup ranges with tags, e.g.:
33+
"By creating an account, you agree to our <terms-link>Terms</terms-link> and <privacy-link>Privacy Policy</privacy-link>."
34+
- Render rich-text messages with `<IntlFormatted>` from `@vintl/vintl/components` and map tags via `values`:
35+
<IntlFormatted
36+
:message="messages.tosLabel"
37+
:values="{
38+
'terms-link': (chunks) => <NuxtLink to='/terms'>{chunks}</NuxtLink>,
39+
'privacy-link': (chunks) => <NuxtLink to='/privacy'>{chunks}</NuxtLink>,
40+
}"
41+
/>
42+
- For simple emphasis: `'Welcome to <strong>Modrinth</strong>!'` and map `'strong': (c) => <strong>{c}</strong>`
43+
44+
5. Formatting in templates
45+
46+
- Import and use `useVIntl()`; prefer `formatMessage` for simple strings:
47+
`const { formatMessage } = useVIntl()`
48+
`<button>{{ formatMessage(messages.welcomeTitle) }}</button>`
49+
- Vue methods like `$formatMessage`, `$formatNumber`, `$formatDate` are also available if needed.
50+
51+
6. Naming conventions and id stability
52+
53+
- Make `id`s descriptive and stable (e.g., `error.generic.default.title`). Group related messages with `defineMessages`.
54+
55+
7. Avoid Vue/ICU delimiter collisions
56+
57+
- If an ICU placeholder would end right before `}}` in a Vue template, insert a space so it becomes `} }` to avoid parsing issues.
58+
59+
8. Update imports and remove literals
60+
61+
- Ensure imports for `defineMessage`/`defineMessages`, `useVIntl`, and `<IntlFormatted>` are present. Replace all hard-coded strings with `formatMessage(...)` or `<IntlFormatted>` and remove the literals.
62+
63+
9. Preserve functionality
64+
65+
- Do not change logic, layout, reactivity, or bindings—only refactor strings into i18n.
66+
67+
Use existing patterns from our codebase:
68+
69+
- Variables/plurals: see `apps/frontend/src/pages/frog.vue`
70+
- Rich-text link tags: see `apps/frontend/src/pages/auth/welcome.vue` and `apps/frontend/src/error.vue`
71+
72+
When you finish, there should be no hard-coded English strings left in the template—everything comes from `formatMessage` or `<IntlFormatted>`.
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
on:
2+
pull_request:
3+
push:
4+
branches:
5+
- master
6+
7+
env:
8+
CARGO_TERM_COLOR: always
9+
SQLX_OFFLINE: true
10+
11+
jobs:
12+
typos:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v4
16+
- uses: crate-ci/typos@master
17+
18+
# broken: <https://github.com/SchemaStore/schemastore/issues/5108>
19+
# tombi:
20+
# runs-on: ubuntu-latest
21+
# steps:
22+
# - uses: actions/checkout@v4
23+
# - uses: tombi-toml/setup-tombi@v1
24+
# - run: tombi lint
25+
# - run: tombi fmt --check

.github/workflows/check-rust.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
on:
2+
pull_request:
3+
push:
4+
branches:
5+
- master
6+
7+
env:
8+
CARGO_TERM_COLOR: always
9+
SQLX_OFFLINE: true
10+
11+
jobs:
12+
shear:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v4
16+
- uses: dtolnay/rust-toolchain@stable
17+
- uses: cargo-bins/cargo-binstall@main
18+
- run: cargo binstall --no-confirm cargo-shear
19+
- run: cargo shear

0 commit comments

Comments
 (0)