add backup suite plugin.
[vuplus_dvbapp] / lib / python / Plugins / Extensions / BackupSuiteHDD / message.py
1 # -*- coding: utf-8 -*-
2 from os import environ as os_environ
3 import gettext
4 import sys
5
6 def localeInit():
7         gettext.bindtextdomain("BackupSuite","/usr/lib/enigma2/python/Plugins/Extensions/BackupSuiteHDD/locale")
8
9 localeInit()
10
11
12
13 def _(txt):
14         t = gettext.dgettext("BackupSuite", txt)
15         if t == txt:
16                 #print "[BackupSuite] fallback to default translation for", txt
17                 t = gettext.gettext(txt)
18         return t
19
20
21 def message01():
22         print _("No supported receiver found!")
23         return 
24         
25 def message02():
26         print _("BACK-UP TOOL, FOR MAKING A COMPLETE BACK-UP")
27         return
28                 
29 def message03():
30         print _("Please be patient, a backup will now be made, because of the used filesystem the back-up will take about 5-7 minutes for this system.")
31         return
32
33 def message05():
34         print _("not found, the backup process will be aborted!")
35         return
36         
37 def message06a():
38         print _("Create: root.ubifs")
39         return
40
41 def message07():
42         print _("Create: kerneldump")
43         return
44
45 def message08():
46         print _("Almost there... Now building the USB-Image!")
47         return
48
49 def message09():
50         sys.stdout.write(_("Additional backup -> "))
51         return
52
53 def message10():
54         sys.stdout.write(_("USB Image created in: "))
55         return
56
57 def message11():
58         sys.stdout.write(_("and there is made an extra copy in: "))
59         return
60
61 def message12():
62         print _("To restore the image:")
63         print _("Place the USB-flash drive in the (front) USB-port and switch the receiver off and on with the powerswitch on the back of the receiver.")
64         print _("Follow the instructions on the front-display.")
65         print _("Please wait.... almost ready!")
66         return
67
68 def message13():
69         print _("To restore the image:")
70         print _("Place the USB-flash drive in the (front) USB-port and switch the receiver off and on with the powerswitch on the back of the receiver.")
71         print _("Press arrow up from frontpanel to start loading.")
72         print _("Please wait.... almost ready!")
73         return 
74
75 def message14():
76         print _("Please check the manual of the receiver on how to restore the image.")
77         return
78
79 def message15():
80         print _("Image creation FAILED!")
81 #       print _("Probable causes could be:")
82 #       print _("-> no space left on back-up device")
83 #       print _("-> no writing permission on back-up device")
84         return 
85
86 def message16():
87         sys.stdout.write(_("available "))
88         return 
89
90 def message17():
91         print _("There is a valid USB-flashdrive detected in one of the USB-ports, therefore an extra copy of the back-up image will now be copied to that USB-flashdrive.")
92         print _("This only takes about 20 seconds.....")
93         return
94
95 def message19():
96         print _("Backup finished and copied to your USB-flashdrive.")
97         return
98
99 def message20():
100         sys.stdout.write(_("Full back-up to the harddisk"))
101         return
102
103 def message21():
104         print _("There is NO valid USB-stick found, so I've got nothing to do.")
105         print " "
106         print _("PLEASE READ THIS:")
107         print _("To back-up directly to the USB-stick, the USB-stick MUST contain a file with the name:")
108         print _("backupstick or")
109         print _("backupstick.txt")
110         print " "
111         print _("If you place an USB-stick containing this file then the back-up will be automatically made onto the USB-stick and can be used to restore the current image if necessary.")
112         print _("The program will exit now.")
113         return
114
115 def message22():
116         sys.stdout.write(_("Full back-up direct to USB"))
117         return
118
119 def message23():
120         print _("The content of the folder is:")
121         return
122         
123         
124 def message24():
125         sys.stdout.write(_("Time required for this process: "))
126         return 
127         
128 def message25():
129         print _("minutes")
130         return 
131                 
132 globals()[sys.argv[2]]()
133 os_environ["LANGUAGE"] = sys.argv[1]
134
135
136
137