Hi Matthias, the first and important one, i made some more stuff on that script (forgot to delete the unused polish strings) and have added also a check after deletion if strings could not be deleted. Now it takes a only little longer :-)=) but it might be also a little more user-friendly… Updated script can be found in here --> https://raw.githubusercontent.com/ummeegge/scripts/master/langsCleaner.sh .
Absolutely: Thanks! Woah!
Funny script comments - you don't need some manager or agent? ;-)
your welcome, fun makes live sometimes a little friendlier :-) and sure i need one, what agency can you manage ;D ...
In the meantime I've found that 'chpasswd.cgi', 'conf.cgi', 'status'cgi' and 'calls.cgi' (the latter three are from 'asterisk') work with "$tr{'". In these files I found strings like this one:
... if ($cgiparams{'SUBMIT'} eq $tr{'advproxy chgwebpwd change password'}) ...
No Lang::tr{' but $tr{'
Yes true there are some older versions in the CGIs but this should be no problem in that manner here for the script i think. As a beneath one i have fixed the chpasswd.cgi longer time ago --> http://git.ipfire.org/?p=people/ummeegge/ipfire-2.x.git;a=commit;h=3418f9c38... which has been also checked by a user in the forum --> http://forum.ipfire.org/viewtopic.php?t=14148 , but it seems to be forgotten…
I see. Perhaps we could just change entries with '/', to avoid problems in the future. I'll look at it during the next days.
Not sure about that, cause this appears to be problematic only for my fast humble script (and the deletion via sed cause "?" or "|" do not work) .
Thanks again, I'll take some test runs here and write back.
O.K. .
Funny, what just ONE obsolete string can start...
Indeed.
Greetings,
Erik
Am 05.02.2017 um 20:33 schrieb Matthias Fischer matthias.fischer@ipfire.org:
On 05.02.2017 19:10, ummeegge wrote:
Hi Matthias,
Hi,
... [Lots of stuff to find and delete the unused translation strings] ...
Absolutely: Thanks! Woah!
Funny script comments - you don't need some manager or agent? ;-)
... an update-lang-cache is included in the script. Have tested it a little in the WUI and haven´t found currently some problems without all that entries...
In the meantime I've found that 'chpasswd.cgi', 'conf.cgi', 'status'cgi' and 'calls.cgi' (the latter three are from 'asterisk') work with "$tr{'". In these files I found strings like this one:
... if ($cgiparams{'SUBMIT'} eq $tr{'advproxy chgwebpwd change password'}) ...
No Lang::tr{' but $tr{'
...
Me too but this one --> https://github.com/ummeegge/scripts/blob/master/langsCleaner.sh needed about 25 Minutes here to compare, sort them out and delete them for each language. Possibly you will get an "sed: -e expression #1, char 15: unterminated `s' command" for each language, this is because an entry which includes "/" , i think this one --> "'ls_free/swan' => 'VPN:'," is responsible for that, haven´t found in the fast a better way to solve that ;-).
I see. Perhaps we could just change entries with '/', to avoid problems in the future. I'll look at it during the next days.
If you want to go for a checkout, i might be better to backup you existing language files for a testing round.
No problem, a testmachine with Core 10X is always in reach.
Possibly the script is way to overdosed but may it helps.
If it works, its ok for this. ;-)
Thanks again, I'll take some test runs here and write back.
Funny, what just ONE obsolete string can start...
Best, Matthias
On 06.02.2017 16:26, ummeegge wrote:
Hi Matthias,
Hi Erik,
the first and important one, i made some more stuff on that script (forgot to delete the unused polish strings) and have added also a check after deletion if strings could not be deleted. Now it takes a only little longer :-)=) but it might be also a little more user-friendly…
Besides, you're acting in the future already: "$date: 03.05.2017"!? ;-))
Updated script can be found in here --> https://raw.githubusercontent.com/ummeegge/scripts/master/langsCleaner.sh .
Thanks! - downloaded. As soon as I "have my hands free", I'll test this. A week of work has started, and "she seems to be kind of bad-tempered"...
Some thoughts: I saw, your script uses "grep -FR" to build the string lists, so that the *.dat-files in '/srv/web/ipfire/cgi-bin/logs.cgi' are included in the search!?
What about the strings in '/var/ipfire/addon-lang/*.pl'?
Best, Matthias