Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Keys inside attributes array removed when update #126

Closed
mohamedsabil83 opened this issue Jun 14, 2021 · 10 comments
Closed

Keys inside attributes array removed when update #126

mohamedsabil83 opened this issue Jun 14, 2021 · 10 comments
Labels
bug Something isn't working

Comments

@mohamedsabil83
Copy link
Member

  • Lang Publisher Version: 10.0.4
  • Laravel Version: 8.45.1
  • PHP Version: 8.0.7

Description:

When run php artisan lang:update all keys within attributes array removed for all locales but en.

Steps To Reproduce:

  • install any locale.
  • add translation keys within attributes array.
  • run 'php artisan lang:update'.
@andrey-helldar
Copy link
Member

At the moment there are some problems with version 10. I will fix them shortly.

#123

@andrey-helldar
Copy link
Member

@mohamedsabil83, i released version 10.1. Can you update and check?

@mohamedsabil83
Copy link
Member Author

Sure, I'll check it and notify you

@andrey-helldar
Copy link
Member

Thank you!

I found a few more bugs and are now fixing them.

@andrey-helldar
Copy link
Member

Fixed all found errors. You can check.

@audunru
Copy link

audunru commented Sep 25, 2021

Just installed 10.1.4 and I don't have this problem anymore @andrey-helldar . keys/values inside the attribues array in my non-english language files are still there.

edit: typos

@mohamedsabil83
Copy link
Member Author

I'll try v10.1.4 today. Yesterday, I tried v10.1.3 and the Arabic files return empty array.

@andrey-helldar
Copy link
Member

Just installed 10.1.4 and I don't have this problem anymore @andrey-helldar . keys/values inside the attribues array in my non-english language files are still there.

edit: typos

You can invoke the reset command:

php artisan lang:reset --full

It will remove all unnecessary keys.

@andrey-helldar
Copy link
Member

@mohamedsabil83, I know what is the reason :)

The publisher takes the list of keys from the original. Since your application does not have keys, it will not add them.

And I know how to solve this problem :)

@andrey-helldar
Copy link
Member

@mohamedsabil83, I have submitted a solution to this problem to the main repository: Laravel-Lang/lang#1861

@andrey-helldar andrey-helldar added the bug Something isn't working label Jan 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Development

No branches or pull requests

3 participants