Closed ibrunotome closed 2 years ago
Thats correct. You can't delete a key either atm. Is this needed?
Edit option will be cool, I just fixed this key of screenshot (remove the @) direct in the database right now.
It's just a suggestion, you can close the issue if you think it's not useful 😅
I think it would be usefull, but there is the problem with existing keys from the files.
The packages uses the spatie/laravel-translation-loader
packages, where all changes and newly created stuff is stored in the database.
So if you create a custom key like my-cool-new
over the ui, it wouldn't be a problem to make it editable, since there is no corresponding key in any translation file. But if you would rename, let's say the failed
key in the auth
group, then you would have a problem / unexpected behavior. The translation would be stored into the database with the new key (for examplefaild-new
), but there would be still the auth
key in the resources/lang/en/auth.php
(and other languages as well). So renaming would basically double the row in the ui, since now you would have failed
AND failed-new
as keys. And if you again rename failed
again, then you would have another row (so 3 rows in total), etc.
Understood, here I try to keep original translations out of the database, I take them from repos like this https://github.com/Laravel-Lang/lang for example. And use the database only for custom texts. But in your example, things will start to have a lot of unexpected behavior 😢
I will think about. Maybe I find a solution to make keys from "database only" rows editable plus deleteable. Will take me some days.
Sorry, don't use nova anymore, since I switched to filamentadmin. So this feature will not be implemented :(
The keys seems to be not editable