ek9_query_translation_completeness
Answers status, translationDebtCount and translationDebt[] (every {textType, locale, method} still needing translation) first, then the per-(text type, locale, method) status grid (translated | stubbed | missing-error) and summary totals - the whole module, nothing to verify.
When to use it
'What still needs translating?' is one call: {} lists every {textType, locale, method} still placeholder-stubbed in the module's i18n text, no file needed.
When not to use it
- You just wrote via
ek9_edit_localized_textand its response already carries translationDebt[] - re-querying is redundant. - You want full method bodies, not just status — use
ek9_query_constructon the text type. - You want to grep the literal placeholder marker text — use
ek9_search_text; this tool returns structured status, not raw matches. - You need to CLEAR an orphaned //AI: marker whose body is already translated — feed the method's placeholderMarker line to
ek9_remove_comments.
Details
Method status: `translated`, `stubbed` (the marker comment above the body matches placeholderPattern — the body literal is NOT the discriminator, an empty "" body alone is not stubbed), or `missing-error` (E07150: method exists in other locales but not this one — transient mid-edit, 0 in a clean workspace). Text-type-per-locale status: complete / partial / stubbed / missing-incomplete / absent-by-design (a text type validly living in only some locales — excluded from percent denominators). translationDebt[] is {textType, locale, method, params} in that field order, LOCKED identical to ek9_edit_localized_text; unknown filter names surface in warnings[] and are skipped, not errored.
Arguments
| Argument | Type | Required | What it is |
|---|---|---|---|
includeMethodBodies | boolean | When true, each method entry includes its current body (truncated to 200 chars). | |
localeFilter | array of string | Limit results to specific locales. Default: all locales discovered in the module. | |
module | string | The module to operate on. Default: the first module that defines any text type; supply it when several modules carry i18n. | |
placeholderPattern | string | Marker-detection regex applied to trimmed source lines. Default: literal match for `//AI: translate the message` (the marker emitted by LocalizedTextWriter). | |
textTypeFilter | array of string | Limit results to specific text type names. Default: all text types in the module. |
Recorded calls
Real calls, recorded against small projects and checked on every build - a changed answer fails it.
Completeness shape
Request
{ }
Response
{
"locales" : [ "de", "en_GB" ],
"meta" : {
"serverMs" : "<timing>"
},
"module" : "com.example.i18n",
"status" : "ok",
"summary" : {
"localeCount" : 2,
"methodPairCount" : 2,
"missingMethodCount" : 0,
"perLocale" : {
"de" : {
"missingMethod" : 0,
"percentTranslated" : 100.0,
"stubbed" : 0,
"translated" : 1
},
"en_GB" : {
"missingMethod" : 0,
"percentTranslated" : 100.0,
"stubbed" : 0,
"translated" : 1
}
...
Cut short here: 38 more lines. The whole recorded call.