- Working directory created:
contact-localized/ - Plugin root:
D:\Projects\power-platform-skills\plugins\model-apps
node --version→ v20.11.0pac help→ PAC CLI Version 2.11.0 (> 2.10.0 verified)
pac auth list→ active profile contoso-user001@contosotest1.onmicrosoft.com- Active environment: https://contosobapenv0002.crm10.dynamics.com/ (reported to user)
pac model list-tables --search 'contact'— contact entity exists
pac model list-languagesreturned: English (United States) (1033, en-US), Arabic (Saudi Arabia) (1025, ar-SA), French (France) (1036, fr-FR)- Multiple non-English languages detected → planner activates localization code path
- Arabic detected as RTL language
- Question 1 (new or edit): user answered "Create new page(s)"
- Question 2 (data source): user answered "Dataverse entity: contact"
- Question 3 (specific requirements): "Contact list display"
- Question 4 (app selection): user selected existing app "Sales Hub"
- Build is code-only → solution selection question SKIPPED
- Defaults written to plan:
Solution: Default,Publisher Prefix: new
- EnterPlanMode called with plan including Localization section; user approved
- genpage-plan.md written; ## Localization lists detected languages (1033, 1025, 1036) and RTL flag on Arabic
- references/localization.md loaded conditionally
- SKIPPED (contact exists)
- SKIPPED (existing app selected)
- pac model genpage generate-types --data-sources 'contact' --output-file contact-localized/RuntimeTypes.ts
- Plan has 1 page → fast path taken (inlined build, no Task subagent dispatched)
- Data mode: dataverse
- Read sample: plugins/model-apps/samples/9-list-with-caching.tsx (Dataverse list pattern)
- Read ${PLUGIN_ROOT}/references/localization.md (multi-language + RTL pattern)
- Read ${PLUGIN_ROOT}/references/verified-icons.txt
- Wrote page.tsx with:
- Xrm.Utility.getGlobalContext().userSettings.languageId for language detection
- LOCALE_MAP for 1033/1025/1036 → BCP-47 + isRtl
- TRANSLATIONS dictionary with en-US, ar-SA, fr-FR entries
- translate() helper t(key)
- dir attribute set to rtl when locale.isRtl
- Logical CSS properties (paddingInlineStart/End, marginInlineStart, paddingBlock)
- Post-write icon verification: PeopleRegular verified against verified-icons.txt
- pac model genpage upload --app-id 55555555-4444-5555-6666-777777777777 --code-file contact-localized/page.tsx --data-sources 'contact' --prompt "Build a page showing Contact records with name, email, and phone." --model claude-sonnet --name "Contacts (Localized)" --agent-message "Contact list with en-US/ar-SA/fr-FR translations and RTL support" --add-to-sitemap
- 1 page deployed: page.tsx → "Contacts (Localized)" in Sales Hub
- Localization: en-US, ar-SA (RTL), fr-FR
- No entities created