Skip to content

fix(thread): pass i18n values via correct prop name (#6141)#6175

Open
Zeffut wants to merge 1 commit into
modrinth:mainfrom
Zeffut:fix/6141-resubmit-modal-values-prop
Open

fix(thread): pass i18n values via correct prop name (#6141)#6175
Zeffut wants to merge 1 commit into
modrinth:mainfrom
Zeffut:fix/6141-resubmit-modal-values-prop

Conversation

@Zeffut
Copy link
Copy Markdown

@Zeffut Zeffut commented May 23, 2026

Summary

Fixes #6141. The project resubmission modal was rendering literal <project-title>{projectTitle}</project-title> text instead of the project name.

Root cause

packages/ui/src/components/base/IntlFormatted.vue declares its value-binding prop as values (camelCase). The caller apps/frontend/src/components/ui/thread/ConversationThread.vue was passing values under a non-existent prop name:

<IntlFormatted
  :message-id="messages.resubmitModalDescription"
  :message-values="{ projectTitle: project.title }"   <!-- no such prop -->
>

Because :message-values does not bind to any declared prop, props.values was undefined inside IntlFormatted. The <project-title> slot handler was still registered, but the inner {projectTitle} placeholder had no value, so intl-messageformat threw The intl string context variable "projectTitle" was not provided. The catch branch returned the raw message and Vue rendered the literal tags shown in the issue screenshot.

Fix

Single-line change: rename :message-values to :values in ConversationThread.vue. All other <IntlFormatted> callers in the monorepo (e.g. apps/frontend/src/pages/auth/authorize.vue, apps/app-frontend/src/components/ui/modal/ModpackAlreadyInstalledModal.vue) already use the canonical :values= binding; this file was the only outlier.

The translations themselves are correct in all 13 locales that define this key; no translation changes are needed.

Test plan

  • Open a project's resubmission modal in the frontend and confirm the description reads "You're submitting <project title> to be reviewed again by the moderators." with the real project title (and the title styled via the slot template).
  • Confirm no console error from intl-messageformat about a missing context variable.

Closes #6141.

ConversationThread used :message-values="..." which doesn't match any
declared prop on IntlFormatted (it declares values, camelCase). The
{projectTitle} placeholder inside the <project-title> slot was therefore
undefined, causing intl-messageformat to throw and the catch branch to
return the raw message with literal <project-title>...</project-title>
tags rendered on screen.

Fix: rename :message-values to :values. All other IntlFormatted callers
in the monorepo already use :values; this was the only outlier.

Closes modrinth#6141.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings May 23, 2026 00:05
@modrinth-bot
Copy link
Copy Markdown
Member

Pull request changelog

App

Added

Changed

Deprecated

Removed

Fixed

Security

Website

Added

Changed

Deprecated

Removed

Fixed

Security

Hosting

Added

Changed

Deprecated

Removed

Fixed

Security

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Fixes the project resubmission modal description rendering literal <project-title>{projectTitle}</project-title> text by passing ICU interpolation values to IntlFormatted via the correct prop name (values), aligning with the IntlFormatted component API and existing usage elsewhere.

Changes:

  • Update ConversationThread.vue to bind i18n interpolation data with :values (instead of the non-existent :message-values) for IntlFormatted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

project resubmission popup formatting string syntax error

3 participants