arcanedev / laravellang Goto Github PK
View Code? Open in Web Editor NEW:globe_with_meridians: Translations manager and checker for Laravel based on 'caouecs/Laravel-lang' translations.
License: MIT License
:globe_with_meridians: Translations manager and checker for Laravel based on 'caouecs/Laravel-lang' translations.
License: MIT License
Is this package abandoned?
Hi,
I'm using this package and when run any artisan command in instalation, this error occurs:
The "" directory does not exist.
Stack trace:
[2016-08-18 13:06:57] local.ERROR: exception 'InvalidArgumentException' with message 'The "" directory does not exist.' in /.../vendor/symfony/finder/Finder.php:546
Stack trace:
#0 /.../vendor/laravel/framework/src/Illuminate/Filesystem/Filesystem.php(366): Symfony\Component\Finder\Finder->in(false)
#1 /.../vendor/arcanedev/laravel-lang/src/TransManager.php(104): Illuminate\Filesystem\Filesystem->directories(false)
#2 /.../vendor/arcanedev/laravel-lang/src/TransManager.php(89): Arcanedev\LaravelLang\TransManager->loadDirectories(false)
#3 /.../vendor/arcanedev/laravel-lang/src/TransManager.php(62): Arcanedev\LaravelLang\TransManager->load()
#4 /.../vendor/arcanedev/laravel-lang/src/LaravelLangServiceProvider.php(113): Arcanedev\LaravelLang\TransManager->__construct(Object(Illuminate\Filesystem\Filesystem), Array)
#5 /.../vendor/laravel/framework/src/Illuminate/Container/Container.php(735): Arcanedev\LaravelLang\LaravelLangServiceProvider->Arcanedev\LaravelLang\{closure}(Object(Illuminate\Foundation\Application), Array)
The $paths
inside vendor/arcanedev/laravel-lang/src/LaravelLangServiceProvider.php:108 return:
array(2) {
["app"]=>string(51) "/.../resources/lang"
["vendor"]=>bool(false)
}
vendor paths with false
value broke Arcanedev\LaravelLang\TransManager->loadDirectories
.
config/laravel-lang.php:
<?php
return [
/* ------------------------------------------------------------------------------------------------
| The vendor path.
| ------------------------------------------------------------------------------------------------
*/
/** @link https://github.com/caouecs/Laravel-lang */
'vendor' => base_path('vendor/caouecs/laravel-lang/src'),
/* ------------------------------------------------------------------------------------------------
| Supported locales
| ------------------------------------------------------------------------------------------------
| If you want to limit your translations, set your supported locales list.
*/
'locales' => ['pt-BR', 'en'],
/* ------------------------------------------------------------------------------------------------
| Check Settings
| ------------------------------------------------------------------------------------------------
*/
'check' => [
'ignore' => [
'validation.custom',
'validation.attributes',
],
],
];
PHP 5.6.10.
Packages:
Any idea?
It's not an issue, but, I suggest publishing the JSON file with the PHP translation files.
When I'm updating dependencies (including laravel-lang) I get an error that happens on ./artisan package:discover
command after update.
Generating optimized autoload files
> Illuminate\Foundation\ComposerScripts::postAutoloadDump
> @php artisan package:discover --ansi
TypeError
Argument 3 passed to Arcanedev\LaravelLang\FileLoader::__construct() must be of the type array, string given, called in /var/www/mysite/vendor/arcanedev/laravel-lang/src/Providers/TranslationServiceProvider.php on line 34
at vendor/arcanedev/laravel-lang/src/FileLoader.php:50
46| * @param string $path
47| * @param array $vendorPaths
48| * @param array $locales
49| */
> 50| public function __construct(Filesystem $files, string $path, array $vendorPaths, array $locales =
[])
51| {
52| parent::__construct($files, $path);
53|
54| $this->setVendorPaths($vendorPaths);
+34 vendor frames
35 artisan:37
Illuminate\Foundation\Console\Kernel::handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
Script @php artisan package:discover --ansi handling the post-autoload-dump event returned with error code 1
How I can fix that?
Hi,
you package ships with two new artisan commands: "trans:check" and "trans:publish", but when running "artisan" to see all registered commands, the description of both commands is the same ("Check the missing translations."). I think "trans:publish" should be something like: "Publish the translations."
Hi,
I'm trying to upgrade this package to 1.3.1, but occurs this error:
[Symfony\Component\Debug\Exception\FatalThrowableError] Call to undefined method Arcanedev\LaravelLang\Providers\CommandServiceProvider::registerCommand()
This occurs because arcanedev/support change the Arcanedev\Support\Providers\CommandServiceProvider removing registerCommand method.
Any solution?
I followed the instructions, and when I run the check command, I get the following error
Version 9.1.0 - Created by ARCANEDEV
Checking the missing translations...
Error
Call to a member function mergeTranslations() on null
151▕
152▕ $translations = is_null($appLocale)
➜ 153▕ ? $vendorLocale->mergeTranslations($appLocale, $ignored)
154▕ : $appLocale->mergeTranslations($vendorLocale, $ignored);
155▕
156▕ return array_filter($translations, function ($key) {
157▕ return ! Str::startsWith($key, ['validation-inline.']);
+15 vendor frames
16 artisan:35
Illuminate\Foundation\Console\Kernel::handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
I followed the instructions like stated, with the following config:
<?php
return [
/* -----------------------------------------------------------------
| The vendor path
| -----------------------------------------------------------------
*/
/** @link https://github.com/Laravel-Lang/lang */
'vendor' => [
// base_path('vendor/laravel-lang/lang/locales'),
],
/* -----------------------------------------------------------------
| Supported locales
| -----------------------------------------------------------------
| If you want to limit your translations, set your supported locales list.
*/
'locales' => [
'dev',
'en',
'sv',
],
/* -----------------------------------------------------------------
| Check Settings
| -----------------------------------------------------------------
*/
'check' => [
'ignore' => [
'validation.custom',
'validation.attributes',
],
],
];
I install this by using composer
composer require caouecs/laravel-lang:~3.0
then i copy the folder language from vendor/caouecs/laravel-lang/src/*
to resources/lang/
then i add this Arcanedev\LaravelLang\LaravelLangServiceProvider::class
to config/app
$providers
when i try to vendor publish i got this error
[Symfony\Component\Debug\Exception\FatalThrowableError]
Class 'Arcanedev\LaravelLang\LaravelLangServiceProvider' not found
i try composer dump-autoload
still the same
Will this package be upgraded to Laravel 10?
Not sure if just adding |^9.0 to composer.json is enough?
An update for Laravel 7 would be nice. No idea if it's just a composer.json update or that more is needed?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.