translation

This commit is contained in:
itsmattkc
2019-01-12 10:10:24 +11:00
parent 215606772c
commit 345328432d
51 changed files with 555 additions and 381 deletions
+36 -30
View File
@@ -400,10 +400,11 @@ void Timeline::update_sequence() {
addButton->setEnabled(!null_sequence);
headers->setEnabled(!null_sequence);
QString title = tr("Timeline: ");
if (null_sequence) {
setWindowTitle("Timeline: <none>");
setWindowTitle(title + tr("<none>"));
} else {
setWindowTitle("Timeline: " + sequence->name);
setWindowTitle(title + sequence->name);
update_ui(false);
}
}
@@ -1010,15 +1011,15 @@ void Timeline::paste(bool insert) {
}
if (found >= 0 && ask_conflict) {
QMessageBox box(this);
box.setWindowTitle("Effect already exists");
box.setText("Clip '" + c->name + "' already contains a '" + e->meta->name + "' effect. Would you like to replace it with the pasted one or add it as a separate effect?");
box.setWindowTitle(tr("Effect already exists"));
box.setText(tr("Clip '%1' already contains a '%2' effect. Would you like to replace it with the pasted one or add it as a separate effect?").arg(c->name, e->meta->name));
box.setIcon(QMessageBox::Icon::Question);
box.addButton("Add", QMessageBox::YesRole);
QPushButton* replace_button = box.addButton("Replace", QMessageBox::NoRole);
QPushButton* skip_button = box.addButton("Skip", QMessageBox::RejectRole);
box.addButton(tr("Add"), QMessageBox::YesRole);
QPushButton* replace_button = box.addButton(tr("Replace"), QMessageBox::NoRole);
QPushButton* skip_button = box.addButton(tr("Skip"), QMessageBox::RejectRole);
QCheckBox* future_box = new QCheckBox("Do this for all conflicts found");
QCheckBox* future_box = new QCheckBox(tr("Do this for all conflicts found"));
box.setCheckBox(future_box);
box.exec();
@@ -1392,8 +1393,8 @@ void Timeline::set_marker() {
if (!add_marker) {
QInputDialog d(this);
d.setWindowTitle("Set Marker");
d.setLabelText("Set marker name:");
d.setWindowTitle(tr("Set Marker"));
d.setLabelText(tr("Set marker name:"));
d.setInputMode(QInputDialog::TextInput);
add_marker = (d.exec() == QDialog::Accepted);
marker_name = d.textValue();
@@ -1481,29 +1482,29 @@ void Timeline::add_btn_click() {
QMenu add_menu(this);
QAction* titleMenuItem = new QAction(&add_menu);
titleMenuItem->setText("Title...");
titleMenuItem->setText(tr("Title..."));
titleMenuItem->setData(ADD_OBJ_TITLE);
add_menu.addAction(titleMenuItem);
QAction* solidMenuItem = new QAction(&add_menu);
solidMenuItem->setText("Solid Color...");
solidMenuItem->setText(tr("Solid Color..."));
solidMenuItem->setData(ADD_OBJ_SOLID);
add_menu.addAction(solidMenuItem);
QAction* barsMenuItem = new QAction(&add_menu);
barsMenuItem->setText("Bars...");
barsMenuItem->setText(tr("Bars..."));
barsMenuItem->setData(ADD_OBJ_BARS);
add_menu.addAction(barsMenuItem);
add_menu.addSeparator();
QAction* toneMenuItem = new QAction(&add_menu);
toneMenuItem->setText("Tone...");
toneMenuItem->setText(tr("Tone..."));
toneMenuItem->setData(ADD_OBJ_TONE);
add_menu.addAction(toneMenuItem);
QAction* noiseMenuItem = new QAction(&add_menu);
noiseMenuItem->setText("Noise...");
noiseMenuItem->setText(tr("Noise..."));
noiseMenuItem->setData(ADD_OBJ_NOISE);
add_menu.addAction(noiseMenuItem);
@@ -1525,11 +1526,16 @@ void Timeline::setScroll(int s) {
void Timeline::record_btn_click() {
if (project_url.isEmpty()) {
QMessageBox::critical(this, "Unsaved Project", "You must save this project before you can record audio in it.", QMessageBox::Ok);
QMessageBox::critical(this,
tr("Unsaved Project"),
tr("You must save this project before you can record audio in it."),
QMessageBox::Ok);
} else {
creating = true;
creating_object = ADD_OBJ_AUDIO;
mainWindow->statusBar()->showMessage("Click on the timeline where you want to start recording (drag to limit the recording to a certain timeframe)", 10000);
mainWindow->statusBar()->showMessage(
tr("Click on the timeline where you want to start recording (drag to limit the recording to a certain timeframe)"),
10000);
}
}
@@ -1608,7 +1614,7 @@ void Timeline::setup_ui() {
arrow_icon.addFile(QStringLiteral(":/icons/arrow-disabled.png"), QSize(), QIcon::Disabled, QIcon::Off);
toolArrowButton->setIcon(arrow_icon);
toolArrowButton->setCheckable(true);
toolArrowButton->setToolTip("Pointer Tool (V)");
toolArrowButton->setToolTip(tr("Pointer Tool") + " (V)");
toolArrowButton->setProperty("tool", TIMELINE_TOOL_POINTER);
connect(toolArrowButton, SIGNAL(clicked(bool)), this, SLOT(set_tool()));
tool_buttons_layout->addWidget(toolArrowButton);
@@ -1619,7 +1625,7 @@ void Timeline::setup_ui() {
icon1.addFile(QStringLiteral(":/icons/beam-disabled.png"), QSize(), QIcon::Disabled, QIcon::Off);
toolEditButton->setIcon(icon1);
toolEditButton->setCheckable(true);
toolEditButton->setToolTip("Edit Tool (X)");
toolEditButton->setToolTip(tr("Edit Tool") + " (X)");
toolEditButton->setProperty("tool", TIMELINE_TOOL_EDIT);
connect(toolEditButton, SIGNAL(clicked(bool)), this, SLOT(set_tool()));
tool_buttons_layout->addWidget(toolEditButton);
@@ -1630,7 +1636,7 @@ void Timeline::setup_ui() {
icon2.addFile(QStringLiteral(":/icons/ripple-disabled.png"), QSize(), QIcon::Disabled, QIcon::Off);
toolRippleButton->setIcon(icon2);
toolRippleButton->setCheckable(true);
toolRippleButton->setToolTip("Ripple Tool (B)");
toolRippleButton->setToolTip(tr("Ripple Tool") + " (B)");
toolRippleButton->setProperty("tool", TIMELINE_TOOL_RIPPLE);
connect(toolRippleButton, SIGNAL(clicked(bool)), this, SLOT(set_tool()));
tool_buttons_layout->addWidget(toolRippleButton);
@@ -1641,7 +1647,7 @@ void Timeline::setup_ui() {
icon4.addFile(QStringLiteral(":/icons/razor-disabled.png"), QSize(), QIcon::Disabled, QIcon::Off);
toolRazorButton->setIcon(icon4);
toolRazorButton->setCheckable(true);
toolRazorButton->setToolTip("Razor Tool (C)");
toolRazorButton->setToolTip(tr("Razor Tool") + " (C)");
toolRazorButton->setProperty("tool", TIMELINE_TOOL_RAZOR);
connect(toolRazorButton, SIGNAL(clicked(bool)), this, SLOT(set_tool()));
tool_buttons_layout->addWidget(toolRazorButton);
@@ -1652,7 +1658,7 @@ void Timeline::setup_ui() {
icon5.addFile(QStringLiteral(":/icons/slip-disabled.png"), QSize(), QIcon::Disabled, QIcon::On);
toolSlipButton->setIcon(icon5);
toolSlipButton->setCheckable(true);
toolSlipButton->setToolTip("Slip Tool (Y)");
toolSlipButton->setToolTip(tr("Slip Tool") + " (Y)");
toolSlipButton->setProperty("tool", TIMELINE_TOOL_SLIP);
connect(toolSlipButton, SIGNAL(clicked(bool)), this, SLOT(set_tool()));
tool_buttons_layout->addWidget(toolSlipButton);
@@ -1663,7 +1669,7 @@ void Timeline::setup_ui() {
icon6.addFile(QStringLiteral(":/icons/slide-disabled.png"), QSize(), QIcon::Disabled, QIcon::On);
toolSlideButton->setIcon(icon6);
toolSlideButton->setCheckable(true);
toolSlideButton->setToolTip("Slide Tool (U)");
toolSlideButton->setToolTip(tr("Slide Tool") + " (U)");
toolSlideButton->setProperty("tool", TIMELINE_TOOL_SLIDE);
connect(toolSlideButton, SIGNAL(clicked(bool)), this, SLOT(set_tool()));
tool_buttons_layout->addWidget(toolSlideButton);
@@ -1674,7 +1680,7 @@ void Timeline::setup_ui() {
icon7.addFile(QStringLiteral(":/icons/hand-disabled.png"), QSize(), QIcon::Disabled, QIcon::On);
toolHandButton->setIcon(icon7);
toolHandButton->setCheckable(true);
toolHandButton->setToolTip("Hand Tool (H)");
toolHandButton->setToolTip(tr("Hand Tool") + " (H)");
toolHandButton->setProperty("tool", TIMELINE_TOOL_HAND);
connect(toolHandButton, SIGNAL(clicked(bool)), this, SLOT(set_tool()));
tool_buttons_layout->addWidget(toolHandButton);
@@ -1685,7 +1691,7 @@ void Timeline::setup_ui() {
icon8.addFile(QStringLiteral(":/icons/transition-tool-disabled.png"), QSize(), QIcon::Disabled, QIcon::On);
toolTransitionButton->setIcon(icon8);
toolTransitionButton->setCheckable(true);
toolTransitionButton->setToolTip("Transition Tool (T)");
toolTransitionButton->setToolTip(tr("Transition Tool") + " (T)");
connect(toolTransitionButton, SIGNAL(clicked(bool)), this, SLOT(transition_tool_click()));
tool_buttons_layout->addWidget(toolTransitionButton);
@@ -1696,7 +1702,7 @@ void Timeline::setup_ui() {
snappingButton->setIcon(icon9);
snappingButton->setCheckable(true);
snappingButton->setChecked(true);
snappingButton->setToolTip("Snapping (S)");
snappingButton->setToolTip(tr("Snapping") + " (S)");
connect(snappingButton, SIGNAL(toggled(bool)), this, SLOT(snapping_clicked(bool)));
tool_buttons_layout->addWidget(snappingButton);
@@ -1705,7 +1711,7 @@ void Timeline::setup_ui() {
icon10.addFile(QStringLiteral(":/icons/zoomin.png"), QSize(), QIcon::Normal, QIcon::On);
icon10.addFile(QStringLiteral(":/icons/zoomin-disabled.png"), QSize(), QIcon::Disabled, QIcon::On);
zoomInButton->setIcon(icon10);
zoomInButton->setToolTip("Zoom In (=)");
zoomInButton->setToolTip(tr("Zoom In") + " (=)");
connect(zoomInButton, SIGNAL(clicked(bool)), this, SLOT(zoom_in()));
tool_buttons_layout->addWidget(zoomInButton);
@@ -1714,7 +1720,7 @@ void Timeline::setup_ui() {
icon11.addFile(QStringLiteral(":/icons/zoomout.png"), QSize(), QIcon::Normal, QIcon::On);
icon11.addFile(QStringLiteral(":/icons/zoomout-disabled.png"), QSize(), QIcon::Disabled, QIcon::On);
zoomOutButton->setIcon(icon11);
zoomOutButton->setToolTip("Zoom Out (-)");
zoomOutButton->setToolTip(tr("Zoom Out") + " (-)");
connect(zoomOutButton, SIGNAL(clicked(bool)), this, SLOT(zoom_out()));
tool_buttons_layout->addWidget(zoomOutButton);
@@ -1723,7 +1729,7 @@ void Timeline::setup_ui() {
icon12.addFile(QStringLiteral(":/icons/record.png"), QSize(), QIcon::Normal, QIcon::On);
icon12.addFile(QStringLiteral(":/icons/record-disabled.png"), QSize(), QIcon::Disabled, QIcon::On);
recordButton->setIcon(icon12);
recordButton->setToolTip("Record audio");
recordButton->setToolTip(tr("Record audio"));
connect(recordButton, SIGNAL(clicked(bool)), this, SLOT(record_btn_click()));
tool_buttons_layout->addWidget(recordButton);
@@ -1733,7 +1739,7 @@ void Timeline::setup_ui() {
icon13.addFile(QStringLiteral(":/icons/add-button.png"), QSize(), QIcon::Normal, QIcon::On);
icon13.addFile(QStringLiteral(":/icons/add-button-disabled.png"), QSize(), QIcon::Disabled, QIcon::On);
addButton->setIcon(icon13);
addButton->setToolTip("Add title, solid, bars, etc.");
addButton->setToolTip(tr("Add title, solid, bars, etc."));
connect(addButton, SIGNAL(clicked()), this, SLOT(add_btn_click()));
tool_buttons_layout->addWidget(addButton);