Re: Txt string cleanup
Reply #2 –
Doh! ... Great idea, one I wish I had when I did the script ! ... I'll get that updated with maybe links to the source lines to help.
Re: Txt string cleanup
Reply #3 –
If you are wanting the strings in the language files for 'Key found in $txt but not found in sources' deleted, then I can take those.
Re: Txt string cleanup
Reply #4 –
Having made a script to do this in the past, most of those "missing" strings are just ones that are _any, _all or something along those lines. In other words, dynamically created keys.
Re: Txt string cleanup
Reply #6 –
I opened a group of issues, one for each file, for the ones that are "Key found in $txt but not found in sources" So those mean the program found a $txt['some_string'] but could not find that used in the sources. As discussed above some of those are going to be false hits, especially ones that start like
bla_edit
bla_show
bla_save
Those are generally concatenated in the sources, so when you see those in the issue report you can almost just skip them. Other are simply not used, or were used a long time ago, others should have been used but were not.
I fixed up the paid subscriptions one, most of those were not used and one should have been used, one of our tables was missing a column header. Anyway if you want to help out, post a comment in the issue when you are working on that file so everyone else knows. What I did then is search for the key name, or part of the key name (trailing, leading, etc) in an attempt to find it usage. When convinced it was not use delete!
For the Keys used but not found in $txt and Duplicates (by key name) I made a PR to fix those, it was quicker than running the script again to get the line numbers and links.
There was only key not found but used that needed to be fixed. For the duplicates I just focused on ones listed in index and another file, as index is generally always loaded, if the strings were identical in the text, then I left what was in index and removed it from the "other" file.