mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-10 15:32:48 -07:00
parent
0ad831e48a
commit
297ef52dcb
1 changed files with 16 additions and 2 deletions
|
@ -71,6 +71,21 @@
|
|||
#include "ui_optionsdialog.h"
|
||||
#include "utils.h"
|
||||
|
||||
namespace
|
||||
{
|
||||
QStringList translatedWeekdayNames()
|
||||
{
|
||||
// return translated strings from Monday to Sunday in user selected locale
|
||||
|
||||
const QLocale locale {Preferences::instance()->getLocale()};
|
||||
const QDate date {2018, 11, 5}; // Monday
|
||||
QStringList ret;
|
||||
for (int i = 0; i < 7; ++i)
|
||||
ret.append(locale.toString(date.addDays(i), "dddd"));
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
class WheelEventEater : public QObject
|
||||
{
|
||||
public:
|
||||
|
@ -164,8 +179,7 @@ OptionsDialog::OptionsDialog(QWidget *parent)
|
|||
initializeLanguageCombo();
|
||||
|
||||
// Load week days (scheduler)
|
||||
for (uint i = 1; i <= 7; ++i)
|
||||
m_ui->comboBoxScheduleDays->addItem(QDate::longDayName(i, QDate::StandaloneFormat));
|
||||
m_ui->comboBoxScheduleDays->addItems(translatedWeekdayNames());
|
||||
|
||||
// Load options
|
||||
loadOptions();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue