
/* gettext library */

var catalog = new Array();

function pluralidx(count) { return (count == 1) ? 0 : 1; }
catalog['AluBorder'] = 'Alu border';
catalog['BaroqueBorder'] = 'Baroque border';
catalog['BlackBorder'] = 'Black border';
catalog['CenteredBlogpostSection'] = 'Default';
catalog['LeftMarginBlogpostSection'] = 'Left margin';
catalog['NoBorder'] = 'No border';
catalog['PinBorder'] = 'Pin';
catalog['PolaBorder'] = 'Pola border';
catalog['RightMarginBlogpostSection'] = 'Right margin';
catalog['ScotchBorder'] = 'Scotch';
catalog['ShadowBorder'] = 'Shadow';
catalog['SmokeBorder'] = 'Smoke border';
catalog['TrashBorder'] = 'Trash border';
catalog['WhiteBorder'] = 'White border';
catalog['WideBlogpostSection'] = 'Wide';
catalog['WoodBorder'] = 'Wood border';
catalog['font_style_bold'] = 'Bold';
catalog['font_style_italic'] = 'Italic';
catalog['font_style_strikeThrough'] = 'Strike';
catalog['font_style_underline'] = 'Underline';
catalog['text_align_justifyCenter'] = 'Justify center';
catalog['text_align_justifyFull'] = 'Justify full';
catalog['text_align_justifyLeft'] = 'Justify left';
catalog['text_align_justifyRight'] = 'Justify right';


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())});
  }
}
