REDROOM
PHP 8.2.30
Path:
Logout
Edit File
Size: 1.65 KB
Close
/proc/thread-self/root/home/byroehnu/.trash/node_modules11/adminjs/src/frontend/hooks/use-translation.ts
Text
Base64
import { useTranslation as originalUseTranslation, } from 'react-i18next' import { TFunction, i18n } from 'i18next' import { TranslateFunctions, createFunctions } from '../../utils/translate-functions.factory.js' /** * Extends {@link TranslateFunctions}. Apart from that it also returns all the properties * defined below. * * ```javascript * import { useTranslation } from 'adminjs' * * const MyComponent = () => { * const { translateButton } = useTranslation() * * return ( * <Box> * <Button variant="contained" onClick={...}>{translateButton('save')}<Button> * </Box> * ) * } * ``` * * @memberof useTranslation * @alias UseTranslationResponse * * @property {TranslateFunction} ... All functions defined in {@link TranslateFunctions} */ export type UseTranslationResponse = TranslateFunctions & { t: TFunction; /** * Current i18n instance. */ i18n: i18n; /** * Indicates if translation system is ready. In AdminJS it is always ready :). */ ready: boolean; } /** * @classdesc * Extends the useTranslation hook from react-i18next library. * * Returns all the {@link TranslateFunctions} + methods returned by the original * useTranslation method from react-i18next like: `i18n` instance and `ready` flag. * * @class * @subcategory Hooks * @bundle * @hideconstructor * @returns {UseTranslationResponse} */ export const useTranslation = (): UseTranslationResponse => { // eslint-disable-next-line no-shadow const { i18n, ...rest } = originalUseTranslation() const translateFunctions = createFunctions(i18n) return { ...rest, i18n, ...translateFunctions, } } export default useTranslation
Save
Close
Exit & Reset
Text mode: syntax highlighting auto-detects file type.
Directory Contents
Dirs: 6 × Files: 10
Delete Selected
Select All
Select None
Sort:
Name
Size
Modified
Enable drag-to-move
Name
Size
Perms
Modified
Actions
use-action
DIR
-
drwxr-xr-x
2026-02-28 00:32:46
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
use-local-storage
DIR
-
drwxr-xr-x
2026-02-28 00:32:46
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
use-record
DIR
-
drwxr-xr-x
2026-02-28 00:32:50
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
use-records
DIR
-
drwxr-xr-x
2026-02-28 00:32:46
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
use-resource
DIR
-
drwxr-xr-x
2026-02-28 00:32:46
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
use-selected-records
DIR
-
drwxr-xr-x
2026-02-28 00:32:46
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
index.ts
550 B
lrw-r--r--
2026-02-28 00:32:28
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
use-current-admin.ts
1.52 KB
lrw-r--r--
2026-02-28 00:32:46
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
use-filter-drawer.tsx
946 B
lrw-r--r--
2026-02-28 00:32:50
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
use-history-listen.ts
1.13 KB
lrw-r--r--
2026-02-28 00:32:46
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
use-modal.doc.md
3.07 KB
lrw-r--r--
2026-02-28 00:31:56
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
use-modal.ts
2.28 KB
lrw-r--r--
2026-02-28 00:32:46
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
use-navigation-resources.ts
2.59 KB
lrw-r--r--
2026-02-28 00:32:46
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
use-notice.ts
890 B
lrw-r--r--
2026-02-28 00:32:46
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
use-query-params.ts
2.39 KB
lrw-r--r--
2026-02-28 00:32:46
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
use-translation.ts
1.65 KB
lrw-r--r--
2026-02-28 00:32:46
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Zip Selected
If ZipArchive is unavailable, a
.tar
will be created (no compression).