
/* gettext library */

var catalog = new Array();

function pluralidx(count) { return (count == 1) ? 0 : 1; }
catalog['A Fave'] = 'Una preferita';
catalog['Add note text here...'] = 'Aggiungi il testo della nota...';
catalog['CANCEL'] = 'ANNULLA';
catalog['Camera Information'] = 'Informazioni sulla fotocamera';
catalog['Cancel'] = 'Annulla';
catalog['Click here to add...'] = 'Clicca qui per aggiungere...';
catalog['Delete'] = 'Cancella';
catalog['Event'] = 'Evento';
catalog['Fave?'] = 'Segna come preferita?';
catalog['Geo'] = 'Geo';
catalog['Labels'] = 'Etichette';
catalog['Marketplace'] = 'Mercato';
catalog['Not Shared (Private)'] = 'Non condivisa (Privata)';
catalog['People'] = 'Persone';
catalog['Please enter your note before saving!'] = 'Inserisci la nota prima di salvare!';
catalog['SAVE'] = 'SALVA';
catalog['Save'] = 'Salva';
catalog['Saving...'] = 'Sto salvando...';
catalog['Shared with Family'] = 'Condivisa con la Famiglia';
catalog['Shared with Friends & Family'] = 'Condivisa con Amici e Famiglia';
catalog['Shared with Friends'] = 'Condivisa con gli Amici';
catalog['Sorry, the update failed.'] = 'Spiacente, l\'aggiornamento \u00e8 fallito';
catalog['This photo is Public'] = 'Questa foto \u00e8 Pubblica';


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/, function(match){return String(obj[match.slice(2,-2)])});
  } else {
    return fmt.replace(/%s/, function(match){return String(obj.shift())});
  }
}
