Providing text to associate with an <activity:verb>

8 views
Skip to first unread message

Rob Dolin

unread,
Nov 17, 2009, 2:44:29 PM11/17/09
to activity...@googlegroups.com

Hey all,

     I was thinking about how to represent the action of Digging (a primary action on http://www.digg.com/.) 

 

     In many ways, digging is like posting a bookmark, so the core <activity:verb> of “…post” and the core <activity:object-type> of “…bookmark” would potentially make sense, but if Digg (or a similar site) wanted a special word to go along with the verb “post” how would it be conveyed?

 

    I was looking around for ways to represent this and thought that the “alt=” attribute (like in an HTML <img> tag) would potentially be appropriate.  Thus, a publishing application could potentially emit:

 

<activity:verb alt="dugg">http://activitystrea.ms/schema/1.0/post</activity:verb>

 

    And a rendering application that was knowledgeable of the “alt=” attribute could render “{name} dugg {bookmark}” instead of “{name} posted {bookmark}.”

 

    What do folks think?

 

Thanks much—

--Rob

 

 

Martin Atkins

unread,
Nov 17, 2009, 3:01:43 PM11/17/09
to activity...@googlegroups.com
On 11/17/2009 11:44 AM, Rob Dolin wrote:
> Hey all,
>
> I was thinking about how to represent the action of Digging (a primary
> action on http://www.digg.com/.)
>
> In many ways, digging is like posting a bookmark, so the core
> <activity:verb> of “…post” and the core <activity:object-type> of
> “…bookmark” would potentially make sense, but if Digg (or a similar
> site) wanted a special word to go along with the verb “post” how would
> it be conveyed?
>
> I was looking around for ways to represent this and thought that the
> “alt=” attribute (like in an HTML <img> tag) would potentially be
> appropriate. Thus, a publishing application could potentially emit:
>
> <activity:verb
> *alt="dugg">*http://activitystrea.ms/schema/1.0/post</activity:verb>
>
> And a rendering application that was knowledgeable of the “alt=”
> attribute could render “{name} dugg {bookmark}” instead of “{name}
> posted {bookmark}.”
>
> What do folks think?
>

This (providing an alternative word) has been proposed before, but it
doesn't play well with internationalization. If my default rendering of
that verb is "A Martin Atkins le gusta esto" (which I stole from
Facebook's Spanish localization of "Martin Atkins liked this") then
there isn't really anywhere sensible I can substitute your word "dugg".

I think a more complete solution will be a mechanism similar in
principle to the template bundles used by Facebook where a particular
pair of (verb, object-type) is associated with a template in some format
that describes how to render it in a particular language.

We've done some brainstorming about this in the past but figured that
we'd leave this until we have the core spec out of the way; for the
moment the workaround is to just continue to include special cases in
your consumer code for things like digg.

It'd be nice to have a spec for "Activity Streams Templates", but I
think that's a big project in itself and I don't think we should get
distracted from the main specifications right now. (Though obviously I
can't and won't stop anyone who wants to work on such specs from working
on them!)

Darren Bounds

unread,
Nov 17, 2009, 3:05:22 PM11/17/09
to activity...@googlegroups.com
Hi Rob,

Personally I think digging is more akin to liking than posting or
sharing. You aren't actually contributing new content but rather
acknowledging something in a positive way.

That said; in the case of Cliqset, we use Atom category to articulate
custom type/verb information as opposed to extending. I believe
MySpace does something similar.

See the example below in which we describe a tweet with Atom category
as "StatusPosted" while maintaining the AS object type of "Note".

<entry xmlns:service="http://activitystrea.ms/service-provider"
xmlns:activity="http://activitystrea.ms/spec/1.0/"
xmlns:cs="http://schemas.cliqset.com/200909">
<activity:verb>http://activitystrea.ms/schema/1.0/post
</activity:verb>
<published>2009-11-01T12:37:16.000Z</published>
<title type="text">charlie posted a tweet on Twitter</title>
<summary type="html">unfortunately kids do not appreciate
the opportunity to sleep in that the time change provides.</summary>
<service:provider>
<name>twitter</name>
<uri>http://twitter.com</uri>
<icon>http://cliqset-services.s3.amazonaws.com/twitter.png</icon>
</service:provider>
<activity:object>
<activity:object-type>http://activitystrea.ms/schema/1.0/note
</activity:object-type>
<content type="text">unfortunately kids do not
appreciate the opportunity to sleep in that the time change
provides.</content>
<link rel="alternate" type="text/html"
href="http://twitter.com/ccauthen/status/5336586081"></link>
</activity:object>
<category scheme="http://schemas.cliqset.com/activity/categories/1.0"
term="StatusPosted" label="Status Posted"></category>
<updated>2009-11-01T12:37:17.040Z</updated>
<id>tag:cliqset.com,2009-11-01:/user/charlie/2TRE5KVUC5pIBAee</id>
<link href="http://cliqset.com/user/charlie/2TRE5KVUC5pIBAee"
type="text/xhtml" rel="alternate" title="charlie posted a tweet on
Twitter"></link>
<author>
<name>charlie</name>
<uri>http://cliqset.com/user/charlie</uri>
</author>
<activity:actor xmlns:poco="http://portablecontacts.net/spec/1.0">
<activity:object-type>http://activitystrea.ms/schema/1.0/person
</activity:object-type>
<id>charlie</id>
<poco:name>
<poco:givenName>Charlie</poco:givenName>
<poco:familyName>Cauthen</poco:familyName>
</poco:name>
<link xmlns:media="http://purl.org/syndication/atommedia" type="image/png"
rel="avatar" href="http://dynamic.cliqset.com/avatar/charlie?s=80"
media:height="80" media:width="80"></link>
<link xmlns:media="http://purl.org/syndication/atommedia" type="image/png"
rel="avatar" href="http://dynamic.cliqset.com/avatar/charlie?s=120"
media:height="120" media:width="120"></link>
<link xmlns:media="http://purl.org/syndication/atommedia" type="image/png"
rel="avatar" href="http://dynamic.cliqset.com/avatar/charlie?s=200"
media:height="200" media:width="200"></link>
</activity:actor>
<thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total>
</entry>
> --
>
> You received this message because you are subscribed to the Google Groups
> "Activity Streams" group.
> To post to this group, send email to activity...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/activity-streams?hl=.
>



--
darren bounds
dar...@cliqset.com

Rob Dolin

unread,
Nov 17, 2009, 5:48:42 PM11/17/09
to activity...@googlegroups.com
Thanks very much for the quick reply Martin.

I agree that the whole templatization question is worthy of its own spec and probably a lower priority than getting a core spec stable. My goal with this thread is to come-up with a simple solution for potential activity publishers (that we could incorporate into the core spec.)

In addition to the custom branded string scenario like Dugg, another use case is where a publisher may not like a provided translation. In our most recent release last week, my team worked with a European partner who wanted to translate a word differently in their primary language from how our localization team had translated it.

I'd want to give an easy way for a publisher to specify an alternate word without needing to define their own template packages or some similar potentially challenging exercise. I'm hoping that the "alt=" attribute on an <activity:verb> would be a good way to do this.

Thanks much--
--Rob


-----Original Message-----
From: Martin Atkins [mailto:ma...@degeneration.co.uk]
Sent: Tuesday, November 17, 2009 12:02 PM
To: activity...@googlegroups.com
Subject: Re: Providing text to associate with an <activity:verb>

On 11/17/2009 11:44 AM, Rob Dolin wrote:
> Hey all,
>
> I was thinking about how to represent the action of Digging (a primary
> action on http://www.digg.com/.)
>
> In many ways, digging is like posting a bookmark, so the core
> <activity:verb> of "...post" and the core <activity:object-type> of
> "...bookmark" would potentially make sense, but if Digg (or a similar

Chris Messina

unread,
Nov 17, 2009, 9:43:22 PM11/17/09
to activity...@googlegroups.com
My original proposal (which I can't seem to find) was something like this:

<activity:verb>
  <activity:label lang="en">dugg</activity:label>
</activity:verb>

The goal here of course is to handle the internationalize of such labels, which, as Rob pointed out, may not carry over into other languages so cleanly.

The label attribute, therefore, is a way for a service to specify the verb that might be used in different languages — overriding the default.

The problem with this approach, as Martin mentioned, is that you might want to use different tenses, or need to structure your grammar differently, such that translations would need to come with several forms of the verb and, well, that gets very messy very quickly.

Chris
--
Chris Messina
Open Web Advocate

Personal: http://factoryjoe.com
Follow me on Twitter: http://twitter.com/chrismessina

Citizen Agency: http://citizenagency.com
Diso Project: http://diso-project.org
OpenID Foundation: http://openid.net

This email is:   [ ] shareable    [X] ask first   [ ] private
Reply all
Reply to author
Forward
0 new messages