From b74a89213aa4580b6e1d7034eb78131a728e50c2 Mon Sep 17 00:00:00 2001 From: Jarek Jakubowski Date: Sat, 13 Apr 2019 18:56:23 +0200 Subject: [PATCH 1/6] Update translation features and composer dependencies --- .travis.yml | 5 +- README.md | 2 + composer.json | 29 +++++----- config/bundles.php | 9 ++-- config/packages/dev/httplug.yaml | 14 ----- config/packages/dev/php_translation.yaml | 5 -- config/packages/dev/translation.yaml | 16 ++---- config/packages/doctrine_migrations.yaml | 5 -- config/packages/translation.yaml | 4 +- config/routes/dev/php_translation.yaml | 6 --- config/routes/dev/translation.yaml | 2 + config/routes/php_translation.yaml | 28 ---------- config/routes/translation.yml | 3 ++ src/Menu/BackendMenuBuilder.php | 10 +--- src/Migrations/.gitignore | 0 symfony.lock | 12 ----- .../TwigBundle/Exception/error.html.twig | 2 +- .../TwigBundle/Exception/error404.html.twig | 2 +- .../TwigBundle/Exception/error500.html.twig | 2 +- translations/messages.en.xlf | 54 ++++++++++++++----- translations/messages.nl.xlf | 54 +++++++++++++++++++ translations/validators.es.xlf | 2 +- translations/validators.fr.xlf | 2 +- translations/validators.nl.xlf | 2 +- translations/validators.pl.xlf | 2 +- 25 files changed, 134 insertions(+), 138 deletions(-) delete mode 100644 config/packages/dev/httplug.yaml delete mode 100644 config/packages/dev/php_translation.yaml delete mode 100644 config/packages/doctrine_migrations.yaml delete mode 100644 config/routes/dev/php_translation.yaml create mode 100644 config/routes/dev/translation.yaml delete mode 100644 config/routes/php_translation.yaml create mode 100644 config/routes/translation.yml delete mode 100644 src/Migrations/.gitignore diff --git a/.travis.yml b/.travis.yml index 4fd6d5994..820d1138b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,8 +12,7 @@ cache: matrix: fast_finish: true include: - - php: 7.1 - - php: 7.1 + - php: 7.2 env: COMPOSER_FLAGS="--prefer-lowest" - php: 7.2 - php: 7.3 @@ -21,7 +20,7 @@ matrix: env: COMPOSER_FLAGS="--ignore-platform-reqs" allow_failures: - php: nightly - - php: 7.1 + - php: 7.2 env: COMPOSER_FLAGS="--prefer-lowest" before_install: diff --git a/README.md b/README.md index 83f306d9a..10b8b110c 100644 --- a/README.md +++ b/README.md @@ -166,6 +166,8 @@ These are the translations used in Bolt. We rely on the community to expand on n translations, and keep them up to date. If you wish to participate, read the [instructions here][translations]. +Later you can download updated translations from Loco by using command `bin/console translation:sync`. + [fowler]: https://martinfowler.com/articles/practical-test-pyramid.html [translations]: https://github.com/bolt/four/wiki/Contribute-on-translations diff --git a/composer.json b/composer.json index 7848ec55d..fcb0ef9aa 100644 --- a/composer.json +++ b/composer.json @@ -4,7 +4,7 @@ "type": "library", "description": "Bolt 4 skeleton / prototype", "require": { - "php": ">=7.1.3", + "php": ">=7.2", "ext-json": "*", "ext-mbstring": "*", "ext-pdo": "*", @@ -14,26 +14,25 @@ "doctrine/annotations": "^1.0", "doctrine/doctrine-bundle": "^1.8", "doctrine/doctrine-cache-bundle": "^1.3.1", - "doctrine/doctrine-migrations-bundle": "^1.3", "doctrine/orm": "^2.5.11", "easycorp/easy-log-handler": "^1.0.7", "embed/embed": "^3.3", "erusev/parsedown": "^1.7", "ezyang/htmlpurifier": "^4.10", "fzaninotto/faker": "^1.8", + "gedmo/doctrine-extensions": "^2.4.4", "guzzlehttp/guzzle": "^6.3", "knplabs/knp-menu-bundle": "^2.0", "league/glide-symfony": "^1.0", "miljar/php-exif": "^0.6.4", "nelmio/cors-bundle": "^1.5", "nesbot/carbon": "^1.34", - "php-translation/symfony-bundle": "^0.8", "phpdocumentor/reflection-docblock": "^4.2", + "php-translation/symfony-bundle": "^0.8", "sensio/framework-extra-bundle": "^5.1", "sensiolabs/security-checker": "^5.0", "siriusphp/upload": "^2.1", "stof/doctrine-extensions-bundle": "^1.3", - "gedmo/doctrine-extensions": "^2.4.4", "symfony/asset": "^4.2", "symfony/console": "^4.2", "symfony/dependency-injection": "^4.2", @@ -60,25 +59,25 @@ "white-october/pagerfanta-bundle": "^1.2" }, "require-dev": { - "ext-pdo_sqlite": "*", "ext-curl": "*", + "ext-pdo_sqlite": "*", "behat/behat": "^3.5", "behat/mink": "dev-master@dev", "behat/mink-extension": "^2.3", "behat/mink-goutte-driver": "^1.2", "behatch/contexts": "^3.2", - "coduo/php-matcher": "dev-feature/array-universal-key@dev", + "coduo/php-matcher": "^3.1.2", "dama/doctrine-test-bundle": "^5.0", "doctrine/doctrine-fixtures-bundle": "^3.1", "lakion/mink-debug-extension": "^1.2", "php-http/httplug-pack": "^1.1", - "php-translation/loco-adapter": "^0.8.0", + "php-translation/loco-adapter": "^0.8", "phpspec/phpspec": "^5.1", "phpspec/prophecy": "^1.8", "phpstan/phpstan": "^0.11", - "phpstan/phpstan-doctrine": "^0.11.0", - "phpstan/phpstan-symfony": "^0.11.0", - "phpunit/phpunit": "^7.0", + "phpstan/phpstan-doctrine": "^0.11", + "phpstan/phpstan-symfony": "^0.11", + "phpunit/phpunit": "^8.0", "roave/security-advisories": "dev-master@dev", "symfony/browser-kit": "^4.2", "symfony/css-selector": "^4.2", @@ -88,16 +87,13 @@ "symfony/stopwatch": "^4.2", "symfony/web-profiler-bundle": "^4.2", "symfony/web-server-bundle": "^4.2", - "symplify/easy-coding-standard": "^5.4.6" + "symplify/easy-coding-standard": "^5.4.14" }, - "repositories": [ - { "type": "vcs", "url": "https://github.com/jarjak/php-matcher", "no-api": true } - ], "minimum-stability": "stable", "prefer-stable": true, "config": { "platform": { - "php": "7.1.3" + "php": "7.2" }, "preferred-install": { "*": "dist" @@ -134,8 +130,7 @@ }, "conflict": { "symfony/symfony": "*", - "api-platform/core": "v2.4.0-beta.2", - "symplify/coding-standard": "5.4.13" + "api-platform/core": "v2.4.0-beta.2" }, "extra": { "symfony": { diff --git a/config/bundles.php b/config/bundles.php index 491a6ef72..a168b1b76 100644 --- a/config/bundles.php +++ b/config/bundles.php @@ -6,7 +6,8 @@ Doctrine\Bundle\DoctrineBundle\DoctrineBundle::class => ['all' => true], Doctrine\Bundle\DoctrineCacheBundle\DoctrineCacheBundle::class => ['all' => true], Doctrine\Bundle\FixturesBundle\DoctrineFixturesBundle::class => ['dev' => true, 'test' => true, 'local' => true], - Doctrine\Bundle\MigrationsBundle\DoctrineMigrationsBundle::class => ['all' => true], + Http\HttplugBundle\HttplugBundle::class => ['dev' => true, 'local' => true], + Knp\Bundle\MenuBundle\KnpMenuBundle::class => ['all' => true], Nelmio\CorsBundle\NelmioCorsBundle::class => ['all' => true], Sensio\Bundle\FrameworkExtraBundle\SensioFrameworkExtraBundle::class => ['all' => true], Stof\DoctrineExtensionsBundle\StofDoctrineExtensionsBundle::class => ['all' => true], @@ -17,12 +18,10 @@ Symfony\Bundle\SecurityBundle\SecurityBundle::class => ['all' => true], Symfony\Bundle\SwiftmailerBundle\SwiftmailerBundle::class => ['all' => true], Symfony\Bundle\TwigBundle\TwigBundle::class => ['all' => true], + Symfony\WebpackEncoreBundle\WebpackEncoreBundle::class => ['all' => true], Symfony\Bundle\WebProfilerBundle\WebProfilerBundle::class => ['dev' => true, 'local' => true], Symfony\Bundle\WebServerBundle\WebServerBundle::class => ['dev' => true, 'test' => true, 'local' => true], - WhiteOctober\PagerfantaBundle\WhiteOctoberPagerfantaBundle::class => ['all' => true], - Knp\Bundle\MenuBundle\KnpMenuBundle::class => ['all' => true], Translation\Bundle\TranslationBundle::class => ['all' => true], - Symfony\WebpackEncoreBundle\WebpackEncoreBundle::class => ['all' => true], Translation\PlatformAdapter\Loco\Bridge\Symfony\TranslationAdapterLocoBundle::class => ['dev' => true, 'local' => true], - Http\HttplugBundle\HttplugBundle::class => ['dev' => true, 'local' => true], + WhiteOctober\PagerfantaBundle\WhiteOctoberPagerfantaBundle::class => ['all' => true], ]; diff --git a/config/packages/dev/httplug.yaml b/config/packages/dev/httplug.yaml deleted file mode 100644 index 2aadcd137..000000000 --- a/config/packages/dev/httplug.yaml +++ /dev/null @@ -1,14 +0,0 @@ -httplug: - plugins: - redirect: - preserve_header: true - - discovery: - client: 'auto' - - clients: - app: - http_methods_client: true - plugins: - - 'httplug.plugin.content_length' - - 'httplug.plugin.redirect' diff --git a/config/packages/dev/php_translation.yaml b/config/packages/dev/php_translation.yaml deleted file mode 100644 index 53398fbca..000000000 --- a/config/packages/dev/php_translation.yaml +++ /dev/null @@ -1,5 +0,0 @@ -translation: - symfony_profiler: - enabled: true - webui: - enabled: true diff --git a/config/packages/dev/translation.yaml b/config/packages/dev/translation.yaml index 032643dfe..b54d31ca7 100644 --- a/config/packages/dev/translation.yaml +++ b/config/packages/dev/translation.yaml @@ -1,25 +1,15 @@ -framework: - default_locale: '%locale%' - translator: - fallbacks: - - 'en' - # php_translation translation: - locales: ['en', 'nl', 'es', 'fr', 'de', 'pl', 'it', 'pt_BR'] - edit_in_place: - enabled: false - config_name: app + symfony_profiler: + enabled: true configs: app: - dirs: ["%kernel.project_dir%/templates", "%kernel.project_dir%/src"] - output_dir: "%kernel.project_dir%/translations" remote_storage: ["php_translation.adapter.loco"] # php_translation_adapter_loco_adapter translation_adapter_loco: index_parameter: 'id' # 'text' or 'name'. Leave blank for "auto" See https://localise.biz/api/docs/export/exportlocale projects: - my_project: + bolt: api_key: '%env(LOCO_PROJECT_API_KEY)%' domains: ['messages'] diff --git a/config/packages/doctrine_migrations.yaml b/config/packages/doctrine_migrations.yaml deleted file mode 100644 index c40143a64..000000000 --- a/config/packages/doctrine_migrations.yaml +++ /dev/null @@ -1,5 +0,0 @@ -doctrine_migrations: - dir_name: '%kernel.project_dir%/src/Migrations' - # namespace is arbitrary but should be different from Bolt\Migrations - # as migrations classes should NOT be autoloaded - namespace: DoctrineMigrations diff --git a/config/packages/translation.yaml b/config/packages/translation.yaml index d8cc35e08..80acc4bb1 100644 --- a/config/packages/translation.yaml +++ b/config/packages/translation.yaml @@ -6,12 +6,12 @@ framework: # php_translation translation: + webui: + enabled: true locales: ['en', 'nl', 'es', 'fr', 'de', 'pl', 'it', 'pt_BR'] edit_in_place: enabled: false - config_name: app configs: app: dirs: ["%kernel.project_dir%/templates", "%kernel.project_dir%/src"] output_dir: "%kernel.project_dir%/translations" - diff --git a/config/routes/dev/php_translation.yaml b/config/routes/dev/php_translation.yaml deleted file mode 100644 index d8461a3f8..000000000 --- a/config/routes/dev/php_translation.yaml +++ /dev/null @@ -1,6 +0,0 @@ -#_translation_webui: -# resource: "@TranslationBundle/Resources/config/routing_webui.yml" -# prefix: /admin - -_translation_profiler: - resource: '@TranslationBundle/Resources/config/routing_symfony_profiler.yml' diff --git a/config/routes/dev/translation.yaml b/config/routes/dev/translation.yaml new file mode 100644 index 000000000..100ace880 --- /dev/null +++ b/config/routes/dev/translation.yaml @@ -0,0 +1,2 @@ +_translation_profiler: + resource: '@TranslationBundle/Resources/config/routing_symfony_profiler.yml' diff --git a/config/routes/php_translation.yaml b/config/routes/php_translation.yaml deleted file mode 100644 index 77e881abf..000000000 --- a/config/routes/php_translation.yaml +++ /dev/null @@ -1,28 +0,0 @@ -_translation_edit_in_place: - resource: '@TranslationBundle/Resources/config/routing_edit_in_place.yml' - prefix: /bolt - -translation_index: - path: /bolt/trans/{configName} - methods: [GET] - defaults: { _controller: Translation\Bundle\Controller\WebUIController::indexAction, configName: null } - -translation_show: - path: /bolt/trans/{configName}/{locale}/{domain} - methods: [GET] - defaults: { _controller: Translation\Bundle\Controller\WebUIController::showAction } - -translation_create: - path: /bolt/trans/{configName}/{locale}/{domain}/new - methods: [POST] - defaults: { _controller: Translation\Bundle\Controller\WebUIController::createAction } - -translation_edit: - path: /bolt/trans/{configName}/{locale}/{domain} - methods: [POST] - defaults: { _controller: Translation\Bundle\Controller\WebUIController::editAction } - -translation_delete: - path: /bolt/trans/{configName}/{locale}/{domain} - methods: [DELETE] - defaults: { _controller: Translation\Bundle\Controller\WebUIController::deleteAction } diff --git a/config/routes/translation.yml b/config/routes/translation.yml new file mode 100644 index 000000000..3b9105cd9 --- /dev/null +++ b/config/routes/translation.yml @@ -0,0 +1,3 @@ +_translation_webui: + resource: "@TranslationBundle/Resources/config/routing_webui.yml" + prefix: '%bolt.backend_url%' diff --git a/src/Menu/BackendMenuBuilder.php b/src/Menu/BackendMenuBuilder.php index befb893b7..21e76a4f1 100644 --- a/src/Menu/BackendMenuBuilder.php +++ b/src/Menu/BackendMenuBuilder.php @@ -199,14 +199,6 @@ private function createAdminMenu(): ItemInterface ], ]); - $menu->getChild('Maintenance')->addChild('Fixtures', [ - 'uri' => '', - 'extras' => [ - 'name' => $t->trans('caption.fixtures_dummy_content'), - 'icon' => 'fa-hat-wizard', - ], - ]); - $menu->getChild('Maintenance')->addChild('Clear the cache', [ 'uri' => $this->urlGenerator->generate('bolt_clear_cache'), 'extras' => [ @@ -223,7 +215,7 @@ private function createAdminMenu(): ItemInterface ], ]); - $menu->getChild('Maintenance')->addChild('Translations: Messages', [ + $menu->getChild('Maintenance')->addChild('Translations', [ 'uri' => $this->urlGenerator->generate('translation_index'), 'extras' => [ 'name' => $t->trans('caption.translations'), diff --git a/src/Migrations/.gitignore b/src/Migrations/.gitignore deleted file mode 100644 index e69de29bb..000000000 diff --git a/symfony.lock b/symfony.lock index 3369dbd5e..c3c0a5f7d 100644 --- a/symfony.lock +++ b/symfony.lock @@ -113,15 +113,6 @@ "src/DataFixtures/AppFixtures.php" ] }, - "doctrine/doctrine-migrations-bundle": { - "version": "1.2", - "recipe": { - "repo": "github.com/symfony/recipes", - "branch": "master", - "version": "1.2", - "ref": "c1431086fec31f17fbcfe6d6d7e92059458facc1" - } - }, "doctrine/event-manager": { "version": "v1.0.0" }, @@ -134,9 +125,6 @@ "doctrine/lexer": { "version": "v1.0.1" }, - "doctrine/migrations": { - "version": "v1.6.0" - }, "doctrine/orm": { "version": "v2.5.12" }, diff --git a/templates/bundles/TwigBundle/Exception/error.html.twig b/templates/bundles/TwigBundle/Exception/error.html.twig index 77d42148d..64297adb4 100644 --- a/templates/bundles/TwigBundle/Exception/error.html.twig +++ b/templates/bundles/TwigBundle/Exception/error.html.twig @@ -18,7 +18,7 @@ {{ 'http_error.description'|trans({ '%status_code%': status_code }) }}

- {{ 'http_error.suggestion'|trans({ '%url%': path('blog_index') })|raw }} + {{ 'http_error.suggestion'|trans({ '%url%': path('homepage') })|raw }}

{% endblock %} diff --git a/templates/bundles/TwigBundle/Exception/error404.html.twig b/templates/bundles/TwigBundle/Exception/error404.html.twig index 80b451c3a..3de9bf55b 100644 --- a/templates/bundles/TwigBundle/Exception/error404.html.twig +++ b/templates/bundles/TwigBundle/Exception/error404.html.twig @@ -18,7 +18,7 @@ {{ 'http_error_404.description'|trans }}

- {{ 'http_error_404.suggestion'|trans({ '%url%': path('blog_index') })|raw }} + {{ 'http_error_404.suggestion'|trans({ '%url%': path('homepage') })|raw }}

{% endblock %} diff --git a/templates/bundles/TwigBundle/Exception/error500.html.twig b/templates/bundles/TwigBundle/Exception/error500.html.twig index a4982e4b5..2c691f401 100644 --- a/templates/bundles/TwigBundle/Exception/error500.html.twig +++ b/templates/bundles/TwigBundle/Exception/error500.html.twig @@ -18,7 +18,7 @@ {{ 'http_error_500.description'|trans }}

- {{ 'http_error_500.suggestion'|trans({ '%url%': path('blog_index') })|raw }} + {{ 'http_error_500.suggestion'|trans({ '%url%': path('homepage') })|raw }}

{% endblock %} diff --git a/translations/messages.en.xlf b/translations/messages.en.xlf index 0c1cc3ad0..63fca8a50 100644 --- a/translations/messages.en.xlf +++ b/translations/messages.en.xlf @@ -927,6 +927,12 @@ Search + + + 9fb3e6e + Built with Bolt.]]> + + contenttypes.generic.overview @@ -957,18 +963,6 @@ Permalink - - - action.preview - Preview - - - - - action.view_saved - View (saved version) on site - - label.displayname @@ -987,13 +981,31 @@ The Kitchensink + + + parameters: +  '%search%': consequatur + + + general.phrase.search-results-for-variable + Search results for '%search%'. + + + + parameters: +  '%search%': ymnrubeyrvwearsytevsf + general.phrase.search-results-for Search results for '%search%'. + + parameters: +  '%SEARCHTERM%': ymnrubeyrvwearsytevsf + general.phrase.no-search-results-for No search results found for '%search%'. @@ -1017,5 +1029,23 @@ Built with Bolt.]]> + + + general.latest_bolt_news + Latest Bolt News + + + + + action.preview + Preview + + + + + action.view_saved + View (saved version) on site + + diff --git a/translations/messages.nl.xlf b/translations/messages.nl.xlf index cb6885ae3..0add33a77 100644 --- a/translations/messages.nl.xlf +++ b/translations/messages.nl.xlf @@ -78,6 +78,15 @@ Gebruikersnaam + + + templates/security/login.twig:4 + + + title.login + Login + + templates/security/login.twig:70 @@ -172,6 +181,15 @@ Copyright + + + templates/security/login.twig:80 + + + label.rememberme + Onthoud me? + + templates/pages/about.twig:25 @@ -564,6 +582,12 @@ Installatie-controle + + + form.select_language + Kies een taal + + field.locale @@ -588,5 +612,35 @@ Auteur + + + general.phrase.search + Zoek + + + + + Search + Zoek + + + + + label.cache_cleared + De Cache is leeggemaakt! + + + + + general.phrase.read-more + Lees meer + + + + + general.latest_bolt_news + Het laatste Bolt nieuws + + diff --git a/translations/validators.es.xlf b/translations/validators.es.xlf index 93fd223e1..33a1040d2 100644 --- a/translations/validators.es.xlf +++ b/translations/validators.es.xlf @@ -1,5 +1,5 @@ - + diff --git a/translations/validators.fr.xlf b/translations/validators.fr.xlf index 232d1966b..e77f6bbad 100644 --- a/translations/validators.fr.xlf +++ b/translations/validators.fr.xlf @@ -1,5 +1,5 @@ - + diff --git a/translations/validators.nl.xlf b/translations/validators.nl.xlf index ec6d9b741..8e01bdb6c 100644 --- a/translations/validators.nl.xlf +++ b/translations/validators.nl.xlf @@ -1,5 +1,5 @@ - + diff --git a/translations/validators.pl.xlf b/translations/validators.pl.xlf index 03b4389ce..b48d3eb87 100644 --- a/translations/validators.pl.xlf +++ b/translations/validators.pl.xlf @@ -1,5 +1,5 @@ - + From 8b8e83a0616747880a1cd48f024087ef0e7888d3 Mon Sep 17 00:00:00 2001 From: Jarek Jakubowski Date: Sat, 13 Apr 2019 19:33:27 +0200 Subject: [PATCH 2/6] Update translations readme --- README.md | 5 ++++- config/packages/dev/translation.yaml | 2 +- config/packages/translation.yaml | 2 +- public/theme/skeleton/partials/_recordfooter.twig | 2 +- src/Form/UserType.php | 2 +- templates/users/edit.html.twig | 2 +- translations/messages.en.xlf | 6 ++++++ 7 files changed, 15 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 10b8b110c..684c4f00d 100644 --- a/README.md +++ b/README.md @@ -166,7 +166,10 @@ These are the translations used in Bolt. We rely on the community to expand on n translations, and keep them up to date. If you wish to participate, read the [instructions here][translations]. -Later you can download updated translations from Loco by using command `bin/console translation:sync`. +Are are several translation-related commands: +- `bin/console translation:download` - download translations from Loco (replaces all local ones) +- `bin/console translation:sync bolt down` - download translations from Loco (replaces local changes if there is a conflict) +- `bin/console translation:sync bolt up` - sends updated translations to Loco [fowler]: https://martinfowler.com/articles/practical-test-pyramid.html diff --git a/config/packages/dev/translation.yaml b/config/packages/dev/translation.yaml index b54d31ca7..88151f8da 100644 --- a/config/packages/dev/translation.yaml +++ b/config/packages/dev/translation.yaml @@ -3,7 +3,7 @@ translation: symfony_profiler: enabled: true configs: - app: + bolt: remote_storage: ["php_translation.adapter.loco"] # php_translation_adapter_loco_adapter diff --git a/config/packages/translation.yaml b/config/packages/translation.yaml index 80acc4bb1..442adac91 100644 --- a/config/packages/translation.yaml +++ b/config/packages/translation.yaml @@ -12,6 +12,6 @@ translation: edit_in_place: enabled: false configs: - app: + bolt: dirs: ["%kernel.project_dir%/templates", "%kernel.project_dir%/src"] output_dir: "%kernel.project_dir%/translations" diff --git a/public/theme/skeleton/partials/_recordfooter.twig b/public/theme/skeleton/partials/_recordfooter.twig index 613668e19..99e2614ef 100644 --- a/public/theme/skeleton/partials/_recordfooter.twig +++ b/public/theme/skeleton/partials/_recordfooter.twig @@ -4,7 +4,7 @@ {{ __('general.phrase.edit') }} - {% endif %} {{ __('general.phrase.written-by-on', { - '%name%': record.author.displayname|default(__('Unknown')), + '%name%': record.author.displayName|default(__('Unknown')), '%date%': record.publishedAt|localedatetime("%A %B %e, %Y") }) }}

diff --git a/src/Form/UserType.php b/src/Form/UserType.php index 4bb94a635..5301ae44d 100644 --- a/src/Form/UserType.php +++ b/src/Form/UserType.php @@ -34,7 +34,7 @@ public function buildForm(FormBuilderInterface $builder, array $options): void 'disabled' => true, ]) ->add('displayName', TextType::class, [ - 'label' => 'label.displayname', + 'label' => 'label.display_name', ]) ->add('email', EmailType::class, [ 'label' => 'label.email', diff --git a/templates/users/edit.html.twig b/templates/users/edit.html.twig index 512cbc622..30d6cc669 100644 --- a/templates/users/edit.html.twig +++ b/templates/users/edit.html.twig @@ -21,7 +21,7 @@ } %} {% include '@bolt/_partials/fields/text.html.twig' with { - 'label' : 'label.displayname'|trans, + 'label' : 'label.display_name'|trans, 'name' : 'displayName', 'value' : user.displayName, 'disabled' : false, diff --git a/translations/messages.en.xlf b/translations/messages.en.xlf index 63fca8a50..b43ab5cd9 100644 --- a/translations/messages.en.xlf +++ b/translations/messages.en.xlf @@ -1047,5 +1047,11 @@ View (saved version) on site
+ + + label.display_name + Display Name + +
From 706f054749945a1ca8b1b33c57f8e9fa741ed6e9 Mon Sep 17 00:00:00 2001 From: Jarek Jakubowski Date: Sat, 13 Apr 2019 19:46:31 +0200 Subject: [PATCH 3/6] Revert PHP 7.2 and Fixtures menu removal --- .travis.yml | 5 +++-- composer.json | 6 +++--- src/Menu/BackendMenuBuilder.php | 8 ++++++++ 3 files changed, 14 insertions(+), 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index 820d1138b..4fd6d5994 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,7 +12,8 @@ cache: matrix: fast_finish: true include: - - php: 7.2 + - php: 7.1 + - php: 7.1 env: COMPOSER_FLAGS="--prefer-lowest" - php: 7.2 - php: 7.3 @@ -20,7 +21,7 @@ matrix: env: COMPOSER_FLAGS="--ignore-platform-reqs" allow_failures: - php: nightly - - php: 7.2 + - php: 7.1 env: COMPOSER_FLAGS="--prefer-lowest" before_install: diff --git a/composer.json b/composer.json index fcb0ef9aa..7793fad9b 100644 --- a/composer.json +++ b/composer.json @@ -4,7 +4,7 @@ "type": "library", "description": "Bolt 4 skeleton / prototype", "require": { - "php": ">=7.2", + "php": ">=7.1.3", "ext-json": "*", "ext-mbstring": "*", "ext-pdo": "*", @@ -77,7 +77,7 @@ "phpstan/phpstan": "^0.11", "phpstan/phpstan-doctrine": "^0.11", "phpstan/phpstan-symfony": "^0.11", - "phpunit/phpunit": "^8.0", + "phpunit/phpunit": "^7.0", "roave/security-advisories": "dev-master@dev", "symfony/browser-kit": "^4.2", "symfony/css-selector": "^4.2", @@ -93,7 +93,7 @@ "prefer-stable": true, "config": { "platform": { - "php": "7.2" + "php": "7.1.3" }, "preferred-install": { "*": "dist" diff --git a/src/Menu/BackendMenuBuilder.php b/src/Menu/BackendMenuBuilder.php index 21e76a4f1..7995baf57 100644 --- a/src/Menu/BackendMenuBuilder.php +++ b/src/Menu/BackendMenuBuilder.php @@ -199,6 +199,14 @@ private function createAdminMenu(): ItemInterface ], ]); + $menu->getChild('Maintenance')->addChild('Fixtures', [ + 'uri' => '', + 'extras' => [ + 'name' => $t->trans('caption.fixtures_dummy_content'), + 'icon' => 'fa-hat-wizard', + ], + ]); + $menu->getChild('Maintenance')->addChild('Clear the cache', [ 'uri' => $this->urlGenerator->generate('bolt_clear_cache'), 'extras' => [ From 67256f6a88b3a6a95b76aaa4bf1f50750f9da37f Mon Sep 17 00:00:00 2001 From: Jarek Jakubowski Date: Sat, 13 Apr 2019 19:49:32 +0200 Subject: [PATCH 4/6] Update Translations readme --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 684c4f00d..0006e6021 100644 --- a/README.md +++ b/README.md @@ -167,8 +167,8 @@ translations, and keep them up to date. If you wish to participate, read the [instructions here][translations]. Are are several translation-related commands: -- `bin/console translation:download` - download translations from Loco (replaces all local ones) -- `bin/console translation:sync bolt down` - download translations from Loco (replaces local changes if there is a conflict) +- `bin/console translation:download` - downloads translations from Loco (replaces all local ones) +- `bin/console translation:sync bolt down` - downloads translations from Loco (replaces local changes if there is a conflict) - `bin/console translation:sync bolt up` - sends updated translations to Loco From 2feb2e5e06c7ee4f66ee49e72f8747a4439b89c1 Mon Sep 17 00:00:00 2001 From: Bob den Otter Date: Sun, 14 Apr 2019 08:52:08 +0200 Subject: [PATCH 5/6] ninja-fix some text formatting --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 0006e6021..8cdcd5a35 100644 --- a/README.md +++ b/README.md @@ -166,10 +166,10 @@ These are the translations used in Bolt. We rely on the community to expand on n translations, and keep them up to date. If you wish to participate, read the [instructions here][translations]. -Are are several translation-related commands: -- `bin/console translation:download` - downloads translations from Loco (replaces all local ones) -- `bin/console translation:sync bolt down` - downloads translations from Loco (replaces local changes if there is a conflict) -- `bin/console translation:sync bolt up` - sends updated translations to Loco +Several translation-related Console commands are available: +- `bin/console translation:download` - Download translations from Loco (replaces all local ones) +- `bin/console translation:sync bolt down` - Download translations from Loco (replaces local changes if there is a conflict) +- `bin/console translation:sync bolt up` - Sends updated translations to Loco [fowler]: https://martinfowler.com/articles/practical-test-pyramid.html From 0f86f9695a9d4d3c6eca71e554b61a6692fde653 Mon Sep 17 00:00:00 2001 From: Jarek Jakubowski Date: Sun, 14 Apr 2019 10:33:50 +0200 Subject: [PATCH 6/6] ninja-fixing the ninja-fix --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 8cdcd5a35..da3c526c0 100644 --- a/README.md +++ b/README.md @@ -169,7 +169,7 @@ translations, and keep them up to date. If you wish to participate, read the Several translation-related Console commands are available: - `bin/console translation:download` - Download translations from Loco (replaces all local ones) - `bin/console translation:sync bolt down` - Download translations from Loco (replaces local changes if there is a conflict) -- `bin/console translation:sync bolt up` - Sends updated translations to Loco +- `bin/console translation:sync bolt up` - Send updated translations to Loco [fowler]: https://martinfowler.com/articles/practical-test-pyramid.html