mirror of
https://github.com/arsenetar/dupeguru.git
synced 2026-01-22 06:37:17 +00:00
Added Russian localization by Igor Pavlov.
This commit is contained in:
@@ -8,6 +8,7 @@
|
||||
|
||||
from PyQt4.QtGui import QApplication
|
||||
|
||||
from hscommon import trans
|
||||
from qtlib.preferences import Preferences as PreferencesBase
|
||||
|
||||
class Preferences(PreferencesBase):
|
||||
@@ -26,6 +27,8 @@ class Preferences(PreferencesBase):
|
||||
self.destination_type = get('DestinationType', self.destination_type)
|
||||
self.custom_command = get('CustomCommand', self.custom_command)
|
||||
self.language = get('Language', self.language)
|
||||
if not self.language and trans.installed_lang:
|
||||
self.language = trans.installed_lang
|
||||
|
||||
self.tableFontSize = get('TableFontSize', self.tableFontSize)
|
||||
self.resultWindowIsMaximized = get('ResultWindowIsMaximized', self.resultWindowIsMaximized)
|
||||
@@ -50,7 +53,7 @@ class Preferences(PreferencesBase):
|
||||
self.debug_mode = False
|
||||
self.destination_type = 1
|
||||
self.custom_command = ''
|
||||
self.language = ''
|
||||
self.language = trans.installed_lang if trans.installed_lang else ''
|
||||
|
||||
self.tableFontSize = QApplication.font().pointSize()
|
||||
self.resultWindowIsMaximized = False
|
||||
|
||||
@@ -6,6 +6,8 @@
|
||||
# which should be included with this package. The terms are also available at
|
||||
# http://www.hardcoded.net/licenses/bsd_license
|
||||
|
||||
from collections import OrderedDict
|
||||
|
||||
from PyQt4.QtCore import SIGNAL, Qt, QSize
|
||||
from PyQt4.QtGui import (QDialog, QDialogButtonBox, QVBoxLayout, QHBoxLayout, QLabel, QComboBox,
|
||||
QSlider, QSizePolicy, QSpacerItem, QCheckBox, QLineEdit, QMessageBox, QSpinBox)
|
||||
@@ -16,16 +18,17 @@ from qtlib.util import horizontalWrap
|
||||
|
||||
tr = trget('ui')
|
||||
|
||||
SUPPORTED_LANGUAGES = ['en', 'fr', 'de', 'zh_CN', 'cs', 'it', 'hy']
|
||||
LANGNAMES = {
|
||||
'en': tr("English"),
|
||||
'fr': tr("French"),
|
||||
'de': tr("German"),
|
||||
'zh_CN': tr("Chinese (Simplified)"),
|
||||
'cs': tr("Czech"),
|
||||
'it': tr("Italian"),
|
||||
'hy': tr("Armenian"),
|
||||
}
|
||||
LANGNAMES = OrderedDict([
|
||||
('en', tr("English")),
|
||||
('fr', tr("French")),
|
||||
('de', tr("German")),
|
||||
('zh_CN', tr("Chinese (Simplified)")),
|
||||
('cs', tr("Czech")),
|
||||
('it', tr("Italian")),
|
||||
('hy', tr("Armenian")),
|
||||
('ru', tr("Russian")),
|
||||
])
|
||||
SUPPORTED_LANGUAGES = list(LANGNAMES.keys())
|
||||
|
||||
class PreferencesDialogBase(QDialog):
|
||||
def __init__(self, parent, app):
|
||||
|
||||
Reference in New Issue
Block a user