Skip to content

Name By Concept, Not Copy ​

Identifiers carry the generic concept they represent, never the specific UI copy, translation, or content they happen to hold. A tab helper is ordersTab, never a name spelled from its label, even when the label is in the UI's own language. The label string is content and keeps its language. The identifier is code and stays generic English.

Why ​

Naming by concept keeps the code stable while the copy is free to move.

How To Apply ​

  • Name the identifier for what it represents in generic English: ordersTab, SETTINGS_TAB, notesLabel.
  • Keep the literal copy as the string value it points at: tab(page, '<label in the UI language>').
  • Applies everywhere a name is chosen: consts, locals, params, helpers, and test fixtures.
  • Catch it with a lint rule or a sweep (Pre-Empt Recurring Code-Review Nits).