xlat changes, layout changes
authorGood Guy <good1.2guy@gmail.com>
Sun, 17 Jul 2016 19:01:44 +0000 (13:01 -0600)
committerGood Guy <good1.2guy@gmail.com>
Sun, 17 Jul 2016 19:01:44 +0000 (13:01 -0600)
49 files changed:
cinelerra-5.1/cinelerra/Makefile
cinelerra-5.1/cinelerra/audioalsa.C
cinelerra-5.1/cinelerra/audiooss.C
cinelerra-5.1/cinelerra/awindowgui.C
cinelerra-5.1/cinelerra/channeledit.C
cinelerra-5.1/cinelerra/channelinfo.C
cinelerra-5.1/cinelerra/cwindowtool.C
cinelerra-5.1/cinelerra/devicev4l2base.C
cinelerra-5.1/cinelerra/edlsession.C
cinelerra-5.1/cinelerra/exportedl.C
cinelerra-5.1/cinelerra/ffmpeg.C
cinelerra-5.1/cinelerra/fileac3.C
cinelerra-5.1/cinelerra/fileffmpeg.C
cinelerra-5.1/cinelerra/filejpeg.C
cinelerra-5.1/cinelerra/filempeg.C
cinelerra-5.1/cinelerra/fileogg.C
cinelerra-5.1/cinelerra/filepng.C
cinelerra-5.1/cinelerra/filetiff.C
cinelerra-5.1/cinelerra/filevorbis.C
cinelerra-5.1/cinelerra/formatpresets.C
cinelerra-5.1/cinelerra/keyframepopup.C
cinelerra-5.1/cinelerra/labeledit.C
cinelerra-5.1/cinelerra/manualgoto.C
cinelerra-5.1/cinelerra/new.C
cinelerra-5.1/cinelerra/pluginarray.C
cinelerra-5.1/cinelerra/pluginpopup.C
cinelerra-5.1/cinelerra/pluginpopup.h
cinelerra-5.1/cinelerra/presets.C.sav [moved from cinelerra-5.1/cinelerra/presets.C with 100% similarity]
cinelerra-5.1/cinelerra/presets.h.sav [moved from cinelerra-5.1/cinelerra/presets.h with 100% similarity]
cinelerra-5.1/cinelerra/presets.inc.sav [moved from cinelerra-5.1/cinelerra/presets.inc with 100% similarity]
cinelerra-5.1/cinelerra/presetsgui.C.sav [moved from cinelerra-5.1/cinelerra/presetsgui.C with 100% similarity]
cinelerra-5.1/cinelerra/presetsgui.h.sav [moved from cinelerra-5.1/cinelerra/presetsgui.h with 100% similarity]
cinelerra-5.1/cinelerra/presetsgui.inc.sav [moved from cinelerra-5.1/cinelerra/presetsgui.inc with 100% similarity]
cinelerra-5.1/cinelerra/recordmonitor.C
cinelerra-5.1/cinelerra/render.C
cinelerra-5.1/cinelerra/renderprofiles.C
cinelerra-5.1/cinelerra/rescale.C
cinelerra-5.1/cinelerra/scale.C
cinelerra-5.1/cinelerra/scopewindow.C
cinelerra-5.1/cinelerra/setformat.C
cinelerra-5.1/cinelerra/shbtnprefs.C
cinelerra-5.1/cinelerra/swindow.C
cinelerra-5.1/cinelerra/theme.C
cinelerra-5.1/cinelerra/theme.h
cinelerra-5.1/cinelerra/timeentry.C
cinelerra-5.1/guicast/bcrecentlist.C
cinelerra-5.1/plugins/echocancel/echocancel.C
cinelerra-5.1/plugins/timefront/timefront.C
cinelerra-5.1/po/xlat.C

index cb0c1d65532ad7f57e20ce942a6d3c1559348374..c5c9ee7efd18d298e7a8a5cb59b62ff5d66aef88 100644 (file)
@@ -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 \
index 166324d61a4e482712c88e623df868252cdb4c88..c8a21f6cb62053d600043201480be1a5e30538c7 100644 (file)
@@ -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;
         }
index 73340ff1bbe0a9fd4f5ffaaaf5de13577070e07e..f75ff0fbd7248f2eb7a95b020d9dfe710019bcf3 100644 (file)
@@ -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;
                        }
index e052668b469b9ca9a0417e09d519712b0e1f75c1..57d9356923a60b18ca011ba48d7d6ed9fe4a004a 100644 (file)
@@ -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, ArrayList<BC_ListBo
 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 :
index 985323690442870f7cf30b4364d78cf3afce366e..6c49c075bb9573288f92c719dbafb2720b06a5ac 100644 (file)
@@ -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);
                }
        }
index 21e5049aab63f7e5ef45da2ce3f402952f717c48..7bcac18863e4bf243dbd0d672b8726e43f8a4fdb 100644 (file)
@@ -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]);
        }
 }
 
index 59a0b5eb821e6afad643b9f3bd797d94616438b2..723088eb2e877a5935d763fab3ac55e2d6cdcebb 100644 (file)
@@ -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)
index f566e5028e9f5c9149168a50cddc7aceed610bf4..b2f332b967c9bc1a84673679045f33fea66eb2ac 100644 (file)
@@ -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);
        }
 
index cbca6297b0e2aa8400f5b787142a56f3b0f01d85..f0815d5ab22110bd0afcdd4271d5b90a20ae90e5 100644 (file)
@@ -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);
index 04e22ebd5613688a104faf848b1bdfe477475cd2..45b9d408e01bb1442a63d5a6280e5b327124859d 100644 (file)
@@ -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, 
index 6c3789e84f5660672321a37837e72f0bddc56291..dbeb96a898715366c8eb44a704d6eda2c717277e 100644 (file)
@@ -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;
index 5d14e7139242b225fbdec8db5a25dc4564f6afe4..1fa0dfc19973a3b8232378e3e9986d9927dc0112 100644 (file)
@@ -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,
index 494844c3de02219580c9e49a260e988b5d41d39d..ac62687f0e138f22d9eb2fee26252600bf3d4c22 100644 (file)
@@ -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;
index ae8ee6ec7012a04b09f47623a08b899173fd0dc6..2a162836ce4564c76c3c8b77a9834b5cebf5f5c0 100644 (file)
@@ -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,
index c34cc731307ade5dbb526a1000bcdc875d4b24e3..fc188a145d71ffe73433be480bbb5aed5ff8d639 100644 (file)
@@ -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; 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");
        }
index 91434ae385fa510ab71a72232e91941007580367..4b8ce0406496b8c4dabe9c5272aa74d6e4390fd1 100644 (file)
@@ -176,7 +176,7 @@ static int take_page_out_autoadvance(FILE *in, sync_window_t *sw, ogg_page *og)
                }
                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
@@ -229,7 +229,7 @@ int FileOGG::open_file(int rd, int wr)
 
                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;
                }
 
@@ -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);
index f1ee1c06fd283cce8f10dd4dc515197157511ca6..d84fcda92d8a6a2d41a66ad106d229feda689dcb 100644 (file)
@@ -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,
index ae0c276c3b93dbe205d2d5be8121d259ad969f97..c5f3f7a6c7197251c537a901dd02542d07f364a7 100644 (file)
@@ -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();
index e99169d25b2ce99936f6f752cfacdd54a486d374..26b39119de61a1d124364afd6b0b178a266569b2 100644 (file)
@@ -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
index d37b6e423ae066b2958628ed3939acb5f46dd9ae..2ec72fb99fadbe858e4e6617b5edd13be265b589 100644 (file)
@@ -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");
 }
 
 
index 13f2af0daf4503490fd8dd8d674ae1c8f231d0ec..6d2c7370e751ee0abfe8b749794891a00696244e 100644 (file)
@@ -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");
 }
 
 
index bd16321740529bee94d44a349c3cce7a00ecaf39..3ba5257276e40ea8afa548622a52dbe7c493cfb4 100644 (file)
@@ -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, 
index 5bdf35a9c578442b857f2c3bc34cbbbf1cb26f98..f5bdd3d2afaab5b2df4bf14b5bc9d586d18050f3 100644 (file)
@@ -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;
index 6c37e34814f8744c2601464068ef5d97c47b246d..e12e60cca194fedd8d4a42bc1e47cc3679379a4a 100644 (file)
@@ -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,
index 0059e23f2560738bcfb4fed08176b863fe65325e..9170742e0f69a969bbdef95f8dad34b01d5efde2 100644 (file)
@@ -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; 
index bccf1e5fedae8cbaf3353d2764fad44ba52ff40c..961f46b9e468e7d6af205067286da554565ccdcb 100644 (file)
@@ -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"
 
 
index 9fa123e4b4383c2eebd0a51b65db6f70fc9eef4e..6aa40dc3278a75431de3527a3c114b86723722af 100644 (file)
@@ -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
index dd65f6c3d189eb9849b90078b23c1bd5c98ab129..7ea18e1dfb1066acf5e0289b9c30449ef31b1fb9 100644 (file)
@@ -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));
 
index 9010ac2939aa3dad6c7dd09afd86e245a0de0fbc..03709b103a0bcbac8e30d4fcfba4a052368d45f8 100644 (file)
@@ -294,7 +294,7 @@ void Render::start_batches(ArrayList<BatchRenderJob*> *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");
index d874bb082cf929352de6af6bcc5999dd3e42d9f6..f4c234d618c01d93fec5a73031473a1ddc63cd0f 100644 (file)
@@ -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;
index 9f96ac23dad867a5b8016fdb9ae3db51064f4eb5..ce9bcd619fd1a1bfc43a01ec2e796fd5e52b7b1b 100644 (file)
@@ -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)
index 15fbbce5539878515081c5a8e521e2645c1ebbd9..a61e31ffa0af2e1482ec54cd90871e49f1e0dada 100644 (file)
@@ -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));
index 966b5736d67decd86565d595fe01e3a9e8e9602a..39bc950a2d97b9c02be963531f1e22b2b332d1cd 100644 (file)
@@ -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"));
        }
 }
 
index ef0d3000813aef51bc1788e2446154483bd91d2a..413fa950357b3f029b0c400452cf9f4ee5c41fe0 100644 (file)
@@ -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,
index 6fe4fc3b968dc6922b5bc457ab05a084d1d64236..4814c3a9fe13c1ac732115027390ffa116907ae4 100644 (file)
@@ -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;
 }
index e88a9e1cb8c88f8165467d906586e376f55dc0aa..57b75a9997f75bef65c48d605799486f064ed2a4 100644 (file)
@@ -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;
index 1fe52ec9e1567087572d98b2e3af5623aa7aea9f..ab684e7fe9c09e6700521bb4508a7aed39962419 100644 (file)
@@ -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"
index 047bbfc6f37e91c135d64fabe1f6e85fdd625766..7b4070a25f70d642ee1c2d8535900b8f1c9c6226 100644 (file)
@@ -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"
index 6c2382ec0f40a4f31e6015e8c68722617f99ad2f..586daaaf8b3c4965e202df36263f9b8cd841ea52 100644 (file)
@@ -20,6 +20,7 @@
  */
 
 #include "timeentry.h"
+#include "language.h"
 #include <string.h>
 
 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();
 }
 
index 8e1a61784970a4f499681e635c8f4d8ea0607dea..ed8111bc0b3fa4b6eb3216c77a25417789f12055 100644 (file)
@@ -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) 
index b227e6b706a10cb14cf04a507028fc9c5cd776ad..097676c1f7633cefa8a7ed592663f5393cc79a36 100644 (file)
@@ -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 ) {
index ece5df1028ab3a7faa922bdab6908405242c5d01..3b9601c2b507c6bbad99f73e864d0cb7698c77b8 100644 (file)
@@ -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)
 {
index 716dfc968ea02cbdf5dc0a6ea3a822abff49cc62..0973f88792bb73d8a7b6ff97d8f6c94594a2ff5b 100644 (file)
@@ -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);