Compare Message Placeholders
localization.message_placeholders_compare
Overview
You send a source string, a translation, and the placeholder syntax. We inventory every placeholder in both, then tell you which names the translation dropped, which names it added, and which ICU argument types no longer match. SIMPLE_BRACES reads {name} with doubled braces and apostrophes as escapes. ICU_MESSAGE uses the ICU parser so nested plural and select arguments keep their types. We never format, never execute the template, and never judge translation quality. A successful call costs 1 execution credit.
A missing placeholder in a translation is a runtime hole. Comparing names and ICU usages is a mechanical check a model cannot prove from the strings alone.
Reliability
Same pair, same syntax, same ICU version, same answer. Malformed input comes back as compatible false with diagnostics rather than a typed failure.
Context footprint
Two short messages in. A successful call costs 1 execution credit.
When to use it
When you hold a source string and a translation and need to know whether the placeholders still line up.
When you want the message rendered, or a judgement about wording quality.
Powered by ICU4J message-pattern parsing (com.ibm.icu:icu4j).
Scope
Non-goals
- Does not score translation quality or fluency
- Does not format or execute the message
- Does not auto-detect printf, Mustache or other template families
Properties
Capabilities
Cost & billing
Flat rate per invocation
File handling
How we handle your data
What this means
This skill may receive sensitive content, but it does not target sensitive data and returns only a structured non-sensitive result.
Squillify guarantees
- Runs inside Squillify
- This skill runs inside Squillify.
- Payloads are not sent to an external service by this skill.
- Squillify does not permanently store submitted payloads.
- Telemetry records metadata only, not submitted content.
- Submitted payloads are not used for training.
- Submitted payloads are not reviewed by humans.
- This skill does not target sensitive data.
- The response does not contain submitted content.
Your responsibility
Squillify does not determine whether submitted content is sensitive. Your application is responsible for deciding what data it is allowed to submit. Your application is responsible for securing the response.
Input schema
| Field | Type | Required | Description |
|---|---|---|---|
| source | string | Yes | Source message whose placeholders are the reference. |
| translation | string | Yes | Translated message compared against the source placeholders. |
| syntax | string | Yes | Placeholder syntax. Published values: SIMPLE_BRACES, ICU_MESSAGE. |
Output schema
| Field | Type | Required | Description |
|---|---|---|---|
| compatible | boolean | Yes | Whether names and usages match and both strings parsed. |
| syntax | string | Yes | Applied placeholder syntax. |
| missingPlaceholders | array | Yes | From 0 through 2000 placeholder names in first-seen order; empty when none apply. |
| extraPlaceholders | array | Yes | From 0 through 2000 placeholder names in first-seen order; empty when none apply. |
| usageMismatches | array | Yes | From 0 through 2000 closed usage-mismatch objects; empty when every shared name keeps the same ICU type. |
| sourceArguments | array | Yes | From 0 through 2000 closed argument inventory rows in first-seen order; empty when none were found. |
| translationArguments | array | Yes | From 0 through 2000 closed argument inventory rows in first-seen order; empty when none were found. |
| diagnostics | array | Yes | From 0 through 500 diagnostics sorted by path, offset, severity and code; empty when nothing was flagged. |
| truncated | boolean | Yes | Whether the diagnostic list was cut at 500 items. |
| _meta | object | Yes | Closed ICU and CLDR versions used for this answer, with icuVersion and cldrVersion strings. |
API contract
POST /v1/executecurl -sS -X POST "$BASE/v1/execute" -H "Authorization: Bearer $KEY" -H 'Content-Type: application/json' -d '{"skillKey":"localization.message_placeholders_compare","input":{"source":"Hello {name}","translation":"Bonjour","syntax":"SIMPLE_BRACES"}}'import { Squillify } from "@squillify/sdk";
const sq = new Squillify({ apiKey: process.env.SQUILLIFY_API_KEY });
const { output } = await sq.execute("localization.message_placeholders_compare", {"syntax":"SIMPLE_BRACES","source":"Hello {name}","translation":"Bonjour"});Errors
| Code | HTTP | Retryable | Description |
|---|---|---|---|
| VALIDATION_ERROR | 400 | No | The request payload failed schema validation. |
| UNAUTHORIZED | 401 | No | Missing or invalid API key. |
| SKILL_NOT_ACCESSIBLE | 403 | No | The API key is not granted access to this skill. |
| SKILL_NOT_AVAILABLE_FOR_PLAN | 403 | No | This skill is not included in your current plan. |
| PLAN_ELIGIBILITY_UNAVAILABLE | 503 | Yes | Plan eligibility could not be decided. Retry after backoff. |
| SKILL_NOT_FOUND | 404 | No | The requested skill or version does not exist. |
| TENANT_RATE_LIMITED | 429 | Yes | Request rate limit exceeded. Retry after backoff. |
| QUOTA_EXCEEDED | 429 | Yes | Plan quota exhausted. Retryable once the quota period resets. |
| EXECUTION_TIMEOUT | 504 | Yes | Execution exceeded the allowed time budget. |
Other limits
| Limit | Value |
|---|---|
| Recommended inline bytes | 32 KiB |
Limitations
- Does not score translation quality or fluency
- Does not format or execute the message
- Does not auto-detect printf, Mustache or other template families
- Asking whether the wording is a good translation
- Rendering the message with real values
How to call
POST /v1/execute (requires authentication)
{
"skillKey": "localization.message_placeholders_compare",
"input": {
"syntax": "SIMPLE_BRACES",
"source": "Hello {name}",
"translation": "Bonjour"
}
}Examples
Simple braces missing a name
{
"syntax": "SIMPLE_BRACES",
"source": "Hello {name}",
"translation": "Bonjour"
}{
"truncated": false,
"_meta": {
"icuVersion": "76.1",
"cldrVersion": "46.0"
},
"compatible": false,
"diagnostics": [],
"sourceArguments": [
{
"name": "name",
"usage": "SIMPLE",
"occurrences": 1
}
],
"translationArguments": [],
"syntax": "SIMPLE_BRACES",
"missingPlaceholders": [
"name"
],
"extraPlaceholders": [],
"usageMismatches": []
}ICU plural argument kept
{
"syntax": "ICU_MESSAGE",
"source": "{count, plural, one {# file} other {# files}}",
"translation": "{count, plural, one {# fichier} other {# fichiers}}"
}{
"truncated": false,
"_meta": {
"icuVersion": "76.1",
"cldrVersion": "46.0"
},
"compatible": true,
"diagnostics": [],
"sourceArguments": [
{
"name": "count",
"usage": "PLURAL",
"occurrences": 1
}
],
"translationArguments": [
{
"name": "count",
"usage": "PLURAL",
"occurrences": 1
}
],
"syntax": "ICU_MESSAGE",
"missingPlaceholders": [],
"extraPlaceholders": [],
"usageMismatches": []
}Recommended use cases
- Catching a dropped {count} before a localized build ships
- Checking that an ICU plural argument stayed a plural in the translation
Avoid for
- Asking whether the wording is a good translation
- Rendering the message with real values
Related skills
Composable with
Safety & privacy
- Runs without calling any external service.
- Your payloads are never stored permanently.
- Telemetry captures metadata only — never your payload contents.
- We never train models on your payloads.
- No human reviews your payloads.