Frappe Core Translation logo

Frappe Core Translation

Organization
Impertio-Studio
frappe-core-translation

Use when implementing translations/i18n in Frappe v14-v16 apps. Covers _() in Python, __() in JavaScript, CSV translation files, bench commands, string extraction rules, lazy translation _lt(), PO/MO files [v15+], RTL support, and custom app translations. Prevents common mistakes with f-strings, concatenation, and template literals that break string extraction. Keywords: translation, i18n, _(), __(), _lt(), CSV, PO, gettext,, translate my app, multi-language, text not translated, wrong language, how to add translation. bench get-untranslated, RTL, localization.

Overview

PublisherImpertio-Studio
RepositoryFrappe_Claude_Skill_Package
Skill namefrappe-core-translation
Stars
180
Forks
53
Bundled files
3
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 3 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by Impertio-Studio on GitHub. Read the source before you install it.

Installation

Install the Frappe Core Translation AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/Impertio-Studio/Frappe_Claude_Skill_Package.git /tmp/Frappe_Claude_Skill_Package
mkdir -p .claude/skills
cp -r /tmp/Frappe_Claude_Skill_Package/skills/source/core/frappe-core-translation .claude/skills/frappe-core-translation
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Frappe Core Translation in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Frappe Core Translation on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Frappe Core Translation is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Frappe Translation / i18n

Deterministic patterns for translating Frappe apps across v14, v15, and v16.


Quick Reference

TaskPythonJavaScript
Translate string_("Hello")__("Hello")
With substitution_("Hello {0}").format(name)__("Hello {0}", [name])
With context_("Change", context="Coins")__("Change", null, "Coins")
Lazy (module-level)_lt("Pending") [v15+]N/A
Check RTLfrappe.utils.is_rtl()frappe.utils.is_rtl()

Decision Tree

Need to translate a string?
├── In Python (.py)?
│   ├── Inside a function/method → _("text {0}").format(val)
│   ├── Module-level constant [v15+] → _lt("text")
│   └── Module-level constant [v14] → define inside function or use lazy
├── In JavaScript (.js)?
│   └── ALWAYS → __("text {0}", [val])
├── In Jinja template (.html)?
│   └── {{ _("text") }}
├── In Vue (.vue)?
│   └── __("text") in <script>, {{ __("text") }} in <template>
└── DocType label/description/option?
    └── Auto-extracted — no _() needed

Where do translations live?
├── v14 → apps/{app}/{app}/translations/{lang}.csv
├── v15+ → apps/{app}/{app}/locale/{lang}/LC_MESSAGES/{app}.po
└── User overrides → Translation DocType (highest priority)

Need to extract untranslated strings?
├── v14 → bench --site {site} get-untranslated {lang} {output}
└── v15+ → bench generate-pot-file --app {app}

Translation Priority (Highest First)

PrioritySourceScope
1Translation DocType (user overrides)Per-site
2MO files (locale/{lang}/.../{app}.mo)Per-app [v15+]
3CSV files (translations/{lang}.csv)Per-app
4Parent language (e.g., pt for pt-BR)Fallback

Version Differences

Featurev14v15v16
_() / __()YesYesYes
_lt() lazy translationNoYesYes
CSV translationsYesYes (legacy)Yes (legacy)
PO/MO (gettext)NoYesYes
bench generate-pot-fileNoYesYes
Babel JS extractorNoYesYes
Type hints on _()NoNoYes

Auto-Extracted Strings (No _() Needed)

These are extracted automatically by the framework:

  • DocType labels and descriptions
  • Select field options (each option line)
  • Workflow states and actions
  • Print Format labels
  • Report column labels
  • Notification subjects (not body)
  • Dashboard chart labels

String Extraction Rules

File TypeExtractorWhat It Finds
.pyBabel (AST)_("..."), _lt("...") calls
.jsBabel tokenizer [v15+] / regex [v14]__("...") calls
.htmlRegex{{ _("...") }} in Jinja
.vueSame as JS__("...") in script/template
.jsonDocType parserLabels, descriptions, options

CRITICAL: Extractors work on the AST/tokens. They CANNOT extract dynamically constructed strings. See Anti-Patterns.


Anti-Patterns (NEVER Do These)

PatternWhy It BreaksCorrect Form
_(f"Hello {name}")f-string not extractable_("Hello {0}").format(name)
_("Hello " + name)Concatenation fragments_("Hello {0}").format(name)
_("Welcome %s") % nameOld-style not extractable_("Welcome {0}").format(name)
__(`Hello ${name}`)Template literal not extractable__("Hello {0}", [name])
_(" Hello ")Leading/trailing spaces trimmed_("Hello")
_("item" if x else "items")Ternary inside _()_("item") if x else _("items")
_(variable)Variable not extractable_("Known String")

Full anti-pattern catalog with code examples: references/anti-patterns.md


CSV Translation File Format

Location: apps/{app}/{app}/translations/{lang}.csv

csv
"source","translation","context"
"Hello","Hallo",""
"Change","Wisselgeld","Coins"
"Change","Wijziging","Amendment"
  • ALWAYS use UTF-8 encoding (no BOM)
  • ALWAYS quote all fields with double quotes
  • Context column is optional but MUST be present (empty string if unused)
  • No hooks registration needed — auto-discovered from translations/ directory

PO/MO Files [v15+]

Location: apps/{app}/{app}/locale/{lang}/LC_MESSAGES/{app}.po

bash
# Generate POT template
bench generate-pot-file --app {app}

# Migrate existing CSV to PO
bench migrate-csv-to-po --app {app}

# Compile PO to MO (required for runtime)
bench compile-po-to-mo --app {app}

PO files follow standard GNU gettext format. Use any PO editor (Poedit, Weblate, Transifex).


Bench Commands

CommandVersionPurpose
bench --site {site} get-untranslated {lang} {output.csv}AllExport untranslated strings
bench update-translations {lang} {untranslated.csv} {translated.csv}AllImport translations
bench generate-pot-file --app {app}v15+Generate .pot template
bench migrate-csv-to-po --app {app}v15+Convert CSV to PO format
bench compile-po-to-mo --app {app}v15+Compile PO to binary MO

RTL Support

Hardcoded RTL languages: ar (Arabic), he (Hebrew), fa (Persian/Farsi), ps (Pashto)

python
# Python
if frappe.utils.is_rtl():
    # Apply RTL-specific logic
javascript
// JavaScript
if (frappe.utils.is_rtl()) {
    // Apply RTL-specific logic
}
  • Frappe auto-applies dir="rtl" to the <html> element
  • ALWAYS use logical CSS properties (margin-inline-start not margin-left) for RTL compatibility
  • Bootstrap RTL stylesheet is auto-loaded when RTL language is active

Custom App Translation Workflow

Adding translations to your custom app:

  1. Write translatable strings using _() / __() with positional placeholders
  2. Extract untranslated strings:
    • v14: bench --site {site} get-untranslated {lang} untranslated.csv
    • v15+: bench generate-pot-file --app {app}
  3. Translate the extracted strings (manually or via PO editor)
  4. Place translations:
    • CSV: apps/{app}/{app}/translations/{lang}.csv
    • PO: apps/{app}/{app}/locale/{lang}/LC_MESSAGES/{app}.po
  5. Compile (v15+ PO only): bench compile-po-to-mo --app {app}
  6. Clear cache: bench --site {site} clear-cache

Reference Files

FileContents
references/api-reference.mdFull Python _() and JS __() API with all signatures and edge cases
references/csv-and-bench.mdCSV format spec, bench commands, PO/MO workflow, custom app setup
references/anti-patterns.mdComplete anti-pattern catalog with failing and corrected examples

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Frappe Core Translation AI skill do?

Use when implementing translations/i18n in Frappe v14-v16 apps. Covers _() in Python, __() in JavaScript, CSV translation files, bench commands, string extraction rules, lazy translation _lt(), PO/MO files [v15+], RTL support, and custom app translations. Prevents common mistakes with f-strings, concatenation, and template literals that break string extraction. Keywords: translation, i18n, _(), __(), _lt(), CSV, PO, gettext,, translate my app, multi-language, text not translated, wrong language, how to add translation. bench get-untranslated, RTL, localization.

Why use Frappe Core Translation on TypingMind?

Because you install it once and use it with any model. Frappe Core Translation is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Frappe Core Translation in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/Impertio-Studio/Frappe_Claude_Skill_Package/tree/main/skills/source/core/frappe-core-translation. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Frappe Core Translation?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Frappe Core Translation?

As many as you like. As long as a model supports skills, you can use Frappe Core Translation with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Frappe Core Translation AI skill free?

Yes. It is published on GitHub by Impertio-Studio under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇