frappe-core-translation

Enforce deterministic translation extraction and placeholder rules in Frappe apps.

163|53|Updated Jan 14, 2026
One-click install
npx skills add https://github.com/Impertio-Studio/Frappe_Claude_Skill_Package --skill frappe-core-translation-impertio-studio
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: frappe-core-translation
Source: https://github.com/Impertio-Studio/Frappe_Claude_Skill_Package/tree/main/skills/source/core/frappe-core-translation
Command: npx skills add https://github.com/Impertio-Studio/Frappe_Claude_Skill_Package --skill frappe-core-translation-impertio-studio

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill prevents production translation failures in Frappe apps caused by incorrect i18n function usage, non-extractable string patterns, and wrong translation file workflows across Frappe v14 to v16.

Core Features & Use Cases

  • Deterministic translation patterns: Use the correct _() / __() forms in Python, JavaScript, and Jinja to ensure strings are actually extractable and translatable.
  • Correct placeholders and context: Enforce {0}-style positional substitutions and proper context handling to keep translations accurate across languages.
  • Version-aware translation workflow: Guide where translations live (CSV for v14, PO/MO for v15+) and which bench commands to run to extract, compile, and clear caches.
  • Anti-pattern protection: Avoid f-strings, concatenation, template literals, and whitespace issues that break extraction or runtime translation behavior, including _lt() rules on v15+.

Quick Start

Instruct the AI to generate Frappe v15 i18n code using _("Hello {0}").format(name) in Python, __( "Hello {0}", [name] ) in JavaScript, and then compile PO into MO and clear cache after translation changes.

Frequently Asked Questions about frappe-core-translation

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

FAQPage Schema
Why are my Frappe translation strings not being extracted by the bench command?▼

Frappe translation extraction fails when using f-strings, string concatenation, or template literals instead of literal translatable strings with deterministic _() or __() function calls. Avoid these anti-patterns to ensure proper string extraction and runtime translation behavior.

How do I format placeholders in Frappe internationalization to support multiple languages?▼

Frappe internationalization requires {0}-style positional substitutions inside _() or __() calls to maintain translation accuracy across languages. Use _("Hello {0}").format(name) in Python and __("Hello {0}", [name]) in JavaScript for correct placeholder formatting.

What is the correct translation file workflow for Frappe v15 compared to v14?▼

Frappe v14 uses CSV files for translations, while v15 and v16 use PO/MO files. You must run the correct bench commands to extract strings, compile PO into MO files, and clear the cache after making translation changes for the workflow to succeed.

How do I define module-level translation constants in Frappe v15 without breaking extraction?▼

Frappe v15 and v16 require using the _lt() function for module constants to keep strings translatable without breaking the extraction process. Ensure you use _lt() instead of standard _() for these constants to avoid known extraction failures.

Does Frappe internationalization support right-to-left (RTL) language considerations?▼

Frappe internationalization includes RTL-aware considerations to ensure proper translation behavior for right-to-left languages. Following deterministic _() usage and correct placeholder formatting helps maintain RTL translation accuracy across Python, JavaScript, and templates.

Can I use Jinja templates for string translation in Frappe apps across versions v14 to v16?▼

Frappe apps support string translation in Jinja templates across v14 to v16 by enforcing deterministic _() usage and literal-only translatable strings. You must avoid template literals and whitespace issues that break extraction in these template files.