mirror of
https://github.com/arsenetar/dupeguru.git
synced 2026-01-22 06:37:17 +00:00
Started moving towards a gettext-based localization.
This commit is contained in:
@@ -9,10 +9,12 @@
|
||||
from PyQt4.QtCore import Qt, QSize
|
||||
from PyQt4.QtGui import QVBoxLayout, QAbstractItemView, QHBoxLayout, QLabel, QSizePolicy, QPixmap
|
||||
|
||||
from hscommon.trans import tr
|
||||
from hscommon.trans import trget
|
||||
from ..base.details_dialog import DetailsDialog as DetailsDialogBase
|
||||
from ..base.details_table import DetailsTable
|
||||
|
||||
tr = trget('ui')
|
||||
|
||||
class DetailsDialog(DetailsDialogBase):
|
||||
def __init__(self, parent, app):
|
||||
DetailsDialogBase.__init__(self, parent, app)
|
||||
|
||||
@@ -7,14 +7,15 @@
|
||||
# http://www.hardcoded.net/licenses/bsd_license
|
||||
|
||||
import sys
|
||||
from PyQt4.QtGui import QLabel, QApplication
|
||||
from PyQt4.QtGui import QApplication
|
||||
|
||||
from hscommon.trans import tr
|
||||
from hscommon.trans import trget
|
||||
from core.scanner import ScanType
|
||||
|
||||
from ..base.preferences_dialog import PreferencesDialogBase
|
||||
from . import preferences
|
||||
|
||||
tr = trget('ui')
|
||||
|
||||
SCAN_TYPE_ORDER = [
|
||||
ScanType.FuzzyBlock,
|
||||
@@ -28,7 +29,10 @@ class PreferencesDialog(PreferencesDialogBase):
|
||||
self.scanTypeComboBox.currentIndexChanged[int].connect(self.scanTypeChanged)
|
||||
|
||||
def _setupPreferenceWidgets(self):
|
||||
scanTypeLabels = [tr(s) for s in ["Contents", "EXIF Timestamp"]]
|
||||
scanTypeLabels = [
|
||||
tr("Contents"),
|
||||
tr("EXIF Timestamp"),
|
||||
]
|
||||
self._setupScanTypeBox(scanTypeLabels)
|
||||
self._setupFilterHardnessBox()
|
||||
self.widgetsVLayout.addLayout(self.filterHardnessHLayout)
|
||||
@@ -42,7 +46,7 @@ class PreferencesDialog(PreferencesDialogBase):
|
||||
self.widgetsVLayout.addWidget(self.removeEmptyFoldersBox)
|
||||
self._setupAddCheckbox('ignoreHardlinkMatches', tr("Ignore duplicates hardlinking to the same file"))
|
||||
self.widgetsVLayout.addWidget(self.ignoreHardlinkMatches)
|
||||
self._setupAddCheckbox('debugModeBox', tr(tr("Debug mode (restart required)")))
|
||||
self._setupAddCheckbox('debugModeBox', tr("Debug mode (restart required)"))
|
||||
self.widgetsVLayout.addWidget(self.debugModeBox)
|
||||
self._setupBottomPart()
|
||||
|
||||
|
||||
@@ -9,9 +9,11 @@
|
||||
from PyQt4.QtCore import SIGNAL
|
||||
from PyQt4.QtGui import QMessageBox, QAction
|
||||
|
||||
from hscommon.trans import tr, trmsg
|
||||
from hscommon.trans import trget
|
||||
from ..base.result_window import ResultWindow as ResultWindowBase
|
||||
|
||||
tr = trget('ui')
|
||||
|
||||
class ResultWindow(ResultWindowBase):
|
||||
def _setupUi(self):
|
||||
ResultWindowBase._setupUi(self)
|
||||
@@ -21,8 +23,8 @@ class ResultWindow(ResultWindowBase):
|
||||
|
||||
def clearPictureCacheTriggered(self):
|
||||
title = tr("Clear Picture Cache")
|
||||
msg = trmsg("ClearPictureCacheConfirmMsg")
|
||||
msg = tr("ClearPictureCacheConfirmMsg")
|
||||
if self.app.confirm(title, msg, QMessageBox.No):
|
||||
self.app.scanner.clear_picture_cache()
|
||||
QMessageBox.information(self, title, trmsg("PictureCacheClearedMsg"))
|
||||
QMessageBox.information(self, title, tr("PictureCacheClearedMsg"))
|
||||
|
||||
Reference in New Issue
Block a user