Back to all reviewers

Consistent placeholder conventions

appwrite/appwrite
Based on 7 comments
Json

Ensure all placeholders in localization files follow consistent naming conventions to prevent runtime errors and text leakage in the UI. This applies to both sprintf-style placeholders (`%s`) and template variables (`{% raw %}{{name}}{% endraw %}`).

Naming Conventions Json

Reviewer Prompt

Ensure all placeholders in localization files follow consistent naming conventions to prevent runtime errors and text leakage in the UI. This applies to both sprintf-style placeholders (%s) and template variables ({{name}}).

Common issues to watch for:

  1. Correct sprintf order: Use %s not s%

    -"emails.invitation.subject": "Invitació a l'equip %s a s%",
    +"emails.invitation.subject": "Invitació a l'equip %s a %s",
    

Placeholder errors are particularly problematic because they can:

  • Break runtime string substitution
  • Cause literal placeholder text to appear in the UI
  • Lead to crashes in formatting functions
  • Create inconsistent user experiences across languages
7
Comments Analyzed
Json
Primary Language
Naming Conventions
Category

Source Discussions