potsky/laravel-localization-helpers

[REQUEST] Show obselete strings when in array

marvinschroeder opened this issue · 1 comments

Would be great to show obselete strings when they are nested in an array.

We have something like

return array (
'buttons' => [
'save' => 'Save',
'change' => 'Change',
]
);

So if the key app.buttons.change is obsolete, your package recognizes this, prints it in the command line interface (1 obsolete strings (can be deleted manually in the generated file)) and when the file is created, nothing shows up after the obsolete strings section (comment).

If it isn't possible or easy to specially mark the obsolete strings directly in the array, it would be great to output the specific keys in the obsolete strings section. In that case we could search the found keys ourselves in the arrays and remove them.

It is a old problem that should be fixed.

If the obsolete key is a root key (like your buttons key for example), the key will be set in the obsolete array at the beginning of the file.

If the obsolete key is a child key, it will not be included because I cannot redefine the parent key of course which should now contain valid and obsolete keys...

A workaround could be setting an LLH_obsolete array for example which should be able to include all child and root obsolete keys.

Will be done in version 2.x.2 !