
/* gettext library */

var catalog = new Array();

function pluralidx(count) { return (count == 1) ? 0 : 1; }
catalog['Invalid credentials'] = 'Invalid credentials';
catalog['ago'] = 'ago';
catalog['answer_call'] = 'answer';
catalog['asked_authorization'] = 'authorization requested';
catalog['authorization_sent'] = 'authorization sent';
catalog['begin'] = 'Started';
catalog['browser_plugin'] = 'Install TalkPad plugin';
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['h'] = 'h';
catalog['incoming_call'] = 'Incoming call';
catalog['incorrect_code'] = 'Incorrect code';
catalog['is_typing'] = 'is typing';
catalog['jingle_novoice'] = 'remote client does not support voice calls';
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['register_and_install_plugin_alert'] = 'Sign up to start making calls';
catalog['reinstall_softphone'] = 'Reinstall plugin';
catalog['rur'] = 'RUR';
catalog['sec'] = 'sec';
catalog['softphone_not_installed'] = 'TalkPad plugin is not installed';
catalog['top_connected'] = 'Connected';
catalog['top_needconnect'] = 'Please login';
catalog['top_noconnection'] = 'Is not connected';
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['want_better_quality'] = 'Want better quality?';
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;
    }
}

