Skip to main content

Squillify development is paused indefinitely. Read why, and discover what this experiment achieved. Read the story

MicroSkills Reference

Compare Message Placeholders

localization.message_placeholders_compare

ProductionEngine wrapper (Class A)Deterministicstrictfastv1.0.0
No network

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

Note
Compares placeholder names and ICU argument usages between one source string and one translation.

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

IdempotentRetry safeStreaming supportedFile input supportedRequires external service

Capabilities

analysisvalidation

Cost & billing

Flat rate per invocation

MetercallsBillable onsuccessCost per call1 credit

File handling

Accepts file_refProduces file_refMax input512 KB

How we handle your data

Sensitive input, safe output
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.

Read the Microskill Data Handling Policy

Input schema

FieldTypeRequiredDescription
sourcestringYesSource message whose placeholders are the reference.
translationstringYesTranslated message compared against the source placeholders.
syntaxstringYesPlaceholder syntax. Published values: SIMPLE_BRACES, ICU_MESSAGE.

Output schema

FieldTypeRequiredDescription
compatiblebooleanYesWhether names and usages match and both strings parsed.
syntaxstringYesApplied placeholder syntax.
missingPlaceholdersarrayYesFrom 0 through 2000 placeholder names in first-seen order; empty when none apply.
extraPlaceholdersarrayYesFrom 0 through 2000 placeholder names in first-seen order; empty when none apply.
usageMismatchesarrayYesFrom 0 through 2000 closed usage-mismatch objects; empty when every shared name keeps the same ICU type.
sourceArgumentsarrayYesFrom 0 through 2000 closed argument inventory rows in first-seen order; empty when none were found.
translationArgumentsarrayYesFrom 0 through 2000 closed argument inventory rows in first-seen order; empty when none were found.
diagnosticsarrayYesFrom 0 through 500 diagnostics sorted by path, offset, severity and code; empty when nothing was flagged.
truncatedbooleanYesWhether the diagnostic list was cut at 500 items.
_metaobjectYesClosed ICU and CLDR versions used for this answer, with icuVersion and cldrVersion strings.

API contract

POST /v1/execute
curl
curl -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"}}'
Integrations
TypeScript SDK
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

CodeHTTPRetryableDescription
VALIDATION_ERROR400NoThe request payload failed schema validation.
UNAUTHORIZED401NoMissing or invalid API key.
SKILL_NOT_ACCESSIBLE403NoThe API key is not granted access to this skill.
SKILL_NOT_AVAILABLE_FOR_PLAN403NoThis skill is not included in your current plan.
PLAN_ELIGIBILITY_UNAVAILABLE503YesPlan eligibility could not be decided. Retry after backoff.
SKILL_NOT_FOUND404NoThe requested skill or version does not exist.
TENANT_RATE_LIMITED429YesRequest rate limit exceeded. Retry after backoff.
QUOTA_EXCEEDED429YesPlan quota exhausted. Retryable once the quota period resets.
EXECUTION_TIMEOUT504YesExecution exceeded the allowed time budget.

Other limits

LimitValue
Recommended inline bytes32 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)

Request bodyjson
{
  "skillKey": "localization.message_placeholders_compare",
  "input": {
    "syntax": "SIMPLE_BRACES",
    "source": "Hello {name}",
    "translation": "Bonjour"
  }
}

Examples

Simple braces missing a name

Inputjson
{
  "syntax": "SIMPLE_BRACES",
  "source": "Hello {name}",
  "translation": "Bonjour"
}
Expected outputjson
{
  "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": []
}
Tip
The translation dropped the name placeholder

ICU plural argument kept

Inputjson
{
  "syntax": "ICU_MESSAGE",
  "source": "{count, plural, one {# file} other {# files}}",
  "translation": "{count, plural, one {# fichier} other {# fichiers}}"
}
Expected outputjson
{
  "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": []
}
Tip
The plural argument name and usage match
  • 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

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.

Tags

i18nplaceholdersvalidationicu