This is a multi-part message in MIME format. --nextPart12661770.lokP6HDUje Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Am Sonntag, 22. Dezember 2013, 15:32:46 schrieb Albert Astals Cid: > El Diumenge, 22 de desembre de 2013, a les 15:26:35, Burkhard L=C3=BC= ck va > escriure: > > Hi, > >=20 > > Commit log for kde.xml Revision 644191 says: > > > > Remove old-style .desktop files, and turn them into a kde.xml file > > [snip] > > During make install, update-mime-database is run to process kde.xml= > > > >=20 > > But apparently this does not work properly, > >=20 > > Looking at the shared-mime-info-1.2 tarball I found a file HACKING = which > > says: > > Releasing > > --------- > > - Run "make update-translations" and "make check-translations" befo= re > > release > >=20 > > This apparently generates the file freedesktop.org.xml and add all > > translations from the po folders for a mime type definition e.g.: > > > >=20 > > > > =20 > > ATK inset > > =D8=B4=D9=83=D9=84 ATK > >=20 > > [snip] > >=20 > > ATK > > Andrew Toolkit > > > > > > =20 > > > >=20 > > The last step is apparently missing in kde or am I completely wrong= here? >=20 > Yes it has never worked. >=20 Attached a python script to fill a file like kde.xml with the our trans= lations Tested with kde.xml in kdelibs and geo.xml in marble, where message=20= extraction works. At the top of the script is comment with a list of all mimetype xml fil= es known=20 to me and their extraction status. The script needs a python module to get the msgstr for a given msgid fr= om a po=20 file. So far I have used my own python module checkutils4, but the scri= pt could=20 use any other module (pology? or a python library from distribution) ab= le to=20 return a msgstr from a po file. To include the script into scripty's workflow and make it fully functio= nal, it=20 needs some tweaking (works for now only for kde main modules, not for=20= extragear + playground, does not overwrite the original xml file etc), = but that=20 should not be difficult. Using this script should make our translations usable at least with pac= kages=20 installed from distribution, does anyone know how this works for self c= ompiled=20 apps/modules? =20 --=20 Burkhard L=C3=BCck --nextPart12661770.lokP6HDUje Content-Disposition: attachment; filename="checkkdexml-dict.py" Content-Transfer-Encoding: 7Bit Content-Type: text/x-python; charset="utf-8"; name="checkkdexml-dict.py" #!/usr/bin/env python # -*- coding: utf-8 -*- import sys, os, re, glob from checkutils4 import * """ kdelibs/mimetypes/kde.xml + XmlMessages.sh -> xml_mimetypes.po kdeedu/marble/data/mimetypes/geo.xml + XmlMessages.sh -> marble_xml_mimetypes.po frameworks/kcoreaddons/src/mimetypes/kde5.xml + XmlMessages.sh -> marble_xml_mimetypes.po kdegames/kpat/mimetypes/kpatience.xml - no XmlMessages.sh kdegames/palapeli/mime/palapeli-mimetypes.xml - no XmlMessages.sh kdesdk/okteta/mimetypes/okteta.xml - no XmlMessages.sh playground/graphics-git/cirkuit/src/mimetypes/cirkuit.xml - no XmlMessages.sh playground/multimedia-git/kdenlive/src/mimetypes/kdenlive.xml - no XmlMessages.sh playground/multimedia-git/kdenlive/src/mimetypes/westley.xml - no XmlMessages.sh playground/utils/khtml_userscript/mimetype_userscript.xml - no XmlMessages.sh extragear/base-git/bluedevil/src/bluedevil-mime.xml - no XmlMessages.sh -> https://bugs.kde.org/show_bug.cgi?id=329105 """ if len(sys.argv) != 4: print '\nUsage: cd module + python %s path/to/xmlfile path/to/l10ndir/ pofilename' %os.path.basename(sys.argv[0]) else: xmlfilepath, xmlfilename, l10ndirpath, pofilename = sys.argv[1], sys.argv[1].split("/")[-1], sys.argv[2], sys.argv[3] l10nmodulename=os.getcwd().split('/')[-1] begincommenttag="" endcommenttag="" begincommentlangtag='