diff cagou/core/menu.py @ 312:772c170b47a9

Python3 port: /!\ Cagou now runs with Python 3.6+ Port has been done in the same way as for backend (check backend commit b2d067339de3 message for details).
author Goffi <goffi@goffi.org>
date Tue, 13 Aug 2019 19:14:22 +0200
parents f55b60659ec1
children e2b51663d8b8
line wrap: on
line diff
--- a/cagou/core/menu.py	Mon Aug 05 11:21:54 2019 +0200
+++ b/cagou/core/menu.py	Tue Aug 13 19:14:22 2019 +0200
@@ -39,8 +39,8 @@
 
 log = logging.getLogger(__name__)
 
-ABOUT_TITLE = _(u"About {}".format(C.APP_NAME))
-ABOUT_CONTENT = _(u"""[b]Cagou (Salut à Toi)[/b]
+ABOUT_TITLE = _("About {}".format(C.APP_NAME))
+ABOUT_CONTENT = _("""[b]Cagou (Salut à Toi)[/b]
 
 [u]cagou version[/u]:
 {version}
@@ -99,7 +99,7 @@
                 try:
                     profile = list(G.host.profiles)[0]
                 except IndexError:
-                    log.warning(u"Can't find profile")
+                    log.warning("Can't find profile")
         self.item.call(selected, profile)
 
 
@@ -162,7 +162,7 @@
                 wid = MenuItem(item=child)
                 caller.add_widget(wid)
             else:
-                log.error(u"Unknown child type: {}".format(child))
+                log.error("Unknown child type: {}".format(child))
 
     def createMenus(self, caller):
         self.clear_widgets()
@@ -273,7 +273,7 @@
         G.host.closeUI()
 
     def do_callback(self, *args, **kwargs):
-        log.warning(u"callback not implemented")
+        log.warning("callback not implemented")
 
 
 class TransferMenu(SideMenu):
@@ -281,11 +281,11 @@
     # callback will be called with path to file to transfer
     # profiles if set will be sent to transfer widget, may be used to get specific files
     profiles = properties.ObjectProperty()
-    transfer_txt = _(u"Beware! The file will be sent to your server and stay unencrypted "
-                     u"there\nServer admin(s) can see the file, and they choose how, "
-                     u"when and if it will be deleted")
-    send_txt = _(u"The file will be sent unencrypted directly to your contact "
-                 u"(without transiting by the server), except in some cases")
+    transfer_txt = _("Beware! The file will be sent to your server and stay unencrypted "
+                     "there\nServer admin(s) can see the file, and they choose how, "
+                     "when and if it will be deleted")
+    send_txt = _("The file will be sent unencrypted directly to your contact "
+                 "(without transiting by the server), except in some cases")
     items_layout = properties.ObjectProperty()
     size_hint_close = (1, 0)
     size_hint_open = (1, 0.5)
@@ -303,7 +303,7 @@
     def do_callback(self, plug_info):
         self.parent.remove_widget(self)
         if self.callback is None:
-            log.warning(u"TransferMenu callback is not set")
+            log.warning("TransferMenu callback is not set")
         else:
             wid = None
             external = plug_info.get('external', False)
@@ -327,7 +327,7 @@
     """allow to select entities from roster"""
     profiles = properties.ObjectProperty()
     layout = properties.ObjectProperty()
-    instructions = properties.StringProperty(_(u"Please select entities"))
+    instructions = properties.StringProperty(_("Please select entities"))
     filter_input = properties.ObjectProperty()
     size_hint_close = (None, 1)
     size_hint_open = (None, 1)