Gadget spec proposed change - perform substitution in screenshot/thumbnail

1 view
Skip to first unread message

Paul Lindner

unread,
Mar 3, 2008, 2:45:58 AM3/3/08
to opensocial-an...@googlegroups.com
The current Gadget spec states that:

4. Perform substitutions of each hangman expansion in the following fields:

a. Module.ModulePrefs@title, Module.ModulePrefs@title_url,
Module.ModulePrefs@description, Module.Content@href, Module.Content

Can we please add Module.ModulePrefs@thumbnail and
Module.ModulePrefs@screenshot to this list?

This will allow internationalization of screenshots and thumbnails.

Regards
Paul


--
Paul Lindner
hi5 Architect
plin...@hi5.com

Kevin Brown

unread,
Mar 3, 2008, 3:03:44 AM3/3/08
to opensocial-an...@googlegroups.com
Here is the full list of substitutions performed by igoogle / gmodules.com today:

__MSG_ only:
ModulePrefs:
 - directory_title
 - author
 - author_email
 - screenshot
 - thumbnail

UserPref:
 - display_name
 - default_value

UserPref.EnumValue:
 - display_value

All 4 substitutions (MSG, BIDI, MODULE, and UP):

ModulePrefs:
 - title
 - title_url

Content:
 - href
 - CDATA

I propose that the spec be amended to one of the following:

a. Match igoogle's behavior

b. Simplify the issue and allow all substitutions to be performed on all ModulePrefs attributes, the Content body, Content@href, UserPref@display_name, UserPref@default_value, and UserPref.EnumValue@display_value (i.e. anything that gets displayed to users).

Both are an expansion of scope as defined in the spec today, and as such are backwards compatible (modulo some edge case of an existing gadget that had a __UP_ substitution mentioned in a message bundle that isn't being substituted at present.)

Somewhat related, but separate from this main issue, is that the presence of __UP hangman variables in the content body makes certain optimizations (such as full iframe / page caching) very difficult. They also introduce a security concern if values aren't properly escaped by the server before substituting. Deprecating support for this would be difficult since many developers have been using it in the past, but we might want to consider discouraging their use (instead relying on programmatic access via gadgets.Prefs and / or open social app data as appropriate) going forward.
--
~Kevin

Cassie

unread,
Mar 31, 2008, 11:57:54 AM3/31/08
to opensocial-an...@googlegroups.com
Based on Kevin's response I think that the following spec modification is sufficient:

5. Perform substitutions of each hangman expansion on all fields which get displayed to users. This results in the following fields:
   a. All Module.ModulePrefs attributes, Module.Content@href, Module.Content, UserPref@display_name, UserPref@default_value, and UserPref.EnumValue@display_value.
 
Please let me know if there are any problems with this.
Thanks!

- Cassie

Kevin Brown

unread,
Mar 31, 2008, 2:16:34 PM3/31/08
to opensocial-an...@googlegroups.com
On Mon, Mar 31, 2008 at 8:57 AM, Cassie <do...@google.com> wrote:
Based on Kevin's response I think that the following spec modification is sufficient:

5. Perform substitutions of each hangman expansion on all fields which get displayed to users. This results in the following fields:
   a. All Module.ModulePrefs attributes, Module.Content@href, Module.Content, UserPref@display_name, UserPref@default_value, and UserPref.EnumValue@display_value.

As has been mentioned elsewhere, it's not necessarily sufficient because it leaves a lot of attributes unaccounted for, such as Icons and ModulePrefs attributes. I lean towards the second option being the better way going forward.




--
~Kevin

Cassie

unread,
Apr 1, 2008, 7:04:02 AM4/1/08
to opensocial-an...@googlegroups.com
I didn't quite understand that Kevin. You said you are leaning towards the "second option". What option is that? I only presented one option which I tried to make equivalent to your "b" option that you mailed out.

The b option said "all fields which get displayed to users". I added that text and enumerated the current fields that would currently be affected. It states "all Module.ModulePrefs attributes" which covers your second concern. So, if you can tell me how to correctly describe Icons then I think it should be good to go.

Please let me know if I missed an option.
Thanks.

- Cassie

Kevin Brown

unread,
Apr 1, 2008, 2:20:10 PM4/1/08
to opensocial-an...@googlegroups.com
On Tue, Apr 1, 2008 at 4:04 AM, Cassie <do...@google.com> wrote:
I didn't quite understand that Kevin. You said you are leaning towards the "second option". What option is that? I only presented one option which I tried to make equivalent to your "b" option that you mailed out.

The b option said "all fields which get displayed to users". I added that text and enumerated the current fields that would currently be affected. It states "all Module.ModulePrefs attributes" which covers your second concern. So, if you can tell me how to correctly describe Icons then I think it should be good to go.

Yes -- that's all *current* fields (except for Icons and Preloads). I want an explicit clause covering new attributes as well.




--
~Kevin

Cassie

unread,
Apr 1, 2008, 7:02:58 PM4/1/08
to opensocial-an...@googlegroups.com
How about this:

5. Perform substitutions of each hangman expansion on all fields which get displayed to users. This currently includes, but is not limited to, the following fields:
   a. All Module.ModulePrefs attributes, Module.Content@href, Module.Content, UserPref@display_name, UserPref@default_value, and UserPref.EnumValue@display
_value.


Or would you like it even more strongly worded?

- Cassie

Kevin Brown

unread,
Apr 1, 2008, 7:21:23 PM4/1/08
to opensocial-an...@googlegroups.com
On Tue, Apr 1, 2008 at 4:02 PM, Cassie <do...@google.com> wrote:
How about this:

5. Perform substitutions of each hangman expansion on all fields which get displayed to users. This currently includes, but is not limited to, the following fields:
   a. All Module.ModulePrefs attributes, Module.Content@href, Module.Content, UserPref@display_name, UserPref@default_value, and UserPref.EnumValue@display
_value.


Or would you like it even more strongly worded?

That's probably fine for now.
 



--
~Kevin

Cassie

unread,
Apr 24, 2008, 11:57:33 AM4/24/08
to opensocial-an...@googlegroups.com
This is an old thread which has +1s from Kevin and Paul.
Will some more people jump in here?

Thanks.

- Cassie

Zhen Wang

unread,
Apr 24, 2008, 3:16:58 PM4/24/08
to opensocial-an...@googlegroups.com
+1

Arne Roomann-Kurrik

unread,
Apr 24, 2008, 4:01:16 PM4/24/08
to opensocial-an...@googlegroups.com
+1
--
OpenSocial IRC - irc://irc.freenode.net/opensocial

Cassie

unread,
Apr 25, 2008, 7:06:22 AM4/25/08
to opensocial-an...@googlegroups.com
+1

Okay, this one is approved.

- Cassie
Reply all
Reply to author
Forward
0 new messages