add GetText for showing config entries, update summary values when changed
[enigma2.git] / lib / python / Components / About.py
1 from Tools.Directories import *
2
3 class About:
4         def __init__(self):
5                 pass
6         
7         def getVersionString(self):
8                 try:
9                         file = open(resolveFilename(SCOPE_SYSETC, 'image-version'), 'r')
10                         lines = file.readlines()
11                         for x in lines:
12                                 splitted = x.split('=')
13                                 if splitted[0] == "version":
14                                         #     YYYY MM DD hh mm
15                                         #0120 2005 11 29 01 16
16                                         #0123 4567 89 01 23 45
17                                         version = splitted[1]
18                                         year = version[4:8]
19                                         month = version[8:10]
20                                         day = version[10:12]
21                                         
22                                         return '-'.join(["2.1", year, month, day])
23                         file.close()
24                 except IOError:
25                         pass
26
27                 return "unavailable"
28         
29 about = About()