[ Index ]

PHP Cross Reference of WordPress Trunk (Updated Daily)

title

Body

[close]

/wp-includes/js/dist/ -> i18n.js (summary)

(no description)

File Size: 1142 lines (34 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 23 functions

  __webpack_require__()
  getDefault()
  getModuleExports()
  _defineProperty()
  sprintf()
  vsprintf()
  sprintf_format()
  sprintf_parse()
  postfix()
  evaluate_evaluate()
  compile()
  pluralForms()
  getPluralExpression()
  Tannin()
  setLocaleData()
  dcnpgettext()
  __()
  _x()
  _n()
  _nx()
  build_module_sprintf()
  memoized()
  _objectSpread()

Functions
Functions that are not part of a class:

__webpack_require__(moduleId)   X-Ref
No description

getDefault()   X-Ref
No description

getModuleExports()   X-Ref
No description

_defineProperty(obj, key, value)   X-Ref
No description

sprintf(key)   X-Ref
No description

vsprintf(fmt, argv)   X-Ref
No description

sprintf_format(parse_tree, argv)   X-Ref
No description

sprintf_parse(fmt)   X-Ref
No description

postfix( expression )   X-Ref
Given a C expression, returns the equivalent postfix (Reverse Polish)
notation terms as an array.

If a postfix string is desired, simply `.join( ' ' )` the result.

param: {string} expression C expression.
return: {string[]} Postfix terms.

evaluate_evaluate( postfix, variables )   X-Ref
Given an array of postfix terms and operand variables, returns the result of
the postfix evaluation.

param: {string[]} postfix   Postfix terms.
param: {Object}   variables Operand variables.
return: {*} Result of evaluation.

compile( expression )   X-Ref
Given a C expression, returns a function which can be called to evaluate its
result.

param: {string} expression C expression.
return: {Function} Compiled evaluator.

pluralForms( expression )   X-Ref
Given a C expression, returns a function which, when called with a value,
evaluates the result with the value assumed to be the "n" variable of the
expression. The result will be coerced to its numeric equivalent.

param: {string} expression C expression.
return: {Function} Evaluator function.

getPluralExpression( pf )   X-Ref
Given a specific locale data's config `plural_forms` value, returns the
expression.

param: {string} pf Locale data plural forms.
return: {string} Plural forms expression.

Tannin( data, options )   X-Ref
Tannin constructor.

param: {Object}        data    Jed-formatted locale data.
param: {TanninOptions} options Tannin options.

setLocaleData(data)   X-Ref
Merges locale data into the Tannin instance by domain. Accepts data in a
Jed-formatted JSON object shape.

param: {?Object} data   Locale data configuration.
param: {?string} domain Domain for which configuration applies.

dcnpgettext()   X-Ref
Wrapper for Tannin's `dcnpgettext`. Populates default locale data if not
otherwise previously assigned.

param: {?string} domain  Domain to retrieve the translated text.
param: {?string} context Context information for the translators.
param: {string}  single  Text to translate if non-plural. Used as fallback
param: {?string} plural  The text to be used if the number is plural.
param: {?number} number  The number to compare against to use either the
return: {string} The translated string.

__(text, domain)   X-Ref
Retrieve the translation of text.

param: {string}  text   Text to translate.
param: {?string} domain Domain to retrieve the translated text.
return: {string} Translated text.

_x(text, context, domain)   X-Ref
Retrieve translated string with gettext context.

param: {string}  text    Text to translate.
param: {string}  context Context information for the translators.
param: {?string} domain  Domain to retrieve the translated text.
return: {string} Translated context string without pipe.

_n(single, plural, number, domain)   X-Ref
Translates and retrieves the singular or plural form based on the supplied
number.

param: {string}  single The text to be used if the number is singular.
param: {string}  plural The text to be used if the number is plural.
param: {number}  number The number to compare against to use either the
param: {?string} domain Domain to retrieve the translated text.
return: {string} The translated singular or plural form.

_nx(single, plural, number, context, domain)   X-Ref
Translates and retrieves the singular or plural form based on the supplied
number, with gettext context.

param: {string}  single  The text to be used if the number is singular.
param: {string}  plural  The text to be used if the number is plural.
param: {number}  number  The number to compare against to use either the
param: {string}  context Context information for the translators.
param: {?string} domain  Domain to retrieve the translated text.
return: {string} The translated singular or plural form.

build_module_sprintf(format)   X-Ref
Returns a formatted string. If an error occurs in applying the format, the
original format string is returned.

param: {string}   format  The format of the string to generate.
param: {...string} args Arguments to apply to the format.
return: {string} The formatted string.

memoized( )   X-Ref
No description

_objectSpread(target)   X-Ref
No description



Generated: Sat Nov 23 20:47:33 2019 Cross-referenced by PHPXref 0.7