View
 

Templating

Page history last edited by Chris Messina 17 years, 5 months ago

Description

Once we have standardized on the syntax for activity streams, it will become useful to take that data and express it in user interfaces, using human-friendly language that can also be localized.

Activity Streams Templating will be a means to accomplish things like using the custom verb label "dugg" in place of "shared", or "tweeted" in place of "posted". 

High-level requirements 

  • Sentences should be selectable based on a (verb, object-type) pair.
  • It should be possible to provide a (verb, *) mapping that is used as a fallback when there is no sentence for a given object-type. This aligns with the suggestion in the spec to simply refer to the object by title in this case.
  • Sentences should be tagged with their human language so that language can also be used as a pivot for sentence selection.
  • The template language itself must be rich enough to handle not only interpolation of data from the entry but also be able to handle the presence or absense of activity:target, the type of activity:actor, and other variables that do not contribute to sentence selection.
  • It must not be tied directly to the Atom representation of activities, since it should be possible to re-use template bundles for activities expressed as OpenSocial activities and in other yet-to-be-invented formats such as JSON activity streams.

 

(And when I say "sentences" above I'm mostly talking about the activity sentence but it's likely to also include some ancillary information such as what to use as a preview image, etc.)

Comments (0)

You don't have permission to comment on this page.