forked from openlp/openlp
Moved over to using UiStrings
This commit is contained in:
parent
7a2df5eab3
commit
6a3982bab9
@ -112,6 +112,7 @@ class UiStrings(object):
|
|||||||
self.NFSp = translate('OpenLP.Ui', 'No Files Selected', 'Plural')
|
self.NFSp = translate('OpenLP.Ui', 'No Files Selected', 'Plural')
|
||||||
self.NISs = translate('OpenLP.Ui', 'No Item Selected', 'Singular')
|
self.NISs = translate('OpenLP.Ui', 'No Item Selected', 'Singular')
|
||||||
self.NISp = translate('OpenLP.Ui', 'No Items Selected', 'Plural')
|
self.NISp = translate('OpenLP.Ui', 'No Items Selected', 'Plural')
|
||||||
|
self.NoResults = translate('OpenLP.Ui', 'No Search Results')
|
||||||
self.OLP = translate('OpenLP.Ui', 'OpenLP')
|
self.OLP = translate('OpenLP.Ui', 'OpenLP')
|
||||||
self.OLPV2 = "{name} {version}".format(name=self.OLP, version="2")
|
self.OLPV2 = "{name} {version}".format(name=self.OLP, version="2")
|
||||||
self.OLPV2x = "{name} {version}".format(name=self.OLP, version="2.4")
|
self.OLPV2x = "{name} {version}".format(name=self.OLP, version="2.4")
|
||||||
@ -139,6 +140,7 @@ class UiStrings(object):
|
|||||||
self.Settings = translate('OpenLP.Ui', 'Settings')
|
self.Settings = translate('OpenLP.Ui', 'Settings')
|
||||||
self.SaveService = translate('OpenLP.Ui', 'Save Service')
|
self.SaveService = translate('OpenLP.Ui', 'Save Service')
|
||||||
self.Service = translate('OpenLP.Ui', 'Service')
|
self.Service = translate('OpenLP.Ui', 'Service')
|
||||||
|
self.ShortResults = translate('OpenLP.Ui', 'Please type more text to use \'Search As You Type\'')
|
||||||
self.Split = translate('OpenLP.Ui', 'Optional &Split')
|
self.Split = translate('OpenLP.Ui', 'Optional &Split')
|
||||||
self.SplitToolTip = translate('OpenLP.Ui',
|
self.SplitToolTip = translate('OpenLP.Ui',
|
||||||
'Split a slide into two only if it does not fit on the screen as one slide.')
|
'Split a slide into two only if it does not fit on the screen as one slide.')
|
||||||
|
@ -26,10 +26,7 @@ import os
|
|||||||
|
|
||||||
from PyQt5 import QtCore, QtGui, QtWidgets
|
from PyQt5 import QtCore, QtGui, QtWidgets
|
||||||
|
|
||||||
from openlp.core.common import Registry, translate
|
from openlp.core.common import Registry, UiStrings
|
||||||
|
|
||||||
NO_RESULTS = translate('OpenLP.ListWidgetWithDnD', 'No Search Results')
|
|
||||||
SHORT_RESULTS = translate('OpenLP.ListWidgetWithDnD', 'Please type more text to use \'Search As You Type\'')
|
|
||||||
|
|
||||||
|
|
||||||
class ListWidgetWithDnD(QtWidgets.QListWidget):
|
class ListWidgetWithDnD(QtWidgets.QListWidget):
|
||||||
@ -42,7 +39,7 @@ class ListWidgetWithDnD(QtWidgets.QListWidget):
|
|||||||
"""
|
"""
|
||||||
super().__init__(parent)
|
super().__init__(parent)
|
||||||
self.mime_data_text = name
|
self.mime_data_text = name
|
||||||
self.no_results_text = NO_RESULTS
|
self.no_results_text = UiStrings().NoResults
|
||||||
|
|
||||||
def activateDnD(self):
|
def activateDnD(self):
|
||||||
"""
|
"""
|
||||||
@ -60,9 +57,9 @@ class ListWidgetWithDnD(QtWidgets.QListWidget):
|
|||||||
:return: None
|
:return: None
|
||||||
"""
|
"""
|
||||||
if search_while_typing:
|
if search_while_typing:
|
||||||
self.no_results_text = SHORT_RESULTS
|
self.no_results_text = UiStrings().ShortResults
|
||||||
else:
|
else:
|
||||||
self.no_results_text = NO_RESULTS
|
self.no_results_text = UiStrings().NoResults
|
||||||
super().clear()
|
super().clear()
|
||||||
|
|
||||||
def mouseMoveEvent(self, event):
|
def mouseMoveEvent(self, event):
|
||||||
|
Loading…
Reference in New Issue
Block a user