mirror of
https://github.com/arsenetar/dupeguru.git
synced 2025-03-10 05:34:36 +00:00
Update a few translation items
- Add Japanese as a selectable language - Wrap a few missed strings in tr() - Regenerate .pot files
This commit is contained in:
parent
e36aab177c
commit
fbdb333457
@ -881,3 +881,27 @@ msgid ""
|
|||||||
"Example: if you want to filter out .PNG files from the \"My Pictures\" directory only:<br><code>.*My\\sPictures\\\\.*\\.png</code><br><br>You can test the regular expression with the \"test string\" button after pasting a fake path in the test field:<br><code>C:\\\\User\\My Pictures\\test.png</code><br><br>\n"
|
"Example: if you want to filter out .PNG files from the \"My Pictures\" directory only:<br><code>.*My\\sPictures\\\\.*\\.png</code><br><br>You can test the regular expression with the \"test string\" button after pasting a fake path in the test field:<br><code>C:\\\\User\\My Pictures\\test.png</code><br><br>\n"
|
||||||
"Matching regular expressions will be highlighted.<br>If there is at least one highlight, the path or filename tested will be ignored during scans.<br><br>Directories and files starting with a period '.' are filtered out by default.<br><br>"
|
"Matching regular expressions will be highlighted.<br>If there is at least one highlight, the path or filename tested will be ignored during scans.<br><br>Directories and files starting with a period '.' are filtered out by default.<br><br>"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
#: qt\app.py:256
|
||||||
|
msgid "Results"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: qt\preferences_dialog.py:150
|
||||||
|
msgid "General Interface"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: qt\preferences_dialog.py:176
|
||||||
|
msgid "Result Table"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: qt\preferences_dialog.py:205
|
||||||
|
msgid "Details Window"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: qt\preferences_dialog.py:285
|
||||||
|
msgid "General"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: qt\preferences_dialog.py:286
|
||||||
|
msgid "Display"
|
||||||
|
msgstr ""
|
||||||
|
12
qt/app.py
12
qt/app.py
@ -75,7 +75,7 @@ class DupeGuru(QObject):
|
|||||||
"DirectoriesDialog", app=self
|
"DirectoriesDialog", app=self
|
||||||
)
|
)
|
||||||
self.main_window.addTab(
|
self.main_window.addTab(
|
||||||
self.directories_dialog, "Directories", switch=False
|
self.directories_dialog, tr("Directories"), switch=False
|
||||||
)
|
)
|
||||||
self.actionDirectoriesWindow.setEnabled(False)
|
self.actionDirectoriesWindow.setEnabled(False)
|
||||||
else: # floating windows only
|
else: # floating windows only
|
||||||
@ -252,7 +252,9 @@ class DupeGuru(QObject):
|
|||||||
if self.resultWindow is not None:
|
if self.resultWindow is not None:
|
||||||
if self.use_tabs:
|
if self.use_tabs:
|
||||||
if self.main_window.indexOfWidget(self.resultWindow) < 0:
|
if self.main_window.indexOfWidget(self.resultWindow) < 0:
|
||||||
self.main_window.addTab(self.resultWindow, "Results", switch=True)
|
self.main_window.addTab(
|
||||||
|
self.resultWindow, tr("Results"), switch=True
|
||||||
|
)
|
||||||
return
|
return
|
||||||
self.main_window.showTab(self.resultWindow)
|
self.main_window.showTab(self.resultWindow)
|
||||||
else:
|
else:
|
||||||
@ -300,13 +302,15 @@ class DupeGuru(QObject):
|
|||||||
|
|
||||||
def ignoreListTriggered(self):
|
def ignoreListTriggered(self):
|
||||||
if self.use_tabs:
|
if self.use_tabs:
|
||||||
self.showTriggeredTabbedDialog(self.ignoreListDialog, "Ignore List")
|
self.showTriggeredTabbedDialog(self.ignoreListDialog, tr("Ignore List"))
|
||||||
else: # floating windows
|
else: # floating windows
|
||||||
self.model.ignore_list_dialog.show()
|
self.model.ignore_list_dialog.show()
|
||||||
|
|
||||||
def excludeListTriggered(self):
|
def excludeListTriggered(self):
|
||||||
if self.use_tabs:
|
if self.use_tabs:
|
||||||
self.showTriggeredTabbedDialog(self.excludeListDialog, "Exclusion Filters")
|
self.showTriggeredTabbedDialog(
|
||||||
|
self.excludeListDialog, tr("Exclusion Filters")
|
||||||
|
)
|
||||||
else: # floating windows
|
else: # floating windows
|
||||||
self.model.exclude_list_dialog.show()
|
self.model.exclude_list_dialog.show()
|
||||||
|
|
||||||
|
@ -57,11 +57,13 @@ SUPPORTED_LANGUAGES = [
|
|||||||
"ko",
|
"ko",
|
||||||
"es",
|
"es",
|
||||||
"nl",
|
"nl",
|
||||||
|
"ja",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
class Sections(Flag):
|
class Sections(Flag):
|
||||||
"""Filter blocks of preferences when reset or loaded"""
|
"""Filter blocks of preferences when reset or loaded"""
|
||||||
|
|
||||||
GENERAL = auto()
|
GENERAL = auto()
|
||||||
DISPLAY = auto()
|
DISPLAY = auto()
|
||||||
ALL = GENERAL | DISPLAY
|
ALL = GENERAL | DISPLAY
|
||||||
@ -145,18 +147,25 @@ class PreferencesDialogBase(QDialog):
|
|||||||
self.widgetsVLayout.addWidget(self.customCommandEdit)
|
self.widgetsVLayout.addWidget(self.customCommandEdit)
|
||||||
|
|
||||||
def _setupDisplayPage(self):
|
def _setupDisplayPage(self):
|
||||||
self.ui_groupbox = QGroupBox("&General Interface")
|
self.ui_groupbox = QGroupBox("&" + tr("General Interface"))
|
||||||
layout = QVBoxLayout()
|
layout = QVBoxLayout()
|
||||||
self.languageLabel = QLabel(tr("Language:"), self)
|
self.languageLabel = QLabel(tr("Language:"), self)
|
||||||
self.languageComboBox = QComboBox(self)
|
self.languageComboBox = QComboBox(self)
|
||||||
for lang in self.supportedLanguages:
|
for lang in self.supportedLanguages:
|
||||||
self.languageComboBox.addItem(get_langnames()[lang])
|
self.languageComboBox.addItem(get_langnames()[lang])
|
||||||
layout.addLayout(horizontalWrap([self.languageLabel, self.languageComboBox, None]))
|
layout.addLayout(
|
||||||
self._setupAddCheckbox("tabs_default_pos",
|
horizontalWrap([self.languageLabel, self.languageComboBox, None])
|
||||||
tr("Use default position for tab bar (requires restart)"))
|
)
|
||||||
|
self._setupAddCheckbox(
|
||||||
|
"tabs_default_pos",
|
||||||
|
tr("Use default position for tab bar (requires restart)"),
|
||||||
|
)
|
||||||
self.tabs_default_pos.setToolTip(
|
self.tabs_default_pos.setToolTip(
|
||||||
tr("Place the tab bar below the main menu instead of next to it\n\
|
tr(
|
||||||
On MacOS, the tab bar will fill up the window's width instead."))
|
"Place the tab bar below the main menu instead of next to it\n\
|
||||||
|
On MacOS, the tab bar will fill up the window's width instead."
|
||||||
|
)
|
||||||
|
)
|
||||||
layout.addWidget(self.tabs_default_pos)
|
layout.addWidget(self.tabs_default_pos)
|
||||||
self.ui_groupbox.setLayout(layout)
|
self.ui_groupbox.setLayout(layout)
|
||||||
self.displayVLayout.addWidget(self.ui_groupbox)
|
self.displayVLayout.addWidget(self.ui_groupbox)
|
||||||
@ -164,23 +173,27 @@ On MacOS, the tab bar will fill up the window's width instead."))
|
|||||||
gridlayout = QGridLayout()
|
gridlayout = QGridLayout()
|
||||||
gridlayout.setColumnStretch(2, 2)
|
gridlayout.setColumnStretch(2, 2)
|
||||||
formlayout = QFormLayout()
|
formlayout = QFormLayout()
|
||||||
result_groupbox = QGroupBox("&Result Table")
|
result_groupbox = QGroupBox("&" + tr("Result Table"))
|
||||||
self.fontSizeSpinBox = QSpinBox()
|
self.fontSizeSpinBox = QSpinBox()
|
||||||
self.fontSizeSpinBox.setMinimum(5)
|
self.fontSizeSpinBox.setMinimum(5)
|
||||||
formlayout.addRow(tr("Font size:"), self.fontSizeSpinBox)
|
formlayout.addRow(tr("Font size:"), self.fontSizeSpinBox)
|
||||||
self._setupAddCheckbox("reference_bold_font",
|
self._setupAddCheckbox(
|
||||||
tr("Use bold font for references"))
|
"reference_bold_font", tr("Use bold font for references")
|
||||||
|
)
|
||||||
formlayout.addRow(self.reference_bold_font)
|
formlayout.addRow(self.reference_bold_font)
|
||||||
|
|
||||||
self.result_table_ref_foreground_color = ColorPickerButton(self)
|
self.result_table_ref_foreground_color = ColorPickerButton(self)
|
||||||
formlayout.addRow(tr("Reference foreground color:"),
|
formlayout.addRow(
|
||||||
self.result_table_ref_foreground_color)
|
tr("Reference foreground color:"), self.result_table_ref_foreground_color
|
||||||
|
)
|
||||||
self.result_table_ref_background_color = ColorPickerButton(self)
|
self.result_table_ref_background_color = ColorPickerButton(self)
|
||||||
formlayout.addRow(tr("Reference background color:"),
|
formlayout.addRow(
|
||||||
self.result_table_ref_background_color)
|
tr("Reference background color:"), self.result_table_ref_background_color
|
||||||
|
)
|
||||||
self.result_table_delta_foreground_color = ColorPickerButton(self)
|
self.result_table_delta_foreground_color = ColorPickerButton(self)
|
||||||
formlayout.addRow(tr("Delta foreground color:"),
|
formlayout.addRow(
|
||||||
self.result_table_delta_foreground_color)
|
tr("Delta foreground color:"), self.result_table_delta_foreground_color
|
||||||
|
)
|
||||||
formlayout.setLabelAlignment(Qt.AlignLeft)
|
formlayout.setLabelAlignment(Qt.AlignLeft)
|
||||||
|
|
||||||
# Keep same vertical spacing as parent layout for consistency
|
# Keep same vertical spacing as parent layout for consistency
|
||||||
@ -189,31 +202,45 @@ On MacOS, the tab bar will fill up the window's width instead."))
|
|||||||
result_groupbox.setLayout(gridlayout)
|
result_groupbox.setLayout(gridlayout)
|
||||||
self.displayVLayout.addWidget(result_groupbox)
|
self.displayVLayout.addWidget(result_groupbox)
|
||||||
|
|
||||||
details_groupbox = QGroupBox("&Details Window")
|
details_groupbox = QGroupBox("&" + tr("Details Window"))
|
||||||
self.details_groupbox_layout = QVBoxLayout()
|
self.details_groupbox_layout = QVBoxLayout()
|
||||||
self._setupAddCheckbox("details_dialog_titlebar_enabled",
|
self._setupAddCheckbox(
|
||||||
tr("Show the title bar and can be docked"))
|
"details_dialog_titlebar_enabled",
|
||||||
|
tr("Show the title bar and can be docked"),
|
||||||
|
)
|
||||||
self.details_dialog_titlebar_enabled.setToolTip(
|
self.details_dialog_titlebar_enabled.setToolTip(
|
||||||
tr("While the title bar is hidden, \
|
tr(
|
||||||
use the modifier key to drag the floating window around") if ISLINUX else
|
"While the title bar is hidden, \
|
||||||
tr("The title bar can only be disabled while the window is docked"))
|
use the modifier key to drag the floating window around"
|
||||||
|
)
|
||||||
|
if ISLINUX
|
||||||
|
else tr("The title bar can only be disabled while the window is docked")
|
||||||
|
)
|
||||||
self.details_groupbox_layout.addWidget(self.details_dialog_titlebar_enabled)
|
self.details_groupbox_layout.addWidget(self.details_dialog_titlebar_enabled)
|
||||||
self._setupAddCheckbox("details_dialog_vertical_titlebar",
|
self._setupAddCheckbox(
|
||||||
tr("Vertical title bar"))
|
"details_dialog_vertical_titlebar", tr("Vertical title bar")
|
||||||
|
)
|
||||||
self.details_dialog_vertical_titlebar.setToolTip(
|
self.details_dialog_vertical_titlebar.setToolTip(
|
||||||
tr("Change the title bar from horizontal on top, to vertical on the left side"))
|
tr(
|
||||||
|
"Change the title bar from horizontal on top, to vertical on the left side"
|
||||||
|
)
|
||||||
|
)
|
||||||
self.details_groupbox_layout.addWidget(self.details_dialog_vertical_titlebar)
|
self.details_groupbox_layout.addWidget(self.details_dialog_vertical_titlebar)
|
||||||
self.details_dialog_vertical_titlebar.setEnabled(
|
self.details_dialog_vertical_titlebar.setEnabled(
|
||||||
self.details_dialog_titlebar_enabled.isChecked())
|
self.details_dialog_titlebar_enabled.isChecked()
|
||||||
|
)
|
||||||
self.details_dialog_titlebar_enabled.stateChanged.connect(
|
self.details_dialog_titlebar_enabled.stateChanged.connect(
|
||||||
self.details_dialog_vertical_titlebar.setEnabled)
|
self.details_dialog_vertical_titlebar.setEnabled
|
||||||
|
)
|
||||||
gridlayout = QGridLayout()
|
gridlayout = QGridLayout()
|
||||||
formlayout = QFormLayout()
|
formlayout = QFormLayout()
|
||||||
self.details_table_delta_foreground_color = ColorPickerButton(self)
|
self.details_table_delta_foreground_color = ColorPickerButton(self)
|
||||||
# Padding on the right side and space between label and widget to keep it somewhat consistent across themes
|
# Padding on the right side and space between label and widget to keep it somewhat consistent across themes
|
||||||
gridlayout.setColumnStretch(1, 1)
|
gridlayout.setColumnStretch(1, 1)
|
||||||
formlayout.setHorizontalSpacing(50)
|
formlayout.setHorizontalSpacing(50)
|
||||||
formlayout.addRow(tr("Delta foreground color:"), self.details_table_delta_foreground_color)
|
formlayout.addRow(
|
||||||
|
tr("Delta foreground color:"), self.details_table_delta_foreground_color
|
||||||
|
)
|
||||||
gridlayout.addLayout(formlayout, 0, 0)
|
gridlayout.addLayout(formlayout, 0, 0)
|
||||||
self.details_groupbox_layout.addLayout(gridlayout)
|
self.details_groupbox_layout.addLayout(gridlayout)
|
||||||
details_groupbox.setLayout(self.details_groupbox_layout)
|
details_groupbox.setLayout(self.details_groupbox_layout)
|
||||||
@ -255,8 +282,8 @@ use the modifier key to drag the floating window around") if ISLINUX else
|
|||||||
self.mainVLayout.addWidget(self.tabwidget)
|
self.mainVLayout.addWidget(self.tabwidget)
|
||||||
self.mainVLayout.addWidget(self.buttonBox)
|
self.mainVLayout.addWidget(self.buttonBox)
|
||||||
self.layout().setSizeConstraint(QLayout.SetFixedSize)
|
self.layout().setSizeConstraint(QLayout.SetFixedSize)
|
||||||
self.tabwidget.addTab(self.page_general, "General")
|
self.tabwidget.addTab(self.page_general, tr("General"))
|
||||||
self.tabwidget.addTab(self.page_display, "Display")
|
self.tabwidget.addTab(self.page_display, tr("Display"))
|
||||||
self.displayVLayout.addStretch(0)
|
self.displayVLayout.addStretch(0)
|
||||||
self.widgetsVLayout.addStretch(0)
|
self.widgetsVLayout.addStretch(0)
|
||||||
|
|
||||||
@ -285,19 +312,27 @@ use the modifier key to drag the floating window around") if ISLINUX else
|
|||||||
if section & Sections.DISPLAY:
|
if section & Sections.DISPLAY:
|
||||||
setchecked(self.reference_bold_font, prefs.reference_bold_font)
|
setchecked(self.reference_bold_font, prefs.reference_bold_font)
|
||||||
setchecked(self.tabs_default_pos, prefs.tabs_default_pos)
|
setchecked(self.tabs_default_pos, prefs.tabs_default_pos)
|
||||||
setchecked(self.details_dialog_titlebar_enabled,
|
setchecked(
|
||||||
prefs.details_dialog_titlebar_enabled)
|
self.details_dialog_titlebar_enabled,
|
||||||
setchecked(self.details_dialog_vertical_titlebar,
|
prefs.details_dialog_titlebar_enabled,
|
||||||
prefs.details_dialog_vertical_titlebar)
|
)
|
||||||
|
setchecked(
|
||||||
|
self.details_dialog_vertical_titlebar,
|
||||||
|
prefs.details_dialog_vertical_titlebar,
|
||||||
|
)
|
||||||
self.fontSizeSpinBox.setValue(prefs.tableFontSize)
|
self.fontSizeSpinBox.setValue(prefs.tableFontSize)
|
||||||
self.details_table_delta_foreground_color.setColor(
|
self.details_table_delta_foreground_color.setColor(
|
||||||
prefs.details_table_delta_foreground_color)
|
prefs.details_table_delta_foreground_color
|
||||||
|
)
|
||||||
self.result_table_ref_foreground_color.setColor(
|
self.result_table_ref_foreground_color.setColor(
|
||||||
prefs.result_table_ref_foreground_color)
|
prefs.result_table_ref_foreground_color
|
||||||
|
)
|
||||||
self.result_table_ref_background_color.setColor(
|
self.result_table_ref_background_color.setColor(
|
||||||
prefs.result_table_ref_background_color)
|
prefs.result_table_ref_background_color
|
||||||
|
)
|
||||||
self.result_table_delta_foreground_color.setColor(
|
self.result_table_delta_foreground_color.setColor(
|
||||||
prefs.result_table_delta_foreground_color)
|
prefs.result_table_delta_foreground_color
|
||||||
|
)
|
||||||
try:
|
try:
|
||||||
langindex = self.supportedLanguages.index(self.app.prefs.language)
|
langindex = self.supportedLanguages.index(self.app.prefs.language)
|
||||||
except ValueError:
|
except ValueError:
|
||||||
@ -315,12 +350,24 @@ use the modifier key to drag the floating window around") if ISLINUX else
|
|||||||
prefs.ignore_hardlink_matches = ischecked(self.ignoreHardlinkMatches)
|
prefs.ignore_hardlink_matches = ischecked(self.ignoreHardlinkMatches)
|
||||||
prefs.debug_mode = ischecked(self.debugModeBox)
|
prefs.debug_mode = ischecked(self.debugModeBox)
|
||||||
prefs.reference_bold_font = ischecked(self.reference_bold_font)
|
prefs.reference_bold_font = ischecked(self.reference_bold_font)
|
||||||
prefs.details_dialog_titlebar_enabled = ischecked(self.details_dialog_titlebar_enabled)
|
prefs.details_dialog_titlebar_enabled = ischecked(
|
||||||
prefs.details_dialog_vertical_titlebar = ischecked(self.details_dialog_vertical_titlebar)
|
self.details_dialog_titlebar_enabled
|
||||||
prefs.details_table_delta_foreground_color = self.details_table_delta_foreground_color.color
|
)
|
||||||
prefs.result_table_ref_foreground_color = self.result_table_ref_foreground_color.color
|
prefs.details_dialog_vertical_titlebar = ischecked(
|
||||||
prefs.result_table_ref_background_color = self.result_table_ref_background_color.color
|
self.details_dialog_vertical_titlebar
|
||||||
prefs.result_table_delta_foreground_color = self.result_table_delta_foreground_color.color
|
)
|
||||||
|
prefs.details_table_delta_foreground_color = (
|
||||||
|
self.details_table_delta_foreground_color.color
|
||||||
|
)
|
||||||
|
prefs.result_table_ref_foreground_color = (
|
||||||
|
self.result_table_ref_foreground_color.color
|
||||||
|
)
|
||||||
|
prefs.result_table_ref_background_color = (
|
||||||
|
self.result_table_ref_background_color.color
|
||||||
|
)
|
||||||
|
prefs.result_table_delta_foreground_color = (
|
||||||
|
self.result_table_delta_foreground_color.color
|
||||||
|
)
|
||||||
prefs.destination_type = self.copyMoveDestinationComboBox.currentIndex()
|
prefs.destination_type = self.copyMoveDestinationComboBox.currentIndex()
|
||||||
prefs.custom_command = str(self.customCommandEdit.text())
|
prefs.custom_command = str(self.customCommandEdit.text())
|
||||||
prefs.tableFontSize = self.fontSizeSpinBox.value()
|
prefs.tableFontSize = self.fontSizeSpinBox.value()
|
||||||
@ -364,8 +411,8 @@ class ColorPickerButton(QPushButton):
|
|||||||
@pyqtSlot()
|
@pyqtSlot()
|
||||||
def onClicked(self):
|
def onClicked(self):
|
||||||
color = QColorDialog.getColor(
|
color = QColorDialog.getColor(
|
||||||
self.color if self.color is not None else Qt.white,
|
self.color if self.color is not None else Qt.white, self.parent
|
||||||
self.parent)
|
)
|
||||||
self.setColor(color)
|
self.setColor(color)
|
||||||
|
|
||||||
def setColor(self, color):
|
def setColor(self, color):
|
||||||
|
@ -107,6 +107,10 @@ msgstr ""
|
|||||||
msgid "Vietnamese"
|
msgid "Vietnamese"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
#: qtlib\preferences.py:39
|
||||||
|
msgid "Japanese"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: qtlib\recent.py:54
|
#: qtlib\recent.py:54
|
||||||
msgid "Clear List"
|
msgid "Clear List"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
@ -36,6 +36,7 @@ def get_langnames():
|
|||||||
"pt_BR": tr("Brazilian"),
|
"pt_BR": tr("Brazilian"),
|
||||||
"es": tr("Spanish"),
|
"es": tr("Spanish"),
|
||||||
"vi": tr("Vietnamese"),
|
"vi": tr("Vietnamese"),
|
||||||
|
"ja": tr("Japanese"),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user