1
0
mirror of https://github.com/clementine-player/Clementine synced 2024-12-17 20:09:50 +01:00

Use '%1 fps' to reduce the number of strings to translate, and to keep consistency over the application, as similar strings are used in equalizer (i.e. I don't want to have different translations for similar original English strings)

This commit is contained in:
Arnaud Bienner 2012-03-22 20:02:12 +01:00
parent 8d1e3ea63a
commit 0d50f9ec7a
2 changed files with 16 additions and 5 deletions

View File

@ -35,10 +35,16 @@
#include <QSignalMapper> #include <QSignalMapper>
#include <QtDebug> #include <QtDebug>
// Framerates
const int VisualisationContainer::kLowFramerate = 15;
const int VisualisationContainer::kMediumFramerate = 25;
const int VisualisationContainer::kHighFramerate = 35;
const int VisualisationContainer::kSuperHighFramerate = 60;
const char* VisualisationContainer::kSettingsGroup = "Visualisations"; const char* VisualisationContainer::kSettingsGroup = "Visualisations";
const int VisualisationContainer::kDefaultWidth = 828; const int VisualisationContainer::kDefaultWidth = 828;
const int VisualisationContainer::kDefaultHeight = 512; const int VisualisationContainer::kDefaultHeight = 512;
const int VisualisationContainer::kDefaultFps = 35; const int VisualisationContainer::kDefaultFps = kHighFramerate;
const int VisualisationContainer::kDefaultTextureSize = 512; const int VisualisationContainer::kDefaultTextureSize = 512;
VisualisationContainer::VisualisationContainer(QWidget *parent) VisualisationContainer::VisualisationContainer(QWidget *parent)
@ -98,10 +104,10 @@ void VisualisationContainer::Init() {
QMenu* fps_menu = menu_->addMenu(tr("Framerate")); QMenu* fps_menu = menu_->addMenu(tr("Framerate"));
QSignalMapper* fps_mapper = new QSignalMapper(this); QSignalMapper* fps_mapper = new QSignalMapper(this);
QActionGroup* fps_group = new QActionGroup(this); QActionGroup* fps_group = new QActionGroup(this);
AddMenuItem(tr("Low (15 fps)"), 15, fps_, fps_group, fps_mapper); AddMenuItem(tr("Low (%1 fps)").arg(kLowFramerate), kLowFramerate, fps_, fps_group, fps_mapper);
AddMenuItem(tr("Medium (25 fps)"), 25, fps_, fps_group, fps_mapper); AddMenuItem(tr("Medium (%1 fps)").arg(kMediumFramerate), kMediumFramerate, fps_, fps_group, fps_mapper);
AddMenuItem(tr("High (35 fps)"), 35, fps_, fps_group, fps_mapper); AddMenuItem(tr("High (%1 fps)").arg(kHighFramerate), kHighFramerate, fps_, fps_group, fps_mapper);
AddMenuItem(tr("Super high (60 fps)"), 60, fps_, fps_group, fps_mapper); AddMenuItem(tr("Super high (%1 fps)").arg(kSuperHighFramerate), kSuperHighFramerate, fps_, fps_group, fps_mapper);
fps_menu->addActions(fps_group->actions()); fps_menu->addActions(fps_group->actions());
connect(fps_mapper, SIGNAL(mapped(int)), SLOT(SetFps(int))); connect(fps_mapper, SIGNAL(mapped(int)), SLOT(SetFps(int)));

View File

@ -38,6 +38,11 @@ class VisualisationContainer : public QGraphicsView {
public: public:
VisualisationContainer(QWidget* parent = 0); VisualisationContainer(QWidget* parent = 0);
static const int kLowFramerate;
static const int kMediumFramerate;
static const int kHighFramerate;
static const int kSuperHighFramerate;
static const char* kSettingsGroup; static const char* kSettingsGroup;
static const int kDefaultWidth; static const int kDefaultWidth;
static const int kDefaultHeight; static const int kDefaultHeight;