Merge pull request #1498 from Kocal/ux-translator-2.32

[UXTranslator] Add recipe for 2.32
This commit is contained in:
Fabien Potencier
2025-12-05 09:35:46 +01:00
committed by GitHub
4 changed files with 35 additions and 0 deletions
@@ -0,0 +1,18 @@
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;
@@ -0,0 +1,3 @@
ux_translator:
# The directory where the JavaScript translations are dumped
dump_directory: '%kernel.project_dir%/var/translations'
+13
View File
@@ -0,0 +1,13 @@
{
"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/"
}
}
@@ -0,0 +1 @@
console.log('Run bin/console cache:warmup to generate the translation files.');