Add string modifications for internationalization
This commit is contained in:
@@ -226,22 +226,22 @@ QString Button::getTypeTooltip(const Button::Type t) {
|
||||
}
|
||||
|
||||
Button::typeData Button::typeTooltip = {
|
||||
{Button::Type::selectionIndicator, "Shows the dimensions of the selection (X Y)"},
|
||||
{Button::Type::mouseVisibility, "Sets the visibility of the mouse pointer"},
|
||||
{Button::Type::exit, "Leaves the capture screen"},
|
||||
{Button::Type::copy, "Copies the selecion into the clipboard"},
|
||||
{Button::Type::save, "Opens the save image window"},
|
||||
{Button::Type::pencil, "Sets the paint tool to a pencil"},
|
||||
{Button::Type::line, "Sets the paint tool to a line drawer"},
|
||||
{Button::Type::arrow, "Sets the paint tool to an arrow drawer"},
|
||||
{Button::Type::rectangle, "Sets the paint tool to a rectagle drawer"},
|
||||
{Button::Type::circle, "Sets the paint tool to a circle drawer"},
|
||||
{Button::Type::marker, "Sets the paint tool to a marker"},
|
||||
{Button::Type::text, "Sets the paint tool to a text creator"},
|
||||
{Button::Type::colorPicker, "Opens the color picker widget"},
|
||||
{Button::Type::undo, "Undo the last modification"},
|
||||
{Button::Type::imageUploader, "Upload the selection to Imgur"},
|
||||
{Button::Type::move, "Move the selection area"}
|
||||
{Button::Type::selectionIndicator, tr("Shows the dimensions of the selection (X Y)")},
|
||||
{Button::Type::mouseVisibility, tr("Sets the visibility of the mouse pointer")},
|
||||
{Button::Type::exit, tr("Leaves the capture screen")},
|
||||
{Button::Type::copy, tr("Copies the selecion into the clipboard")},
|
||||
{Button::Type::save, tr("Opens the save image window")},
|
||||
{Button::Type::pencil, tr("Sets the paint tool to a pencil")},
|
||||
{Button::Type::line, tr("Sets the paint tool to a line drawer")},
|
||||
{Button::Type::arrow, tr("Sets the paint tool to an arrow drawer")},
|
||||
{Button::Type::rectangle, tr("Sets the paint tool to a rectagle drawer")},
|
||||
{Button::Type::circle, tr("Sets the paint tool to a circle drawer")},
|
||||
{Button::Type::marker, tr("Sets the paint tool to a marker")},
|
||||
{Button::Type::text, tr("Sets the paint tool to a text creator")},
|
||||
{Button::Type::colorPicker, tr("Opens the color picker widget")},
|
||||
{Button::Type::undo, tr("Undo the last modification")},
|
||||
{Button::Type::imageUploader, tr("Upload the selection to Imgur")},
|
||||
{Button::Type::move, tr("Move the selection area")}
|
||||
};
|
||||
|
||||
Button::typeData Button::typeName = {
|
||||
|
||||
@@ -380,7 +380,7 @@ void CaptureWidget::uploadScreenshot() {
|
||||
m_screenshot->uploadToImgur(am, getExtendedSelection());
|
||||
}
|
||||
hide();
|
||||
Q_EMIT newMessage("Uploading image...");
|
||||
Q_EMIT newMessage(tr("Uploading image..."));
|
||||
}
|
||||
|
||||
void CaptureWidget::undo() {
|
||||
|
||||
@@ -33,12 +33,12 @@ ConfigWindow::ConfigWindow(QWidget *parent) : QWidget(parent){
|
||||
|
||||
QVBoxLayout *baseLayout = new QVBoxLayout(this);
|
||||
|
||||
QLabel *colorSelectionLabel = new QLabel("UI color editor", this);
|
||||
QLabel *colorSelectionLabel = new QLabel(tr("UI color editor"), this);
|
||||
baseLayout->addWidget(colorSelectionLabel);
|
||||
|
||||
baseLayout->addWidget(new UIcolorEditor(this));
|
||||
|
||||
QLabel *buttonSelectLabel = new QLabel("Button selection", this);
|
||||
QLabel *buttonSelectLabel = new QLabel(tr("Button selection"), this);
|
||||
baseLayout->addWidget(buttonSelectLabel);
|
||||
|
||||
ButtonListView *m_buttonListView = new ButtonListView(this);
|
||||
|
||||
@@ -42,27 +42,27 @@ InfoWindow::InfoWindow(QWidget *parent) : QWidget(parent) {
|
||||
show();
|
||||
}
|
||||
|
||||
namespace {
|
||||
QVector<QString> keys = {
|
||||
"←↓↑→",
|
||||
"SHIFT + ←↓↑→",
|
||||
"ESC",
|
||||
"CTRL + C",
|
||||
"CTRL + S",
|
||||
"CTRL + Z",
|
||||
"Right Click"
|
||||
};
|
||||
|
||||
QVector<QString> description = {
|
||||
"Move selection 1px",
|
||||
"Resize selection 1px",
|
||||
"Quit capture",
|
||||
"Copy to clipboard",
|
||||
"Save selection as a file",
|
||||
"Undo the last modification",
|
||||
"Show color picker"
|
||||
};
|
||||
}
|
||||
QVector<QString> InfoWindow::keys = {
|
||||
"←↓↑→",
|
||||
"SHIFT + ←↓↑→",
|
||||
"ESC",
|
||||
"CTRL + C",
|
||||
"CTRL + S",
|
||||
"CTRL + Z",
|
||||
tr("Right Click")
|
||||
};
|
||||
|
||||
QVector<QString> InfoWindow::description = {
|
||||
tr("Move selection 1px"),
|
||||
tr("Resize selection 1px"),
|
||||
tr("Quit capture"),
|
||||
tr("Copy to clipboard"),
|
||||
tr("Save selection as a file"),
|
||||
tr("Undo the last modification"),
|
||||
tr("Show color picker")
|
||||
};
|
||||
|
||||
|
||||
void InfoWindow::initInfoTable() {
|
||||
QTableWidget *table = new QTableWidget(this);
|
||||
@@ -76,7 +76,7 @@ void InfoWindow::initInfoTable() {
|
||||
table->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
|
||||
// header creation
|
||||
QStringList names;
|
||||
names << "Key" << "Description";
|
||||
names << tr("Key") << tr("Description");
|
||||
table->setHorizontalHeaderLabels(names);
|
||||
//add content
|
||||
for (int i= 0; i < keys.size(); ++i){
|
||||
|
||||
@@ -30,6 +30,9 @@ public:
|
||||
private:
|
||||
void initInfoTable();
|
||||
QVBoxLayout *layout;
|
||||
|
||||
static QVector<QString> keys;
|
||||
static QVector<QString> description;
|
||||
};
|
||||
|
||||
#endif // INFOWINDOW_H
|
||||
|
||||
Reference in New Issue
Block a user