PHP 8.2.30
Preview: Trans.js Size: 2.58 KB
/proc/thread-self/root/home/byroehnu/.trash/node_modules11/react-i18next/dist/es/Trans.js

import _defineProperty from "@babel/runtime/helpers/defineProperty";
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
var _excluded = ["children", "count", "parent", "i18nKey", "context", "tOptions", "values", "defaults", "components", "ns", "i18n", "t", "shouldUnescape"];

function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }

function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }

import { useContext } from 'react';
import { nodesToString, Trans as TransWithoutContext } from './TransWithoutContext.js';
import { getI18n, I18nContext } from './context.js';
export { nodesToString };
export function Trans(_ref) {
  var children = _ref.children,
      count = _ref.count,
      parent = _ref.parent,
      i18nKey = _ref.i18nKey,
      context = _ref.context,
      _ref$tOptions = _ref.tOptions,
      tOptions = _ref$tOptions === void 0 ? {} : _ref$tOptions,
      values = _ref.values,
      defaults = _ref.defaults,
      components = _ref.components,
      ns = _ref.ns,
      i18nFromProps = _ref.i18n,
      tFromProps = _ref.t,
      shouldUnescape = _ref.shouldUnescape,
      additionalProps = _objectWithoutProperties(_ref, _excluded);

  var _ref2 = useContext(I18nContext) || {},
      i18nFromContext = _ref2.i18n,
      defaultNSFromContext = _ref2.defaultNS;

  var i18n = i18nFromProps || i18nFromContext || getI18n();
  var t = tFromProps || i18n && i18n.t.bind(i18n);
  return TransWithoutContext(_objectSpread({
    children: children,
    count: count,
    parent: parent,
    i18nKey: i18nKey,
    context: context,
    tOptions: tOptions,
    values: values,
    defaults: defaults,
    components: components,
    ns: ns || t && t.ns || defaultNSFromContext || i18n && i18n.options && i18n.options.defaultNS,
    i18n: i18n,
    t: tFromProps,
    shouldUnescape: shouldUnescape
  }, additionalProps));
}

Directory Contents

Dirs: 0 × Files: 16

Name Size Perms Modified Actions
2.90 KB lrw-r--r-- 2026-02-28 00:27:06
Edit Download
1.48 KB lrw-r--r-- 2026-02-28 00:27:34
Edit Download
429 B lrw-r--r-- 2026-02-28 00:27:58
Edit Download
135 B lrw-r--r-- 2026-02-28 00:28:10
Edit Download
994 B lrw-r--r-- 2026-02-28 00:28:26
Edit Download
246 B lrw-r--r-- 2026-02-28 00:28:30
Edit Download
37 B lrw-r--r-- 2026-02-28 00:29:16
Edit Download
2.58 KB lrw-r--r-- 2026-02-28 00:28:50
Edit Download
687 B lrw-r--r-- 2026-02-28 00:28:54
Edit Download
11.97 KB lrw-r--r-- 2026-02-28 00:28:58
Edit Download
684 B lrw-r--r-- 2026-02-28 00:29:00
Edit Download
1.02 KB lrw-r--r-- 2026-02-28 00:29:04
Edit Download
5.49 KB lrw-r--r-- 2026-02-28 00:29:06
Edit Download
3.38 KB lrw-r--r-- 2026-02-28 00:29:10
Edit Download
1.89 KB lrw-r--r-- 2026-02-28 00:29:10
Edit Download
2.73 KB lrw-r--r-- 2026-02-28 00:29:12
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).