-
Type: Feature Request
-
Status: Closed
-
Priority: Minor
-
Resolution: Fixed
-
Affects Version/s: 5.1.3-RC1
-
Fix Version/s: 5.1.3
-
Component/s: Optimization
-
Labels:
-
External issue URL:
-
Additional information:
-
Change Log Message:Changed a way how helping phrases (hints) are stored
-
External issue ID:1094
-
Copy Issue Key:
-
Patch Instructions:
Then maybe we need to implement site-wide inline help system. We already have ability to add descriptive hint about field/configuration variable usage, but we rarely actually use that ability.
Since any translatable text on a website is a phrase, then adding a lot of helping text will double (in worst case) language pack size.
To solve that problem before we get to it I'm proposing to add [b]HintTranslation[/b] column into [b]Phrase[/b] table, right after [b]Translation[/b] column that we have already. This way every phrase we created can have hint translation stored under the same name as phrase is stored currently.
To determine what translation (regular or hint) should be used I'm proposing to add "[b]hint:[/b]" in front of phrase name to get it's hint translation instead of actual translation. For example:
- <inp2:m_Phrase name="la_fld_Name"/> - returns just la_fld_Name phrase translation;
- <inp2:m_Phrase name="hint:la_fld_Name"/> - returns a hint translation, associated with la_fld_Name phrase.
In case, when la_fld_Name phrase's translation should have different hints on different forms, then we'll use same old approach, when phrase la_hint_AnotherHintForName is created and specified directly to [b]inp_edit_box[/b] block via [b]hint_label[/b] parameter in template. When not specified, then we'll assume, that hint phrase is "[b]hint:[/b]" + phrase for field name (e.g. la_fld_Name in this case).
Another thing, that could be automated this way is actual "la_fld_Name" phrase. In 99% cases, when field name is [b]Name[/b], then corresponding phrase to show is "la_fld_[b]Name[/b]". This way regular form field code in template would became [b]<inp2:m_RenderElement name="inp_edit_box" field="Name"/>[/b] instead of [b]<inp2:m_RenderElement name="inp_edit_box" field="Name" title="la_fld_Name" hint_label="la_hint_Name"/>[/b].
Of course if we need to do a manual override, then ability to specify "[b]title[/b]" parameter will stay.
Same way we can get rid of specifying "[b]la_col_Name[/b]" in every grid column definition, however in 99% cases it matches "[b]la_col_[/b]" + [b]FieldName[/b] formula.
- is duplicated by
-
INP-1747 Prevent "FieldHintLabel" tag from displaying empty hints
- Closed
- parent of
-
INP-1016 Allow entering hint/column translation of phrases with Debug Mode turned off
- Closed
-
INP-1020 Don't use "la_col_*" phrases (let it auto guess) during grid auto-generation
- Closed
- relates to
-
INP-241 Translation system refactoring
- Closed
-
INP-826 Phrase type detection based on it's name
- Closed