Skip to main content
qt-translation-workflow Set up Qt Linguist workflow with .ts files, lupdate/lrelease integration, and translation management
설치로 이동 Skills Marketplace 커뮤니티가 만든 AI 스킬을 발견하고 탐색하세요.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
직접 명령은 검토 Prompt를 거치지 않습니다. 실행하기 전에 소스를 확인하세요.
npx skills add https://github.com/a5c-ai/babysitter --skill qt-translation-workflow명령은 한 줄로 유지됩니다. 복사하기 전에 가로로 스크롤해 전체 내용을 확인하세요.
로컬 사본을 원하시나요? SkillsMP에서 현재 제공할 수 있는 파일을 다운로드하세요.
Zip 다운로드 다운로드 중... 이 저장소의 다른 Skills Reference for querying the Atlas knowledge graph through its MCP tools — the SECONDARY enrichment/comparison layer that adds best-practice context to systems you have ALREADY scanned from your real sources (`az`, repos, dirs). Use when you need to look up nodes, edges, kinds, clusters, stats, or wiki pages in Atlas to compare against your real inventory. (atlas graph, query atlas, atlas mcp, search the graph, graph neighbors, atlas record, atlas kinds, enrichment layer)
Atlas turns your STATED NEED into a real systems atlas by SCANNING your actual sources (Azure via `az`, git repos, local dirs) and process/data mining them, THEN enriching against the Atlas knowledge graph. Use this skill when asked to inventory/map your real systems, scan your cloud + repos + directories, mine the real processes or data they contain, or collect their real constraints/gotchas. (atlas, scan my systems, inventory our azure account, map my repos, real systems atlas, process mining, data mining, collect nuances, system discovery)
assimilate-popular-workflows This skill should be used when the user asks to "find skills in the wild", "assimilate popular workflows", "discover SKILL.md files in repos", "research external skills", "find workflow patterns", "survey the skill landscape", "what skills exist out there", or wants to investigate public repositories for extractable processes, babysitter plugins, and reusable procedural insights. Searches GitHub for SKILL.md files, classifies repos by archetype, and maintains structured research under docs/reference-repos/.
name qt-translation-workflow description Set up Qt Linguist workflow with .ts files, lupdate/lrelease integration, and translation management allowed-tools Read, Write, Edit, Bash, Glob, Grep tags ["qt","i18n","translation","linguist","localization"] graph {"domains":["domain:software-engineering"],"specializations":["specialization:desktop-development"],"skillAreas":["skill-area:desktop-ui-frameworks","skill-area:internationalization"],"roles":["role:desktop-developer","role:fullstack-engineer"],"workflows":["workflow:feature-development","workflow:release-management"]}
qt-translation-workflow
Set up Qt Linguist translation workflow with .ts files and lrelease integration. This skill configures the complete internationalization pipeline for Qt applications.
Capabilities
Configure lupdate for string extraction
Set up .ts translation files
Integrate lrelease for .qm compilation
Generate CMake translation targets
Configure plural forms handling
Set up context-based translations
Generate translation status reports
Configure Qt Linguist project files
Input Schema
{
"type"
:
"object"
,
"properties"
:
{
"projectPath"
:
{
"type"
:
"string"
,
"description"
:
"Path to the Qt project"
}
,
"languages"
:
{
"type"
:
"array"
,
"items"
:
{
"type"
:
"string"
}
,
"description"
:
"Target language codes (e.g., ['de', 'fr', 'ja'])"
}
,
"sourceLanguage"
:
{
"type"
:
"string"
,
"default"
:
"en"
,
"description"
:
"Source language code"
}
,
"translationDir"
:
{
"type"
:
"string"
,
"default"
:
"translations"
}
,
"includeQml"
:
{
"type"
:
"boolean"
,
"default"
:
true
}
,
"pluralForms"
:
{
"type"
:
"boolean"
,
"default"
:
true
}
,
"generateCMake"
:
{
"type"
:
"boolean"
,
"default"
:
true
}
}
,
"required"
:
[
"projectPath"
,
"languages"
]
}
Output Schema {
"type" : "object" ,
"properties" : {
"success" : { "type" : "boolean" } ,
"files" : {
"type" : "array" ,
"items" : {
"type" : "object" ,
"properties" : {
"path" : { "type" : "string" } ,
"language" : { "type" : "string" } ,
"type" : { "enum" : [ "ts" , "qm" , "cmake" ] }
}
}
} ,
"commands" : {
"type" : "object" ,
"properties" : {
"extract" : { "type" : "string" } ,
"compile" : { "type" : "string" }
}
}
} ,
"required" : [ "success" ]
}
CMake Integration # CMakeLists.txt
find_package(Qt6 REQUIRED COMPONENTS LinguistTools)
set(TS_FILES
translations/myapp_de.ts
translations/myapp_fr.ts
translations/myapp_ja.ts
)
# Create translation targets
qt_add_translations(myapp
TS_FILES ${TS_FILES}
QM_FILES_OUTPUT_VARIABLE QM_FILES
LUPDATE_OPTIONS -no-obsolete -locations relative
LRELEASE_OPTIONS -compress
)
# Add to resources
qt_add_resources(myapp "translations"
PREFIX "/translations"
FILES ${QM_FILES}
)
Translation File Structure project/
├── translations/
│ ├── myapp_de.ts
│ ├── myapp_fr.ts
│ ├── myapp_ja.ts
│ └── myapp_en.ts # Reference
├── src/
│ ├── main.cpp
│ └── mainwindow.cpp
└── qml/
└── main.qml
Source Code Setup
C++ Translations
#include <QCoreApplication>
MainWindow::MainWindow () {
setWindowTitle (tr ("My Application" ));
label->setText (QCoreApplication::translate ("MainWindow" , "Welcome" ));
QString message = tr ("%n file(s) selected" , "" , count);
QString open1 = tr ("Open" , "menu item" );
QString open2 = tr ("Open" , "window title" );
QString format = tr ("Hello, %1!" );
label->setText (format.arg (userName));
}
void MainWindow::changeEvent (QEvent* event) {
if (event->type () == QEvent::LanguageChange) {
retranslateUi ();
}
QMainWindow::changeEvent (event);
}
QML Translations // main.qml
import QtQuick 2.15
Window {
title: qsTr("My Application")
Text {
// Simple translation
text: qsTr("Welcome to the app")
}
Text {
// Plural forms
text: qsTr("%n item(s)", "", itemCount)
}
Text {
// With context
text: qsTranslate("SettingsPage", "Language")
}
}
Translation Loading
#include <QTranslator>
#include <QLocale>
int main (int argc, char *argv[]) {
QApplication app (argc, argv) ;
QTranslator translator;
const QStringList uiLanguages = QLocale::system ().uiLanguages ();
for (const QString &locale : uiLanguages) {
const QString baseName = "myapp_" + QLocale (locale).name ();
if (translator.load (":/translations/" + baseName)) {
app.installTranslator (&translator);
break ;
}
}
QTranslator germanTranslator;
if (germanTranslator.load (":/translations/myapp_de" )) {
app.installTranslator (&germanTranslator);
}
return app.exec ();
}
Language Switching class LanguageManager : public QObject {
Q_OBJECT
public :
void setLanguage (const QString& languageCode) {
if (m_translator) {
qApp->removeTranslator (m_translator);
}
m_translator = new QTranslator (this );
QString path = QString (":/translations/myapp_%1" ).arg (languageCode);
if (m_translator->load (path)) {
qApp->installTranslator (m_translator);
emit languageChanged () ;
}
}
signals:
void languageChanged () ;
private :
QTranslator* m_translator = nullptr ;
};
Workflow Commands
lupdate src/*.cpp qml/*.qml -ts translations/myapp_de.ts
lupdate -recursive -locations relative -no-obsolete \
src/ qml/ -ts translations/*.ts
lrelease translations/*.ts
linguist translations/myapp_de.ts
Translation Status Report
lconvert -if ts -i translations/myapp_de.ts -of csv -o status.csv
for file in translations/*.ts; do
total=$(grep -c '<source>' "$file " )
translated=$(grep -c 'type="finished"' "$file " )
echo "$file : $translated /$total translated"
done
Best Practices
Use tr() everywhere : Mark all user-visible strings
Provide context : Use disambiguation comments
Handle plurals : Use %n with plural forms
Use QString::arg() : For dynamic content
Test RTL languages : Arabic, Hebrew support
Keep translations updated : Run lupdate in CI
Related Skills
qt-cmake-project-generator - Project setup
desktop-i18n process - Full i18n workflow
docs-localization - Documentation localization
Related Agents
qt-cpp-specialist - Qt implementation
localization-coordinator - Translation management