i18n-pass

Convert hard-coded English strings in Vue files to the @modrinth/ui i18n system.

2.3k|559|Updated Jun 20, 2021
One-click install
npx skills add https://github.com/modrinth/code --skill i18n-pass
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: i18n-pass
Source: https://github.com/modrinth/code/tree/main/.claude/skills/i18n-pass
Command: npx skills add https://github.com/modrinth/code --skill i18n-pass

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill automates the conversion of hard-coded English strings in Vue components to a standardized internationalization (i18n) system, making your application ready for global audiences.

Core Features & Use Cases

  • Automated String Conversion: Identifies and converts English strings in Vue templates and scripts to use the @modrinth/ui i18n system.
  • PR Review Assistance: Helps identify untranslated strings during code reviews.
  • Component Internationalization: Facilitates the process of making individual components translatable.

Quick Start

Run the i18n-pass skill on the file 'src/components/MyComponent.vue'.

Frequently Asked Questions about i18n-pass

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I convert hard-coded English strings in Vue components to an i18n system?

To internationalize Vue components, this Skill scans changed files and converts hard-coded English strings in templates and scripts to use defineMessages and formatMessage within the @modrinth/ui i18n system.

How does automated localization handle dynamic content in Vue templates?

Automated localization handles dynamic content by requiring the IntlFormatted component usage. This ensures dynamic variables in Vue templates adhere to ICU format rules during the internationalization pass.

Can I use this to identify untranslated strings during a pull request review?

Yes, you can use this Skill for PR review assistance. It performs an internationalization pass on changed Vue files within a pull request to help identify untranslated strings.

Does this internationalization pass support Vue files outside of pull requests?

Yes, the internationalization pass supports Vue files outside of pull requests by accepting a specified file path. You can run it directly on individual components like src/components/MyComponent.vue.

What ICU format rules are required for internationalizing Vue scripts?

Internationalizing Vue scripts requires adherence to ICU format rules. The Skill enforces this standard when converting English strings into the defineMessages and formatMessage functions.

What is the best way to automate UI string translation for Vue components?

The best way to automate UI string translation is running an i18n localization pass on changed Vue files. This automatically converts hard-coded English strings to a standardized internationalization system using defineMessages.