Anki/designer/preferences.ui
Damien Elmes d919615475 refactor language handling
Because Qt translations need to be initialized before any widgets are created,
and because the Qt language needs to match the gettext language in order for
translated shortcuts to work, per-profile language settings aren't possible.
So instead of storing the language in the profile, we use
pm.meta['defaultLang'] for all profiles and initialize language handling in
__init__.py

The language selection in the preferences has been removed, because in a
school setting a student fiddling with the language could potentially cause
other students to be unable to navigate the UI. Instead, Anki will accept
-l/--lang passed on the command line to override the original language chosen
at first program startup.
2012-04-18 03:06:56 +09:00

520 lines
15 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>Preferences</class>
<widget class="QDialog" name="Preferences">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>441</width>
<height>426</height>
</rect>
</property>
<property name="windowTitle">
<string>Preferences</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_2">
<item>
<widget class="QTabWidget" name="tabWidget">
<property name="focusPolicy">
<enum>Qt::StrongFocus</enum>
</property>
<property name="currentIndex">
<number>0</number>
</property>
<widget class="QWidget" name="tab_1">
<attribute name="title">
<string>Basic</string>
</attribute>
<layout class="QVBoxLayout" name="verticalLayout">
<property name="spacing">
<number>12</number>
</property>
<item>
<widget class="QCheckBox" name="showEstimates">
<property name="text">
<string>Show next review time above answer buttons</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="showProgress">
<property name="text">
<string>Show remaining card count during review</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="stripHTML">
<property name="text">
<string>Strip HTML when pasting text</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="deleteMedia">
<property name="text">
<string>When adding media, move files instead of copying</string>
</property>
</widget>
</item>
<item>
<widget class="QComboBox" name="newSpread"/>
</item>
<item>
<layout class="QGridLayout" name="gridLayout_4">
<item row="0" column="0">
<widget class="QLabel" name="label_23">
<property name="text">
<string>Next day starts at</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QSpinBox" name="dayOffset">
<property name="maximumSize">
<size>
<width>60</width>
<height>16777215</height>
</size>
</property>
<property name="maximum">
<number>23</number>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_24">
<property name="text">
<string>Learn ahead limit</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QSpinBox" name="lrnCutoff">
<property name="maximumSize">
<size>
<width>60</width>
<height>16777215</height>
</size>
</property>
</widget>
</item>
<item row="1" column="2">
<widget class="QLabel" name="label_29">
<property name="text">
<string>mins</string>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="label_30">
<property name="text">
<string>Timebox time limit</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QSpinBox" name="timeLimit">
<property name="maximum">
<number>9999</number>
</property>
</widget>
</item>
<item row="2" column="2">
<widget class="QLabel" name="label_39">
<property name="text">
<string>mins</string>
</property>
</widget>
</item>
<item row="0" column="2">
<widget class="QLabel" name="label_40">
<property name="text">
<string>hours past midnight</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<spacer name="verticalSpacer_3">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Preferred</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QPushButton" name="profilePass">
<property name="text">
<string>Profile Password...</string>
</property>
<property name="autoDefault">
<bool>false</bool>
</property>
</widget>
</item>
</layout>
</widget>
<widget class="QWidget" name="tab_2">
<attribute name="title">
<string>Network</string>
</attribute>
<layout class="QVBoxLayout" name="verticalLayout_4">
<property name="spacing">
<number>10</number>
</property>
<item>
<layout class="QHBoxLayout">
<property name="spacing">
<number>10</number>
</property>
<item>
<layout class="QVBoxLayout">
<item>
<widget class="QLabel" name="syncLabel">
<property name="text">
<string>&lt;b&gt;Synchronisation&lt;/b&gt;</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
<property name="openExternalLinks">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="syncMedia">
<property name="text">
<string>Synchronize audio and images too</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="syncOnProgramOpen">
<property name="text">
<string>Automatically sync on profile open/close</string>
</property>
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QPushButton" name="syncDeauth">
<property name="text">
<string>Deauthorize</string>
</property>
<property name="autoDefault">
<bool>false</bool>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_2">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>1</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
</layout>
</item>
</layout>
</item>
<item>
<widget class="QLabel" name="label_13">
<property name="text">
<string>&lt;b&gt;Proxy&lt;/b&gt;&lt;br&gt;If your system needs a proxy to access the internet, enter your details below. Leave &quot;Host&quot; blank to disable proxy support.</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<layout class="QGridLayout" name="gridLayout_3">
<property name="verticalSpacing">
<number>6</number>
</property>
<item row="0" column="0">
<widget class="QLabel" name="label_14">
<property name="text">
<string>Host</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QLineEdit" name="proxyHost"/>
</item>
<item row="0" column="2">
<widget class="QLabel" name="label_15">
<property name="text">
<string>Port</string>
</property>
</widget>
</item>
<item row="0" column="3">
<widget class="QSpinBox" name="proxyPort">
<property name="minimumSize">
<size>
<width>60</width>
<height>0</height>
</size>
</property>
<property name="minimum">
<number>1</number>
</property>
<property name="maximum">
<number>65535</number>
</property>
<property name="value">
<number>8080</number>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_19">
<property name="text">
<string>Username</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QLineEdit" name="proxyUser"/>
</item>
<item row="2" column="0">
<widget class="QLabel" name="label_20">
<property name="text">
<string>Password</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QLineEdit" name="proxyPass">
<property name="echoMode">
<enum>QLineEdit::Password</enum>
</property>
</widget>
</item>
</layout>
</item>
<item>
<spacer name="verticalSpacer_2">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QLabel" name="label_12">
<property name="text">
<string>Some settings will take effect after you restart Anki.</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
</layout>
</widget>
<widget class="QWidget" name="tab">
<attribute name="title">
<string>Backups</string>
</attribute>
<layout class="QVBoxLayout" name="verticalLayout_3">
<property name="spacing">
<number>10</number>
</property>
<item>
<widget class="QLabel" name="label_9">
<property name="text">
<string>&lt;b&gt;Backups&lt;/b&gt;&lt;br&gt;Anki will create a backup of your collection each time it is closed or synchronized.</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<layout class="QGridLayout" name="gridLayout_2">
<item row="0" column="0">
<widget class="QLabel" name="label_10">
<property name="text">
<string>Keep</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QSpinBox" name="numBackups">
<property name="minimumSize">
<size>
<width>60</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>60</width>
<height>16777215</height>
</size>
</property>
</widget>
</item>
<item row="0" column="2">
<widget class="QLabel" name="label_11">
<property name="text">
<string>backups</string>
</property>
</widget>
</item>
<item row="0" column="3">
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
<item>
<widget class="QLabel" name="openBackupFolder">
<property name="text">
<string>&lt;a href=&quot;backups&quot;&gt;Open backup folder&lt;/a&gt;</string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label_4">
<property name="text">
<string>Note: Media is not backed up. Please create a periodic backup of your Documents/Anki folder to be safe.</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<spacer name="verticalSpacer_4">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>59</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QLabel" name="label_21">
<property name="text">
<string>Some settings will take effect after you restart Anki.</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
</layout>
</widget>
</widget>
</item>
<item>
<widget class="QDialogButtonBox" name="buttonBox">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="standardButtons">
<set>QDialogButtonBox::Close|QDialogButtonBox::Help</set>
</property>
</widget>
</item>
</layout>
</widget>
<tabstops>
<tabstop>showEstimates</tabstop>
<tabstop>showProgress</tabstop>
<tabstop>stripHTML</tabstop>
<tabstop>deleteMedia</tabstop>
<tabstop>newSpread</tabstop>
<tabstop>dayOffset</tabstop>
<tabstop>lrnCutoff</tabstop>
<tabstop>timeLimit</tabstop>
<tabstop>profilePass</tabstop>
<tabstop>syncMedia</tabstop>
<tabstop>syncOnProgramOpen</tabstop>
<tabstop>syncDeauth</tabstop>
<tabstop>proxyHost</tabstop>
<tabstop>proxyPort</tabstop>
<tabstop>proxyUser</tabstop>
<tabstop>proxyPass</tabstop>
<tabstop>numBackups</tabstop>
<tabstop>buttonBox</tabstop>
<tabstop>tabWidget</tabstop>
</tabstops>
<resources/>
<connections>
<connection>
<sender>buttonBox</sender>
<signal>accepted()</signal>
<receiver>Preferences</receiver>
<slot>accept()</slot>
<hints>
<hint type="sourcelabel">
<x>285</x>
<y>439</y>
</hint>
<hint type="destinationlabel">
<x>157</x>
<y>274</y>
</hint>
</hints>
</connection>
<connection>
<sender>buttonBox</sender>
<signal>rejected()</signal>
<receiver>Preferences</receiver>
<slot>reject()</slot>
<hints>
<hint type="sourcelabel">
<x>332</x>
<y>439</y>
</hint>
<hint type="destinationlabel">
<x>286</x>
<y>274</y>
</hint>
</hints>
</connection>
</connections>
</ui>