* feat: move notion docs to standards folder * fix: remove skills mention (automatic now)
1.7 KiB
1.7 KiB
name, description, argument-hint
| name | description | argument-hint | |
|---|---|---|---|
| i18n-pass | Perform an i18n localization pass on changed files or a pull request, converting hard-coded English strings to the @modrinth/ui i18n system. Use when internationalizing a set of changes, reviewing a PR for untranslated strings, or converting a specific component. |
|
Refer to the standard: @standards/frontend/INTERNATIONALIZATION.md
Steps
- Identify the scope of changes:
- If
$ARGUMENTSis a PR number, rungh pr diff $ARGUMENTSto get the changed files. - If
$ARGUMENTSis a file path, use that directly. - If no argument, check
git difffor uncommitted changes.
- If
- Read the standard above for the message definition pattern, ICU format rules, and
IntlFormattedusage. - Filter to Vue SFCs — only
.vuefiles need i18n passes. Skip non-component files. - For each file, scan for hard-coded strings:
<template>: inner text,alt,placeholder,aria-label, button labels, tooltip text.<script>: string literals passed to user-visible UI (notification messages, dropdown labels, error messages).- Skip: dynamic expressions, HTML tag names, CSS classes, internal identifiers, log messages.
- Define messages with
defineMessages— use descriptive, stableids based on the component's domain (e.g.project.settings.title). - Replace strings in templates with
formatMessage()calls, or<IntlFormatted>for strings containing links or markup. - Handle ICU edge cases — add a space before
}}if an ICU placeholder ends at a Vue template delimiter boundary. - Verify no hard-coded English strings remain in the changed templates. Do not alter logic, layout, or reactivity.