wp/wp-includes/js/dist/i18n.js
changeset 22 8c2e4d02f4ef
parent 21 48c4eec2b7e6
equal deleted inserted replaced
21:48c4eec2b7e6 22:8c2e4d02f4ef
   307 /******/ 		};
   307 /******/ 		};
   308 /******/ 	})();
   308 /******/ 	})();
   309 /******/ 	
   309 /******/ 	
   310 /************************************************************************/
   310 /************************************************************************/
   311 var __webpack_exports__ = {};
   311 var __webpack_exports__ = {};
   312 // This entry need to be wrapped in an IIFE because it need to be in strict mode.
   312 // This entry needs to be wrapped in an IIFE because it needs to be in strict mode.
   313 (() => {
   313 (() => {
   314 "use strict";
   314 "use strict";
   315 // ESM COMPAT FLAG
   315 // ESM COMPAT FLAG
   316 __webpack_require__.r(__webpack_exports__);
   316 __webpack_require__.r(__webpack_exports__);
   317 
   317 
   330   setLocaleData: () => (/* reexport */ setLocaleData),
   330   setLocaleData: () => (/* reexport */ setLocaleData),
   331   sprintf: () => (/* reexport */ sprintf_sprintf),
   331   sprintf: () => (/* reexport */ sprintf_sprintf),
   332   subscribe: () => (/* reexport */ subscribe)
   332   subscribe: () => (/* reexport */ subscribe)
   333 });
   333 });
   334 
   334 
   335 ;// CONCATENATED MODULE: ./node_modules/memize/dist/index.js
   335 ;// ./node_modules/memize/dist/index.js
   336 /**
   336 /**
   337  * Memize options object.
   337  * Memize options object.
   338  *
   338  *
   339  * @typedef MemizeOptions
   339  * @typedef MemizeOptions
   340  *
   340  *
   495 
   495 
   496 
   496 
   497 // EXTERNAL MODULE: ./node_modules/sprintf-js/src/sprintf.js
   497 // EXTERNAL MODULE: ./node_modules/sprintf-js/src/sprintf.js
   498 var sprintf = __webpack_require__(2058);
   498 var sprintf = __webpack_require__(2058);
   499 var sprintf_default = /*#__PURE__*/__webpack_require__.n(sprintf);
   499 var sprintf_default = /*#__PURE__*/__webpack_require__.n(sprintf);
   500 ;// CONCATENATED MODULE: ./node_modules/@wordpress/i18n/build-module/sprintf.js
   500 ;// ./node_modules/@wordpress/i18n/build-module/sprintf.js
   501 /**
   501 /**
   502  * External dependencies
   502  * External dependencies
   503  */
   503  */
   504 
   504 
   505 
   505 
   533     }
   533     }
   534     return format;
   534     return format;
   535   }
   535   }
   536 }
   536 }
   537 
   537 
   538 ;// CONCATENATED MODULE: ./node_modules/@tannin/postfix/index.js
   538 ;// ./node_modules/@tannin/postfix/index.js
   539 var PRECEDENCE, OPENERS, TERMINATORS, PATTERN;
   539 var PRECEDENCE, OPENERS, TERMINATORS, PATTERN;
   540 
   540 
   541 /**
   541 /**
   542  * Operator precedence mapping.
   542  * Operator precedence mapping.
   543  *
   543  *
   659 
   659 
   660 	// Pop remaining items from stack into terms.
   660 	// Pop remaining items from stack into terms.
   661 	return terms.concat( stack.reverse() );
   661 	return terms.concat( stack.reverse() );
   662 }
   662 }
   663 
   663 
   664 ;// CONCATENATED MODULE: ./node_modules/@tannin/evaluate/index.js
   664 ;// ./node_modules/@tannin/evaluate/index.js
   665 /**
   665 /**
   666  * Operator callback functions.
   666  * Operator callback functions.
   667  *
   667  *
   668  * @type {Object}
   668  * @type {Object}
   669  */
   669  */
   771 	}
   771 	}
   772 
   772 
   773 	return stack[ 0 ];
   773 	return stack[ 0 ];
   774 }
   774 }
   775 
   775 
   776 ;// CONCATENATED MODULE: ./node_modules/@tannin/compile/index.js
   776 ;// ./node_modules/@tannin/compile/index.js
   777 
   777 
   778 
   778 
   779 
   779 
   780 /**
   780 /**
   781  * Given a C expression, returns a function which can be called to evaluate its
   781  * Given a C expression, returns a function which can be called to evaluate its
   802 	return function( variables ) {
   802 	return function( variables ) {
   803 		return evaluate( terms, variables );
   803 		return evaluate( terms, variables );
   804 	};
   804 	};
   805 }
   805 }
   806 
   806 
   807 ;// CONCATENATED MODULE: ./node_modules/@tannin/plural-forms/index.js
   807 ;// ./node_modules/@tannin/plural-forms/index.js
   808 
   808 
   809 
   809 
   810 /**
   810 /**
   811  * Given a C expression, returns a function which, when called with a value,
   811  * Given a C expression, returns a function which, when called with a value,
   812  * evaluates the result with the value assumed to be the "n" variable of the
   812  * evaluates the result with the value assumed to be the "n" variable of the
   822 	return function( n ) {
   822 	return function( n ) {
   823 		return +evaluate( { n: n } );
   823 		return +evaluate( { n: n } );
   824 	};
   824 	};
   825 }
   825 }
   826 
   826 
   827 ;// CONCATENATED MODULE: ./node_modules/tannin/index.js
   827 ;// ./node_modules/tannin/index.js
   828 
   828 
   829 
   829 
   830 /**
   830 /**
   831  * Tannin constructor options.
   831  * Tannin constructor options.
   832  *
   832  *
  1037 	// If entry not found, fall back to singular vs. plural with zero index
  1037 	// If entry not found, fall back to singular vs. plural with zero index
  1038 	// representing the singular value.
  1038 	// representing the singular value.
  1039 	return index === 0 ? singular : plural;
  1039 	return index === 0 ? singular : plural;
  1040 };
  1040 };
  1041 
  1041 
  1042 ;// CONCATENATED MODULE: ./node_modules/@wordpress/i18n/build-module/create-i18n.js
  1042 ;// ./node_modules/@wordpress/i18n/build-module/create-i18n.js
  1043 /**
  1043 /**
  1044  * External dependencies
  1044  * External dependencies
  1045  */
  1045  */
  1046 
  1046 
  1047 
  1047 
  1317      * @param {string} text        Text to translate.
  1317      * @param {string} text        Text to translate.
  1318      * @param {string} domain      Text domain. Unique identifier for retrieving translated strings.
  1318      * @param {string} domain      Text domain. Unique identifier for retrieving translated strings.
  1319      */
  1319      */
  1320     translation = /** @type {string} */
  1320     translation = /** @type {string} */
  1321     /** @type {*} */hooks.applyFilters('i18n.gettext', translation, text, domain);
  1321     /** @type {*} */hooks.applyFilters('i18n.gettext', translation, text, domain);
  1322     return /** @type {string} */(
  1322     return /** @type {string} */ /** @type {*} */hooks.applyFilters('i18n.gettext_' + getFilterDomain(domain), translation, text, domain);
  1323       /** @type {*} */hooks.applyFilters('i18n.gettext_' + getFilterDomain(domain), translation, text, domain)
       
  1324     );
       
  1325   };
  1323   };
  1326 
  1324 
  1327   /** @type {_x} */
  1325   /** @type {_x} */
  1328   const _x = (text, context, domain) => {
  1326   const _x = (text, context, domain) => {
  1329     let translation = dcnpgettext(domain, context, text);
  1327     let translation = dcnpgettext(domain, context, text);
  1339      * @param {string} context     Context information for the translators.
  1337      * @param {string} context     Context information for the translators.
  1340      * @param {string} domain      Text domain. Unique identifier for retrieving translated strings.
  1338      * @param {string} domain      Text domain. Unique identifier for retrieving translated strings.
  1341      */
  1339      */
  1342     translation = /** @type {string} */
  1340     translation = /** @type {string} */
  1343     /** @type {*} */hooks.applyFilters('i18n.gettext_with_context', translation, text, context, domain);
  1341     /** @type {*} */hooks.applyFilters('i18n.gettext_with_context', translation, text, context, domain);
  1344     return /** @type {string} */(
  1342     return /** @type {string} */ /** @type {*} */hooks.applyFilters('i18n.gettext_with_context_' + getFilterDomain(domain), translation, text, context, domain);
  1345       /** @type {*} */hooks.applyFilters('i18n.gettext_with_context_' + getFilterDomain(domain), translation, text, context, domain)
       
  1346     );
       
  1347   };
  1343   };
  1348 
  1344 
  1349   /** @type {_n} */
  1345   /** @type {_n} */
  1350   const _n = (single, plural, number, domain) => {
  1346   const _n = (single, plural, number, domain) => {
  1351     let translation = dcnpgettext(domain, undefined, single, plural, number);
  1347     let translation = dcnpgettext(domain, undefined, single, plural, number);
  1362      * @param {string} number      The number to compare against to use either the singular or plural form.
  1358      * @param {string} number      The number to compare against to use either the singular or plural form.
  1363      * @param {string} domain      Text domain. Unique identifier for retrieving translated strings.
  1359      * @param {string} domain      Text domain. Unique identifier for retrieving translated strings.
  1364      */
  1360      */
  1365     translation = /** @type {string} */
  1361     translation = /** @type {string} */
  1366     /** @type {*} */hooks.applyFilters('i18n.ngettext', translation, single, plural, number, domain);
  1362     /** @type {*} */hooks.applyFilters('i18n.ngettext', translation, single, plural, number, domain);
  1367     return /** @type {string} */(
  1363     return /** @type {string} */ /** @type {*} */hooks.applyFilters('i18n.ngettext_' + getFilterDomain(domain), translation, single, plural, number, domain);
  1368       /** @type {*} */hooks.applyFilters('i18n.ngettext_' + getFilterDomain(domain), translation, single, plural, number, domain)
       
  1369     );
       
  1370   };
  1364   };
  1371 
  1365 
  1372   /** @type {_nx} */
  1366   /** @type {_nx} */
  1373   const _nx = (single, plural, number, context, domain) => {
  1367   const _nx = (single, plural, number, context, domain) => {
  1374     let translation = dcnpgettext(domain, context, single, plural, number);
  1368     let translation = dcnpgettext(domain, context, single, plural, number);
  1386      * @param {string} context     Context information for the translators.
  1380      * @param {string} context     Context information for the translators.
  1387      * @param {string} domain      Text domain. Unique identifier for retrieving translated strings.
  1381      * @param {string} domain      Text domain. Unique identifier for retrieving translated strings.
  1388      */
  1382      */
  1389     translation = /** @type {string} */
  1383     translation = /** @type {string} */
  1390     /** @type {*} */hooks.applyFilters('i18n.ngettext_with_context', translation, single, plural, number, context, domain);
  1384     /** @type {*} */hooks.applyFilters('i18n.ngettext_with_context', translation, single, plural, number, context, domain);
  1391     return /** @type {string} */(
  1385     return /** @type {string} */ /** @type {*} */hooks.applyFilters('i18n.ngettext_with_context_' + getFilterDomain(domain), translation, single, plural, number, context, domain);
  1392       /** @type {*} */hooks.applyFilters('i18n.ngettext_with_context_' + getFilterDomain(domain), translation, single, plural, number, context, domain)
       
  1393     );
       
  1394   };
  1386   };
  1395 
  1387 
  1396   /** @type {IsRtl} */
  1388   /** @type {IsRtl} */
  1397   const isRTL = () => {
  1389   const isRTL = () => {
  1398     return 'rtl' === _x('ltr', 'text direction');
  1390     return 'rtl' === _x('ltr', 'text direction');
  1446     isRTL,
  1438     isRTL,
  1447     hasTranslation
  1439     hasTranslation
  1448   };
  1440   };
  1449 };
  1441 };
  1450 
  1442 
  1451 ;// CONCATENATED MODULE: external ["wp","hooks"]
  1443 ;// external ["wp","hooks"]
  1452 const external_wp_hooks_namespaceObject = window["wp"]["hooks"];
  1444 const external_wp_hooks_namespaceObject = window["wp"]["hooks"];
  1453 ;// CONCATENATED MODULE: ./node_modules/@wordpress/i18n/build-module/default-i18n.js
  1445 ;// ./node_modules/@wordpress/i18n/build-module/default-i18n.js
  1454 /**
  1446 /**
  1455  * Internal dependencies
  1447  * Internal dependencies
  1456  */
  1448  */
  1457 
  1449 
  1458 
  1450 
  1596  * @param {string} [domain]  Domain to retrieve the translated text.
  1588  * @param {string} [domain]  Domain to retrieve the translated text.
  1597  * @return {boolean} Whether the translation exists or not.
  1589  * @return {boolean} Whether the translation exists or not.
  1598  */
  1590  */
  1599 const hasTranslation = i18n.hasTranslation.bind(i18n);
  1591 const hasTranslation = i18n.hasTranslation.bind(i18n);
  1600 
  1592 
  1601 ;// CONCATENATED MODULE: ./node_modules/@wordpress/i18n/build-module/index.js
  1593 ;// ./node_modules/@wordpress/i18n/build-module/index.js
  1602 
  1594 
  1603 
  1595 
  1604 
  1596 
  1605 
  1597 
  1606 })();
  1598 })();