
/* gettext library */

var catalog = new Array();

function pluralidx(count) { return (count == 1) ? 0 : 1; }
catalog['Invalid credentials'] = 'Invalid credentials';
catalog['\u041d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0432\u043e\u0439\u0442\u0438 \u0432 \u0441\u0435\u0442\u044c'] = 'Is not connected';
catalog['\u041d\u0435\u0442 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u043a \u0441\u0435\u0442\u0438'] = 'Is not connected';
catalog['\u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d \u043a \u0441\u0435\u0442\u0438'] = 'Connected';
catalog['ago'] = 'ago';
catalog['answer_call'] = 'answer';
catalog['asked_authorization'] = 'authorization requested';
catalog['authorization_sent'] = 'authorization sent';
catalog['begin'] = 'Started';
catalog['busy_here'] = 'Busy';
catalog['call_ended'] = 'Call ended';
catalog['cancel_call_confirmation'] = 'Are you sure you want to cancel current call?';
catalog['chat'] = 'Chat';
catalog['connected'] = 'Connected';
catalog['delete_contact'] = 'Delete contact';
catalog['den'] = 'days';
catalog['dney'] = 'days';
catalog['dnya'] = 'days';
catalog['drop_call'] = 'hangup';
catalog['error'] = 'Error';
catalog['for_firefox'] = 'Hidden browser plugin for<br>Firefox >= 3.0';
catalog['for_firefox_and_ie'] = 'Hidden browser plugin for<br> Mozilla Firefox >= 3.0,<br> Internet Explorer >= 6.0<br> and Google Chrome >= 4.0';
catalog['get_chrome_beta'] = 'You need the latest beta version of Google Chrome to run extensions. Get it here:\n\nhttp://www.google.com/chrome/?extra=betachannel';
catalog['h'] = 'h';
catalog['incoming_call'] = 'Incoming call';
catalog['incorrect_code'] = 'Incorrect code';
catalog['is_typing'] = 'is typing';
catalog['lost_call'] = 'Lost call';
catalog['me'] = 'me';
catalog['min'] = 'min';
catalog['no_answer'] = 'No answer';
catalog['outgoing_call'] = 'Calling';
catalog['please login'] = 'Please login';
catalog['qiwi_order_complete'] = 'Your order is complete. Please use QIWI terminals to pay for the order';
catalog['qiwi_order_error'] = 'Sorry, there is an error while making your order';
catalog['rur'] = 'RUR';
catalog['sec'] = 'sec';
catalog['softphone_not_installed'] = 'TalkPad plugin is not installed';
catalog['unresolvable_destination'] = 'Domain does not exist';
catalog['unsupported_browser'] = 'Installing TalkPad plugin for your browser is not supported';
catalog['update_extension'] = 'Update TalkPad plugin to the latest version ';
catalog['wrote_message'] = 'wrote a message';
catalog['yesterday'] = 'yesterday';


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

/* formatting library */

var formats = new Array();

formats['DATETIME_FORMAT'] = 'N j, Y, P';
formats['DATE_FORMAT'] = 'N j, Y';
formats['DECIMAL_SEPARATOR'] = '.';
formats['MONTH_DAY_FORMAT'] = 'F j';
formats['NUMBER_GROUPING'] = '0';
formats['TIME_FORMAT'] = 'P';
formats['FIRST_DAY_OF_WEEK'] = '0';
formats['TIME_INPUT_FORMATS'] = ['%H:%M:%S', '%H:%M'];
formats['THOUSAND_SEPARATOR'] = ',';
formats['DATE_INPUT_FORMATS'] = ['%Y-%m-%d', '%m/%d/%Y', '%m/%d/%y', '%b %d %Y', '%b %d, %Y', '%d %b %Y', '%d %b, %Y', '%B %d %Y', '%B %d, %Y', '%d %B %Y', '%d %B, %Y'];
formats['YEAR_MONTH_FORMAT'] = 'F Y';
formats['SHORT_DATE_FORMAT'] = 'm/d/Y';
formats['SHORT_DATETIME_FORMAT'] = 'm/d/Y P';
formats['DATETIME_INPUT_FORMATS'] = ['%Y-%m-%d %H:%M:%S', '%Y-%m-%d %H:%M', '%Y-%m-%d', '%m/%d/%Y %H:%M:%S', '%m/%d/%Y %H:%M', '%m/%d/%Y', '%m/%d/%y %H:%M:%S', '%m/%d/%y %H:%M', '%m/%d/%y'];

function get_format(format_type) {
    var value = formats[format_type];
    if (typeof(value) == 'undefined') {
      return msgid;
    } else {
      return value;
    }
}
