Skip to content

Commit

Permalink
[i18n] Make more strings translatable (Daniel Amm)
Browse files Browse the repository at this point in the history
  • Loading branch information
mean committed Aug 31, 2016
1 parent 053e574 commit 3972605
Show file tree
Hide file tree
Showing 111 changed files with 449 additions and 449 deletions.
2 changes: 1 addition & 1 deletion avidemux/common/ADM_commonUI/DIA_prefs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,7 @@ std::string currentSdlDriver=getSdlDriverName();
typedef struct { const char *lang;const char *desc;}languageDescriptor;
uint32_t languageIndex=0;
languageDescriptor myLanguages[]={
{"auto","System language"},
{"auto",QT_TRANSLATE_NOOP("adm","System language")},
{"da","Dansk"},
{"de","Deutsch"},
{"en","English"},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,14 @@ typedef struct
#define WRAP_Open_Template(funcz,argz,display,codecid) \
{\
AVCodec *codec=funcz(argz);\
if(!codec) {GUI_Error_HIG("Codec",QT_TR_NOOP("Internal error finding codec :"display));ADM_assert(0);} \
if(!codec) {GUI_Error_HIG("Codec",QT_TRANSLATE_NOOP("adm","Internal error finding codec :"display));ADM_assert(0);} \
codecId=codecid; \
_context->workaround_bugs=1*FF_BUG_AUTODETECT +0*FF_BUG_NO_PADDING; \
_context->error_concealment=3; \
if (avcodec_open2(_context, codec,NULL) < 0) \
{ \
printf("[lavc] Decoder init: "display" video decoder failed!\n"); \
GUI_Error_HIG("Codec","Internal error opening "display); \
GUI_Error_HIG("Codec",QT_TRANSLATE_NOOP("adm","Internal error opening "display)); \
ADM_assert(0); \
} \
else \
Expand Down
2 changes: 1 addition & 1 deletion avidemux/common/ADM_videoCodec/src/ADM_ffmpeg_libva.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ bool libvaProbe(void)
UI_getWindowInfo(draw,&xinfo );
if( admCoreCodecSupports(ADM_CORE_CODEC_FEATURE_LIBVA)==false)
{
GUI_Error_HIG("Error","Core has been compiled without LIBVA support, but the application has been compiled with it.\nInstallation mismatch");
GUI_Error_HIG(QT_TRANSLATE_NOOP("adm","Error"),QT_TRANSLATE_NOOP("adm","Core has been compiled without LIBVA support, but the application has been compiled with it.\nInstallation mismatch"));
libvaWorking=false;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ bool vdpauProbe(void)
#ifdef USE_VDPAU
if( admCoreCodecSupports(ADM_CORE_CODEC_FEATURE_VDPAU)==false)
{
GUI_Error_HIG("Error","Core has been compiled without VDPAU support, but the application has been compiled with it.\nInstallation mismatch");
GUI_Error_HIG(QT_TRANSLATE_NOOP("adm","Error"),QT_TRANSLATE_NOOP("adm","Core has been compiled without VDPAU support, but the application has been compiled with it.\nInstallation mismatch"));
vdpauWorking=false;
}
#endif
Expand Down
2 changes: 1 addition & 1 deletion avidemux/common/ADM_videoCodec/src/ADM_ffmpeg_xvba.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ bool xvbaProbe(void)
#ifdef USE_XVBA
if( admCoreCodecSupports(ADM_CORE_CODEC_FEATURE_XVBA)==false)
{
GUI_Error_HIG("Error","Core has been compiled without XVBA support, but the application has been compiled with it.\nInstallation mismatch");
GUI_Error_HIG(QT_TRANSLATE_NOOP("adm","Error"),QT_TRANSLATE_NOOP("adm","Core has been compiled without XVBA support, but the application has been compiled with it.\nInstallation mismatch"));
xvbaWorking=false;
}

Expand Down
4 changes: 2 additions & 2 deletions avidemux/common/ADM_videoFilter2/src/ADM_vidPartial.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -298,10 +298,10 @@ bool partialFilter::configure( void)
uint32_t mx=9*3600*1000;
diaElemTimeStamp start(&(configuration.startBlack),QT_TRANSLATE_NOOP("partial","Start time (ms):"),0,mx);
diaElemTimeStamp end(&(configuration.endBlack),QT_TRANSLATE_NOOP("partial","End time (ms):"),0,mx);
diaElemButton son(QT_TR_NOOP("Configure filter"), partialFilter::reconfigureCallback,this);
diaElemButton son(QT_TRANSLATE_NOOP("partial", "Configure filter"), partialFilter::reconfigureCallback,this);

diaElem *elems[3]={&start,&end,&son};
return diaFactoryRun(QT_TRANSLATE_NOOP("Partial","Partial Filter"),3,elems);
return diaFactoryRun(QT_TRANSLATE_NOOP("partial","Partial Filter"),3,elems);
}

/**
Expand Down
4 changes: 2 additions & 2 deletions avidemux/common/gui_blackframes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ uint8_t fastIsNotBlack(int darkness,ADMImage *img)
*/
void GUI_PrevBlackFrame(void)
{
GUI_Error_HIG("BlackFrame","This function is unsupported at the moment");
GUI_Error_HIG(QT_TRANSLATE_NOOP("blackframes", "BlackFrame"), QT_TRANSLATE_NOOP("blackframes", "This function is unsupported at the moment"));
}

/**
Expand All @@ -124,7 +124,7 @@ void GUI_NextBlackFrame(void)
// guess ~ number of frames
uint64_t duration=video_body->getVideoDuration();
uint64_t startTime=admPreview::getCurrentPts();
DIA_processingBase *work=createProcessing(QT_TR_NOOP("Searching black frame.."),duration-startTime);
DIA_processingBase *work=createProcessing(QT_TRANSLATE_NOOP("blackframes", "Searching black frame.."),duration-startTime);

uint32_t count=0;
while(1)
Expand Down
10 changes: 5 additions & 5 deletions avidemux/common/gui_navigate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ void GUI_NextKeyFrame(void)

if (!admPreview::nextKeyFrame())
{
A_timedError("Cannot go to next keyframe");
A_timedError(QT_TRANSLATE_NOOP("navigate","Cannot go to next keyframe"));
return;
}
GUI_setCurrentFrameAndTime();
Expand Down Expand Up @@ -290,7 +290,7 @@ void GUI_PreviousKeyFrame(void)

if (!admPreview::previousKeyFrame())
{
A_timedError("Cannot go to previous keyframe");
A_timedError(QT_TRANSLATE_NOOP("navigate","Cannot go to previous keyframe"));
return;
}
GUI_setCurrentFrameAndTime();
Expand All @@ -315,7 +315,7 @@ void GUI_PrevFrame(uint32_t frameCount)
if (!admPreview::previousPicture())
{
// We're probably at the beginning of the file ...
// GUI_Error_HIG(QT_TR_NOOP("Error"), QT_TR_NOOP("Cannot go to previous frame"));
// GUI_Error_HIG(QT_TRANSLATE_NOOP("navigate","Error"), QT_TRANSLATE_NOOP("navigate","Cannot go to previous frame"));
return;
}
GUI_setCurrentFrameAndTime();
Expand Down Expand Up @@ -466,7 +466,7 @@ bool GUI_GoToTime(uint64_t time)
// We have to call the editor as the frames needed to decode the target frame may be hidden
if(false==video_body->goToTimeVideo(time))
{
GUI_Error_HIG("Seek", "Error seeking to %" PRIu64" ms",time/1000);
GUI_Error_HIG(QT_TRANSLATE_NOOP("navigate","Seek"), QT_TRANSLATE_NOOP("navigate","Error seeking to %" PRIu64" ms"),time/1000);
}
admPreview::samePicture();
GUI_setCurrentFrameAndTime();
Expand All @@ -481,7 +481,7 @@ void A_timedError(const char *s)
{
if(NaggingCountDown.done()) // still running, do not nag
{
GUI_Error_HIG(QT_TR_NOOP("Error"),QT_TR_NOOP(s));
GUI_Error_HIG(QT_TRANSLATE_NOOP("navigate","Error"),s);
}
NaggingCountDown.reset();
}
Expand Down
2 changes: 1 addition & 1 deletion avidemux/common/gui_play.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,7 @@ bool GUIPlayback::initializeAudio(void)
audioLatency=latency; // ms -> us
if (!state)
{
GUI_Error_HIG(QT_TR_NOOP("Trouble initializing audio device"), NULL);
GUI_Error_HIG(QT_TRANSLATE_NOOP("adm","Trouble initializing audio device"), NULL);
cleanupAudio();
return false;
}
Expand Down
14 changes: 7 additions & 7 deletions avidemux/common/gui_save.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ void HandleAction_Save(Action action)
{
if(!video_body->getNbSegment())
{
GUI_Error_HIG("No","No file loaded");
GUI_Error_HIG(QT_TRANSLATE_NOOP("adm","No"),QT_TRANSLATE_NOOP("adm","No file loaded"));
return;
}
switch(action)
Expand All @@ -60,7 +60,7 @@ void HandleAction_Save(Action action)
{
if(false==ADMJob::jobInit())
{
GUI_Error_HIG("Job",QT_TR_NOOP("Cannot reach database. Do you have Job control running ?"));
GUI_Error_HIG(QT_TRANSLATE_NOOP("adm","Job"),QT_TRANSLATE_NOOP("adm","Cannot reach database. Do you have Job control running ?"));
}else
{
std::string oFile;
Expand Down Expand Up @@ -278,7 +278,7 @@ int A_saveAudioCopy (const char *name)
int A_saveAudioProcessed (const char *name)
{
#if 0
GUI_Error_HIG("Audio","Function not implemented\n");
GUI_Error_HIG(QT_TRANSLATE_NOOP("adm","Audio"),QT_TRANSLATE_NOOP("adm","Function not implemented\n"));
return false;
#else

Expand All @@ -299,14 +299,14 @@ int A_saveAudioProcessed (const char *name)
ADM_audioStream *access=audioCreateEncodingStream(ed,false,start);
if(!access)
{
GUI_Error_HIG("Audio","Cannot create stream");
GUI_Error_HIG(QT_TRANSLATE_NOOP("adm","Audio"),QT_TRANSLATE_NOOP("adm","Cannot create stream"));
return false;
}
// #warning Fixme,duration can change! e.g. pal2film /film2pal
bool r=A_saveAudioCommon (name,access,duration);
delete access;
if(false==r)
GUI_Error_HIG("Audio","Saving failed");
GUI_Error_HIG(QT_TRANSLATE_NOOP("adm","Audio"),QT_TRANSLATE_NOOP("adm","Saving failed"));
return r;
#endif
}
Expand Down Expand Up @@ -431,7 +431,7 @@ void A_queueJob(const char *jobName,const char *outputFile)
IScriptEngine *engine=getPythonScriptEngine();
if(!engine)
{
GUI_Error_HIG("Queue","Cannot get tinyPÿ script engine");
GUI_Error_HIG(QT_TRANSLATE_NOOP("adm","Queue"),QT_TRANSLATE_NOOP("adm","Cannot get tinyPÿ script engine"));
return;
}

Expand All @@ -441,7 +441,7 @@ void A_queueJob(const char *jobName,const char *outputFile)
job.scriptName=string(jobName)+string(".")+engine->defaultFileExtension();
if(false==ADMJob::jobAdd(job))
{
GUI_Error_HIG("Queue","Cannot add job %s",jobName);
GUI_Error_HIG(QT_TRANSLATE_NOOP("adm","Queue"),QT_TRANSLATE_NOOP("adm","Cannot add job %s"),jobName);
return;
}
string completePath=string(ADM_getJobDir());
Expand Down
30 changes: 15 additions & 15 deletions avidemux/qt4/ADM_UIs/src/T_bitrate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,19 +47,19 @@ ADM_Qbitrate::ADM_Qbitrate(COMPRES_PARAMS *p,uint32_t minQ, uint32_t mq,QGridLay
if(p->mode==COMPRESS_##z) set=index;\
index++;}

add(CBR,CBR,QT_TR_NOOP("Constant Bitrate"));
add(CQ,CQ,QT_TR_NOOP("Constant Quantiser"));
add(SAME,SAME,QT_TR_NOOP("Same Quantiser as Input"));
add(AQ,AQ,QT_TR_NOOP("Constant Rate Factor"));
add(2PASS,2PASS,QT_TR_NOOP("Two Pass - Video Size"));
add(2PASS_BR,2PASS_BITRATE,QT_TR_NOOP("Two Pass - Average Bitrate"));

text1=new QLabel( QString::fromUtf8(QT_TR_NOOP("Encoding mode")));
add(CBR,CBR,QT_TRANSLATE_NOOP("bitrate","Constant Bitrate"));
add(CQ,CQ,QT_TRANSLATE_NOOP("bitrate","Constant Quantiser"));
add(SAME,SAME,QT_TRANSLATE_NOOP("bitrate","Same Quantiser as Input"));
add(AQ,AQ,QT_TRANSLATE_NOOP("bitrate","Constant Rate Factor"));
add(2PASS,2PASS,QT_TRANSLATE_NOOP("bitrate","Two Pass - Video Size"));
add(2PASS_BR,2PASS_BITRATE,QT_TRANSLATE_NOOP("bitrate","Two Pass - Average Bitrate"));

text1=new QLabel( QString::fromUtf8(QT_TRANSLATE_NOOP("bitrate","Encoding mode")));
text1->setBuddy(combo);

box=new QSpinBox();

text2=new QLabel( QString::fromUtf8(QT_TR_NOOP("Bitrate")));
text2=new QLabel( QString::fromUtf8(QT_TRANSLATE_NOOP("bitrate","Bitrate")));
text2->setBuddy(combo);

QHBoxLayout *hboxLayout = new QHBoxLayout();
Expand Down Expand Up @@ -145,31 +145,31 @@ void ADM_Qbitrate::comboChanged(int i)
switch(mode)
{
case COMPRESS_CBR: //CBR
P(QT_TR_NOOP("Target bitrate (kb/s)"));
P(QT_TRANSLATE_NOOP("bitrate","Target bitrate (kb/s)"));
M(0,20000);
S(compress->bitrate);
break;
case COMPRESS_CQ:// CQ
P(QT_TR_NOOP("Quantizer"));
P(QT_TRANSLATE_NOOP("bitrate","Quantizer"));
M(_minQ,maxQ);
S(compress->qz);
break;
case COMPRESS_2PASS : // 2pass Filesize
P(QT_TR_NOOP("Target video size (MB)"));
P(QT_TRANSLATE_NOOP("bitrate","Target video size (MB)"));
M(1,8000);
S(compress->finalsize);
break;
case COMPRESS_2PASS_BITRATE : // 2pass Avg
P(QT_TR_NOOP("Average bitrate (kb/s)"));
P(QT_TRANSLATE_NOOP("bitrate","Average bitrate (kb/s)"));
M(0,20000);
S(compress->avg_bitrate);
break;
case COMPRESS_SAME : // Same Qz as input
P(QT_TR_NOOP("-"));
P(QT_TRANSLATE_NOOP("bitrate","-"));
M(0,0);
break;
case COMPRESS_AQ : // AQ
P(QT_TR_NOOP("Quantizer"));
P(QT_TRANSLATE_NOOP("bitrate","Quantizer"));
M(_minQ,maxQ);
S(compress->qz);
break;
Expand Down
14 changes: 7 additions & 7 deletions avidemux/qt4/ADM_userInterfaces/ADM_dialog/Q_audioTracks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ void audioTrackQt4::inputChanged(int signal)
// start fileselector
#define MAX_SOURCE_LENGTH 1024
char fileName[MAX_SOURCE_LENGTH];
if(!FileSel_SelectRead("Select audio file",fileName,MAX_SOURCE_LENGTH-1,NULL))
if(!FileSel_SelectRead(QT_TRANSLATE_NOOP("qaudiotracks","Select audio file"),fileName,MAX_SOURCE_LENGTH-1,NULL))
{
ADM_info("No file selected as audioTrack\n");
// deactivate me
Expand All @@ -145,7 +145,7 @@ void audioTrackQt4::inputChanged(int signal)
ADM_edAudioTrackExternal *ext=create_edAudioExternal(fileName);
if(!ext)
{
GUI_Error_HIG("Error","Cannot use that file as audio track");
GUI_Error_HIG(QT_TRANSLATE_NOOP("qaudiotracks","Error"),QT_TRANSLATE_NOOP("qaudiotracks","Cannot use that file as audio track"));
return ;
}
int poolIndex=_pool->size();
Expand Down Expand Up @@ -285,7 +285,7 @@ bool audioTrackQt4::updateActive(void)
int trackIndex=window->inputs[i]->currentIndex();
if(map[trackIndex])
{
GUI_Error_HIG("Error","Some tracks are used multiple times");
GUI_Error_HIG(QT_TRANSLATE_NOOP("qaudiotracks","Error"), QT_TRANSLATE_NOOP("qaudiotracks","Some tracks are used multiple times"));
return false;
}
map[trackIndex]++;
Expand Down Expand Up @@ -411,15 +411,15 @@ void audioTrackQt4::setupMenu(int dex, int forcedIndex)
QString num;
ADM_edAudioTrackFromVideo *fromVideo=edTrack->castToTrackFromVideo() ;
num.setNum(fromVideo->getMyTrackIndex());
str=QString("Track ")+num+QString(" from video");
str=QString(QT_TRANSLATE_NOOP("qaudiotracks","Track "))+num+QString(QT_TRANSLATE_NOOP("qaudiotracks"," from video"));
}
break;
case ADM_EDAUDIO_EXTERNAL:
{
ADM_edAudioTrackExternal *ext=edTrack->castToExternal() ;
ADM_assert(ext);
std::string name=ext->getMyName();
str=QString("File ")+QString(name.c_str());
str=QString(QT_TRANSLATE_NOOP("qaudiotracks","File "))+QString(name.c_str());
}
break;
default:
Expand Down Expand Up @@ -453,7 +453,7 @@ void audioTrackQt4::setupMenu(int dex, int forcedIndex)

//--
// add the "add audio track" item
window->inputs[dex]->addItem(QString(".... Add audio track"));
window->inputs[dex]->addItem(QString(QT_TRANSLATE_NOOP("qaudiotracks",".... Add audio track")));
// set index if possible
if(forcedIndex==-1)
{
Expand Down Expand Up @@ -486,7 +486,7 @@ void audioTrackQt4::setupMenu(int dex, int forcedIndex)
// -- language --
// now add codecs
int nbAud=audioEncoderGetNumberOfEncoders();
window->codec[dex]->addItem(QString("copy"));
window->codec[dex]->addItem(QString(QT_TRANSLATE_NOOP("qaudiotracks","copy")));
for(uint32_t i=1;i<nbAud;i++)
{
QString name=QString(audioEncoderGetDisplayName(i));
Expand Down
8 changes: 4 additions & 4 deletions avidemux/qt4/ADM_userInterfaces/ADM_dialog/Q_encoding.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ void DIA_encodingQt4::priorityChanged(int priorityLevel)
ui->comboBoxPriority->setCurrentIndex(2);
connect(ui->checkBoxShutdown, SIGNAL(currentIndexChanged(int)), this, SLOT(priorityChanged(int)));

GUI_Error_HIG(QT_TR_NOOP("Privileges Required"), QT_TR_NOOP( "Root privileges are required to perform this operation."));
GUI_Error_HIG(QT_TRANSLATE_NOOP("qencoding","Privileges Required"), QT_TRANSLATE_NOOP("qencoding","Root privileges are required to perform this operation."));

return;
}
Expand All @@ -74,7 +74,7 @@ void DIA_encodingQt4::shutdownChanged(int state)
ui->checkBoxShutdown->setCheckState(Qt::Unchecked);
connect(ui->checkBoxShutdown, SIGNAL(stateChanged(int)), this, SLOT(shutdownChanged(int)));

GUI_Error_HIG(QT_TR_NOOP("Privileges Required"), QT_TR_NOOP( "Root privileges are required to perform this operation."));
GUI_Error_HIG(QT_TRANSLATE_NOOP("qencoding","Privileges Required"), QT_TRANSLATE_NOOP("qencoding","Root privileges are required to perform this operation."));
}
#endif
}
Expand Down Expand Up @@ -358,8 +358,8 @@ bool DIA_encodingQt4::isAlive( void )

if(stopRequest)
{
if(GUI_Alternate((char*)QT_TR_NOOP("The encoding is paused. Do you want to resume or abort?"),
(char*)QT_TR_NOOP("Resume"),(char*)QT_TR_NOOP("Abort")))
if(GUI_Alternate((char*)QT_TRANSLATE_NOOP("qencoding","The encoding is paused. Do you want to resume or abort?"),
(char*)QT_TRANSLATE_NOOP("qencoding","Resume"),(char*)QT_TRANSLATE_NOOP("qencoding","Abort")))
{
stopRequest=false;
}
Expand Down
Loading

0 comments on commit 3972605

Please sign in to comment.