Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow labels to be edited in the Editor #2865

Merged
merged 4 commits into from
Oct 22, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions config/packages/translation.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ framework:

# php_translation
translation:
locales: '%locales_array%'
webui:
enabled: true
edit_in_place:
Expand Down
3 changes: 3 additions & 0 deletions src/Kernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,9 @@ private function setBoltParameters(ContainerBuilder $container, string $confDir)
{
$container->setParameter('bolt.public_folder', $this->getPublicFolder());

$locales = explode('|', $container->getParameter('app_locales'));
$container->setParameter('locales_array', $locales);

$fileLocator = new FileLocator([$confDir . '/bolt']);
$fileName = $fileLocator->locate('config.yaml', null, true);

Expand Down
20 changes: 20 additions & 0 deletions yaml-migrations/m_2021-10-21-translation.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Adding the new locales_array for Bolt 5.0.4
file: packages/translation.yaml
since: 5.0.4

add:
translation:
locales: '%locales_array%'
default_locale: '%locale%'
webui:
enabled: true
edit_in_place:
enabled: false
config_name: site
configs:
site:
dirs: ["%kernel.project_dir%/public/theme/%bolt.theme%"]
output_dir: "%kernel.project_dir%/translations"
auto_add_missing_translations:
enabled: true
config_name: site