We have moved to Github. Please open tickets there.

Opened 11 months ago

#4590 new Enhancement

Standardize form-related language strings

Reported by: ewinslow Owned by:
Priority: normal Milestone: Needs Review
Component: Core Version: 1.8.5
Severity: minor Keywords:
Cc: brett@… Difficulty:

Description

My recommendation: $type:$subtype:$property:$field where $field is something like "placeholder", "label", "title", "hint", etc.

An example from the plugins repo, which could really use this because it has terrible i18n support right now:

$en = array(
  'object:plugin_project:title:label' => 'Project Name',
  'object:plugin_project:summary:label' => 'Project Summary',
  'object:plugin_project:summary:hint' => 'A one- or two-sentence (250 characters) summary of your project's main features.',
  ...
);

This just provides a more semantic, logical method of organizing these strings.

These could also fall back like views to $type:default:$property:$field or even further back to entity:$property:$field so that each new subtype doesn't have to provide a duplicate label for access_id, which has semantics that are pretty consistent across all Elgg entities.

Approach:

  1. Agree on a standard structure for these language strings.
  2. Make use of this standard structure in bundled plugins.
  3. Encourage (but don't require) use of this standard in 3rd party plugins.
  4. Implement a forms system that uses these language strings automagically.

Change History (0)

Note: See TracTickets for help on using tickets.