Skip to content
This repository has been archived by the owner on Feb 12, 2023. It is now read-only.

Commit

Permalink
feat(i18n): make Markdown settings translatable
Browse files Browse the repository at this point in the history
  • Loading branch information
agilob authored and zetok committed May 11, 2016
1 parent 5cb271b commit 3e22593
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 7 deletions.
5 changes: 0 additions & 5 deletions src/widget/form/settings/generalform.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,6 @@ static QStringList langs = {"Arabic",
"Türkçe",
"Українська",
"简体中文"};
static QStringList mdPrefs = {"Plaintext",
"Show Formatting Characters",
"Don't Show Formatting Characters"};

static QStringList timeFormats = {"hh:mm AP", "hh:mm", "hh:mm:ss AP", "hh:mm:ss"};
// http://doc.qt.io/qt-4.8/qdate.html#fromString
Expand All @@ -116,8 +113,6 @@ GeneralForm::GeneralForm(SettingsWidget *myParent) :
bodyUI->transComboBox->insertItem(i, langs[i]);

bodyUI->transComboBox->setCurrentIndex(locales.indexOf(Settings::getInstance().getTranslation()));
for (int i = 0; i < mdPrefs.size(); i++)
bodyUI->markdownComboBox->insertItem(i, mdPrefs[i]);

bodyUI->markdownComboBox->setCurrentIndex(Settings::getInstance().getMarkdownPreference());
bodyUI->cbAutorun->setChecked(Settings::getInstance().getAutorun());
Expand Down
19 changes: 17 additions & 2 deletions src/widget/form/settings/generalsettings.ui
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>1277</width>
<height>1272</height>
<width>1278</width>
<height>1413</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_4" stretch="0,0,0,1">
Expand Down Expand Up @@ -382,6 +382,21 @@ instead of closing itself.</string>
<property name="toolTip">
<string>Select Markdown preference.</string>
</property>
<item>
<property name="text">
<string>Plaintext</string>
</property>
</item>
<item>
<property name="text">
<string>Show formatting characters</string>
</property>
</item>
<item>
<property name="text">
<string>Don't show formatting characters</string>
</property>
</item>
</widget>
</item>
<item>
Expand Down

0 comments on commit 3e22593

Please sign in to comment.