$(OBJDIR)/pluginvclient.o \
$(OBJDIR)/preferences.o \
$(OBJDIR)/preferencesthread.o \
- $(OBJDIR)/presetsgui.o \
- $(OBJDIR)/presets.o \
$(OBJDIR)/question.o \
$(OBJDIR)/quit.o \
$(OBJDIR)/recconfirmdelete.o \
#include "audiodevice.h"
#include "audioalsa.h"
#include "bcsignals.h"
+#include "language.h"
#include "mutex.h"
#include "playbackconfig.h"
#include "preferences.h"
err = snd_pcm_hw_params_any(dsp, params);
if (err < 0) {
- fprintf(stderr, "AudioALSA::set_params: no PCM configurations available\n");
+ fprintf(stderr, "AudioALSA::set_params: ");
+ fprintf(stderr, _("no PCM configurations available\n"));
return 1;
}
params,
SND_PCM_ACCESS_RW_INTERLEAVED);
if(err) {
- fprintf(stderr, "AudioALSA::set_params: failed to set up "
- "interleaved device access.\n");
+ fprintf(stderr, "AudioALSA::set_params: ");
+ fprintf(stderr, _("failed to set up interleaved device access.\n"));
return 1;
}
params,
translate_format(bits));
if(err) {
- fprintf(stderr, "AudioALSA::set_params: failed to set output format.\n");
+ fprintf(stderr, "AudioALSA::set_params: ");
+ fprintf(stderr, _("failed to set output format.\n"));
return 1;
}
params,
channels);
if(err) {
- fprintf(stderr, "AudioALSA::set_params: Configured ALSA device "
- "does not support %d channel operation.\n",
+ fprintf(stderr, "AudioALSA::set_params: ");
+ fprintf(stderr, _("Configured ALSA device does not support %d channel operation.\n"),
channels);
return 1;
}
(unsigned int*)&samplerate,
(int*)0);
if(err) {
- fprintf(stderr, "AudioALSA::set_params: Configured ALSA device "
- "does not support %u Hz playback.\n",
+ fprintf(stderr, "AudioALSA::set_params: ");
+ fprintf(stderr, _(" Configured ALSA device does not support %u Hz playback.\n"),
(unsigned int)samplerate);
return 1;
}
#include "clip.h"
#include "condition.h"
#include "errno.h"
+#include "language.h"
#include "playbackconfig.h"
#include "preferences.h"
#include "recordconfig.h"
buffer_info = 0x7fff000f;
int ret = 1;
if(ioctl(dsp_in[i], SNDCTL_DSP_SETFRAGMENT, &buffer_info))
- fprintf(stderr, "SNDCTL_DSP_SETFRAGMENT failed.\n");
+ fprintf(stderr, _("%s failed\n"), "SNDCTL_DSP_SETFRAGMENT");
else if(ioctl(dsp_in[i], SNDCTL_DSP_SETFMT, &format) < 0)
- fprintf(stderr, "SNDCTL_DSP_SETFMT failed\n");
+ fprintf(stderr, _("%s failed\n"), "SNDCTL_DSP_SETFMT");
else {
int channels = device->get_ichannels();
if(ioctl(dsp_in[i], SNDCTL_DSP_CHANNELS, &channels) < 0)
- fprintf(stderr, "SNDCTL_DSP_CHANNELS failed\n");
+ fprintf(stderr, _("%s failed\n"), "SNDCTL_DSP_CHANNELS");
else if(ioctl(dsp_in[i], SNDCTL_DSP_SPEED, &device->in_samplerate) < 0)
- fprintf(stderr, "SNDCTL_DSP_SPEED failed\n");
+ fprintf(stderr, _("%s failed\n"), "SNDCTL_DSP_SPEED");
else
ret = 0;
}
AWindowGUI::AWindowGUI(MWindow *mwindow, AWindow *awindow)
- : BC_Window(PROGRAM_NAME ": Resources",
- mwindow->session->awindow_x,
- mwindow->session->awindow_y,
- mwindow->session->awindow_w,
- mwindow->session->awindow_h,
- 100,
- 100,
- 1,
- 1,
- 1)
+ : BC_Window(_(PROGRAM_NAME ": Resources"),
+ mwindow->session->awindow_x, mwindow->session->awindow_y,
+ mwindow->session->awindow_w, mwindow->session->awindow_h,
+ 100, 100, 1, 1, 1)
{
// printf("AWindowGUI::AWindowGUI %d %d %d %d\n",
// mwindow->session->awindow_x,
VFrame **images = mwindow->theme->get_image_set("playpatch_data");
AVIconDrawing::calculate_geometry(this, images, &avicon_w, &avicon_h);
add_subwindow(avicon_drawing = new AVIconDrawing(this, fw-avicon_w, fy, images));
- add_subwindow(add_tools = new AddTools(mwindow, this, fx, fy, "Visibility"));
+ add_subwindow(add_tools = new AddTools(mwindow, this, fx, fy, _("Visibility")));
add_tools->create_objects();
fy += add_tools->get_h(); fh -= add_tools->get_h();
SET_TRACE
AWindowRemovePluginGUI::
AWindowRemovePluginGUI(AWindow *awindow, AWindowRemovePlugin *thread,
int x, int y, PluginServer *plugin)
- : BC_Window(PROGRAM_NAME ": Remove plugin", x,y, 500,200, 50, 50, 1, 0, 1, -1, "", 1)
+ : BC_Window(_(PROGRAM_NAME ": Remove plugin"), x,y, 500,200, 50, 50, 1, 0, 1, -1, "", 1)
{
this->awindow = awindow;
this->thread = thread;
void AWindowRemovePlugin::handle_close_event(int result)
{
if( !result ) {
- printf("remove %s\n", plugin->path);
+ printf(_("remove %s\n"), plugin->path);
ArrayList<BC_ListBoxItem*> *folder =
plugin->audio ? plugin->transition ?
&awindow->gui->atransitions :
ChannelEditWindow::ChannelEditWindow(ChannelEditThread *thread,
ChannelPicker *channel_picker)
- : BC_Window(PROGRAM_NAME ": Channels",
+ : BC_Window(_(PROGRAM_NAME ": Channels"),
channel_picker->mwindow->session->channels_x,
channel_picker->mwindow->session->channels_y,
350, 400, 350, 400, 0, 0, 1)
ConfirmScan::ConfirmScan(ChannelEditWindow *gui, int x, int y)
- : BC_Window(PROGRAM_NAME ": Scan confirm",
+ : BC_Window(_(PROGRAM_NAME ": Scan confirm"),
x,
y,
350,
progress = new BC_ProgressBox(
edit->channel_picker->parent_window->get_abs_cursor_x(1),
edit->channel_picker->parent_window->get_abs_cursor_y(1),
- "Scanning",
+ _("Scanning"),
chanlists[edit->scan_params.freqtable].count);
progress->start();
char string[BCTEXTLEN];
sprintf(edit->scan_params.title, "%s",
chanlists[edit->scan_params.freqtable].list[i].name);
- sprintf(string, "Scanning %s", edit->scan_params.title);
+ sprintf(string, _("Scanning %s"), edit->scan_params.title);
progress->update_title(string, 1);
progress->update(i, 1);
edit->channel_picker->set_channel(&edit->scan_params);
ChannelEditEditWindow::ChannelEditEditWindow(ChannelEditEditThread *thread,
ChannelEditWindow *window,
ChannelPicker *channel_picker)
- : BC_Window(PROGRAM_NAME ": Edit Channel",
+ : BC_Window(_(PROGRAM_NAME ": Edit Channel"),
channel_picker->parent_window->get_abs_cursor_x(1),
channel_picker->parent_window->get_abs_cursor_y(1),
390,
ChannelEditPictureWindow::ChannelEditPictureWindow(ChannelEditPictureThread *thread,
ChannelPicker *channel_picker)
- : BC_Window(PROGRAM_NAME ": Picture",
+ : BC_Window(_(PROGRAM_NAME ": Picture"),
channel_picker->mwindow->session->picture_x,
channel_picker->mwindow->session->picture_y,
calculate_w(channel_picker),
!channel_picker->get_controls()))
{
result = BC_Title::calculate_w(channel_picker->parent_window,
- "Device has no picture controls." +
- 2 * widget_border);
+ _("Device has no picture controls.")) +
+ 2 * widget_border;
}
// Only used for Video4Linux 1
{
if(picture_usage->use_brightness)
{
- int new_w = BC_Title::calculate_w(channel_picker->parent_window, "Brightness:") + pad;
+ int new_w = BC_Title::calculate_w(channel_picker->parent_window, _("Brightness:")) + pad;
result = MAX(result, new_w);
}
if(picture_usage->use_contrast)
{
- int new_w = BC_Title::calculate_w(channel_picker->parent_window, "Contrast:") + pad;
+ int new_w = BC_Title::calculate_w(channel_picker->parent_window, _("Contrast:")) + pad;
result = MAX(result, new_w);
}
if(picture_usage->use_color)
{
- int new_w = BC_Title::calculate_w(channel_picker->parent_window, "Color:") + pad;
+ int new_w = BC_Title::calculate_w(channel_picker->parent_window, _("Color:")) + pad;
result = MAX(result, new_w);
}
if(picture_usage->use_hue)
{
- int new_w = BC_Title::calculate_w(channel_picker->parent_window, "Hue:") + pad;
+ int new_w = BC_Title::calculate_w(channel_picker->parent_window, _("Hue:")) + pad;
result = MAX(result, new_w);
}
if(picture_usage->use_whiteness)
{
- int new_w = BC_Title::calculate_w(channel_picker->parent_window, "Whiteness:") + pad;
+ int new_w = BC_Title::calculate_w(channel_picker->parent_window, _("Whiteness:")) + pad;
result = MAX(result, new_w);
}
}
struct tm xtm; localtime_r(&xt,&xtm);
cp += sprintf(cp,"%02d:%02d",xtm.tm_hour, xtm.tm_min);
if( !xtm.tm_hour && !xtm.tm_min ) {
- sprintf(cp,_("(%3.3s) "),&_("sunmontuewedthufrisat")[xtm.tm_wday*3]);
+ sprintf(cp,"(%3.3s) ",&_("sunmontuewedthufrisat")[xtm.tm_wday*3]);
}
}
{ FloatAuto::SMOOTH,
true,
"tan_smooth",
- _("\"smooth\" Curve on current Camera Keyframes")
+ N_("\"smooth\" Curve on current Camera Keyframes")
};
const _CVD Camera_Crv_Linear =
{ FloatAuto::LINEAR,
true,
"tan_linear",
- _("\"linear\" Curve on current Camera Keyframes")
+ N_("\"linear\" Curve on current Camera Keyframes")
};
const _CVD Projector_Crv_Smooth =
{ FloatAuto::SMOOTH,
false,
"tan_smooth",
- _("\"smooth\" Curve on current Projector Keyframes")
+ N_("\"smooth\" Curve on current Projector Keyframes")
};
const _CVD Projector_Crv_Linear =
{ FloatAuto::LINEAR,
false,
"tan_linear",
- _("\"linear\" Curve on current Projector Keyframes")
+ N_("\"linear\" Curve on current Projector Keyframes")
};
-
// Implementation Class für Keyframe Curve Mode buttons
//
// This button reflects the state of the "current" keyframe
{
this->gui = gui;
this->mwindow = mwindow;
- set_tooltip(cfg.tooltip);
+ set_tooltip(_(cfg.tooltip));
}
void CWindowCurveToggle::check_toggle_state(FloatAuto *x, FloatAuto *y, FloatAuto *z)
best_format = cmodel_to_device(color_model);
break;
}
- printf(_("DeviceV4L2Base::v4l2_open "
- " attempting format %4.4s\n"), (char *)&best_format);
+ printf("DeviceV4L2Base::v4l2_open ");
+ printf(_(" attempting format %4.4s\n"),
+ (char *)&best_format);
}
if(driver == VIDEO4LINUX2JPEG && best_format != V4L2_PIX_FMT_MJPEG)
{
- printf(_("DeviceV4L2Base::v4l2_open jpeg driver"
- " and best_format not mjpeg (%4.4s)\n"), (char *)&best_format);
+ printf("DeviceV4L2Base::v4l2_open ");
+ printf(_("jpeg driver and best_format not mjpeg (%4.4s)\n"),
+ (char *)&best_format);
return 1;
}
if(driver == VIDEO4LINUX2MPEG && best_format != V4L2_PIX_FMT_MPEG)
{
- printf(_("DeviceV4L2Base::v4l2_open mpeg driver"
- " and best_format not mpeg (%4.4s)\n"),(char *)&best_format);
+ printf("DeviceV4L2Base::v4l2_open ");
+ printf(_("mpeg driver and best_format not mpeg (%4.4s)\n"),
+ (char *)&best_format);
return 1;
}
if(config_width != best_width || config_height != best_height)
{
- printf(_("DeviceV4L2Base::v4l2_open config geom %dx%d != %dx%d best_geom\n"),
+ printf("DeviceV4L2Base::v4l2_open ");
+ printf(_("config geom %dx%d != %dx%d best_geom\n"),
config_width, config_height, best_width, best_height);
}
cwindow_xscroll = defaults->get("CWINDOW_XSCROLL", 0);
cwindow_yscroll = defaults->get("CWINDOW_YSCROLL", 0);
cwindow_zoom = defaults->get("CWINDOW_ZOOM", (float)1);
- sprintf(default_atransition, "Crossfade");
+ sprintf(default_atransition, _("Crossfade"));
defaults->get("DEFAULT_ATRANSITION", default_atransition);
- sprintf(default_vtransition, "Dissolve");
+ sprintf(default_vtransition, _("Dissolve"));
defaults->get("DEFAULT_VTRANSITION", default_vtransition);
default_transition_length = defaults->get("DEFAULT_TRANSITION_LENGTH", (double)1);
edit_handle_mode[0] = defaults->get("EDIT_HANDLE_MODE0", MOVE_ALL_EDITS);
};
ExportEDLWindow::ExportEDLWindow(MWindow *mwindow, ExportEDL *exportedl, ExportEDLAsset *exportasset)
- : BC_Window(PROGRAM_NAME ": Export EDL",
+ : BC_Window(_(PROGRAM_NAME ": Export EDL"),
mwindow->gui->get_screen_w(1, 0) / 2 - WIDTH / 2,
mwindow->gui->get_root_h(1) / 2 - HEIGHT / 2,
WIDTH,
if( ret >= 0 )
reading = 1;
else
- eprintf("FFStream::decode_activate: open decoder failed\n");
+ eprintf(_("open decoder failed\n"));
}
else
- eprintf("FFStream::decode_activate: can't clone input file\n");
+ eprintf(_("can't clone input file\n"));
av_dict_free(&copts);
ff_unlock();
}
frame, AV_BUFFERSRC_FLAG_KEEP_REF);
if( ret < 0 ) {
av_frame_unref(frame);
- eprintf("FFStream::load_filter: av_buffersrc_add_frame_flags failed\n");
+ eprintf(_("av_buffersrc_add_frame_flags failed\n"));
}
return ret;
}
{
FILE *fp = fopen(options,"r");
if( !fp ) {
- eprintf("FFMPEG::get_encoder: options open failed %s\n",options);
+ eprintf(_("options open failed %s\n"),options);
return 1;
}
if( get_encoder(fp, format, codec, bsfilter, bsargs) )
- eprintf(_("FFMPEG::get_encoder:"
- " err: format/codec not found %s\n"), options);
+ eprintf(_("format/codec not found %s\n"), options);
fclose(fp);
return 0;
}
if( line[0] == '\n' ) continue;
char key[BCSTRLEN], val[BCTEXTLEN];
if( scan_option_line(line, key, val) ) {
- eprintf(_("FFMPEG::read_options:"
- " err reading %s: line %d\n"), options, no);
+ eprintf(_("err reading %s: line %d\n"), options, no);
ret = 1;
}
if( !ret ) {
{
struct stat st;
if( stat(fmt_ctx->filename, &st) < 0 ) {
- eprintf("FFMPEG::open_decoder: can't stat file: %s\n",
- fmt_ctx->filename);
+ eprintf(_("can't stat file: %s\n"), fmt_ctx->filename);
return 1;
}
int fd = ::open(filename,O_WRONLY);
if( fd < 0 ) fd = open(filename,O_WRONLY+O_CREAT,0666);
if( fd < 0 ) {
- eprintf("FFMPEG::init_encoder: bad file path: %s\n", filename);
+ eprintf(_("bad file path: %s\n"), filename);
return 1;
}
::close(fd);
int ret = get_file_format();
if( ret > 0 ) {
- eprintf("FFMPEG::init_encoder: bad file format: %s\n", filename);
+ eprintf(_("bad file format: %s\n"), filename);
return 1;
}
if( ret < 0 ) {
- eprintf("FFMPEG::init_encoder: mismatch audio/video file format: %s\n", filename);
+ eprintf(_("mismatch audio/video file format: %s\n"), filename);
return 1;
}
ff_lock("FFMPEG::init_encoder");
av_register_all();
avformat_alloc_output_context2(&fmt_ctx, 0, file_format, filename);
if( !fmt_ctx ) {
- eprintf("FFMPEG::init_encoder: failed: %s\n", filename);
+ eprintf(_("failed: %s\n"), filename);
ret = 1;
}
if( !ret ) {
char format_name[BCSTRLEN], codec_name[BCTEXTLEN];
char bsfilter[BCSTRLEN], bsargs[BCTEXTLEN];
if( get_encoder(option_path, format_name, codec_name, bsfilter, bsargs) ) {
- eprintf("FFMPEG::open_encoder: get_encoder failed %s:%s\n",
- option_path, filename);
+ eprintf(_("get_encoder failed %s:%s\n"), option_path, filename);
return 1;
}
const AVCodecDescriptor *codec_desc = 0;
AVCodec *codec = avcodec_find_encoder_by_name(codec_name);
if( !codec ) {
- eprintf("FFMPEG::open_encoder: cant find codec %s:%s\n",
- codec_name, filename);
+ eprintf(_("cant find codec %s:%s\n"), codec_name, filename);
ret = 1;
}
if( !ret ) {
codec_desc = avcodec_descriptor_get(codec->id);
if( !codec_desc ) {
- eprintf("FFMPEG::open_encoder: unknown codec %s:%s\n",
- codec_name, filename);
+ eprintf(_("unknown codec %s:%s\n"), codec_name, filename);
ret = 1;
}
}
if( !ret ) {
st = avformat_new_stream(fmt_ctx, 0);
if( !st ) {
- eprintf("FFMPEG::open_encoder: cant create stream %s:%s\n",
- codec_name, filename);
+ eprintf(_("cant create stream %s:%s\n"), codec_name, filename);
ret = 1;
}
}
switch( codec_desc->type ) {
case AVMEDIA_TYPE_AUDIO: {
if( has_audio ) {
- eprintf("FFMPEG::open_encoder: duplicate audio %s:%s\n",
- codec_name, filename);
+ eprintf(_("duplicate audio %s:%s\n"), codec_name, filename);
ret = 1;
break;
}
has_audio = 1;
if( scan_options(asset->ff_audio_options, sopts, st) ) {
- eprintf("FFMPEG::open_encoder: bad audio options %s:%s\n",
- codec_name, filename);
+ eprintf(_("bad audio options %s:%s\n"), codec_name, filename);
ret = 1;
break;
}
ctx->channel_layout = av_get_default_channel_layout(ctx->channels);
ctx->sample_rate = check_sample_rate(codec, asset->sample_rate);
if( !ctx->sample_rate ) {
- eprintf("FFMPEG::open_encoder:"
- " check_sample_rate failed %s\n", filename);
+ eprintf(_("check_sample_rate failed %s\n"), filename);
ret = 1;
break;
}
break; }
case AVMEDIA_TYPE_VIDEO: {
if( has_video ) {
- eprintf("FFMPEG::open_encoder: duplicate video %s:%s\n",
- codec_name, filename);
+ eprintf(_("duplicate video %s:%s\n"), codec_name, filename);
ret = 1;
break;
}
has_video = 1;
if( scan_options(asset->ff_video_options, sopts, st) ) {
- eprintf("FFMPEG::open_encoder: bad video options %s:%s\n",
- codec_name, filename);
+ eprintf(_("bad video options %s:%s\n"), codec_name, filename);
ret = 1;
break;
}
ctx->pix_fmt = codec->pix_fmts ? codec->pix_fmts[0] : AV_PIX_FMT_YUV420P;
AVRational frame_rate = check_frame_rate(codec, vid->frame_rate);
if( !frame_rate.num || !frame_rate.den ) {
- eprintf("FFMPEG::open_encoder:"
- " check_frame_rate failed %s\n", filename);
+ eprintf(_("check_frame_rate failed %s\n"), filename);
ret = 1;
break;
}
vid->writing = -1;
break; }
default:
- eprintf("FFMPEG::open_encoder: not audio/video, %s:%s\n",
- codec_name, filename);
+ eprintf(_("not audio/video, %s:%s\n"), codec_name, filename);
ret = 1;
}
}
ret = avcodec_open2(st->codec, codec, &sopts);
if( ret < 0 ) {
ff_err(ret,"FFMPEG::open_encoder");
- eprintf("FFMPEG::open_encoder: open failed %s:%s\n",
- codec_name, filename);
+ eprintf(_("open failed %s:%s\n"), codec_name, filename);
ret = 1;
}
else
AVStream *st = ffaudio[stream]->st;
AVCodecID id = st->codec->codec_id;
const AVCodecDescriptor *desc = avcodec_descriptor_get(id);
- return desc ? desc->name : "Unknown";
+ return desc ? desc->name : _("Unknown");
}
int FFMPEG::ff_audio_pid(int stream)
AVStream *st = ffvideo[stream]->st;
AVCodecID id = st->codec->codec_id;
const AVCodecDescriptor *desc = avcodec_descriptor_get(id);
- return desc ? desc->name : "Unknown";
+ return desc ? desc->name : _("Unknown");
}
double FFMPEG::ff_frame_rate(int stream)
av_init_packet(&pkt);
AVFrame *frame = av_frame_alloc();
if( !frame ) {
- fprintf(stderr, "FFMPEG::scan: av_frame_alloc failed\n");
+ fprintf(stderr,"FFMPEG::scan: ");
+ fprintf(stderr,_("av_frame_alloc failed\n"));
return -1;
}
AVStream *st = fmt_ctx->streams[i];
AVCodecID codec_id = st->codec->codec_id;
AVCodec *decoder = avcodec_find_decoder(codec_id);
- if( avcodec_open2(st->codec, decoder, &copts) < 0 )
- fprintf(stderr, "FFMPEG::scan: codec open failed\n");
+ if( avcodec_open2(st->codec, decoder, &copts) < 0 ) {
+ fprintf(stderr,"FFMPEG::scan: ");
+ fprintf(stderr,_("codec open failed\n"));
+ }
av_dict_free(&copts);
}
int errs = 0;
if( ret < 0 ) {
if( ret == AVERROR_EOF ) break;
if( ++errs > 100 ) {
- ff_err(ret, "over 100 read_frame errs\n");
+ ff_err(ret,_("over 100 read_frame errs\n"));
break;
}
continue;
mpg_file = new FileMPEG(file->asset, file);
result = mpg_file->open_file(1, 0);
if( result ) {
- eprintf("Error while opening \"%s\" for reading. \n%m\n", asset->path);
+ eprintf(_("Error while opening \"%s\" for reading. \n%m\n"), asset->path);
}
}
codec = avcodec_find_encoder(AV_CODEC_ID_AC3);
if(!codec)
{
- eprintf("FileAC3::open_file codec not found.\n");
+ eprintf(_("FileAC3::open_file codec not found.\n"));
result = 1;
}
if( !result && !(fd = fopen(asset->path, "w")))
{
- eprintf("Error while opening \"%s\" for writing. \n%m\n", asset->path);
+ eprintf(_("Error while opening \"%s\" for writing. \n%m\n"), asset->path);
result = 1;
}
if( !result ) {
swr_init(resample_context);
if(avcodec_open2(codec_context, codec, 0))
{
- eprintf("FileAC3::open_file failed to open codec.\n");
+ eprintf(_("FileAC3::open_file failed to open codec.\n"));
result = 1;
}
}
int bytes_written = fwrite(temp_compressed, 1, output_size, fd);
if(bytes_written < output_size)
{
- eprintf("Error while writing samples. \n%m\n");
+ eprintf(_("Error while writing samples. \n%m\n"));
return 1;
}
return 0;
AC3ConfigAudio::AC3ConfigAudio(BC_WindowBase *parent_window,
Asset *asset)
- : BC_Window(PROGRAM_NAME ": Audio Compression",
+ : BC_Window(_(PROGRAM_NAME ": Audio Compression"),
parent_window->get_abs_cursor_x(1),
parent_window->get_abs_cursor_y(1),
500,
int x = 10, y = 10;
int x1 = 150;
lock_window("AC3ConfigAudio::create_objects");
- add_tool(new BC_Title(x, y, "Bitrate (kbps):"));
+ add_tool(new BC_Title(x, y, _("Bitrate (kbps):")));
AC3ConfigAudioBitrate *bitrate;
add_tool(bitrate =
new AC3ConfigAudioBitrate(this,
FFOptionsWindow::FFOptionsWindow(FFOptionsDialog *dialog)
- : BC_Window(PROGRAM_NAME ": Options", 60, 30, 640, 400)
+ : BC_Window(_(PROGRAM_NAME ": Options"), 60, 30, 640, 400)
{
this->dialog = dialog;
this->selected = 0;
JPEGConfigVideo::JPEGConfigVideo(BC_WindowBase *parent_window, Asset *asset)
- : BC_Window(PROGRAM_NAME ": Video Compression",
+ : BC_Window(_(PROGRAM_NAME ": Video Compression"),
parent_window->get_abs_cursor_x(1),
parent_window->get_abs_cursor_y(1),
400,
cp += snprintf(cp,ep-cp, _("cell times:"));
for( int i=0; i<cell_times.size(); ++i ) {
if( (i%4) == 0 ) *cp++ = '\n';
- cp += snprintf(cp,ep-cp,_(" %3d. %8.3f"),i,cell_times.get(i));
+ cp += snprintf(cp,ep-cp," %3d. %8.3f",i,cell_times.get(i));
}
cp += snprintf(cp,ep-cp, "\n");
}
}
else if (ret < 0)
{
- eprintf("FileOGG: Taking page out on nonsynced stream!\n");
+ eprintf(_("FileOGG: Taking page out on nonsynced stream!\n"));
return ret;
} else
if((stream = fopen(asset->path, "w+b")) == 0)
{
- eprintf("Error while opening \"%s\" for writing. %m\n", asset->path);
+ eprintf(_("Error while opening \"%s\" for writing. %m\n"), asset->path);
return 1;
}
tf->ti.height = ((asset->height + 15) >>4)<<4; // round up to the nearest multiple of 16
if (tf->ti.width != tf->ti.frame_width || tf->ti.height != tf->ti.frame_height)
{
- eprintf("WARNING: Encoding theora when width or height are not dividable by 16 is suboptimal\n");
+ eprintf(_("WARNING: Encoding theora when width or height are not dividable by 16 is suboptimal\n"));
}
tf->ti.offset_x = 0;
if (theora_encode_init (&tf->td, &tf->ti))
{
- eprintf("(FileOGG:file_open) initialization of theora codec failed\n");
+ eprintf(_("(FileOGG:file_open) initialization of theora codec failed\n"));
}
}
/* init theora done */
if((stream = fopen(asset->path, "rb")) == 0)
{
- eprintf("Error while opening %s for reading. %m\n", asset->path);
+ eprintf(_("Error while opening %s for reading. %m\n"), asset->path);
return 1;
}
if(tf->ti.width!=tf->ti.frame_width || tf->ti.height!=tf->ti.frame_height)
{
- eprintf("Frame content is %dx%d with offset (%d,%d), We do not support this yet. You will get black border.\n",
+ eprintf(_("Frame content is %dx%d with offset (%d,%d), We do not support this yet. You will get black border.\n"),
tf->ti.frame_width, tf->ti.frame_height, tf->ti.offset_x, tf->ti.offset_y);
}
tf->videosync = new sync_window_t;
{
vorbis_synthesis_init(&tf->vd, &tf->vi);
vorbis_block_init(&tf->vd, &tf->vb);
-/* eprintf("FileOGG: Ogg logical stream %x is Vorbis %d channel %d Hz audio.\n",
+/* eprintf(_("FileOGG: Ogg logical stream %x is Vorbis %d channel %d Hz audio.\n"),
(unsigned int)tf->vo.serialno, tf->vi.channels, (int)tf->vi.rate);
*/
/* init audio_sync structure */
{
if (previous_comming_sample > sample)
{
- eprintf("Ogg decoding error while seeking sample\n");
+ eprintf(_("Ogg decoding error while seeking sample\n"));
}
vorbis_synthesis_read(&tf->vd, (sample - previous_comming_sample));
// printf("WE GOT IT, samples already decoded: %jd\n", vorbis_synthesis_pcmout(&tf->vd,NULL));
if(len > HISTORY_MAX)
{
- eprintf("max samples=%d\n", HISTORY_MAX);
+ eprintf(_("max samples=%d\n"), HISTORY_MAX);
return 1;
}
ogg_sample_position = hole_absstart;
if (!ogg_seek_to_sample(tf->audiosync, tf->vo.serialno, ogg_sample_position))
{
- eprintf("Error while seeking to sample\n");
+ eprintf(_("Error while seeking to sample\n"));
return 1;
}
}
ret = fwrite(tf->apage, 1, tf->apage_len, stream);
if(ret < tf->apage_len)
{
- eprintf("error writing audio page\n");
+ eprintf(_("error writing audio page\n"));
}
tf->apage_valid = 0;
tf->a_pkg -= ogg_page_packets((ogg_page *)&tf->apage);
ret = fwrite(tf->vpage, 1, tf->vpage_len, stream);
if(ret < tf->vpage_len)
{
- eprintf("error writing video page\n");
+ eprintf(_("error writing video page\n"));
}
tf->vpage_valid = 0;
tf->v_pkg -= ogg_page_packets((ogg_page *)&tf->vpage);
PNGConfigVideo::PNGConfigVideo(BC_WindowBase *parent_window, Asset *asset)
- : BC_Window(PROGRAM_NAME ": Video Compression",
+ : BC_Window(_(PROGRAM_NAME ": Video Compression"),
parent_window->get_abs_cursor_x(1),
parent_window->get_abs_cursor_y(1),
200,
TIFFConfigVideo::TIFFConfigVideo(BC_WindowBase *parent_window, Asset *asset)
- : BC_Window(PROGRAM_NAME ": Video Compression",
+ : BC_Window(_(PROGRAM_NAME ": Video Compression"),
parent_window->get_abs_cursor_x(1),
parent_window->get_abs_cursor_y(1),
400,
lock_window("TIFFConfigVideo::create_objects()");
int x = 10, y = 10;
- add_subwindow(new BC_Title(x, y, "Colorspace:"));
+ add_subwindow(new BC_Title(x, y, _("Colorspace:")));
TIFFColorspace *menu1;
add_subwindow(menu1 = new TIFFColorspace(this, x + 150, y, 200));
menu1->create_objects();
y += 40;
- add_subwindow(new BC_Title(x, y, "Compression:"));
+ add_subwindow(new BC_Title(x, y, _("Compression:")));
TIFFCompression *menu2;
add_subwindow(menu2 = new TIFFCompression(this, x + 150, y, 200));
menu2->create_objects();
{
if(!(fd = fopen(asset->path, "wb")))
{
- eprintf("Error while opening \"%s\" for writing. \n%m\n", asset->path);
+ eprintf(_("Error while opening \"%s\" for writing. \n%m\n"), asset->path);
result = 1;
}
else
const char* FormatPresets::get_preset_text(EDL *edl)
{
FormatPresetItem *item = edl ? find_preset(edl) : 0;
- return item ? item->get_text() : "User Defined";
+ return item ? item->get_text() : _("User Defined");
}
case FloatAuto::TFREE: return _("tangent edit");
case FloatAuto::FREE: return _("disjoint edit");
}
- return "misconfigured";
+ return _("misconfigured");
}
LabelEditWindow::LabelEditWindow(MWindow *mwindow, LabelEdit *thread)
- : BC_Window(PROGRAM_NAME ": Label Info",
+ : BC_Window(_(PROGRAM_NAME ": Label Info"),
mwindow->gui->get_abs_cursor_x(1) - 400 / 2,
mwindow->gui->get_abs_cursor_y(1) - 350 / 2,
400,
ManualGotoWindow::ManualGotoWindow(ManualGoto *mango, int x, int y)
- : BC_Window(PROGRAM_NAME ": Goto position", x, y,
+ : BC_Window(_(PROGRAM_NAME ": Goto position"), x, y,
250, 80, 250, 80, 0, 0, 1)
{
this->mango = mango;
-#if 0
-N_("Cinelerra: New Project");
-#endif
-
NewWindow::NewWindow(MWindow *mwindow, NewThread *new_thread, int x, int y)
: BC_Window(_(_(PROGRAM_NAME ": New Project")),
x,
MainProgressBar *progress;
char string[BCTEXTLEN], string2[BCTEXTLEN];
- sprintf(string, _("%s..."), plugin_server->title);
+ sprintf(string, "%s...", plugin_server->title);
progress = mwindow->mainprogress->start_progress(string, end - start);
for(int64_t current_position = start;
#include "plugin.h"
#include "plugindialog.h"
#include "pluginpopup.h"
-#include "presets.h"
-#include "presetsgui.h"
+//#include "presets.h"
+//#include "presetsgui.h"
#include "track.h"
#include "mwindowgui.inc"
#include "plugin.inc"
#include "plugindialog.inc"
-#include "presets.inc"
-#include "presetsgui.inc"
+//#include "presets.inc"
+//#include "presetsgui.inc"
PluginPopup *popup;
};
-
#endif
add_subwindow(avc1394transport_timecode =
new BC_Title(avc1394_transport->x_end,
mwindow->theme->rmonitor_tx_y + 10,
- _("00:00:00:00"),
+ "00:00:00:00",
MEDIUM_7SEGMENT,
BLACK));
start_render();
}
else if( in_progress ) {
- ErrorBox error_box(PROGRAM_NAME ": Error",
+ ErrorBox error_box(_(PROGRAM_NAME ": Error"),
mwindow->gui->get_abs_cursor_x(1),
mwindow->gui->get_abs_cursor_y(1));
error_box.create_objects("Already rendering");
slot = profile->get_new_profile_slot();
if (slot < 0)
{
- ErrorBox error_box(PROGRAM_NAME ": Error",
+ ErrorBox error_box(_(PROGRAM_NAME ": Error"),
profile->mwindow->gui->get_abs_cursor_x(1),
profile->mwindow->gui->get_abs_cursor_y(1));
- error_box.create_objects("Maximum number of render profiles reached");
+ error_box.create_objects(_("Maximum number of render profiles reached"));
error_box.raise_window();
error_box.run_window();
return 1;
#include "rescale.h"
#include "indexable.h"
+#include "language.h"
#include "mwindow.h"
const char *Rescale::scale_types[] = {
- "None", "Scaled", "Cropped", "Filled", "Horiz Edge", "Vert Edge",
+ N_("None"), N_("Scaled"), N_("Cropped"), N_("Filled"), N_("Horiz Edge"), N_("Vert Edge"),
};
Rescale::Rescale(int w, int h, double aspect)
sprintf(string, "%.0f", thread->aspect_w);
add_subwindow(aspect_w = new ScaleAspectW(x, y, thread, &(thread->aspect_w), string));
x += 55;
- add_subwindow(new BC_Title(x, y, _(":")));
+ add_subwindow(new BC_Title(x, y, ":"));
x += 10;
sprintf(string, "%.0f", thread->aspect_h);
add_subwindow(aspect_h = new ScaleAspectH(x, y, thread, &(thread->aspect_h), string));
int w,
int h,
int cpus)
- : PluginClientWindow(PROGRAM_NAME ": Scopes",
+ : PluginClientWindow(_(PROGRAM_NAME ": Scopes"),
x,
y,
w,
this->value = value;
if(value == &gui->use_hist_parade)
{
- set_tooltip("Histogram Parade");
+ set_tooltip(_("Histogram Parade"));
}
else
if(value == &gui->use_hist)
{
- set_tooltip("Histogram");
+ set_tooltip(_("Histogram"));
}
else
if(value == &gui->use_wave_parade)
{
- set_tooltip("Waveform Parade");
+ set_tooltip(_("Waveform Parade"));
}
else
if(value == &gui->use_wave)
{
- set_tooltip("Waveform");
+ set_tooltip(_("Waveform"));
}
else
{
- set_tooltip("Vectorscope");
+ set_tooltip(_("Vectorscope"));
}
}
thread,
&(thread->new_settings->session->aspect_w)));
x += aspect_w->get_w() + 5;
- add_subwindow(new BC_Title(x, y, _(":")));
+ add_subwindow(new BC_Title(x, y, ":"));
x += 10;
add_subwindow(aspect_h = new ScaleAspectText(x,
y,
}
ShBtnErrWarn::ShBtnErrWarn(ShBtnTextWindow *st_window, int x, int y)
- : BC_CheckBox(x, y, &st_window->warn, "Warn on err exit")
+ : BC_CheckBox(x, y, &st_window->warn, _("Warn on err exit"))
{
this->st_window = st_window;
}
*cp = 0;
snprintf(ext,len,"-%s.udvd",track_title);
FILE *fp = fopen(filename, "w");
+ if( !fp ) {
+ eprintf(_("Unable to open %s:\n%m"), filename);
+ continue;
+ }
int64_t start = 0;
for( Edit *edit=track->edits->first; edit; edit=edit->next ) {
SEdit *sedit = (SEdit *)edit;
#include "overlayframe.h"
#include "patchbay.h"
#include "playtransport.h"
-#include "presetsgui.h"
+//#include "presetsgui.h"
#include "recordgui.h"
#include "recordmonitor.h"
#include "resourcepixmap.h"
#include "overlayframe.inc"
#include "patchbay.inc"
#include "preferencesthread.inc"
-#include "presetsgui.inc"
+//#include "presetsgui.inc"
#include "recordgui.inc"
#include "recordmonitor.inc"
#include "resourcepixmap.inc"
*/
#include "timeentry.h"
+#include "language.h"
#include <string.h>
TimeEntry::TimeEntry(BC_WindowBase *gui, int x, int y,
}
const char* TimeEntry::day_table[] =
{
- "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "*"
+ N_("Sun"), N_("Mon"), N_("Tue"), N_("Wed"), N_("Thu"), N_("Fri"), N_("Sat"), "*"
};
int TimeEntry::day_to_int(const char *day)
{
for(int i = 0; i < TOTAL_DAYS; i++)
- if(!strcasecmp(day, day_table[i])) return i;
+ if(!strcasecmp(day, _(day_table[i]))) return i;
return 0;
}
int x, int y, int w,
const char **table, int table_items,
const char *text)
- : BC_TextBox(x, y, w, 1, text)
+ : BC_TextBox(x, y, w, 1, _(text))
{
this->timeentry = timeentry;
this->table = table;
*timeentry->output_day += 1;
if(*timeentry->output_day >= text->table_items)
*timeentry->output_day = 0;
- text->update(text->table[*timeentry->output_day]);
+ text->update(_(text->table[*timeentry->output_day]));
return timeentry->handle_event();
}
*timeentry->output_day -= 1;
if(*timeentry->output_day < 0)
*timeentry->output_day = text->table_items - 1;
- text->update(text->table[*timeentry->output_day]);
+ text->update(_(text->table[*timeentry->output_day]));
return timeentry->handle_event();
}
#include "bclistbox.h"
#include "bclistboxitem.h"
#include "bcrecentlist.h"
+#include "language.h"
// NOTE: textbox can be NULL if no textbox is associated
BC_RecentList::BC_RecentList(const char *type, BC_Hash *defaults,
this->type = type;
this->defaults = defaults;
this->textbox = textbox;
- set_tooltip("Choose from recently used");
+ set_tooltip(_("Choose from recently used"));
}
BC_RecentList::BC_RecentList(const char *type, BC_Hash *defaults,
this->type = type;
this->defaults = defaults;
this->textbox = textbox;
- set_tooltip("Choose from recently used");
+ set_tooltip(_("Choose from recently used"));
}
BC_RecentList::BC_RecentList(const char *type, BC_Hash *defaults)
x = x1;
add_subwindow(normalize = new EchoCancelNormalize(plugin, x, y));
x += normalize->get_w() + 3*pad;
- y += normalize->get_h() - BC_Title::calculate_h(this,"Gain: ");
+ y += normalize->get_h() - BC_Title::calculate_h(this,_("Gain: "));
add_subwindow(gain_title = new EchoCancelTitle(x, y, _("Gain: "), 0.));
x += gain_title->get_w() + 2*pad;
add_subwindow(offset_title = new EchoCancelTitle(x, y, _("Offset: "), 0));
y = y1;
add_subwindow(freq_title = new BC_Title(x, y, _("0 Hz")));
y += freq_title->get_h() + pad;
- add_subwindow(amplitude_title = new BC_Title(x, y, "Amplitude: 0 dB"));
+ add_subwindow(amplitude_title = new BC_Title(x, y, _("Amplitude: 0 dB")));
show_window();
}
int freq = plugin->header.sample_rate / offset;
int msecs = 1000. / freq;
char string[BCTEXTLEN];
- sprintf(string, "%d Hz, %d ms (%d))", freq, msecs, (int)offset);
+ sprintf(string, _("%d Hz, %d ms (%d))"), freq, msecs, (int)offset);
freq_title->update(string);
int frm_sz1 = frm->size()-1;
if( freq_pixel > frm_sz1 ) freq_pixel = frm_sz1;
float *frame_data = frm->samples();
double level = frame_data[freq_pixel];
double scale = frm->scale();
- sprintf(string, "Amplitude: %.3f (%.6g)", level, scale);
+ sprintf(string, _("Amplitude: %.3f (%.6g)"), level, scale);
amplitude_title->update(string);
}
if( y >= 0 ) {
TimeFrontWindow *gui,
int x,
int y)
- : BC_PopupMenu(x, y, 190, to_text(plugin->config.shape), 1)
+ : BC_PopupMenu(x, y, 230, to_text(plugin->config.shape), 1)
{
this->plugin = plugin;
this->gui = gui;
TimeFrontRate::TimeFrontRate(TimeFrontMain *plugin, int x, int y)
: BC_PopupMenu(x,
y,
- 100,
+ 155,
to_text(plugin->config.rate),
1)
{
if( !fp ) return 0;
fputs((const char*)bp, fp);
fputc('\n',fp);
- return 1;
+ int n = 1;
+ while( *bp ) if( *bp++ == '\n' ) ++n;
+ return n;
}
static inline int bput(uint8_t *bp, FILE *fp)
{
while( bgets(ibfr, sizeof(ibfr), ifp) ) {
if( !prefix_is(ibfr, "msgid ") ) {
if( nocmts && ibfr[0] == '#' ) continue;
- bputs(ibfr, ofp); ++no;
+ no += bputs(ibfr, ofp);
continue;
}
uint8_t str[MX_STR]; xlat2(&ibfr[6], str);
fprintf(stderr, "file truncated line %d: %s", no, ibfr);
exit(1);
}
- bputs(ibfr, ofp); ++no;
+ no += bputs(ibfr, ofp);
while( tbfr[0] == '"' ) {
- bputs(tbfr, ofp); ++no;
+ no += bputs(tbfr, ofp);
xlat2(&tbfr[0], str); key.append((const char*)str);
if( !bgets(tbfr, sizeof(tbfr), ifp) ) {
fprintf(stderr, "file truncated line %d: %s", no, ibfr);
if( it == trans.end() || it->first.compare(key) ) {
fprintf(stderr, "no trans line %d: %s\n", no, ibfr);
xlat3(key.c_str(), &tbfr[7]);
- bputs(tbfr, ofp); ++no;
- bputs((uint8_t*)"#msgstr \"\"", ofp); ++no;
+ no += bputs(tbfr, ofp);
+ no += bputs((uint8_t*)"#msgstr \"\"", ofp);
}
else if( !it->second.ok ) {
fprintf(stderr, "bad fmt line %d: %s\n", no, ibfr);
xlat3(it->first.c_str(), &tbfr[7]);
- bputs(tbfr, ofp); ++no;
+ no += bputs(tbfr, ofp);
xlat3(it->second.c_str(), str);
bput((uint8_t*)"#msgstr ", ofp);
- bputs(str, ofp); ++no;
+ no += bputs(str, ofp);
}
else {
xlat3(it->second.c_str(), &tbfr[7]);
- bputs(tbfr, ofp); ++no;
+ no += bputs(tbfr, ofp);
}
}
if( ifp != stdin ) fclose(ifp);