[opensource-dev] Request for review/testing: VWR-20583 submenu indicators (▶ a.k.a. U+25B6) shouldn't be hard-coded in context menu sub menu names

Oz Linden (Scott Lawrence) oz at lindenlab.com
Fri Sep 3 03:01:53 PDT 2010

Esbee - this looks like a good thing for us to pull in under the general 
cleanups category.

Boroondas - please recheck the Dutch files - I pulled in those fixes 3 
days ago, and you should have them in your repo now.

On 2010-09-02 20:41, Boroondas Gupte wrote:
> As far as I know, VWR-20583 
> <http://jira.secondlife.com/browse/VWR-20583> is on neither Product 
> Backlog nor Sprint List, yet, but Tofu asked 
> <http://jira.secondlife.com/browse/VWR-20583?focusedCommentId=208248&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#action_208248> 
> me about this on jira and already imported a fix for a /symptom/ 
> <http://bitbucket.org/lindenlab/viewer-development/changeset/55e0d418a749> 
> of which this issue here is IMHO the /cause/.
> My fix for this underlying issue can be found at 
> http://bitbucket.org/boroondas/viewer-development-vwr-20583
>       How my fix works
> Up to now, all menu entries except those context menus automatically 
> generated the submenu indicator when they had sub-entries. Context 
> menu entries didn't to that, so the "▶" had to be explicitly encoded 
> in the labels in the XUI files (for all submenu labels in all 
> languages). I guess this was necessary in Viewer 1.x, because the 
> generic way of adding a ">" (which was the indicator back then), 
> wouldn't work for pie menus.
> Now though, that context menus are regular rectangular menus, their 
> entries can be handled just like other menu entries 
> <http://bitbucket.org/boroondas/viewer-development-vwr-20583/src/52897e0a2f5d/indra/llui/llmenugl.cpp#cl-1044> 
> (regarding the "▶", at least) and that's what the changeset does 
> <http://bitbucket.org/boroondas/viewer-development-vwr-20583/changeset/52897e0a2f5d#chg-indra/llui/llmenugl.cpp_newline3730>. 
> The big bulky rest of the changeset just removes all the hard-coded 
> "▶" (and some left over "&gt;" (>) for the Portuguese localization) 
> from the context menus of all supported languages (except nl, which 
> doesn't seem to have localized context menus for some reason), so they 
> won't display twice now.
>       Impact for users
> As long as all hard-coded strings are in-sync, users wouldn't notice 
> VWR-20583 nor its fix, except for whether the triangles aren't 
> right-aligned in context menus (as they are in the main menus, so the 
> fix makes this consistent, too.) However, VWR-17801 and the left over 
> "&gt;"s in the Portuguese localization 
> <http://bitbucket.org/boroondas/viewer-development-vwr-20583/changeset/52897e0a2f5d#chg-indra/newview/skins/default/xui/pt/menu_object.xml_oldline13> 
> show how easily inconsistencies can creep in. Having the indicators 
> handled automagically diminishes the risk of that happening again in 
> the future.
>       Impact for translators
> One less thing to worry about, once this is fixed.
>       Impact for developers
> While generation of one of the context menus remains 
> <http://bitbucket.org/boroondas/viewer-development-vwr-20583/changeset/52897e0a2f5d#chg-indra/newview/llvoavatarself.cpp> 
> in a CPP file (instead of XUI like the others), that part of the code 
> at least doesn't have to bother anymore with adding the indicator to 
> each entry individually.
>       Impact for UI designers / implementers
> With the fix, it should now be easy to change the submenu indicator 
> for either all menus (main menu and context menus) or either type 
> individually. Changing it for single selected entries would now be 
> more difficult, but I don't see any cases where this might be needed.
>       Summary
> Massive code duplication is usually bad. (Duh!)
> Cheers,
> Boroondas
> PS: Well, as this is a request for review and testing, I should 
> probably write something about that, too. Because I had to touch XUI 
> files of all localizations except Dutch, it'd be good if people could 
> test the context menus with the Viewer set to different languages. 
> More detailed test plan in this jira comment 
> <http://jira.secondlife.com/browse/VWR-20583?focusedCommentId=208637&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#action_208637>.
> _______________________________________________
> Policies and (un)subscribe information available here:
> http://wiki.secondlife.com/wiki/OpenSource-Dev
> Please read the policies before posting to keep unmoderated posting privileges

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.secondlife.com/pipermail/opensource-dev/attachments/20100903/35671c29/attachment.htm 

More information about the opensource-dev mailing list