const cc_i18n = (function(){ return { getLocale: function(content, params) { if(!content && !params) { return } const replacedContent = content.replace(/#\?#/gi, () => params.shift()); return replacedContent; }, sprintf: function() { var regex = /%%|%(\d+\$)?([-+\'#0 ]*)(\*\d+\$|\*|\d+)?(\.(\*\d+\$|\*|\d+))?([scboxXuidfegEG])/g; var a = arguments, i = 0, format = a[i++]; // pad() var pad = function (str, len, chr, leftJustify) { if (!chr) { chr = ' '; } var padding = (str.length >= len) ? '' : Array(1 + len - str.length >>> 0).join(chr); return leftJustify ? str + padding : padding + str; }; // justify() var justify = function (value, prefix, leftJustify, minWidth, zeroPad, customPadChar) { var diff = minWidth - value.length; if (diff > 0) { if (leftJustify || !zeroPad) { value = pad(value, minWidth, customPadChar, leftJustify); } else { value = value.slice(0, prefix.length) + pad('', diff, '0', true) + value.slice(prefix.length); } } return value; }; // formatBaseX() var formatBaseX = function (value, base, prefix, leftJustify, minWidth, precision, zeroPad) { // Note: casts negative numbers to positive ones var number = value >>> 0; prefix = prefix && number && { '2': '0b', '8': '0', '16': '0x' }[base] || ''; value = prefix + pad(number.toString(base), precision || 0, '0', false); return justify(value, prefix, leftJustify, minWidth, zeroPad); }; // formatString() var formatString = function (value, leftJustify, minWidth, precision, zeroPad, customPadChar) { if (precision != null) { value = value.slice(0, precision); } return justify(value, '', leftJustify, minWidth, zeroPad, customPadChar); }; // doFormat() var doFormat = function (substring, valueIndex, flags, minWidth, _, precision, type) { // console.log(`substring: ${substring}, valueIndex: ${valueIndex}, flags: ${flags}, minWidth: ${minWidth}, _: ${_}, precision: ${precision}, type: ${type}`) var number; var prefix; var method; var textTransform; var value; if (substring == '%%') { return '%'; } // parse flags var leftJustify = false, positivePrefix = '', zeroPad = false, prefixBaseX = false, customPadChar = ' '; var flagsl = flags.length; for (var j = 0; flags && j < flagsl; j++) { switch (flags.charAt(j)) { case ' ': positivePrefix = ' '; break; case '+': positivePrefix = '+'; break; case '-': leftJustify = true; break; case "'": customPadChar = flags.charAt(j + 1); break; case '0': zeroPad = true; break; case '#': prefixBaseX = true; break; } } // parameters may be null, undefined, empty-string or real valued // we want to ignore null, undefined and empty-string values if (!minWidth) { minWidth = 0; } else if (minWidth == '*') { minWidth = +a[i++]; } else if (minWidth.charAt(0) == '*') { minWidth = +a[minWidth.slice(1, -1)]; } else { minWidth = +minWidth; } // Note: undocumented perl feature: if (minWidth < 0) { minWidth = -minWidth; leftJustify = true; } if (!isFinite(minWidth)) { throw new Error('sprintf: (minimum-)width must be finite'); } if (!precision) { precision = 'fFeE'.indexOf(type) > -1 ? 6 : (type == 'd') ? 0 : undefined; } else if (precision == '*') { precision = +a[i++]; } else if (precision.charAt(0) == '*') { precision = +a[precision.slice(1, -1)]; } else { precision = +precision; } // grab value using valueIndex if required? value = valueIndex ? a[valueIndex.slice(0, -1)] : a[i++]; switch (type) { case 's': return formatString(String(value), leftJustify, minWidth, precision, zeroPad, customPadChar); case 'c': return formatString(String.fromCharCode(+value), leftJustify, minWidth, precision, zeroPad); case 'b': return formatBaseX(value, 2, prefixBaseX, leftJustify, minWidth, precision, zeroPad); case 'o': return formatBaseX(value, 8, prefixBaseX, leftJustify, minWidth, precision, zeroPad); case 'x': return formatBaseX(value, 16, prefixBaseX, leftJustify, minWidth, precision, zeroPad); case 'X': return formatBaseX(value, 16, prefixBaseX, leftJustify, minWidth, precision, zeroPad).toUpperCase(); case 'u': return formatBaseX(value, 10, prefixBaseX, leftJustify, minWidth, precision, zeroPad); case 'i': case 'd': number = (+value) | 0; prefix = number < 0 ? '-' : positivePrefix; value = prefix + pad(String(Math.abs(number)), precision, '0', false); return justify(value, prefix, leftJustify, minWidth, zeroPad); case 'e': case 'E': case 'f': case 'F': case 'g': case 'G': number = +value; prefix = number < 0 ? '-' : positivePrefix; method = ['toExponential', 'toFixed', 'toPrecision']['efg'.indexOf(type.toLowerCase())]; textTransform = ['toString', 'toUpperCase']['eEfFgG'.indexOf(type) % 2]; value = prefix + Math.abs(number)[method](precision); return justify(value, prefix, leftJustify, minWidth, zeroPad)[textTransform](); default: return substring; } }; return format.replace(regex, doFormat); } } })(); cc_i18n.common = { "label": { "id": "Certificate id", "order": "Order", "signature_hash": "Signature hash", "common_name": "Common name", 'cert_name': "Certificate name", 'order_status': "Order status", "serial_number": "Serial number", "thumbprint": "Thumbprint", "csr": "CSR", "sans": "SANs", "ct_Logging": "CT logging", "issuing_ca": "Issuing CA", "organization": "Organization", "cert_validity": "Certificate validity", "order_date": "Order date", "order_end_date": "Order end date", "product": "Product", "platform": "Platform", "server_platform": "Platform", "issued": "Issued", "pending": "Pending", "reissue_pending": "Reissue pending", "revoked": "Revoked", "revoke_pending": "Revocation pending", "rejected": "Rejected", "expired": "Expired", "renewed": "Renewed", "Renew": "Renew", "Reissue": "Reissue", "Expires between 1-30 days": "Expires between 1-30 days", "Expires between 31-60 days": "Expires between 31-60 days", "Expires between 61-90 days": "Expires between 61-90 days", "Expired in the last 7 days": "Expired in the last 7 days", "archived": "Archived", "Download": "Download", "Initial": "Initial", "Search": "Search", "Go": "Go", "Search_notes": "Search notes", "Certificate_information": "Certificate information", "Certificate_date": "Certificate date", "Certificate_status": "Certificate status", "Certificate_actions": "Certificate actions", "certificate_id": "Certificate id", "Cancel_order": "Cancel order", "Cancel_reissue": "Cancel reissue", "Revoke_certificate": "Revoke certificate", "Reissue_certificate": "Reissue certificate", "Duplicate_certificate": "Duplicate certificate", "Archive_certificate": "Archive certificate", "Unarchive_certificate": "Unarchive certificate", "Install_certificate": "Install certificate", "Hide_certificate": "Hide certificate details", "View_certificate": "View certificate details", "Send_certificate": "Send certificate", "Download_certificate": "Download certificate", "Cancel": "Cancel", "Archive": "Archive", "Unarchive": "Unarchive", "Done": "Done", "Included": "Included", "Duplicate": "Duplicate", "View": "View", "more": "more", "more_sans": "Show %d more SANs", "Unfiltered": "Unfiltered", "From": "From", "To": "To", "Search_for": "Search for", "rows_per_page": "Rows per page", "quick_view": "Quick View", "note": "Note", "notes": "Notes", "add_note": "Add Note", "save": "Save", "edit": "Edit", "year": "year", "years": "years", "Custom order validity": "Custom order validity", "On": "On", "Off": "Off", "Enabled": "Enabled", "Disabled": "Disabled", "show_archived": "Show archived certificates", "hide_archived": "Hide archived certificates", "all_certificates": "All certificates", "cert_notes": "Certificate notes", "email_address": "Email address", "custom_field": "Custom field", "acme_ari_data": "ACME Renewal Information (ARI)" }, "status": { "issued": "Issued", "failed": "failed", "pending": "Pending", "reissue_pending": "Reissue Pending", "revoked": "Revoked", "revoke_pending": "Revocation pending", "rejected": "Rejected", "expired": "Expired", "renewed": "Renewed", "waiting_pickup": "Emailed to Recipient", "ready_to_install": "Ready to Install", "canceled": "Canceled", "needs_csr": "Needs CSR", "needs_approval": "Needs Approval", "processing": "Processing", "submitted": "Submitted", "approved": "Approved", "validation_in_progress": "Validation In Progress", "request_needs_approval": "Request Needs Approval", "finalizing_certificate": "Finalizing Certificate", "reissue_processing": "Reissue Processing", "new_request": "Request", "revoke": "Revocation Request", "duplicate": "Duplicate Request", "reissue": "Reissue Request", "reissued": "Reissued", "completed": "Completed", "active": "Active", "inactive": "Inactive", "enabled": "Enabled", "disabled": "Disabled", "partially_enabled": "Partially enabled", "to_be_removed": "Removal pending", "to_be_cancelled": "Cancelation pending", "not_started": "Not started", "replaced": "Replaced", "removed": "Removed", "processed": "Processed", "initiated": "Initiated", "empty_slot": "Active", }, "product": { "ssl_securesite_pro": "Secure Site Pro SSL", "ssl_wildCard": "WildCard", "code_signing": "Code Signing", "code_signing_ev": "EV Code Signing", "document_signing_individual_1": "Document Signing - Individual (500)", "document_signing_individual_2": "Document Signing - Individual (2000)", "document_signing_org_1": "Document Signing - Organization (2000)", "document_signing_org_2": "Document Signing - Organization (5000)", "ssl_securesite_flex": "Secure Site OV", "ssl_ev_securesite_flex": "Secure Site EV", "ssl_ev_securesite_pro": "Secure Site Pro EV SSL", "ssl_geotrust_truebizid": "GeoTrust TrueBusiness ID OV", "ssl_ev_geotrust_truebizid": "GeoTrust TrueBusiness ID EV", "ssl_securesite": "Secure Site SSL", "ssl_ev_securesite": "Secure Site EV SSL", "ssl_dv_geotrust_flex": "GeoTrust DV SSL", "ssl_dv_geotrust": " GeoTrust Standard DV", "ssl_basic": "Basic OV", "ssl_ev_basic": "Basic EV", "private_ssl_flex": "Private SSL OV", "ov_smime_secure_mail_id": "Organization Email Certificate", "vmc_basic": "Verified Mark Certificate", "common_mark_certificate": "Common Mark Certificate", "mark_certificate": "Common Mark Certificate", "ssl_dv_thawte": "Thawte SSL123 DV", "ssl_thawte_webserver": "Thawte SSL Webserver OV", "ssl_ev_thawte_webserver": "Thawte SSL Webserver EV", "ssl_dv_rapidssl": "RapidSSL Standard DV", "wildcard_dv_rapidssl": "RapidSSL Wildcard DV", "hardware_token": "Hardware Token", "key_locker": "Key Locker", "secure_email_sponsor": "Secure Email for Business", "secure_email_mailbox": "Secure Email for Individual", "secure_email_organization": "Secure Email for Organization", "secure_email_business": "Secure Email for Business", "secure_email_individual": "Secure Email for Individual", "ds_org": "Document Signing for Business - Group", "ds_org_individual": "Document Signing for Individual in Organization", "ds_individual": "Document Signing for Individual", "digital_signing": "Digital Signing Certificate", "code_signing_key_locker": "Code Signing with KeyLocker", "code_signing_hardware_token": "Code Signing with Hardware Token", "code_signing_own_hardware_token": "Code Signing with OWN Hardware Token", "code_signing_own_hsm": "Code Signing with OWN HSM", "code_signing_ev_key_locker": "Code Signing EV with KeyLocker", "code_signing_ev_hardware_token": "Code Signing EV with Hardware Token", "code_signing_ev_own_hardware_token": "Code Signing EV with Hardware Token", "code_signing_ev_own_hsm": "Code Signing EV with OWN HSM", "expedited_shipping": "Expedited Shipping", "eu_qwac": "EU Qualified Website Authentication Certificate", "eu_qwac_psd2": "EU Qualified Website Authentication Certificate PSD2", "eu_eseal": "EU Qualified eSeal", "eu_eseal_psd2": "EU Qualified eSeal PSD2", "eu_individual": "EU Qualified Personal", "eu_individual_org": "EU Qualified Personal Organisation", "pkio_qualified_organisation_person": "PKIo Personal Organisation - Signing", "pkio_qualified_organisation_person_prof": "PKIo Professional - Signing", "pkio_qualified_burger": "PKIo Citizen - Signing", "pkio_qualified_organisation_services": "PKIo Qualified eSeal", "pkio_qualified_private_person": "PKIo Private Person - Signing", "pkio_qualified_private_person_prof": "PKIo Private Professional - Signing", "pkio_organisation_person": "PKIo Personal Organisation - Authentication/Encryption", "pkio_organisation_person_prof": "PKIo Professional - Authentication/Encryption", "pkio_organisation_services": "PKIo Organisation - Authentication/Encryption", "pkio_burger": "PKIo Citizen - Authentication/Encryption", "pkio_private_person": "PKIo Private Person - Authentication/Encryption", "pkio_private_person_prof": "PKIo Private Professional - Authentication/Encryption", "pkio_private_services_server": "PKIo Private Services Server", }, "product_shorter_name" : { "vmc_basic": "Verified Mark", "common_mark_certificate": "Common Mark", }, "heading": { "san": "Subject Alternative Names", "csr": "CSR" }, "msg": { "cert_expiring_soon": "Certificate expiring soon", "cert_expired": "Certificate expired", "expired": "Expired", "expiring_soon": "Expiring soon", "pagin_details": "Showing %d - %d of %d", "ari_tool_tip": "ARI makes it possible for our subscribers to handle certificate revocation and renewal as easily and automatically as the process of getting a certificate in the first place.", "rows_per_page": "Rows per page", "single_day": "%s day", "multiple_days": "%s days", "organization_id": "(Organization ID: %d)", "prepay_single_day": "Prepay for %d day", "prepay_multiple_days": "Prepay for %d days", "prepay_single_year": "Prepay for %d year", "prepay_multiple_years": "Prepay for %d years", "popover_msg_receive_cert": "Receive your %s certificate after we process your order", "popover_msg_pay_for_cert": "Pay for %s 1-year %s", "went_wrong": "Something went wrong", "no_special_chars": "Special characters are not allowed", "fill_field": "Please fill out this field", "invalid_url": "This endpoint URL is not valid. Retry.", "invalid_webhook_secret": "Invalid secret. Secret should be at least 32 characters.", "auto_renew_multiple_times": "(Automatically renew %d times)", "auto_renew_once": "(Automatically renew once)", "select_atleast_one_option": "Select at least one option", 'year_savings': "%d-year-savings", 'Preferred_customer_discount': "Preferred customer discount", 'with_off': "with %s off" } }