Closed rbruhn closed 7 years ago
Hi @rbruhn,
I am sorry not to have been able to get back to you sooner. The behaviour you describe is anormal. What command do you execute ?
Could you send me your lang/en/buttons.php
file please ?
Just noticed the same behavior.
I have this in a model: trans('messages.status.new')
and the translation is generated in resources/lang/en/messages.php
but also in resources/lang/vendor/messages.php
.
Hi @cdarken,
this is normal because the extension thinks that the vendor
folder name is a lang
name. So it generates a messages.php
lang file...
Why do you have a vendor
lang folder ? Is it a laraval convention that I have missed ?
The resources/lang/vendor
folder is for overriding the translations belonging to the packages.
Docs: https://laravel.com/docs/5.3/localization#overriding-package-language-files
Oops :-)
So I really need to remove it from the folder scan !
Or maybe, if it's not very complicated, you could search for namespaces specific to the vendors (those separated by ::) and update the translations if there are new strings, what do you say? Only if the translations are copied from the package.
Good idea. This is supported in 4.2 so it is a global feature, nice.
How to you write the trans lemma for a package ?
I will exclude the vendor folder in the next version and will implement vendor translation in the v3. I need to rewrite the extension to do this.
When localization:missing command, there are files generated and placed in the lang/vendor directory. Many of these look like this:
Which refers to this:
And is clearly present in the lang/en/buttons.php file that is generated:
So, I'm wondering why this is telling me I have a TODO when it already exists?