本文へスキップ
Skillpedia
WebサイトとUI(フロントエンド)75k · #3052

text-expansion

できること

このスキルは、翻訳された文で壊れる可能性のある CSS の固定サイズや強制的な切り取りを確認します。複数の言語に対応するアプリやサイトのための開発者やデザイナー向けです。

使う場面

  • ✓長い言語に変わると崩れる、固定幅のボタンやラベルがあるとき。
  • ✓ウェブサイトを複数の言語に翻訳しようとしているとき。
  • ✓翻訳ファイルのテキストが、レイアウトで切られたり隠されたりしているとき。

スキルのリンク

https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/text-expansion/SKILL.md

コピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。

使い方

いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。

貼り付け用メッセージ

このスキルを使って手伝ってください:https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/text-expansion/SKILL.md このリンクのSKILL.mdファイルを読んで、私の作業でその指示に従ってください。
こういうスキルを、AIが自分で見つけてくれたら?無料のSkillpedia MCPをインストール。1行で、作業の前に15,000+のスキルから探してくれます。1分でインストール →

AIへの頼み方の例

“アプリをドイツ語に翻訳したところ、ボタンがはみ出します。長い文を扱えるようにレイアウトを直してもらえますか。”

毎週5つの新しいスキル。1分で読めます。

仕組み

エージェントは、スタイルの中の固定幅と強制的な切り取りを見つけます。それらを柔軟なサイズに置き換え、疑似翻訳の長いテキストでテストすることを提案します。

技術的な内容(元のSKILL.md)

作者による元のテキスト(英語)をGitHubからそのまま表示しています。

Design UI components to accommodate text expansion from translation

Layouts designed only with English copy routinely break when translated: buttons overflow their containers, labels truncate, and navigation items wrap unexpectedly. Catching these issues early with pseudo-locale testing is far cheaper than fixing them after translations are delivered.

Quick Reference

  • German translations are typically 30% longer than English; Finnish 50% longer
  • Avoid fixed-width containers for text-bearing elements like buttons and labels
  • Use min-inline-size instead of inline-size to allow natural growth
  • Test with a pseudo-locale that inflates strings before committing translations
  • Include pseudolocalization in CI or preview testing, not just manual QA

Check

Identify CSS rules and component styles that use fixed widths or hard truncation on elements containing translatable text, which would break when content expands in other languages. Check that the team can test a pseudolocalized build or preview.

Fix

Replace fixed inline-size with min-inline-size on text containers, remove overflow: hidden from interactive elements, and add a pseudo-locale build step for visual testing in local development and CI.

Explain

Explain how text expansion during translation breaks fixed layouts and what CSS patterns prevent overflow and clipping across locales.

Code Review

Review CSS files and component styles for fixed widths, overflow: hidden, white-space: nowrap, and text-overflow: ellipsis on buttons, labels, navigation items, and headings that contain translatable text.


For full implementation details, code examples, and framework-specific guidance, see references/rule.md.

Rule page: https://frontendchecklist.io/rules/i18n/text-expansion

よくある質問

翻訳された文はどのくらい長くなりますか?

ドイツ語は英語よりおよそ30パーセント、フィンランド語は約50パーセント長くなることが多いとこのスキルは説明しています。

疑似ローカライズとは何ですか?

実際の翻訳が届く前にレイアウトの問題を見つけるため、水増しされた仮のテキストで作るサイトのテスト版です。

overflow: hidden はすべて削除すべきですか?

操作できる要素からは削除すべきだとこのスキルは提案しています。隠れたオーバーフローはテキストを切ってしまうことがあるためです。

詳細

作者による元の説明

Use when reviewing CSS for fixed dimensions, truncation, or overflow rules on elements that render translatable strings.

repo: thedaviddias/Front-End-Checklist

人気

GitHubのスター
75k
ランキング
#3052
ライセンス
MIT
更新日
2026/10/31

このスキルは役に立ちますか?

0

ログイン して投票しましょう。

コメント

  • …

このリポジトリの他のスキル

似ているスキル