El divendres, 3 de juny de 2016, a les 1:18:32 CEST, Frederik Schwarzer va= =20 escriure: > Am 29.05.2016 23:10 schrieb Albert Astals Cid: > > El diumenge, 29 de maig de 2016, a les 21:19:06 CEST, Burkhard L=FCck va > >=20 > > escriure: > >> Am Sonntag, 29. Mai 2016, 20:44:25 CEST schrieb Frederik Schwarzer: > >> > Am 29.05.2016 19:56 schrieb Burkhard L=FCck: > >> > > In trunk kf5 we have 1221 gui catalogs, but only 37 german gui > >> > > catalogs > >> > > have a > >> > > header line starting with "This file is distributed", no clue why. > >> >=20 > >> > A few years ago, I wrote a little cleanup script that got rid of tho= se > >> > lines. > >>=20 > >> That obviously qualifies you to replace 'PACKAGE package' string with > >> 'current package' in all four branches and all languages as requested > >> by > >> Maximiliano Curia > >=20 > > Maybe it's better if we remove them all and make sure the .pot files > > don't > > have it either and/or just point people to the policy on the wiki=BF? >=20 > The first few lines of PO files are a bit tricky. Some developers and/or > translators put text in there to communicate things with (other) > translators or just add hand-crafted copyright strings. Also tools like > Ubuntu's Rosetta put custom strings there and we import those files if > an application moves to our infrastructure. So while PO files contain a > lot of useless stuff within the fist few lines, there's still stuff in > there that should be kept. And it's hard to just mess with that in a > scripted manner. >=20 > If we just remove the lines in question: > # Copyright (C) YEAR This_file_is_part_of_KDE > # This file is distributed under the same license as the PACKAGE > package. > they probably have to be removed regularily, if it is not possible to > tell gettext not to create them. So the daily scripty run would have to > check for that. ... ... Not sure if it is an important enough matter to > put that extra bit onto the scripty run though. >=20 > A one-liner like > perl -i -n -e 'print unless $. < 5 && (/This_file_is_part_of_KDE$/ >=20 > || /^# This file is distributed under the same license as the PACKAGE >=20 > package.$/)' filename.po > or > perl -i -p -e 'BEGIN{undef $/;} s/^# Copyright.*?#$/#/sm' > filename.po (This removes from "# Copyright" to the next line with just > '#' so do not do this blindly!) > would remove those lines but many other lines like > # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER > or > # translation of de.po to Deutsch > would still remain. >=20 > So, I guess it comes down to checking what gettext can do for us on file > creation/update and then cleanup the rest with a few one-liners. We control the creation of the file so if we need to replace something on t= he=20 =2Epot files, that's also possible. Cheers, Albert >=20 > Regards, > Frederik