knuckleswtf / scribe

Generate API documentation for humans from your Laravel codebase.✍
https://scribe.knuckles.wtf/laravel/
MIT License
1.59k stars 280 forks source link

Translation not found for scribe::headings.introduction ---- When running php artisan scribe:generate #756

Closed JustinDugas closed 8 months ago

JustinDugas commented 8 months ago

Scribe version

4.25.0

PHP version

8.1.4

Framework

Laravel

Framework version

10.28.0

Scribe config

type => "laravel"
auth.enabled => true
auth.default => true
postman.enabled => false
logo => "../img/logo-api-doc.jpg"

What happened?

i made sure i had no previously compiled views in the scribe folder i ran php artisan vendor:publish --tag=scribe-translations i ran php artisan config:clear i ran php artisan view:clear i ran php artisan scribe:generate i got the following error, it seems the generation script has a hard time recognizing the following translation key: scribe::headings.introduction even if it is in fact defined in the lang/scribe.php as i am using the default translation file

The index.blade.php file has also not been generated. my scribe folder is empty after this happens.

Screenshot 2023-11-01 at 12 55 16 PM

Docs

shalvah commented 8 months ago

This may be a case of the translations loader not loading your translation file. Do you have any other packages installed that might be hooking into the translation layer?

JustinDugas commented 8 months ago

@shalvah Very good call! Disabling/Tweaking my translation service providers has corrected this issue. Thank you