Opened 11 months ago
Standardize form-related language strings
|Reported by:||ewinslow||Owned by:|
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.
- Agree on a standard structure for these language strings.
- Make use of this standard structure in bundled plugins.
- Encourage (but don't require) use of this standard in 3rd party plugins.
- Implement a forms system that uses these language strings automagically.