Merge pull request #9464 from luzpaz/draft-guiselectplane

Draft: Add l10n context for ambiguous string
This commit is contained in:
Chris Hennes
2023-05-05 09:44:38 -05:00
committed by GitHub
2 changed files with 5 additions and 5 deletions

View File

@@ -518,9 +518,9 @@ class Draft_SelectPlane:
vdir = '('
vdir += str(_vdir.x)[:4] + ','
vdir += str(_vdir.y)[:4] + ','
vdir += str(_vdir.z)[:4]
vdir += ')'
vdir = " " + translate("draft", "Dir") + ": " + vdir
vdir += str(_vdir.z)[:4] + ')' + ' '
vdir += translate("draft", "Dir", "Dir here means Direction, not Directory. Also shorten the translation because of available space in GUI")
vdir = ': ' + vdir
if type(arg).__name__ == 'str':
self.wpButton.setText(arg + suffix)
if o != 0:

View File

@@ -43,7 +43,7 @@ except AttributeError:
_encoding = None
def translate(context, text):
def translate(context, text, comment=None):
r"""Translate the text using the Qt translate function.
It wraps around `QtGui.QApplication.translate`,
@@ -79,7 +79,7 @@ def translate(context, text):
>>> QtCore.QCoreApplication.translate(context, text, None)
>>> QtGui.QApplication.translate(context, text, None)
"""
return Qtranslate(context, text, None)
return Qtranslate(context, text, comment)
# Original code no longer used. It is listed here for reference