translation
This commit is contained in:
+8
-5
@@ -43,6 +43,7 @@
|
||||
#include <QPainter>
|
||||
#include <QtMath>
|
||||
#include <QMenu>
|
||||
#include <QApplication>
|
||||
|
||||
bool shaders_are_enabled = true;
|
||||
QVector<EffectMeta> effects;
|
||||
@@ -71,7 +72,9 @@ Effect* create_effect(Clip* c, const EffectMeta* em) {
|
||||
}
|
||||
} else {
|
||||
qCritical() << "Invalid effect data";
|
||||
QMessageBox::critical(mainWindow, "Invalid effect", "No candidate for effect '" + em->name + "'. This effect may be corrupt. Try reinstalling it or Olive.");
|
||||
QMessageBox::critical(mainWindow,
|
||||
QCoreApplication::translate("Effect", "Invalid effect"),
|
||||
QCoreApplication::translate("Effect", "No candidate for effect '%1'. This effect may be corrupt. Try reinstalling it or Olive.").arg(em->name));
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
@@ -86,7 +89,7 @@ const EffectMeta* get_internal_meta(int internal_id, int type) {
|
||||
}
|
||||
|
||||
void load_internal_effects() {
|
||||
qWarning() << "Shaders are disabled, some effects may be nonfunctional";
|
||||
if (!shaders_are_enabled) qWarning() << "Shaders are disabled, some effects may be nonfunctional";
|
||||
|
||||
EffectMeta em;
|
||||
|
||||
@@ -545,18 +548,18 @@ void Effect::show_context_menu(const QPoint& pos) {
|
||||
int index = get_index_in_clip();
|
||||
|
||||
if (index > 0) {
|
||||
QAction* move_up = menu.addAction("Move &Up");
|
||||
QAction* move_up = menu.addAction(tr("Move &Up"));
|
||||
connect(move_up, SIGNAL(triggered(bool)), this, SLOT(move_up()));
|
||||
}
|
||||
|
||||
if (index < parent_clip->effects.size() - 1) {
|
||||
QAction* move_down = menu.addAction("Move &Down");
|
||||
QAction* move_down = menu.addAction(tr("Move &Down"));
|
||||
connect(move_down, SIGNAL(triggered(bool)), this, SLOT(move_down()));
|
||||
}
|
||||
|
||||
menu.addSeparator();
|
||||
|
||||
QAction* del_action = menu.addAction("D&elete");
|
||||
QAction* del_action = menu.addAction(tr("D&elete"));
|
||||
connect(del_action, SIGNAL(triggered(bool)), this, SLOT(delete_self()));
|
||||
|
||||
menu.exec(container->title_bar->mapToGlobal(pos));
|
||||
|
||||
@@ -64,7 +64,10 @@ void EffectRow::set_keyframe_enabled(bool enabled) {
|
||||
set_keyframe_now(ca);
|
||||
undo_stack.push(ca);
|
||||
} else {
|
||||
if (QMessageBox::question(panel_effect_controls, "Disable Keyframes", "Disabling keyframes will delete all current keyframes. Are you sure you want to do this?", QMessageBox::Yes, QMessageBox::No) == QMessageBox::Yes) {
|
||||
if (QMessageBox::question(panel_effect_controls,
|
||||
tr("Disable Keyframes"),
|
||||
tr("Disabling keyframes will delete all current keyframes. Are you sure you want to do this?"),
|
||||
QMessageBox::Yes, QMessageBox::No) == QMessageBox::Yes) {
|
||||
// clear
|
||||
ComboAction* ca = new ComboAction();
|
||||
for (int i=0;i<fieldCount();i++) {
|
||||
|
||||
+35
-24
@@ -9,6 +9,7 @@
|
||||
#include "projectmodel.h"
|
||||
|
||||
#include <QPainter>
|
||||
#include <QCoreApplication>
|
||||
|
||||
#include "debug.h"
|
||||
|
||||
@@ -19,18 +20,18 @@ extern "C" {
|
||||
|
||||
QString get_interlacing_name(int interlacing) {
|
||||
switch (interlacing) {
|
||||
case VIDEO_PROGRESSIVE: return "None (Progressive)";
|
||||
case VIDEO_TOP_FIELD_FIRST: return "Top Field First";
|
||||
case VIDEO_BOTTOM_FIELD_FIRST: return "Bottom Field First";
|
||||
default: return "Invalid";
|
||||
case VIDEO_PROGRESSIVE: return QCoreApplication::translate("InterlacingName", "None (Progressive)");
|
||||
case VIDEO_TOP_FIELD_FIRST: return QCoreApplication::translate("InterlacingName", "Top Field First");
|
||||
case VIDEO_BOTTOM_FIELD_FIRST: return QCoreApplication::translate("InterlacingName", "Bottom Field First");
|
||||
default: return QCoreApplication::translate("InterlacingName", "Invalid");
|
||||
}
|
||||
}
|
||||
|
||||
QString get_channel_layout_name(int channels, uint64_t layout) {
|
||||
switch (channels) {
|
||||
case 0: return "Invalid"; break;
|
||||
case 1: return "Mono"; break;
|
||||
case 2: return "Stereo"; break;
|
||||
case 0: return QCoreApplication::translate("ChannelLayoutName", "Invalid"); break;
|
||||
case 1: return QCoreApplication::translate("ChannelLayoutName", "Mono"); break;
|
||||
case 2: return QCoreApplication::translate("ChannelLayoutName", "Stereo"); break;
|
||||
default: {
|
||||
char buf[50];
|
||||
av_get_channel_layout_string(buf, sizeof(buf), channels, layout);
|
||||
@@ -76,7 +77,7 @@ void Media::set_sequence(Sequence *s) {
|
||||
}
|
||||
|
||||
void Media::set_folder() {
|
||||
if (folder_name.isEmpty()) folder_name = "New Folder";
|
||||
if (folder_name.isEmpty()) folder_name = QCoreApplication::translate("Media", "New Folder");
|
||||
set_icon(QIcon(":/icons/folder.png"));
|
||||
type = MEDIA_TYPE_FOLDER;
|
||||
object = NULL;
|
||||
@@ -95,11 +96,11 @@ void Media::update_tooltip(const QString& error) {
|
||||
case MEDIA_TYPE_FOOTAGE:
|
||||
{
|
||||
Footage* f = to_footage();
|
||||
tooltip = "Name: " + f->name + "\nFilename: " + f->url + "\n";
|
||||
tooltip = QCoreApplication::translate("Media", "Name:") + " " + f->name + "\n" + QCoreApplication::translate("Media", "Filename:") + " " + f->url + "\n";
|
||||
|
||||
if (error.isEmpty()) {
|
||||
if (f->video_tracks.size() > 0) {
|
||||
tooltip += "Video Dimensions: ";
|
||||
tooltip += QCoreApplication::translate("Media", "Video Dimensions:") + " ";
|
||||
for (int i=0;i<f->video_tracks.size();i++) {
|
||||
if (i > 0) {
|
||||
tooltip += ", ";
|
||||
@@ -109,7 +110,7 @@ void Media::update_tooltip(const QString& error) {
|
||||
tooltip += "\n";
|
||||
|
||||
if (!f->video_tracks.at(0).infinite_length) {
|
||||
tooltip += "Frame Rate: ";
|
||||
tooltip += QCoreApplication::translate("Media", "Frame Rate:") + " ";
|
||||
for (int i=0;i<f->video_tracks.size();i++) {
|
||||
if (i > 0) {
|
||||
tooltip += ", ";
|
||||
@@ -117,14 +118,16 @@ void Media::update_tooltip(const QString& error) {
|
||||
if (f->video_tracks.at(i).video_interlacing == VIDEO_PROGRESSIVE) {
|
||||
tooltip += QString::number(f->video_tracks.at(i).video_frame_rate * f->speed);
|
||||
} else {
|
||||
tooltip += QString::number(f->video_tracks.at(i).video_frame_rate * f->speed * 2);
|
||||
tooltip += " fields (" + QString::number(f->video_tracks.at(i).video_frame_rate * f->speed) + " frames)";
|
||||
tooltip += QCoreApplication::translate("Media", "%1 fields (%2 frames)").arg(
|
||||
QString::number(f->video_tracks.at(i).video_frame_rate * f->speed * 2),
|
||||
QString::number(f->video_tracks.at(i).video_frame_rate * f->speed)
|
||||
);
|
||||
}
|
||||
}
|
||||
tooltip += "\n";
|
||||
}
|
||||
|
||||
tooltip += "Interlacing: ";
|
||||
tooltip += QCoreApplication::translate("Media", "Interlacing:") + " ";
|
||||
for (int i=0;i<f->video_tracks.size();i++) {
|
||||
if (i > 0) {
|
||||
tooltip += ", ";
|
||||
@@ -136,7 +139,7 @@ void Media::update_tooltip(const QString& error) {
|
||||
if (f->audio_tracks.size() > 0) {
|
||||
tooltip += "\n";
|
||||
|
||||
tooltip += "Audio Frequency: ";
|
||||
tooltip += QCoreApplication::translate("Media", "Audio Frequency:") + " ";
|
||||
for (int i=0;i<f->audio_tracks.size();i++) {
|
||||
if (i > 0) {
|
||||
tooltip += ", ";
|
||||
@@ -145,7 +148,7 @@ void Media::update_tooltip(const QString& error) {
|
||||
}
|
||||
tooltip += "\n";
|
||||
|
||||
tooltip += "Audio Channels: ";
|
||||
tooltip += QCoreApplication::translate("Media", "Audio Channels:") + " ";
|
||||
for (int i=0;i<f->audio_tracks.size();i++) {
|
||||
if (i > 0) {
|
||||
tooltip += ", ";
|
||||
@@ -162,11 +165,19 @@ void Media::update_tooltip(const QString& error) {
|
||||
case MEDIA_TYPE_SEQUENCE:
|
||||
{
|
||||
Sequence* s = to_sequence();
|
||||
tooltip = "Name: " + s->name
|
||||
+ "\nVideo Dimensions: " + QString::number(s->width) + "x" + QString::number(s->height)
|
||||
+ "\nFrame Rate: " + QString::number(s->frame_rate)
|
||||
+ "\nAudio Frequency: " + QString::number(s->audio_frequency)
|
||||
+ "\nAudio Layout: " + get_channel_layout_name(av_get_channel_layout_nb_channels(s->audio_layout), s->audio_layout);
|
||||
|
||||
tooltip = QCoreApplication::translate("Media", "Name: %1"
|
||||
"\nVideo Dimensions: %2x%3"
|
||||
"\nFrame Rate: %4"
|
||||
"\nAudio Frequency: %5"
|
||||
"\nAudio Layout: %6").arg(
|
||||
s->name,
|
||||
QString::number(s->width),
|
||||
QString::number(s->height),
|
||||
QString::number(s->frame_rate),
|
||||
QString::number(s->audio_frequency),
|
||||
get_channel_layout_name(av_get_channel_layout_nb_channels(s->audio_layout), s->audio_layout)
|
||||
);
|
||||
}
|
||||
break;
|
||||
}
|
||||
@@ -268,9 +279,9 @@ QVariant Media::data(int column, int role) {
|
||||
break;
|
||||
case Qt::DisplayRole:
|
||||
switch (column) {
|
||||
case 0: return (root) ? "Name" : get_name();
|
||||
case 0: return (root) ? QCoreApplication::translate("Media", "Name") : get_name();
|
||||
case 1:
|
||||
if (root) return "Duration";
|
||||
if (root) return QCoreApplication::translate("Media", "Duration");
|
||||
if (get_type() == MEDIA_TYPE_SEQUENCE) {
|
||||
Sequence* s = to_sequence();
|
||||
return frame_to_timecode(s->getEndFrame(), config.timecode_view, s->frame_rate);
|
||||
@@ -287,7 +298,7 @@ QVariant Media::data(int column, int role) {
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
if (root) return "Rate";
|
||||
if (root) return QCoreApplication::translate("Media", "Rate");
|
||||
if (get_type() == MEDIA_TYPE_SEQUENCE) return QString::number(get_frame_rate()) + " FPS";
|
||||
if (get_type() == MEDIA_TYPE_FOOTAGE) {
|
||||
Footage* f = to_footage();
|
||||
|
||||
@@ -3,6 +3,8 @@
|
||||
#include "clip.h"
|
||||
#include "transition.h"
|
||||
|
||||
#include <QCoreApplication>
|
||||
|
||||
#include "debug.h"
|
||||
|
||||
Sequence::Sequence() :
|
||||
@@ -24,7 +26,7 @@ Sequence::~Sequence() {
|
||||
|
||||
Sequence* Sequence::copy() {
|
||||
Sequence* s = new Sequence();
|
||||
s->name = name + " (copy)";
|
||||
s->name = QCoreApplication::translate("Sequence", "%1 (copy)").arg(name);
|
||||
s->width = width;
|
||||
s->height = height;
|
||||
s->frame_rate = frame_rate;
|
||||
|
||||
+20
-16
@@ -49,10 +49,10 @@ void SourcesCommon::show_context_menu(QWidget* parent, const QModelIndexList& it
|
||||
|
||||
selected_items = items;
|
||||
|
||||
QAction* import_action = menu.addAction("Import...");
|
||||
QAction* import_action = menu.addAction(tr("Import..."));
|
||||
QObject::connect(import_action, SIGNAL(triggered(bool)), project_parent, SLOT(import_dialog()));
|
||||
|
||||
QMenu* new_menu = menu.addMenu("New");
|
||||
QMenu* new_menu = menu.addMenu(tr("New"));
|
||||
mainWindow->make_new_menu(new_menu);
|
||||
|
||||
if (items.size() > 0) {
|
||||
@@ -62,20 +62,20 @@ void SourcesCommon::show_context_menu(QWidget* parent, const QModelIndexList& it
|
||||
// replace footage
|
||||
int type = m->get_type();
|
||||
if (type == MEDIA_TYPE_FOOTAGE) {
|
||||
QAction* replace_action = menu.addAction("Replace/Relink Media");
|
||||
QAction* replace_action = menu.addAction(tr("Replace/Relink Media"));
|
||||
QObject::connect(replace_action, SIGNAL(triggered(bool)), project_parent, SLOT(replace_selected_file()));
|
||||
|
||||
#if defined(Q_OS_WIN)
|
||||
QAction* reveal_in_explorer = menu.addAction("Reveal in Explorer");
|
||||
QAction* reveal_in_explorer = menu.addAction(tr("Reveal in Explorer"));
|
||||
#elif defined(Q_OS_MAC)
|
||||
QAction* reveal_in_explorer = menu.addAction("Reveal in Finder");
|
||||
QAction* reveal_in_explorer = menu.addAction(tr("Reveal in Finder"));
|
||||
#else
|
||||
QAction* reveal_in_explorer = menu.addAction("Reveal in File Manager");
|
||||
QAction* reveal_in_explorer = menu.addAction(tr("Reveal in File Manager"));
|
||||
#endif
|
||||
QObject::connect(reveal_in_explorer, SIGNAL(triggered(bool)), this, SLOT(reveal_in_browser()));
|
||||
}
|
||||
if (type != MEDIA_TYPE_FOLDER) {
|
||||
QAction* replace_clip_media = menu.addAction("Replace Clips Using This Media");
|
||||
QAction* replace_clip_media = menu.addAction(tr("Replace Clips Using This Media"));
|
||||
QObject::connect(replace_clip_media, SIGNAL(triggered(bool)), project_parent, SLOT(replace_clip_media()));
|
||||
}
|
||||
}
|
||||
@@ -93,41 +93,41 @@ void SourcesCommon::show_context_menu(QWidget* parent, const QModelIndexList& it
|
||||
}
|
||||
|
||||
// create sequence from
|
||||
QAction* create_seq_from = menu.addAction("Create Sequence With This Media");
|
||||
QAction* create_seq_from = menu.addAction(tr("Create Sequence With This Media"));
|
||||
QObject::connect(create_seq_from, SIGNAL(triggered(bool)), this, SLOT(create_seq_from_selected()));
|
||||
|
||||
// ONLY sequences are selected
|
||||
if (all_sequences) {
|
||||
// ONLY sequences are selected
|
||||
QAction* duplicate_action = menu.addAction("Duplicate");
|
||||
QAction* duplicate_action = menu.addAction(tr("Duplicate"));
|
||||
QObject::connect(duplicate_action, SIGNAL(triggered(bool)), project_parent, SLOT(duplicate_selected()));
|
||||
}
|
||||
|
||||
// ONLY footage is selected
|
||||
if (all_footage) {
|
||||
QAction* delete_footage_from_sequences = menu.addAction("Delete All Clips Using This Media");
|
||||
QAction* delete_footage_from_sequences = menu.addAction(tr("Delete All Clips Using This Media"));
|
||||
QObject::connect(delete_footage_from_sequences, SIGNAL(triggered(bool)), project_parent, SLOT(delete_clips_using_selected_media()));
|
||||
}
|
||||
|
||||
// delete media
|
||||
QAction* delete_action = menu.addAction("Delete");
|
||||
QAction* delete_action = menu.addAction(tr("Delete"));
|
||||
QObject::connect(delete_action, SIGNAL(triggered(bool)), project_parent, SLOT(delete_selected_media()));
|
||||
|
||||
if (items.size() == 1) {
|
||||
QAction* properties_action = menu.addAction("Properties...");
|
||||
QAction* properties_action = menu.addAction(tr("Properties..."));
|
||||
QObject::connect(properties_action, SIGNAL(triggered(bool)), project_parent, SLOT(open_properties()));
|
||||
}
|
||||
}
|
||||
|
||||
menu.addSeparator();
|
||||
|
||||
QAction* tree_view_action = menu.addAction("Tree View");
|
||||
QAction* tree_view_action = menu.addAction(tr("Tree View"));
|
||||
connect(tree_view_action, SIGNAL(triggered(bool)), project_parent, SLOT(set_tree_view()));
|
||||
|
||||
QAction* icon_view_action = menu.addAction("Icon View");
|
||||
QAction* icon_view_action = menu.addAction(tr("Icon View"));
|
||||
connect(icon_view_action, SIGNAL(triggered(bool)), project_parent, SLOT(set_icon_view()));
|
||||
|
||||
QAction* toolbar_action = menu.addAction("Show Toolbar");
|
||||
QAction* toolbar_action = menu.addAction(tr("Show Toolbar"));
|
||||
toolbar_action->setCheckable(true);
|
||||
toolbar_action->setChecked(project_parent->toolbar_widget->isVisible());
|
||||
connect(toolbar_action, SIGNAL(triggered(bool)), project_parent->toolbar_widget, SLOT(setVisible(bool)));
|
||||
@@ -183,7 +183,11 @@ void SourcesCommon::dropEvent(QWidget* parent, QDropEvent *event, const QModelIn
|
||||
&& m->get_type() == MEDIA_TYPE_FOOTAGE
|
||||
&& !QFileInfo(paths.at(0)).isDir()
|
||||
&& config.drop_on_media_to_replace
|
||||
&& QMessageBox::question(parent, "Replace Media", "You dropped a file onto '" + m->get_name() + "'. Would you like to replace it with the dropped file?", QMessageBox::Yes | QMessageBox::No, QMessageBox::No) == QMessageBox::Yes) {
|
||||
&& QMessageBox::question(
|
||||
parent,
|
||||
tr("Replace Media"),
|
||||
tr("You dropped a file onto '%1'. Would you like to replace it with the dropped file?").arg(m->get_name()),
|
||||
QMessageBox::Yes | QMessageBox::No, QMessageBox::No) == QMessageBox::Yes) {
|
||||
replace = true;
|
||||
project_parent->replace_media(m, paths.at(0));
|
||||
}
|
||||
|
||||
@@ -19,12 +19,13 @@
|
||||
#include "panels/timeline.h"
|
||||
|
||||
#include <QMessageBox>
|
||||
#include <QCoreApplication>
|
||||
|
||||
Transition::Transition(Clip* c, Clip* s, const EffectMeta* em) :
|
||||
Effect(c, em), secondary_clip(s),
|
||||
length(30)
|
||||
{
|
||||
length_field = add_row("Length:", false)->add_field(EFFECT_FIELD_DOUBLE, "length");
|
||||
length_field = add_row(tr("Length:"), false)->add_field(EFFECT_FIELD_DOUBLE, "length");
|
||||
connect(length_field, SIGNAL(changed()), this, SLOT(set_length_from_slider()));
|
||||
length_field->set_double_default_value(30);
|
||||
length_field->set_double_minimum_value(0);
|
||||
@@ -74,7 +75,10 @@ Transition* get_transition_from_meta(Clip* c, Clip* s, const EffectMeta* em) {
|
||||
}
|
||||
} else {
|
||||
qCritical() << "Invalid transition data";
|
||||
QMessageBox::critical(mainWindow, "Invalid transition", "No candidate for transition '" + em->name + "'. This transition may be corrupt. Try reinstalling it or Olive.");
|
||||
QMessageBox::critical(mainWindow,
|
||||
QCoreApplication::translate("transition", "Invalid transition"),
|
||||
QCoreApplication::translate("transition", "No candidate for transition '%1'. This transition may be corrupt. Try reinstalling it or Olive.").arg(em->name)
|
||||
);
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user