
/* gettext library */

var catalog = new Array();

function pluralidx(count) { return (count == 1) ? 0 : 1; }
catalog[' and '] = ' et ';
catalog['%s ago'] = 'il y a %s';
catalog['ERROR'] = 'Erreur';
catalog['There was an error previewing your post.'] = 'Une erreur s\'est produite dans la pr\u00e9visualisation.';
catalog['This message has been revised'] = 'Ce message a \u00e9t\u00e9 modifi\u00e9.';
catalog['What is the URL of the image?'] = 'Quelle est l\'URL de l\'image?';
catalog['What is the URL of the link?'] = 'Quelle est l\'URL du lien?';
catalog['What is the title of the image?'] = 'Quel est le titre de l\'image?';
catalog['What is the title of the link?'] = 'Quel est le titre du lien?';
catalog['day'] = 'jour';
catalog['days'] = 'jours';
catalog['hour'] = 'heure';
catalog['hours'] = 'heures';
catalog['just now'] = 'maintenant';
catalog['minute'] = 'minute';
catalog['minutes'] = 'minutes';
catalog['month'] = 'mois';
catalog['months'] = 'mois';
catalog['next'] = 'suivante';
catalog['week'] = 'semaine';
catalog['weeks'] = 'semaines';
catalog['year'] = 'an';
catalog['years'] = 'ans';


function gettext(msgid) {
  var value = catalog[msgid];
  if (typeof(value) == 'undefined') {
    return msgid;
  } else {
    return (typeof(value) == 'string') ? value : value[0];
  }
}

function ngettext(singular, plural, count) {
  value = catalog[singular];
  if (typeof(value) == 'undefined') {
    return (count == 1) ? singular : plural;
  } else {
    return value[pluralidx(count)];
  }
}

function gettext_noop(msgid) { return msgid; }

function interpolate(fmt, obj, named) {
  if (named) {
    return fmt.replace(/%\(\w+\)s/g, function(match){return String(obj[match.slice(2,-2)])});
  } else {
    return fmt.replace(/%s/g, function(match){return String(obj.shift())});
  }
}
