After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 452315 - i18n.TranslationDb implementation that handles comps.xml
i18n.TranslationDb implementation that handles comps.xml
Status: RESOLVED WONTFIX
Product: dogtail
Classification: Deprecated
Component: Framework
0.6.1
Other All
: Normal enhancement
: ---
Assigned To: Dogtail Maintainers
Dogtail Maintainers
gnome[unmaintained]
Depends on:
Blocks:
 
 
Reported: 2007-06-29 17:11 UTC by Alexander Todorov
Modified: 2011-02-07 06:09 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Alexander Todorov 2007-06-29 17:11:51 UTC
The comps.xml file is used to populate Categories/Groups in package management  frontends. Examples are yum and 'pirut' (GUI).
Below is a class that implements TranslationDb for use with Dogtail. It has dependancy on yum.
--------------------------------------------------------------------------------
from yum.comps import Comps

class CompsXMLTranslationDb(TranslationDb):
    def __init__(self, compsFile, language):
        _comps = Comps()
        _comps.add(compsFile)
        self._strings = {}
        # load all strings into a dictionary structure
        for g in _comps._groups.values():
            if g.translated_name.has_key(language):
                self._strings[g.name] = g.translated_name[language]
                
        for c in _comps._categories.values():
            if c.translated_name.has_key(language):
                self._strings[c.name] = c.translated_name[language]

        del _comps

    def getTranslationsOf(self, srcName):
        result = []
        if self._strings.has_key(srcName):
            result.append(self._strings[srcName])
        return result
--------------------------------------------------------------------------------
Comment 1 Fabio Durán Verdugo 2011-02-07 06:09:07 UTC
dogtail development has been stalled and it has been unmaintained for a few
years now.
Maintainers don't have future development plan so i am closing bugs as WONTFIX.
Please feel free to reopen the bugs in future if anyone takes the responsibility for active development.