Anonymous | Login | Signup for a new account | 2024-04-25 16:42 CDT |
Main | My View | View Issues | Change Log | Roadmap | Docs | Wiki | Repositories |
Dependency Graph | [ View Issue ] [ Relation Graph ] [ Horizontal ] | |||
|
||||
|
Viewing Issue Simple Details | |||||
ID | Category | Type | Reproducibility | Date Submitted | Last Update |
0001094 | [In-Portal CMS] Optimization | feature request | N/A | 2011-08-08 12:06 | 2011-11-30 08:17 |
Reporter | alex | View Status | public | ||
Assigned To | alex | ||||
Priority | normal | Resolution | fixed | ||
Status | closed | ||||
Summary | 0001094: Optimizing storage of help phrases | ||||
Description |
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 HintTranslation column into Phrase table, right after Translation 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 "hint:" 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 inp_edit_box block via hint_label parameter in template. When not specified, then we'll assume, that hint phrase is "hint:" + 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 Name, then corresponding phrase to show is "la_fld_Name". This way regular form field code in template would became <inp2:m_RenderElement name="inp_edit_box" field="Name"/> instead of <inp2:m_RenderElement name="inp_edit_box" field="Name" title="la_fld_Name" hint_label="la_hint_Name"/>. Of course if we need to do a manual override, then ability to specify "title" parameter will stay. Same way we can get rid of specifying "la_col_Name" in every grid column definition, however in 99% cases it matches "la_col_" + FieldName formula. |
||||
Additional Information |
Some more ideas that were implemented: 1. added "Hint Phrase" and "Column Phrase" textarea on phrase translation form 2. to use phrase hint translation use <inp2:m_Phrase name="hint:la_fld_FieldName"/> 3. to use phrase column translation use <inp2:m_Phrase name="column:la_fld_FieldName"/> 4. most of "la_col_FieldName" were deleted and their translation was set as "column phrase" for corrsponding "la_fld_FieldName" phrases 4. added hint support for "form submissions" & "custom fields" This way only 1 phrase will have 3 translation: 1. main translation 2. associated hint translation 3. associated column heading translation TODO I wasn't able to remove "title" attribute in "inp_edit_*" block on edit templates due lack of time. Goal is to remove title="la_fld_FieldName" when tag contains field="FieldName". |
Main | My View | View Issues | Change Log | Roadmap | Docs | Wiki | Repositories |
Web Development by Intechnic In-Portal Open Source CMS |