Code Monkey home page Code Monkey logo

laravellang's People

Contributors

arcanedev-maroc avatar tvbeek avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

laravellang's Issues

Error with vendor path equals false

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:

  • arcanedev/laravel-lang => 1.3.0
  • caouecs/laravel-lang => 3.0.11
  • Laravel Framework => 5.2.34

Any idea?

Publish the json file

It's not an issue, but, I suggest publishing the JSON file with the PHP translation files.

Error on package:discover

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?

Wrong command description?

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."

Upgrade to 1.3.1 break

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?

Get error when running the check command (not usable without the laravel-lang package?)

  • LaravelLang Version: 9.1.0
  • Laravel Version: 9.0.0
  • PHP Version: 8.1.0

Description:

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))

Steps To Reproduce:

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',
        ],
    ],

];

Class 'Arcanedev\LaravelLang\LaravelLangServiceProvider' not found Laravel 5.4.27

  • LaravelLang Version: 3.0
  • Laravel Version: 5.4.27
  • PHP Version: 7.0.15

Description:

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

Steps To Reproduce:

Doesn't work with Laravel 7

An update for Laravel 7 would be nice. No idea if it's just a composer.json update or that more is needed?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.