vormkracht10 / laravel-seo-scanner

Scan your Laravel application routes for SEO improvements suggestions.
MIT License
189 stars 17 forks source link

Translate CLI content #48

Open Baspa opened 12 months ago

Baspa commented 12 months ago

Only the failure reason is translated for each check, while the check name and other content is not translated. We could translate those as well. We might need help with the French translations.

Baspa commented 12 months ago

@ThibaultDuhem would you like to help me when I'm adding more translations to the translation files? Not all text is currently translated and I would like to add those to the translation files as well.

ThibaultDuhem commented 12 months ago

@Baspa Yes, of course. I'll be happy to assist you with the new translation keys in the french translation file. Just mention me when new keys are available in English, and I'll add them to the French translation file.

MuriloChianfa commented 1 month ago

Hello guys, im testing the package and i've noticed that's language not working for me:

image

I had tested tested using language => null and language => 'en', but not work. Im doing something wrong?

Baspa commented 1 month ago

My translations work on the latest version (nl and en),

Screenshot 2024-09-02 at 19 23 41 Screenshot 2024-09-02 at 19 24 15

However, titles of the checks are not translated yet (which would be a nice addition). @MuriloChianfa

MuriloChianfa commented 1 month ago

Im using the latest version too, but the translations not working :(

Environment Context: image image image

Baspa commented 1 month ago

Did you also set the locale in your .env file? @MuriloChianfa

MuriloChianfa commented 1 month ago

Testing again here, setting the config app.locale to "en" it works successfully, but my default app.locale is "en_US", that's why it didn't work.

So the config seo.language does not working? image

Baspa commented 1 month ago

Hmm I would expect that the language from the seo config would overrule the app config but maybe that's broken. Have to check that to make sure that isn't working. @MuriloChianfa

Baspa commented 1 month ago

Ah, forgot what the language was used for but I checked it and the language option in the config does only work for the TransitionWordRatioCheck. It checks on transition words on the page and to do so it needs to know the language of the website. @MuriloChianfa

So to change the locale of the output of the scan you should use the normal app config.