Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:11.4
rpmlint
DesktopTranslationCheck.py
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File DesktopTranslationCheck.py of Package rpmlint
# vim:sw=4:et #--------------------------------------------------------------- # Module : rpmlint # File : DesktopTranslationCheck.py # Author : Dirk Mueller # Purpose : Check for untranslated desktop files #--------------------------------------------------------------- from Filter import * import AbstractCheck import rpm import re import commands import Config desktop_re=re.compile('(services|applets)/.*\.desktop$') class DesktopCheck(AbstractCheck.AbstractFilesCheck): def __init__(self): AbstractCheck.AbstractFilesCheck.__init__(self, "DesktopTranslationCheck", ".*\.desktop$") def check_file(self, pkg, filename): if pkg.isSource() or filename in pkg.ghostFiles(): return try: f = open(pkg.dirName() + '/' + filename) except Exception, e: printWarning(pkg, "read-error", e) return 0 found_desktop_group=False for line in f: if line.startswith('X-SuSE-translate='): return if line.startswith('[Desktop Entry]'): found_desktop_group=True if found_desktop_group: printWarning(pkg, "untranslated-desktop-file", filename) check=DesktopCheck() if Config.info: addDetails( 'untranslated-desktop-file', """Your desktop file hasn't been handled by %suse_update_desktop_file Please use it to make the desktop file translate-able by Novell translations.""" )
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor