chiark / gitweb /
Add some more missing translations.
authordaid <daid303@gmail.com>
Thu, 16 Oct 2014 09:24:53 +0000 (11:24 +0200)
committerYouness Alaoui <kakaroto@kakaroto.homelinux.net>
Wed, 14 Jan 2015 17:05:45 +0000 (12:05 -0500)
Cura/util/resources.py
Cura/util/sliceEngine.py

index 6bbbdac92dbf636d75f81f596585b3da77460d3a..6c38576398db5a26d5685c99301e0e12b465632f 100644 (file)
@@ -59,6 +59,7 @@ def setupLocalization(selectedLanguage = None):
 
        locale_path = os.path.normpath(os.path.join(resourceBasePath, 'locale'))
        translation = gettext.translation('Cura', locale_path, languages, fallback=True)
+       #translation.ugettext = lambda message: u'#' + message
        translation.install(unicode=True)
 
 def getLanguageOptions():
index 781919b22376f7ff6fb98b570976e77409899492..ccfd56e471cbfcf24c9bd1aee5bcadb0310237af 100644 (file)
@@ -89,15 +89,15 @@ class EngineResult(object):
                if self._printTimeSeconds is None:
                        return ''
                if int(self._printTimeSeconds / 60 / 60) < 1:
-                       return '%d minutes' % (int(self._printTimeSeconds / 60) % 60)
+                       return _('%d minutes') % (int(self._printTimeSeconds / 60) % 60)
                if int(self._printTimeSeconds / 60 / 60) == 1:
-                       return '%d hour %d minutes' % (int(self._printTimeSeconds / 60 / 60), int(self._printTimeSeconds / 60) % 60)
-               return '%d hours %d minutes' % (int(self._printTimeSeconds / 60 / 60), int(self._printTimeSeconds / 60) % 60)
+                       return _('%d hour %d minutes') % (int(self._printTimeSeconds / 60 / 60), int(self._printTimeSeconds / 60) % 60)
+               return _('%d hours %d minutes') % (int(self._printTimeSeconds / 60 / 60), int(self._printTimeSeconds / 60) % 60)
 
        def getFilamentAmount(self, e=0):
                if self._filamentMM[e] == 0.0:
                        return None
-               return '%0.2f meter %0.0f gram' % (float(self._filamentMM[e]) / 1000.0, self.getFilamentWeight(e) * 1000.0)
+               return _('%0.2f meter %0.0f gram') % (float(self._filamentMM[e]) / 1000.0, self.getFilamentWeight(e) * 1000.0)
 
        def getLog(self):
                return self._engineLog