Skip to content
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
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,11 @@ 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].

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` - Send updated translations to Loco


[fowler]: https://martinfowler.com/articles/practical-test-pyramid.html
[translations]: https://github.com/bolt/four/wiki/Contribute-on-translations
Expand Down
23 changes: 9 additions & 14 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -60,24 +59,24 @@
"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",
"phpstan/phpstan-doctrine": "^0.11",
"phpstan/phpstan-symfony": "^0.11",
"phpunit/phpunit": "^7.0",
"roave/security-advisories": "dev-master@dev",
"symfony/browser-kit": "^4.2",
Expand All @@ -88,11 +87,8 @@
"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": {
Expand Down Expand Up @@ -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": {
Expand Down
9 changes: 4 additions & 5 deletions config/bundles.php
Original file line number Diff line number Diff line change
Expand Up @@ -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],
Expand All @@ -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],
];
14 changes: 0 additions & 14 deletions config/packages/dev/httplug.yaml

This file was deleted.

5 changes: 0 additions & 5 deletions config/packages/dev/php_translation.yaml

This file was deleted.

18 changes: 4 additions & 14 deletions config/packages/dev/translation.yaml
Original file line number Diff line number Diff line change
@@ -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"
bolt:
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']
5 changes: 0 additions & 5 deletions config/packages/doctrine_migrations.yaml

This file was deleted.

6 changes: 3 additions & 3 deletions config/packages/translation.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
bolt:
dirs: ["%kernel.project_dir%/templates", "%kernel.project_dir%/src"]
output_dir: "%kernel.project_dir%/translations"

6 changes: 0 additions & 6 deletions config/routes/dev/php_translation.yaml

This file was deleted.

2 changes: 2 additions & 0 deletions config/routes/dev/translation.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
_translation_profiler:
resource: '@TranslationBundle/Resources/config/routing_symfony_profiler.yml'
28 changes: 0 additions & 28 deletions config/routes/php_translation.yaml

This file was deleted.

3 changes: 3 additions & 0 deletions config/routes/translation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
_translation_webui:
resource: "@TranslationBundle/Resources/config/routing_webui.yml"
prefix: '%bolt.backend_url%'
2 changes: 1 addition & 1 deletion public/theme/skeleton/partials/_recordfooter.twig
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<span class="edit-link"><a href="{{ record|edit_link }}"><strong>{{ __('general.phrase.edit') }}</strong></a></span> -
{% 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")
}) }}
</p>
Expand Down
2 changes: 1 addition & 1 deletion src/Form/UserType.php
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
2 changes: 1 addition & 1 deletion src/Menu/BackendMenuBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,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'),
Expand Down
Empty file removed src/Migrations/.gitignore
Empty file.
12 changes: 0 additions & 12 deletions symfony.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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"
},
Expand All @@ -134,9 +125,6 @@
"doctrine/lexer": {
"version": "v1.0.1"
},
"doctrine/migrations": {
"version": "v1.6.0"
},
"doctrine/orm": {
"version": "v2.5.12"
},
Expand Down
2 changes: 1 addition & 1 deletion templates/bundles/TwigBundle/Exception/error.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
{{ 'http_error.description'|trans({ '%status_code%': status_code }) }}
</p>
<p>
{{ 'http_error.suggestion'|trans({ '%url%': path('blog_index') })|raw }}
{{ 'http_error.suggestion'|trans({ '%url%': path('homepage') })|raw }}
</p>
{% endblock %}

Expand Down
2 changes: 1 addition & 1 deletion templates/bundles/TwigBundle/Exception/error404.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
{{ 'http_error_404.description'|trans }}
</p>
<p>
{{ 'http_error_404.suggestion'|trans({ '%url%': path('blog_index') })|raw }}
{{ 'http_error_404.suggestion'|trans({ '%url%': path('homepage') })|raw }}
</p>
{% endblock %}

Expand Down
2 changes: 1 addition & 1 deletion templates/bundles/TwigBundle/Exception/error500.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
{{ 'http_error_500.description'|trans }}
</p>
<p>
{{ 'http_error_500.suggestion'|trans({ '%url%': path('blog_index') })|raw }}
{{ 'http_error_500.suggestion'|trans({ '%url%': path('homepage') })|raw }}
</p>
{% endblock %}

Expand Down
2 changes: 1 addition & 1 deletion templates/users/edit.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Loading