From 0b78779e9e75131eee81d2e4689b98df0e91c092 Mon Sep 17 00:00:00 2001 From: Good Guy Date: Sun, 17 Jul 2016 13:01:44 -0600 Subject: [PATCH] xlat changes, layout changes --- cinelerra-5.1/cinelerra/Makefile | 2 - cinelerra-5.1/cinelerra/audioalsa.C | 19 +++-- cinelerra-5.1/cinelerra/audiooss.C | 9 ++- cinelerra-5.1/cinelerra/awindowgui.C | 20 ++--- cinelerra-5.1/cinelerra/channeledit.C | 26 +++---- cinelerra-5.1/cinelerra/channelinfo.C | 2 +- cinelerra-5.1/cinelerra/cwindowtool.C | 11 ++- cinelerra-5.1/cinelerra/devicev4l2base.C | 18 +++-- cinelerra-5.1/cinelerra/edlsession.C | 4 +- cinelerra-5.1/cinelerra/exportedl.C | 2 +- cinelerra-5.1/cinelerra/ffmpeg.C | 76 ++++++++----------- cinelerra-5.1/cinelerra/fileac3.C | 14 ++-- cinelerra-5.1/cinelerra/fileffmpeg.C | 2 +- cinelerra-5.1/cinelerra/filejpeg.C | 2 +- cinelerra-5.1/cinelerra/filempeg.C | 2 +- cinelerra-5.1/cinelerra/fileogg.C | 24 +++--- cinelerra-5.1/cinelerra/filepng.C | 2 +- cinelerra-5.1/cinelerra/filetiff.C | 6 +- cinelerra-5.1/cinelerra/filevorbis.C | 2 +- cinelerra-5.1/cinelerra/formatpresets.C | 2 +- cinelerra-5.1/cinelerra/keyframepopup.C | 2 +- cinelerra-5.1/cinelerra/labeledit.C | 2 +- cinelerra-5.1/cinelerra/manualgoto.C | 2 +- cinelerra-5.1/cinelerra/new.C | 4 - cinelerra-5.1/cinelerra/pluginarray.C | 2 +- cinelerra-5.1/cinelerra/pluginpopup.C | 4 +- cinelerra-5.1/cinelerra/pluginpopup.h | 5 +- .../cinelerra/{presets.C => presets.C.sav} | 0 .../cinelerra/{presets.h => presets.h.sav} | 0 .../{presets.inc => presets.inc.sav} | 0 .../{presetsgui.C => presetsgui.C.sav} | 0 .../{presetsgui.h => presetsgui.h.sav} | 0 .../{presetsgui.inc => presetsgui.inc.sav} | 0 cinelerra-5.1/cinelerra/recordmonitor.C | 2 +- cinelerra-5.1/cinelerra/render.C | 2 +- cinelerra-5.1/cinelerra/renderprofiles.C | 4 +- cinelerra-5.1/cinelerra/rescale.C | 3 +- cinelerra-5.1/cinelerra/scale.C | 2 +- cinelerra-5.1/cinelerra/scopewindow.C | 12 +-- cinelerra-5.1/cinelerra/setformat.C | 2 +- cinelerra-5.1/cinelerra/shbtnprefs.C | 2 +- cinelerra-5.1/cinelerra/swindow.C | 4 + cinelerra-5.1/cinelerra/theme.C | 2 +- cinelerra-5.1/cinelerra/theme.h | 2 +- cinelerra-5.1/cinelerra/timeentry.C | 11 +-- cinelerra-5.1/guicast/bcrecentlist.C | 5 +- cinelerra-5.1/plugins/echocancel/echocancel.C | 8 +- cinelerra-5.1/plugins/timefront/timefront.C | 4 +- cinelerra-5.1/po/xlat.C | 20 ++--- 49 files changed, 171 insertions(+), 180 deletions(-) rename cinelerra-5.1/cinelerra/{presets.C => presets.C.sav} (100%) rename cinelerra-5.1/cinelerra/{presets.h => presets.h.sav} (100%) rename cinelerra-5.1/cinelerra/{presets.inc => presets.inc.sav} (100%) rename cinelerra-5.1/cinelerra/{presetsgui.C => presetsgui.C.sav} (100%) rename cinelerra-5.1/cinelerra/{presetsgui.h => presetsgui.h.sav} (100%) rename cinelerra-5.1/cinelerra/{presetsgui.inc => presetsgui.inc.sav} (100%) diff --git a/cinelerra-5.1/cinelerra/Makefile b/cinelerra-5.1/cinelerra/Makefile index cb0c1d65..c5c9ee7e 100644 --- a/cinelerra-5.1/cinelerra/Makefile +++ b/cinelerra-5.1/cinelerra/Makefile @@ -223,8 +223,6 @@ OBJS = \ $(OBJDIR)/pluginvclient.o \ $(OBJDIR)/preferences.o \ $(OBJDIR)/preferencesthread.o \ - $(OBJDIR)/presetsgui.o \ - $(OBJDIR)/presets.o \ $(OBJDIR)/question.o \ $(OBJDIR)/quit.o \ $(OBJDIR)/recconfirmdelete.o \ diff --git a/cinelerra-5.1/cinelerra/audioalsa.C b/cinelerra-5.1/cinelerra/audioalsa.C index 166324d6..c8a21f6c 100644 --- a/cinelerra-5.1/cinelerra/audioalsa.C +++ b/cinelerra-5.1/cinelerra/audioalsa.C @@ -22,6 +22,7 @@ #include "audiodevice.h" #include "audioalsa.h" #include "bcsignals.h" +#include "language.h" #include "mutex.h" #include "playbackconfig.h" #include "preferences.h" @@ -273,7 +274,8 @@ int AudioALSA::set_params(snd_pcm_t *dsp, int mode, 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; } @@ -281,8 +283,8 @@ int AudioALSA::set_params(snd_pcm_t *dsp, int mode, 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; } @@ -290,7 +292,8 @@ int AudioALSA::set_params(snd_pcm_t *dsp, int mode, 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; } @@ -298,8 +301,8 @@ int AudioALSA::set_params(snd_pcm_t *dsp, int mode, 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; } @@ -309,8 +312,8 @@ int AudioALSA::set_params(snd_pcm_t *dsp, int mode, (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; } diff --git a/cinelerra-5.1/cinelerra/audiooss.C b/cinelerra-5.1/cinelerra/audiooss.C index 73340ff1..f75ff0fb 100644 --- a/cinelerra-5.1/cinelerra/audiooss.C +++ b/cinelerra-5.1/cinelerra/audiooss.C @@ -25,6 +25,7 @@ #include "clip.h" #include "condition.h" #include "errno.h" +#include "language.h" #include "playbackconfig.h" #include "preferences.h" #include "recordconfig.h" @@ -197,15 +198,15 @@ int AudioOSS::open_input() 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; } diff --git a/cinelerra-5.1/cinelerra/awindowgui.C b/cinelerra-5.1/cinelerra/awindowgui.C index e052668b..57d93569 100644 --- a/cinelerra-5.1/cinelerra/awindowgui.C +++ b/cinelerra-5.1/cinelerra/awindowgui.C @@ -397,16 +397,10 @@ void AssetPicon::create_objects() 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, @@ -597,7 +591,7 @@ SET_TRACE 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 @@ -747,7 +741,7 @@ void AWindowGUI::stop_vicon_drawing() 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; @@ -800,7 +794,7 @@ int AWindowRemovePlugin::remove_plugin(PluginServer *plugin, ArrayListpath); + printf(_("remove %s\n"), plugin->path); ArrayList *folder = plugin->audio ? plugin->transition ? &awindow->gui->atransitions : diff --git a/cinelerra-5.1/cinelerra/channeledit.C b/cinelerra-5.1/cinelerra/channeledit.C index 98532369..6c49c075 100644 --- a/cinelerra-5.1/cinelerra/channeledit.C +++ b/cinelerra-5.1/cinelerra/channeledit.C @@ -160,7 +160,7 @@ char* ChannelEditThread::value_to_input(int value) 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) @@ -639,7 +639,7 @@ int ChannelEditPicture::handle_event() ConfirmScan::ConfirmScan(ChannelEditWindow *gui, int x, int y) - : BC_Window(PROGRAM_NAME ": Scan confirm", + : BC_Window(_(PROGRAM_NAME ": Scan confirm"), x, y, 350, @@ -779,7 +779,7 @@ void ScanThread::start() 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(); @@ -794,7 +794,7 @@ void ScanThread::run() 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); @@ -991,7 +991,7 @@ void ChannelEditEditThread::run() 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, @@ -1387,7 +1387,7 @@ void ChannelEditPictureThread::edit_picture() 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), @@ -1446,8 +1446,8 @@ int ChannelEditPictureWindow::calculate_w(ChannelPicker *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 @@ -1455,27 +1455,27 @@ int ChannelEditPictureWindow::calculate_w(ChannelPicker *channel_picker) { 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); } } diff --git a/cinelerra-5.1/cinelerra/channelinfo.C b/cinelerra-5.1/cinelerra/channelinfo.C index 21e5049a..7bcac188 100644 --- a/cinelerra-5.1/cinelerra/channelinfo.C +++ b/cinelerra-5.1/cinelerra/channelinfo.C @@ -959,7 +959,7 @@ void ChannelPanel::get_xtime(int x, char *cp) 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]); } } diff --git a/cinelerra-5.1/cinelerra/cwindowtool.C b/cinelerra-5.1/cinelerra/cwindowtool.C index 59a0b5eb..723088eb 100644 --- a/cinelerra-5.1/cinelerra/cwindowtool.C +++ b/cinelerra-5.1/cinelerra/cwindowtool.C @@ -589,28 +589,27 @@ const _CVD Camera_Crv_Smooth = { 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 @@ -638,7 +637,7 @@ CWindowCurveToggle::CWindowCurveToggle(_CVD mode, MWindow *mwindow, CWindowToolG { 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) diff --git a/cinelerra-5.1/cinelerra/devicev4l2base.C b/cinelerra-5.1/cinelerra/devicev4l2base.C index f566e502..b2f332b9 100644 --- a/cinelerra-5.1/cinelerra/devicev4l2base.C +++ b/cinelerra-5.1/cinelerra/devicev4l2base.C @@ -381,24 +381,28 @@ int DeviceV4L2Base::v4l2_open(int color_model) 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); } diff --git a/cinelerra-5.1/cinelerra/edlsession.C b/cinelerra-5.1/cinelerra/edlsession.C index cbca6297..f0815d5a 100644 --- a/cinelerra-5.1/cinelerra/edlsession.C +++ b/cinelerra-5.1/cinelerra/edlsession.C @@ -250,9 +250,9 @@ int EDLSession::load_defaults(BC_Hash *defaults) 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); diff --git a/cinelerra-5.1/cinelerra/exportedl.C b/cinelerra-5.1/cinelerra/exportedl.C index 04e22ebd..45b9d408 100644 --- a/cinelerra-5.1/cinelerra/exportedl.C +++ b/cinelerra-5.1/cinelerra/exportedl.C @@ -365,7 +365,7 @@ static int list_widths[] = }; 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, diff --git a/cinelerra-5.1/cinelerra/ffmpeg.C b/cinelerra-5.1/cinelerra/ffmpeg.C index 6c3789e8..dbeb96a8 100644 --- a/cinelerra-5.1/cinelerra/ffmpeg.C +++ b/cinelerra-5.1/cinelerra/ffmpeg.C @@ -314,10 +314,10 @@ int FFStream::decode_activate() 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(); } @@ -384,7 +384,7 @@ int FFStream::load_filter(AVFrame *frame) 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; } @@ -1290,12 +1290,11 @@ int FFMPEG::get_encoder(const char *options, { 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; } @@ -1347,8 +1346,7 @@ int FFMPEG::read_options(FILE *fp, const char *options, AVDictionary *&opts) 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 ) { @@ -1541,8 +1539,7 @@ int FFMPEG::open_decoder() { 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; } @@ -1634,24 +1631,24 @@ int FFMPEG::init_encoder(const char *filename) 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 ) { @@ -1676,8 +1673,7 @@ int FFMPEG::open_encoder(const char *type, const char *spec) 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; } @@ -1693,23 +1689,20 @@ int FFMPEG::open_encoder(const char *type, const char *spec) 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; } } @@ -1718,15 +1711,13 @@ int FFMPEG::open_encoder(const char *type, const char *spec) 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; } @@ -1747,8 +1738,7 @@ int FFMPEG::open_encoder(const char *type, const char *spec) 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; } @@ -1764,15 +1754,13 @@ int FFMPEG::open_encoder(const char *type, const char *spec) 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; } @@ -1809,8 +1797,7 @@ int FFMPEG::open_encoder(const char *type, const char *spec) 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; } @@ -1819,8 +1806,7 @@ int FFMPEG::open_encoder(const char *type, const char *spec) 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; } } @@ -1831,8 +1817,7 @@ int FFMPEG::open_encoder(const char *type, const char *spec) 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 @@ -2179,7 +2164,7 @@ const char* FFMPEG::ff_audio_format(int stream) 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) @@ -2289,7 +2274,7 @@ const char* FFMPEG::ff_video_format(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) @@ -2466,7 +2451,8 @@ int FFMPEG::scan(IndexState *index_state, int64_t *scan_position, int *canceled) 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; } @@ -2479,8 +2465,10 @@ int FFMPEG::scan(IndexState *index_state, int64_t *scan_position, int *canceled) 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; @@ -2492,7 +2480,7 @@ int FFMPEG::scan(IndexState *index_state, int64_t *scan_position, int *canceled) 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; diff --git a/cinelerra-5.1/cinelerra/fileac3.C b/cinelerra-5.1/cinelerra/fileac3.C index 5d14e713..1fa0dfc1 100644 --- a/cinelerra-5.1/cinelerra/fileac3.C +++ b/cinelerra-5.1/cinelerra/fileac3.C @@ -124,7 +124,7 @@ int FileAC3::open_file(int rd, int wr) 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); } } @@ -135,12 +135,12 @@ int FileAC3::open_file(int rd, int wr) 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 ) { @@ -161,7 +161,7 @@ int FileAC3::open_file(int rd, int wr) 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; } } @@ -320,7 +320,7 @@ int FileAC3::write_samples(double **buffer, int64_t len) 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; @@ -334,7 +334,7 @@ int FileAC3::write_samples(double **buffer, int64_t len) 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, @@ -354,7 +354,7 @@ void AC3ConfigAudio::create_objects() 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, diff --git a/cinelerra-5.1/cinelerra/fileffmpeg.C b/cinelerra-5.1/cinelerra/fileffmpeg.C index 494844c3..ac62687f 100644 --- a/cinelerra-5.1/cinelerra/fileffmpeg.C +++ b/cinelerra-5.1/cinelerra/fileffmpeg.C @@ -1281,7 +1281,7 @@ const char *FFOptions_Opt::tip() 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; diff --git a/cinelerra-5.1/cinelerra/filejpeg.C b/cinelerra-5.1/cinelerra/filejpeg.C index ae8ee6ec..2a162836 100644 --- a/cinelerra-5.1/cinelerra/filejpeg.C +++ b/cinelerra-5.1/cinelerra/filejpeg.C @@ -304,7 +304,7 @@ JPEGUnit::~JPEGUnit() 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, diff --git a/cinelerra-5.1/cinelerra/filempeg.C b/cinelerra-5.1/cinelerra/filempeg.C index c34cc731..fc188a14 100644 --- a/cinelerra-5.1/cinelerra/filempeg.C +++ b/cinelerra-5.1/cinelerra/filempeg.C @@ -244,7 +244,7 @@ void FileMPEG::get_info(char *title_path, char *path, char *text, int len) cp += snprintf(cp,ep-cp, _("cell times:")); for( int i=0; ipath, "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; } @@ -264,7 +264,7 @@ int FileOGG::open_file(int rd, int wr) 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; @@ -313,7 +313,7 @@ int FileOGG::open_file(int rd, int wr) 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 */ @@ -451,7 +451,7 @@ int FileOGG::open_file(int rd, int wr) 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; } @@ -636,7 +636,7 @@ Not yet available in alpha4, we assume 420 for now 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; @@ -731,7 +731,7 @@ Not yet available in alpha4, we assume 420 for now { 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 */ @@ -1110,7 +1110,7 @@ int FileOGG::ogg_seek_to_sample(sync_window_t *sw, long serialno, int64_t sample { 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)); @@ -1617,7 +1617,7 @@ int FileOGG::read_samples(double *buffer, int64_t len) if(len > HISTORY_MAX) { - eprintf("max samples=%d\n", HISTORY_MAX); + eprintf(_("max samples=%d\n"), HISTORY_MAX); return 1; } @@ -1700,7 +1700,7 @@ int FileOGG::read_samples(double *buffer, int64_t len) 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; } } @@ -1771,7 +1771,7 @@ int FileOGG::write_audio_page() 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); @@ -1785,7 +1785,7 @@ int FileOGG::write_video_page() 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); diff --git a/cinelerra-5.1/cinelerra/filepng.C b/cinelerra-5.1/cinelerra/filepng.C index f1ee1c06..d84fcda9 100644 --- a/cinelerra-5.1/cinelerra/filepng.C +++ b/cinelerra-5.1/cinelerra/filepng.C @@ -403,7 +403,7 @@ PNGUnit::~PNGUnit() 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, diff --git a/cinelerra-5.1/cinelerra/filetiff.C b/cinelerra-5.1/cinelerra/filetiff.C index ae0c276c..c5f3f7a6 100644 --- a/cinelerra-5.1/cinelerra/filetiff.C +++ b/cinelerra-5.1/cinelerra/filetiff.C @@ -585,7 +585,7 @@ FileTIFFUnit::~FileTIFFUnit() 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, @@ -604,12 +604,12 @@ void TIFFConfigVideo::create_objects() 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(); diff --git a/cinelerra-5.1/cinelerra/filevorbis.C b/cinelerra-5.1/cinelerra/filevorbis.C index e99169d2..26b39119 100644 --- a/cinelerra-5.1/cinelerra/filevorbis.C +++ b/cinelerra-5.1/cinelerra/filevorbis.C @@ -163,7 +163,7 @@ int FileVorbis::open_file(int rd, int wr) { 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 diff --git a/cinelerra-5.1/cinelerra/formatpresets.C b/cinelerra-5.1/cinelerra/formatpresets.C index d37b6e42..2ec72fb9 100644 --- a/cinelerra-5.1/cinelerra/formatpresets.C +++ b/cinelerra-5.1/cinelerra/formatpresets.C @@ -108,7 +108,7 @@ FormatPresetItem* FormatPresets::find_preset(EDL *edl) 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"); } diff --git a/cinelerra-5.1/cinelerra/keyframepopup.C b/cinelerra-5.1/cinelerra/keyframepopup.C index 13f2af0d..6d2c7370 100644 --- a/cinelerra-5.1/cinelerra/keyframepopup.C +++ b/cinelerra-5.1/cinelerra/keyframepopup.C @@ -439,7 +439,7 @@ const char* KeyframePopupCurveMode::get_labeltext(int mode) case FloatAuto::TFREE: return _("tangent edit"); case FloatAuto::FREE: return _("disjoint edit"); } - return "misconfigured"; + return _("misconfigured"); } diff --git a/cinelerra-5.1/cinelerra/labeledit.C b/cinelerra-5.1/cinelerra/labeledit.C index bd163217..3ba52572 100644 --- a/cinelerra-5.1/cinelerra/labeledit.C +++ b/cinelerra-5.1/cinelerra/labeledit.C @@ -76,7 +76,7 @@ void LabelEdit::run() 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, diff --git a/cinelerra-5.1/cinelerra/manualgoto.C b/cinelerra-5.1/cinelerra/manualgoto.C index 5bdf35a9..f5bdd3d2 100644 --- a/cinelerra-5.1/cinelerra/manualgoto.C +++ b/cinelerra-5.1/cinelerra/manualgoto.C @@ -69,7 +69,7 @@ void ManualGoto::handle_done_event(int result) 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; diff --git a/cinelerra-5.1/cinelerra/new.C b/cinelerra-5.1/cinelerra/new.C index 6c37e348..e12e60cc 100644 --- a/cinelerra-5.1/cinelerra/new.C +++ b/cinelerra-5.1/cinelerra/new.C @@ -227,10 +227,6 @@ int NewThread::update_aspect() -#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, diff --git a/cinelerra-5.1/cinelerra/pluginarray.C b/cinelerra-5.1/cinelerra/pluginarray.C index 0059e23f..9170742e 100644 --- a/cinelerra-5.1/cinelerra/pluginarray.C +++ b/cinelerra-5.1/cinelerra/pluginarray.C @@ -193,7 +193,7 @@ int PluginArray::run_plugins() 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; diff --git a/cinelerra-5.1/cinelerra/pluginpopup.C b/cinelerra-5.1/cinelerra/pluginpopup.C index bccf1e5f..961f46b9 100644 --- a/cinelerra-5.1/cinelerra/pluginpopup.C +++ b/cinelerra-5.1/cinelerra/pluginpopup.C @@ -26,8 +26,8 @@ #include "plugin.h" #include "plugindialog.h" #include "pluginpopup.h" -#include "presets.h" -#include "presetsgui.h" +//#include "presets.h" +//#include "presetsgui.h" #include "track.h" diff --git a/cinelerra-5.1/cinelerra/pluginpopup.h b/cinelerra-5.1/cinelerra/pluginpopup.h index 9fa123e4..6aa40dc3 100644 --- a/cinelerra-5.1/cinelerra/pluginpopup.h +++ b/cinelerra-5.1/cinelerra/pluginpopup.h @@ -35,8 +35,8 @@ class PluginPresets; #include "mwindowgui.inc" #include "plugin.inc" #include "plugindialog.inc" -#include "presets.inc" -#include "presetsgui.inc" +//#include "presets.inc" +//#include "presetsgui.inc" @@ -186,5 +186,4 @@ public: PluginPopup *popup; }; - #endif diff --git a/cinelerra-5.1/cinelerra/presets.C b/cinelerra-5.1/cinelerra/presets.C.sav similarity index 100% rename from cinelerra-5.1/cinelerra/presets.C rename to cinelerra-5.1/cinelerra/presets.C.sav diff --git a/cinelerra-5.1/cinelerra/presets.h b/cinelerra-5.1/cinelerra/presets.h.sav similarity index 100% rename from cinelerra-5.1/cinelerra/presets.h rename to cinelerra-5.1/cinelerra/presets.h.sav diff --git a/cinelerra-5.1/cinelerra/presets.inc b/cinelerra-5.1/cinelerra/presets.inc.sav similarity index 100% rename from cinelerra-5.1/cinelerra/presets.inc rename to cinelerra-5.1/cinelerra/presets.inc.sav diff --git a/cinelerra-5.1/cinelerra/presetsgui.C b/cinelerra-5.1/cinelerra/presetsgui.C.sav similarity index 100% rename from cinelerra-5.1/cinelerra/presetsgui.C rename to cinelerra-5.1/cinelerra/presetsgui.C.sav diff --git a/cinelerra-5.1/cinelerra/presetsgui.h b/cinelerra-5.1/cinelerra/presetsgui.h.sav similarity index 100% rename from cinelerra-5.1/cinelerra/presetsgui.h rename to cinelerra-5.1/cinelerra/presetsgui.h.sav diff --git a/cinelerra-5.1/cinelerra/presetsgui.inc b/cinelerra-5.1/cinelerra/presetsgui.inc.sav similarity index 100% rename from cinelerra-5.1/cinelerra/presetsgui.inc rename to cinelerra-5.1/cinelerra/presetsgui.inc.sav diff --git a/cinelerra-5.1/cinelerra/recordmonitor.C b/cinelerra-5.1/cinelerra/recordmonitor.C index dd65f6c3..7ea18e1d 100644 --- a/cinelerra-5.1/cinelerra/recordmonitor.C +++ b/cinelerra-5.1/cinelerra/recordmonitor.C @@ -347,7 +347,7 @@ void RecordMonitorGUI::create_objects() 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)); diff --git a/cinelerra-5.1/cinelerra/render.C b/cinelerra-5.1/cinelerra/render.C index 9010ac29..03709b10 100644 --- a/cinelerra-5.1/cinelerra/render.C +++ b/cinelerra-5.1/cinelerra/render.C @@ -294,7 +294,7 @@ void Render::start_batches(ArrayList *jobs) 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"); diff --git a/cinelerra-5.1/cinelerra/renderprofiles.C b/cinelerra-5.1/cinelerra/renderprofiles.C index d874bb08..f4c234d6 100644 --- a/cinelerra-5.1/cinelerra/renderprofiles.C +++ b/cinelerra-5.1/cinelerra/renderprofiles.C @@ -261,10 +261,10 @@ int SaveRenderProfileButton::handle_event() 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; diff --git a/cinelerra-5.1/cinelerra/rescale.C b/cinelerra-5.1/cinelerra/rescale.C index 9f96ac23..ce9bcd61 100644 --- a/cinelerra-5.1/cinelerra/rescale.C +++ b/cinelerra-5.1/cinelerra/rescale.C @@ -1,9 +1,10 @@ #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) diff --git a/cinelerra-5.1/cinelerra/scale.C b/cinelerra-5.1/cinelerra/scale.C index 15fbbce5..a61e31ff 100644 --- a/cinelerra-5.1/cinelerra/scale.C +++ b/cinelerra-5.1/cinelerra/scale.C @@ -273,7 +273,7 @@ void ScaleWindow::create_objects() 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)); diff --git a/cinelerra-5.1/cinelerra/scopewindow.C b/cinelerra-5.1/cinelerra/scopewindow.C index 966b5736..39bc950a 100644 --- a/cinelerra-5.1/cinelerra/scopewindow.C +++ b/cinelerra-5.1/cinelerra/scopewindow.C @@ -423,7 +423,7 @@ ScopeGUI::ScopeGUI(Theme *theme, int w, int h, int cpus) - : PluginClientWindow(PROGRAM_NAME ": Scopes", + : PluginClientWindow(_(PROGRAM_NAME ": Scopes"), x, y, w, @@ -1323,26 +1323,26 @@ ScopeToggle::ScopeToggle(ScopeGUI *gui, 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")); } } diff --git a/cinelerra-5.1/cinelerra/setformat.C b/cinelerra-5.1/cinelerra/setformat.C index ef0d3000..413fa950 100644 --- a/cinelerra-5.1/cinelerra/setformat.C +++ b/cinelerra-5.1/cinelerra/setformat.C @@ -479,7 +479,7 @@ void SetFormatWindow::create_objects() 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, diff --git a/cinelerra-5.1/cinelerra/shbtnprefs.C b/cinelerra-5.1/cinelerra/shbtnprefs.C index 6fe4fc3b..4814c3a9 100644 --- a/cinelerra-5.1/cinelerra/shbtnprefs.C +++ b/cinelerra-5.1/cinelerra/shbtnprefs.C @@ -189,7 +189,7 @@ ShBtnTextWindow::~ShBtnTextWindow() } 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; } diff --git a/cinelerra-5.1/cinelerra/swindow.C b/cinelerra-5.1/cinelerra/swindow.C index e88a9e1c..57b75a99 100644 --- a/cinelerra-5.1/cinelerra/swindow.C +++ b/cinelerra-5.1/cinelerra/swindow.C @@ -818,6 +818,10 @@ void SWindowGUI::save_spumux_data() *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; diff --git a/cinelerra-5.1/cinelerra/theme.C b/cinelerra-5.1/cinelerra/theme.C index 1fe52ec9..ab684e7f 100644 --- a/cinelerra-5.1/cinelerra/theme.C +++ b/cinelerra-5.1/cinelerra/theme.C @@ -40,7 +40,7 @@ #include "overlayframe.h" #include "patchbay.h" #include "playtransport.h" -#include "presetsgui.h" +//#include "presetsgui.h" #include "recordgui.h" #include "recordmonitor.h" #include "resourcepixmap.h" diff --git a/cinelerra-5.1/cinelerra/theme.h b/cinelerra-5.1/cinelerra/theme.h index 047bbfc6..7b4070a2 100644 --- a/cinelerra-5.1/cinelerra/theme.h +++ b/cinelerra-5.1/cinelerra/theme.h @@ -36,7 +36,7 @@ #include "overlayframe.inc" #include "patchbay.inc" #include "preferencesthread.inc" -#include "presetsgui.inc" +//#include "presetsgui.inc" #include "recordgui.inc" #include "recordmonitor.inc" #include "resourcepixmap.inc" diff --git a/cinelerra-5.1/cinelerra/timeentry.C b/cinelerra-5.1/cinelerra/timeentry.C index 6c2382ec..586daaaf 100644 --- a/cinelerra-5.1/cinelerra/timeentry.C +++ b/cinelerra-5.1/cinelerra/timeentry.C @@ -20,6 +20,7 @@ */ #include "timeentry.h" +#include "language.h" #include TimeEntry::TimeEntry(BC_WindowBase *gui, int x, int y, @@ -47,13 +48,13 @@ TimeEntry::~TimeEntry() } 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; } @@ -192,7 +193,7 @@ DayText::DayText(TimeEntry *timeentry, 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; @@ -220,7 +221,7 @@ int DayTumbler::handle_up_event() *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(); } @@ -230,7 +231,7 @@ int DayTumbler::handle_down_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(); } diff --git a/cinelerra-5.1/guicast/bcrecentlist.C b/cinelerra-5.1/guicast/bcrecentlist.C index 8e1a6178..ed8111bc 100644 --- a/cinelerra-5.1/guicast/bcrecentlist.C +++ b/cinelerra-5.1/guicast/bcrecentlist.C @@ -26,6 +26,7 @@ #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, @@ -36,7 +37,7 @@ 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, @@ -48,7 +49,7 @@ 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) diff --git a/cinelerra-5.1/plugins/echocancel/echocancel.C b/cinelerra-5.1/plugins/echocancel/echocancel.C index b227e6b7..097676c1 100644 --- a/cinelerra-5.1/plugins/echocancel/echocancel.C +++ b/cinelerra-5.1/plugins/echocancel/echocancel.C @@ -439,7 +439,7 @@ void EchoCancelWindow::create_objects() 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)); @@ -500,7 +500,7 @@ void EchoCancelWindow::create_objects() 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(); } @@ -576,14 +576,14 @@ void EchoCancelWindow::calculate_frequency(int x, int y, int do_overlay) 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 ) { diff --git a/cinelerra-5.1/plugins/timefront/timefront.C b/cinelerra-5.1/plugins/timefront/timefront.C index ece5df10..3b9601c2 100644 --- a/cinelerra-5.1/plugins/timefront/timefront.C +++ b/cinelerra-5.1/plugins/timefront/timefront.C @@ -349,7 +349,7 @@ TimeFrontShape::TimeFrontShape(TimeFrontMain *plugin, 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; @@ -491,7 +491,7 @@ int TimeFrontAngle::handle_event() TimeFrontRate::TimeFrontRate(TimeFrontMain *plugin, int x, int y) : BC_PopupMenu(x, y, - 100, + 155, to_text(plugin->config.rate), 1) { diff --git a/cinelerra-5.1/po/xlat.C b/cinelerra-5.1/po/xlat.C index 716dfc96..0973f887 100644 --- a/cinelerra-5.1/po/xlat.C +++ b/cinelerra-5.1/po/xlat.C @@ -211,7 +211,9 @@ static inline int bputs(uint8_t *bp, FILE *fp) 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) { @@ -455,7 +457,7 @@ void scan_po(FILE *ifp, FILE *ofp) 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); @@ -464,10 +466,10 @@ void scan_po(FILE *ifp, FILE *ofp) 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); @@ -490,20 +492,20 @@ void scan_po(FILE *ifp, FILE *ofp) 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); -- 2.26.2