Re: Separating in-source translations from */messages into own */srcmessages (or similar)
- Date: Mon, 20 Jun 2016 00:50:12 +0200
- From: Luigi Toscano <luigi.toscano@xxxxxxxxxx>
- Subject: Re: Separating in-source translations from */messages into own */srcmessages (or similar)
Albert Astals Cid ha scritto:
> El divendres, 17 de juny de 2016, a les 12:30:00 CEST, Luigi Toscano va
>> On Friday 17 of June 2016 12:10:41 Friedrich W. H. Kossebau wrote:
>>> PROBLEM: garbage po and mo files in packages
>>> currently many of the scripts used for creating release tarballs of KDE
>>> software accidentally also add those po files to the tarballs whose
>>> translations are already fed back directly into the sources by scripty
>>> (with data files like appdata, desktop, json, or mimetype.xml). So
>>> strings which will never be loaded from an external mo or qm catalog.
>>> Those po files then also end up in the binary packages as mo files given
>>> the generic handling of po files during builds. Do this to see how much
>>> of those unneeded mo files you might have yourself on your system:
>>> du -ch `find /usr/share/locale \
>>> -name "*appdata.mo" -o \
>>> -name "*mimetypes.mo" -o \
>>> -name "desktop_*.mo" -o \
>>> -name "json_*.mo"`
>>> which for me reports in total 43M.
>>> find ... | wc -l
>>> is 186 here.
>>> Problem is that many people are not aware of all the different data file
>>> types which scripty cares for, and i18n in general is more seen as "magic
>>> which just works (mostly)" (well, shows the great work of the KDE i18n
>>> :) ). And the number of such file types is rising now and then, just all
>>> the different release scripts ("official" and home-grown) are not keeping
>> If someone writes a new release script, then the issues and requirements
>> should be known.
>> I still fail to see why we need tons of release scripts. Let's fix the 3
>> more used (sysadmin/release-tools.git for Frameworks and Applications,
>> releaseme for Plasma and others, and create_tarball_kf5) and make sure that
>> people are using them instead of reinventing the wheel.
> How do you fix them though, i just had a look at what we do in the
> Applications script and we just delete all files named desktop_*
> Which i guess up to now is good enough but i would sayi it's impossible for
> Plasma to ever come up with a name for a catalog named "desktop_controller" or
> If we increase those catch all we'll eventually end up hitting one that
> matches and have a hard time figuring out why it broke.
> Maybe one of the ways to fix this is "fordidding" non autogenerated names to
> have an underscore?
In another (now stuck) thread ("Renaming desktop_<module>_<program>.po file"),
where we were discussing about the renaming json_foo.po and desktop_foo.po to
foo.json.po and foo.desktop.po, a similar issue was raised.
A possible solution would be to use a specific suffix which we could quite
sure is not going to be taken by any other user. I don't know, something like
.__desktop.po and __json.po ? Then we could use that pattern to catch all of
those special gettext file.