From: daid Date: Thu, 16 Oct 2014 09:24:53 +0000 (+0200) Subject: Add some more missing translations. X-Git-Tag: lulzbot-14.12~65 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=587e203d717042466d69c2897e04b5aa3218700a;p=cura.git Add some more missing translations. --- diff --git a/Cura/util/resources.py b/Cura/util/resources.py index 6bbbdac9..6c385763 100644 --- a/Cura/util/resources.py +++ b/Cura/util/resources.py @@ -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(): diff --git a/Cura/util/sliceEngine.py b/Cura/util/sliceEngine.py index 781919b2..ccfd56e4 100644 --- a/Cura/util/sliceEngine.py +++ b/Cura/util/sliceEngine.py @@ -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