Files
symfony-flex-recipes/symfony.ux-translator.2.32.json
T
github-action[bot]andgithub-action[bot] 15eae169f9 Update Flex endpoint
2025-12-07 07:54:46 +00:00

71 lines
3.0 KiB
JSON

{
"manifests": {
"symfony/ux-translator": {
"manifest": {
"bundles": {
"Symfony\\UX\\Translator\\UxTranslatorBundle": [
"all"
]
},
"conflict": {
"symfony/flex": "<1.20.0 || >=2.0.0,<2.3.0"
},
"copy-from-recipe": {
"assets/": "assets/",
"config/": "%CONFIG_DIR%/",
"var/": "var/"
}
},
"files": {
"assets/translator.js": {
"contents": [
"import { createTranslator } from '@symfony/ux-translator';",
"import { messages, localeFallbacks } from '../var/translations/index.js';",
"",
"/*",
" * This file is part of the Symfony UX Translator package.",
" *",
" * If folder \"../var/translations\" does not exist, or some translations are missing,",
" * you must warmup your Symfony cache to refresh JavaScript translations.",
" *",
" * If you use TypeScript, you can rename this file to \"translator.ts\" to take advantage of types checking.",
" */",
"",
"const translator = createTranslator({",
" messages,",
" localeFallbacks,",
"});",
"",
"export const { trans } = translator;",
""
],
"executable": false
},
"config/packages/ux_translator.yaml": {
"contents": [
"ux_translator:",
" # The directory where the JavaScript translations are dumped",
" dump_directory: '%kernel.project_dir%/var/translations'",
"",
"when@prod:",
" ux_translator:",
" # Control whether TypeScript types are dumped alongside translations.",
" # Disable this if you do not use TypeScript (e.g. in production when using AssetMapper), to speed up cache warmup.",
" # dump_typescript: false",
""
],
"executable": false
},
"var/translations/index.js": {
"contents": [
"console.log('Run bin/console cache:warmup to generate the translation files.');",
""
],
"executable": false
}
},
"ref": "20e2abac415da4c3a9a6bafa059a6419beb74593"
}
}
}