Changeset 30941 in spip-zone


Ignore:
Timestamp:
Aug 16, 2009, 5:30:23 AM (11 years ago)
Author:
da@…
Message:

Prendre en compte la langue du contexte dans la balise #JABBER_ACTIVITY_ICON
pour la balise "alt".

File:
1 edited

Legend:

Unmodified
Added
Removed
  • _plugins_/omnipresence/balise/jabber_activity_icon.php

    r30940 r30941  
    33
    44function balise_JABBER_ACTIVITY_ICON($p) {
    5         return calculer_balise_dynamique($p, 'JABBER_ACTIVITY_ICON', array(CHAMP_JID, CHAMP_SERVEUR_OMNIPRESENCE));
     5        return calculer_balise_dynamique($p, 'JABBER_ACTIVITY_ICON', array(CHAMP_JID, CHAMP_SERVEUR_OMNIPRESENCE, 'lang'));
    66}
    77
    88function balise_JABBER_ACTIVITY_ICON_stat($args, $filtres) {
    99        return array(
    10                 isset($args[2]) ? $args[2] : $args[0],
     10                isset($args[3]) ? $args[3] : $args[0],
    1111                $args[1],
     12                $args[2],
    1213        );
    1314}
    1415
    15 function balise_JABBER_ACTIVITY_ICON_dyn($jid, $host) {
    16         #TODO: Request value in the context's locale
     16function balise_JABBER_ACTIVITY_ICON_dyn($jid, $host, $locale) {
    1717        include_spip('inc/filtres');
    18         $status = demander_action('pep/activity/value.txt', $jid, $host);
     18        $status = demander_action("pep/activity/value-$locale.txt", $jid, $host);
    1919        return inserer_attribut(demander_action('pep/activity/image.png'.$theme, $jid, $host), "alt", $status);
    2020}
Note: See TracChangeset for help on using the changeset viewer.