dejwcake / admin-translations
Translation manager for brackets/admin-ui
Requires
- php: ^8.2
- dejwcake/admin-listing: ^1.0
- dejwcake/admin-ui: ^1.0
- dejwcake/craftable-translatable: ^1.0
- illuminate/console: ^12.0
- illuminate/container: ^12.0
- illuminate/contracts: ^12.0
- illuminate/database: ^12.0
- illuminate/support: ^12.0
- maatwebsite/excel: ^3.1
- psr/http-message: ^2.0
Requires (Dev)
- doctrine/dbal: ^4.2.2
- larastan/larastan: ^3.1
- mockery/mockery: ^1.6
- orchestra/testbench: ^10.0
- phpunit/phpunit: ^11.5.9
This package is auto-updated.
Last update: 2025-02-24 20:47:38 UTC
README
Admin Translations is a translation manager package. It scans your codebase and stores all the translations in the database. Once stored it provides nice UI to manage stored translations. It defines a custom translation loader overriding default Laravel's one, so the translations are automatically loaded from the database.
This packages is part of Craftable (brackets/craftable
) - an administration starter kit for Laravel 5. You should definitely have a look :)
You can find full documentation at https://docs.getcraftable.com/#/admin-translations
Composer
To develop this package, you need to have composer installed. To run composer command use:
docker compose run -it --rm test composer update
For composer normalization:
docker compose run -it --rm php-qa composer normalize
Run tests
To run tests use this docker environment.
docker compose run -it --rm test vendor/bin/phpunit -d pcov.enabled=1
To switch between postgresql and mariadb change in docker-compose.yml
DB_CONNECTION environmental variable:
- DB_CONNECTION: pgsql
+ DB_CONNECTION: mysql
Run code analysis tools
To be sure, that your code is clean, you can run code analysis tools. To do this, run:
For php compatibility:
docker compose run -it --rm php-qa phpcs --standard=.phpcs.compatibility.xml --cache=.phpcs.cache
For code style:
docker compose run -it --rm php-qa phpcs -s --colors --extensions=php
or to fix issues:
docker compose run -it --rm php-qa phpcbf -s --colors --extensions=php
For static analysis:
docker compose run -it --rm php-qa phpstan analyse --configuration=phpstan.neon
For mess detector:
docker compose run -it --rm php-qa phpmd ./src,./config,./database,./install-stubs,./lang,./resources,./routes,./tests ansi phpmd.xml --suffixes php --baseline-file phpmd.baseline.xml
Issues
Where do I report issues? If something is not working as expected, please open an issue in the main repository https://github.com/BRACKETS-by-TRIAD/craftable.