Skip to content

Commit

Permalink
Merge pull request #2865 from bolt/bugfix/edit-locales-in-editor
Browse files Browse the repository at this point in the history
Allow labels to be edited in the Editor
  • Loading branch information
bobdenotter authored Oct 22, 2021
2 parents 649221a + af6341a commit ea7beac
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 0 deletions.
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

0 comments on commit ea7beac

Please sign in to comment.