
/* gettext library */

var catalog = new Array();

function pluralidx(count) { return (count == 1) ? 0 : 1; }
catalog[' and '] = ' \u548c ';
catalog['%s ago'] = '%s\u4e4b\u524d';
catalog['Are you sure you want to cancel this invitation ?'] = '\u60a8\u786e\u5b9a\u8981\u53d6\u6d88\u8fd9\u4e2a\u9080\u8bf7\uff1f';
catalog['Are you sure you want to promote %s to administrator of this group?'] = '\u60a8\u786e\u5b9a\u60a8\u60f3\u63a8\u8350%s\u7ed9\u672c\u7ec4\u7684\u7ba1\u7406\u5458\uff1f';
catalog['Are you sure you want to remove the admin rights of %s for the group?'] = '\u60a8\u786e\u5b9a\u5c06%s\u7684\u7ba1\u7406\u5458\u6743\u9650\u53bb\u9664\uff1f';
catalog['Are you sure you want to remove the user %s from this group?'] = '\u60a8\u786e\u5b9a\u5c06\u7528\u6237%s\u4ece\u8fd9\u4e2a\u7ec4\u5185\u53bb\u9664\uff1f';
catalog['ERROR'] = '\u9519\u8bef';
catalog['There was an error previewing your post.'] = '\u60a8\u7684\u5e16\u5b50\u9884\u89c8\u65f6\u51fa\u9519\u4e86\u3002';
catalog['This message has been revised'] = '\u8fd9\u4e2a\u4fe1\u606f\u88ab\u4fee\u6539\u8fc7';
catalog['What is the URL of the image?'] = '\u56fe\u7247\u7684URL\u5730\u5740\u662f\u4ec0\u4e48\uff1f';
catalog['What is the URL of the link?'] = '\u94fe\u63a5\u7684URL\u5730\u5740\u662f\u591a\u5c11\uff1f';
catalog['What is the URL of the video?'] = '\u89c6\u9891\u7684URL\u5730\u5740\u662f\u4ec0\u4e48\uff1f';
catalog['What is the flashvars of the video?'] = '\u5982\u679c\u89c6\u9891\u6709flashvars,\u8bf7\u586b\u5165flashvars';
catalog['What is the title of the image?'] = '\u56fe\u7247\u7684\u6807\u9898\u662f\u4ec0\u4e48\uff1f';
catalog['What is the title of the link?'] = '\u94fe\u63a5\u7684\u6807\u9898\u662f\u4ec0\u4e48\uff1f';
catalog['day'] = '\u65e5';
catalog['days'] = '\u65e5';
catalog['hour'] = '\u65f6';
catalog['hours'] = '\u65f6';
catalog['just now'] = '\u521a\u521a';
catalog['minute'] = '\u79d2';
catalog['minutes'] = '\u79d2';
catalog['month'] = '\u6708';
catalog['months'] = '\u6708';
catalog['next'] = '\u4e0b\u4e00\u4e2a';
catalog['previous'] = '\u4e0a\u4e00\u4e2a';
catalog['week'] = '\u5468';
catalog['weeks'] = '\u5468';
catalog['year'] = '\u5e74';
catalog['years'] = '\u5e74';


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

