Skillpedia
المواقع والواجهات (frontend)75k · #3052

text-expansion

ما الذي تفعله

تفحص هذه المهارة CSS بحثًا عن أحجام ثابتة وقصّ حاد قد يكسر النصوص المترجمة. وهي موجهة إلى المطورين والمصممين الذين يدعمون أكثر من لغة.

متى تستخدمها

  • ✓عندما يكون لزر أو تسمية عرض ثابت سينكسر مع لغة أطول.
  • ✓عندما يوشك موقع على الترجمة إلى عدة لغات.
  • ✓عندما يقطع التخطيط نصًا قادمًا من ملفات الترجمة أو يخفيه.

رابط المهارة

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

انسخه والصقه في الذكاء الاصطناعي الذي تستخدمه (Claude أو ChatGPT أو Cursor) واطلب منه اتباع التعليمات.

طريقة الاستخدام

أسهل طريقة: انسخ الرسالة والصقها في الذكاء الاصطناعي الذي تستخدمه. سيقرأ المهارة وينفّذ تعليماتها.

رسالة جاهزة للصق

استخدم هذه المهارة لمساعدتي: https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/text-expansion/SKILL.md اقرأ ملف SKILL.md في هذا الرابط ونفّذ تعليماته لمهمتي.
تريد أن يجد الذكاء الاصطناعي مهارات مثل هذه بنفسه؟ثبّت خادم Skillpedia MCP المجاني: سطر واحد، ويبحث في 15,000+ مهارة قبل كل مهمة.ثبّته في دقيقة واحدة →

مثال على ما تطلبه من الذكاء الاصطناعي

“نترجم تطبيقنا إلى الألمانية والأزرار تفيض عن حدودها. هل يمكنك جعل التخطيط يتعامل مع النص الأطول؟”

5 مهارات جديدة كل أسبوع. قراءة في دقيقة واحدة.

كيف تعمل

يجد الوكيل الأحجام الثابتة والقص الحاد في الأنماط، ويستبدلها بأحجام مرنة. ويقترح الاختبار بلغة وهمية ممطوطة.

المحتوى التقني (ملف 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 في المئة.

ما هو pseudo-localization؟

هو نسخة اختبار من الموقع بنص بديل مُنفَّخ، فتظهر مشكلات التخطيط قبل وصول الترجمات الحقيقية.

هل يجب أن أزيل 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
آخر تحديث
31‏/10‏/2026

هل هذه المهارة مفيدة؟

0

سجّل الدخول للتصويت.

التعليقات

  • …

المزيد من المهارات من هذا المستودع

مهارات مشابهة