internationalization
ما الذي تفعله
تصف هذه المهارة كيفية الإبقاء على النصوص الظاهرة للمستخدم في كتالوجات الترجمة الخاصة بالتطبيق. تغطي اللغات المستخدمة، وكيفية تسمية المفاتيح، وطريقة تشغيل فحص الترجمة. وهي مخصصة للمطورين الذين يضيفون نصوصاً أو يغيّرونها في تطبيقات تدعم أكثر من لغة.
متى تستخدمها
- ✓عندما تضيف نصاً ظاهراً أو تغيّره، مثل تسميات أو رسائل منبثقة أو حالات فارغة.
- ✓عندما اختار التطبيق لغات إضافية، وتحتاج كتالوجاتها إلى تحديث.
- ✓عندما تعرض قائمة اللغات لغات لا يستطيع التطبيق تحميلها فعلاً.
رابط المهارة
https://github.com/BuilderIO/agent-native/blob/main/.agents/skills/internationalization/SKILL.mdانسخه والصقه في الذكاء الاصطناعي الذي تستخدمه (Claude أو ChatGPT أو Cursor) واطلب منه اتباع التعليمات.
طريقة الاستخدام
أسهل طريقة: انسخ الرسالة والصقها في الذكاء الاصطناعي الذي تستخدمه. سيقرأ المهارة وينفّذ تعليماتها.
رسالة جاهزة للصق
لـ Claude Code أو Codex أو Cursor: شغّله داخل مجلد مشروعك وستُثبَّت المهارة.
نزّل ملف SKILL.md وضعه في مجلد مهارات وكيلك.
مثال على ما تطلبه من الذكاء الاصطناعي
“هل يمكنك إضافة تسمية جديدة إلى صفحة الإعدادات، وتحديث الترجمتين الفرنسية والألمانية أيضاً؟”
5 مهارات جديدة كل أسبوع. قراءة في دقيقة واحدة.
كيف تعمل
يضيف الوكيل النص أولاً إلى الكتالوج الإنجليزي، ثم يحدّث اللغات التي يسردها التطبيق فقط. ويحافظ على المفاتيح نفسها والعناصر النائبة، ويشغّل فحص الترجمة.
المحتوى التقني (ملف SKILL.md الأصلي)
النص الأصلي من المؤلف، مباشرة من GitHub.
Internationalization — opt-in translations
English (en-US) is the default source locale. Do not create or update
additional locale catalogs unless the app's agent-native.config.ts lists them
under translations.locales.
Rule
Visible framework/template UI copy belongs in the app's i18n catalog, not
inline in components. When you add or edit UI text, update the English source
catalog first, then update only the locale catalogs listed in
translations.locales, and run the i18n guard.
Catalogs
Templates use app/i18n/:
en-US.tsis the canonical source tree and fallback.- Other locale files keep the same non-plural keys and the same placeholders.
index.tsexports anAgentNativeI18nCatalogwith English bundled and non-English catalogs loaded by dynamic import.
Use BCP-47 filenames from the supported set: en-US, zh-CN, es-ES,
fr-FR, de-DE, ja-JP, ko-KR, pt-BR, hi-IN, ar-SA.
If an app only ships translations for a subset of that set, set
supportedLocales on the AgentNativeI18nCatalog to that subset. Without it,
<LanguagePicker /> lists every framework-supported locale regardless of
whether loadMessages can actually resolve it.
UI Pattern
- Wrap apps with
AppProviders i18n={{ catalog: i18nCatalog }}. - Read strings with
useT()and keep keys stable. - Apps expose a
/settingsroute without a sidebar item for it: Settings opens from the account menu in the sidebar footer and from ⌘, (Ctrl+, elsewhere). Core's Account › Preferences page already renders the Interface language row (with Timezone; both are the per-userlocalizationrecord, so a change applies in every app); don't add a second picker to an app's Settings page. Keep the header language icon only as a quick-access shortcut. - Don't add an "Agent settings" row to an app's settings page: the Agent
group's pages are part of Settings. Link to a page with
buildSettingsRoute(page, sub?), and localize the link's label. - Settings copy follows the same rules: page and group labels are core
agentChat.settingsShell.*keys, and an app's own rows, areas, and search entries take already translated strings from the app catalog. - Use
useFormatters()for dates, numbers, relative time, and lists instead of embedding formatted values in translation strings. - Do not translate stable identifiers: action names, route names, enum values, app-state keys, database values, protocol fields, env var names, or provider names.
Plurals And Placeholders
Plural strings use i18next/CLDR suffixes. Do not force every locale to copy English plural categories:
- English uses
_oneand_other. - Chinese and Japanese usually use
_other. - Arabic uses
_zero,_one,_two,_few,_many, and_other.
Keep interpolation placeholders identical across locales, such as
{{count}}, {{name}}, or ICU-style {count} arguments.
RTL
New UI should be RTL-safe. Prefer logical CSS utilities/properties such as
ms-*, me-*, ps-*, pe-*, start-*, end-*, text-start, and
text-end when direction matters. Avoid hardcoded left/right positioning for
new localized UI unless it is genuinely physical.
Verification
Run:
pnpm guard:i18n-catalogs
For broader changes, also run the affected template tests and pnpm typecheck.
Machine translation is only a starting point; high-visibility strings need
human review.
الأسئلة الشائعة
هل الترجمة مفعّلة افتراضياً؟
لا. يجب أن تفعّل التطبيقات اللغات الأخرى في إعداداتها، والإنجليزية هي الافتراضية.
هل يجب تغيير كل ملف لغة؟
فقط اللغات التي يسردها التطبيق مفعّلة. أما الكتالوج الإنجليزي فيُحدَّث دائماً أولاً.
هل أستطيع وضع النص مباشرة داخل المكون؟
تنص المهارة على أن النص الظاهر ينتمي إلى الكتالوج، لا أن يكون مضمّناً داخل المكونات.
التفاصيل
الوصف الأصلي من المؤلف
How to add or edit localized UI copy in agent-native apps. Use when adding, removing, or changing user-visible interface text, prompts, toasts, labels, empty states, or date/number/list formatting. Apps opt in to additional locales from `agent-native.config.ts`.
repo: BuilderIO/agent-native
الشعبية
- نجوم GitHub
- 7.6k
- الترتيب
- #13165
- الترخيص
- MIT
- آخر تحديث
- 2/11/2026
التعليقات
- …
المزيد من المهارات من هذا المستودع
design-exploration
7.6kيساعد وكيلك على استكشاف عدة اتجاهات تصميم لواجهة المستخدم جنباً إلى جنب، ثم تختار أنت واحداً، ويحسّن الوكيل التصميم المختار.
visual-edit
7.6kيساعد وكيلك على فتح تطبيق محلي يعمل في محرر مرئي، لتراجع شاشاته الحقيقية وتحررها معاً.
turn-into-app
7.6kيحوّل سير عمل أو جدول بيانات أو مشروعاً إلى تطبيق مرئي مصقول، فيه شاشات مملوءة بالبيانات ووكيل يعمل خلف أدوات التحكم.
visual-plan
7.6kيحوّل خطة نصية عادية إلى خطة مرئية تفاعلية فيها مخططات وخرائط ملفات ومقتطفات كود وأسئلة مفتوحة.
مهارات مشابهة
angular-developer
280kيساعد وكيلك على كتابة شيفرة Angular وتقديم نصائح لبنية المشروع، ويفيد في بدء المشاريع الجديدة وإنشاء المكونات وتحسين الأداء وإمكانية الوصول.
frontend-a11y
280kيساعد وكيلك على جعل واجهات الويب متاحة للجميع، فيضمن أن المواقع والتطبيقات تعمل جيدًا مع قارئات الشاشة والتنقل بلوحة المفاتيح.
frontend-patterns
280kيطبّق وكيلك أنماط تطوير الواجهات الحديثة، فيحسّن الأداء ويدير الحالة ويتبع أفضل الممارسات في React وNext.js.