In-Portal Issue Tracker

Welcome to the In-Portal Open Source CMS Issue Tracker! This is a central management / tracking tool for all types of tasks / issues / bugs for the In-Portal Project. Before reporting any issues, please make sure to read the Guide into Issue Tracker and How to Properly Test and Report Bugs!

Viewing Issue Simple Details Jump to Notes ] Wiki ]  Related Changesets ] View Advanced ] Issue History ] Print ]
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 Project Name In-Portal CMS
Assigned To alex Developer
Priority normal Resolution fixed Fixed in Version 5.1.3
Status closed Product Version 5.1.3-RC1 Target Version 5.1.3
Time EstimateNo estimate
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".
Tags No tags attached.
Reference https://groups.google.com/d/topic/in-portal-dev/qsJlsjcAl3I/discussion
Change Log Message Changed a way how helping phrases (hints) are stored
Estimate Points 0
Attached Files patch file icon phrase_storage_automation_core.patch [^] (184,220 bytes) 2011-08-09 12:29 [Show Content]
patch file icon phrase_storage_automation_modules.patch [^] (281,860 bytes) 2011-08-09 12:33
patch file icon phrase_storage_automation_incommerce_only.patch [^] (126,722 bytes) 2011-08-09 12:42 [Show Content]
patch file icon phrase_storage_automation_install-Dmitry.patch [^] (4,732 bytes) 2011-09-06 22:23 [Show Content]
patch file icon phrase_storage_automation_Themes_Advanced-Dmitry.patch [^] (2,881 bytes) 2011-09-06 22:24 [Show Content]
png file icon 2011-09-06_2216-EmptyColumns.png [^] (109,836 bytes) 2011-09-06 22:24


patch file icon phrase_storage_automation_core_v2.patch [^] (182,027 bytes) 2011-09-17 06:14 [Show Content]
patch file icon phrase_storage_automation_modules_v2.patch [^] (229,703 bytes) 2011-09-17 06:15 [Show Content]
patch file icon phrase_storage_automation_themes_v2.patch [^] (2,881 bytes) 2011-09-17 06:15 [Show Content]
patch file icon phrase_storage_automation_core_v3.patch [^] (187,204 bytes) 2011-09-18 08:50 [Show Content]