PPROLint

Messages

Write messages that explain themselves, with placeholders, translations and plural forms.

The message is the sentence the editor reads in the panel. A good message names the item and gives the measured value and the threshold, so it explains itself:

"message": "Clip \"{clip.name}\" on {clip.track} is scaled to {clip.scale} %, outside the allowed range ({options.min}–{options.max} %)."

Placeholders

{field.path} is replaced by the value of the field for the reported item. Any field of the check's scope works, and so do the rule's options.

ValueShown as
stringas it is
numberformatted for the panel's language, at most one decimal (12.5, 12,5 in French or German)
booleantrue or false
unknown?

{field.path:3} shows at most three decimals. Every placeholder is checked when the rule loads: a misspelled field is an error, not an empty gap in the sentence.

To word a value per language, such as a marker type or "named" versus "unnamed", use a label.

Translations

A plain string is the English message. To translate it, give an object keyed by locale. en_US is required; a missing locale falls back to English.

"message": {
  "en_US": "Clip \"{clip.name}\" on {clip.track} is disabled.",
  "fr_FR": "Élément « {clip.name} » sur {clip.track} est désactivé."
}

name and description are translated the same way, with plain text only.

The locales are Premiere's interface languages:

LocaleLanguage
en_USEnglish
de_DEGerman
es_ESSpanish
fr_FRFrench
it_ITItalian
ja_JPJapanese
ko_KRKorean
pt_BRPortuguese (Brazil)
ru_RURussian
zh_CNSimplified Chinese

Plural forms

When a number changes the grammar of the sentence, give the plural forms and the field that picks them in count. other is required; one, few and many are used where the language has them (CLDR plural categories).

"message": {
  "en_US": {
    "count": "clip.durationFrames",
    "one": "Clip \"{clip.name}\" on {clip.track} is {clip.durationFrames} frame long (minimum {options.minFrames}).",
    "other": "Clip \"{clip.name}\" on {clip.track} is {clip.durationFrames} frames long (minimum {options.minFrames})."
  }
}

Write the whole sentence in each form. Do not assemble it from translated fragments: word order changes between languages.

On this page