Skip to content

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

@dietergeerts

Description

@dietergeerts
  • 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',
        ],
    ],

];

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions