Skip to content

Commit

Permalink
Improving Subtitle Style
Browse files Browse the repository at this point in the history
  • Loading branch information
llamaret committed Jan 19, 2020
1 parent 4e8cfdd commit 90af21f
Show file tree
Hide file tree
Showing 13 changed files with 151 additions and 92 deletions.
15 changes: 11 additions & 4 deletions converter/ffmpeginterface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -362,18 +362,21 @@ QStringList FFmpegInterface::Private::getOptionList(const ConversionParameters &
QString source = o.source;
int last_point_source = source.lastIndexOf(".");
//Begins Subtitle files declaration
QString subtitlesrt, subtitlessa;
QString subtitlesrt, subtitlessa, subtitlesub;
if (last_point_source==-1){
subtitlesrt = source+".srt";
subtitlessa = source+".ssa";
subtitlesub = source+".sub";
}
else{
subtitlesrt = source.replace(last_point_source, 5, ".srt");
subtitlessa = source.replace(last_point_source, 5, ".ssa");
subtitlesub = source.replace(last_point_source, 5, ".sub");
}
QFile subtitle_srt, subtitle_ssa;
QFile subtitle_srt, subtitle_ssa, subtitle_sub;
subtitle_srt.setFileName(subtitlesrt);
subtitle_ssa.setFileName(subtitlessa);
subtitle_sub.setFileName(subtitlesub);
//Finishing Subtitle files declaration

// overwrite if file exists
Expand Down Expand Up @@ -407,11 +410,15 @@ QStringList FFmpegInterface::Private::getOptionList(const ConversionParameters &

if (subtitle_srt.exists())
{
command = QString("subtitles='%1':force_style='Fontsize=28':charenc=ISO-8859-1").arg(subtitlesrt);
command = QString("subtitles='%1':force_style='FontName=Sans Serif,OutlineColour=&H00000000,WrapStyle=2,Borderstyle=1,Outline=1,Shadow=1,Fontsize=28':charenc=ISO-8859-1").arg(subtitlesrt);
}
else if (subtitle_ssa.exists())
{
command = QString("subtitles='%1':force_style='Fontsize=28':charenc=ISO-8859-1").arg(subtitlessa);
command = QString("subtitles='%1':force_style='FontName=Sans Serif,OutlineColour=&H00000000,WrapStyle=2,Borderstyle=1,Outline=1,Shadow=1,Fontsize=28':charenc=ISO-8859-1").arg(subtitlessa);
}
else if (subtitle_sub.exists())
{
command = QString("subtitles='%1':force_style='FontName=Sans Serif,OutlineColour=&H00000000,WrapStyle=2,Borderstyle=1,Outline=1,Shadow=1,Fontsize=28':charenc=ISO-8859-1").arg(subtitlesub);
}

if (!command.isEmpty())
Expand Down
16 changes: 11 additions & 5 deletions translations/mystiq_de.ts
Original file line number Diff line number Diff line change
Expand Up @@ -181,12 +181,15 @@ p, li { white-space: pre-wrap; }
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Fira Sans';"> - Added Russian language Pack</span></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Fira Sans';"> - Partially added Polish language Pack</span></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Fira Sans';"> - Added MystiQ's manpage (only GNU/Linux)</span></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Fira Sans';"> - Added (temporarily) 32-bit Windows installer</span></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Fira Sans';"> - Fixed Media Preview in Windows systems</span></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Fira Sans';"> - Changed to QUrl::fromLocalFile to generate the correct file:// url</span></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Fira Sans';"> - Fixed all Warnings of Qt 5.14</span></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Fira Sans';"> - Added missing namespace to demuxing_formats</span></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Fira Sans';"> - Fixed crop math scalar functions</span></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Fira Sans';"> - Fixed packaging error for MacOS</span></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Fira Sans';"> - Changed background for mystiq logo to dark and light themes</span></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Fira Sans';"> - Fixed minimum width in mainwindow affecting small screens or tiling window managers</span></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Fira Sans';"> - Fixed subtitles burning</span></p>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Fira Sans';"><br /></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Fira Sans'; font-weight:600;">Version 20.01.09 (2020-01-09)</span></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Fira Sans'; font-weight:600;"> </span><span style=" font-family:'Fira Sans';">- Changed version numbering system. Now we use the exact release date as version number.</span></p>
Expand Down Expand Up @@ -287,9 +290,8 @@ p, li { white-space: pre-wrap; }
<translation>Entwicklerliste:&lt;br&gt; %1</translation>
</message>
<message>
<location filename="../ui/aboutdialog.cpp" line="74"/>
<source>Aplication Name:&lt;br&gt; %1</source>
<translation>Anwendungsname:&lt;br&gt; %1</translation>
<translation type="vanished">Anwendungsname:&lt;br&gt; %1</translation>
</message>
<message>
<location filename="../ui/aboutdialog.cpp" line="75"/>
Expand Down Expand Up @@ -343,6 +345,11 @@ p, li { white-space: pre-wrap; }
<extracomment>Swedish Language (Sweden)</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/aboutdialog.cpp" line="74"/>
<source>Application Name:&lt;br&gt; %1</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/aboutdialog.cpp" line="136"/>
<source>German (Germany)</source>
Expand Down Expand Up @@ -1350,9 +1357,8 @@ p, li { white-space: pre-wrap; }
<translation>Spenden</translation>
</message>
<message>
<location filename="../ui/mainwindow.cpp" line="126"/>
<source>Conversion finished successfully.</source>
<translation>Die Konvertierung wurde erfolgreich abgeschlossen.</translation>
<translation type="vanished">Die Konvertierung wurde erfolgreich abgeschlossen.</translation>
</message>
<message>
<location filename="../ui/mainwindow.cpp" line="130"/>
Expand Down
Binary file modified translations/mystiq_es.qm
Binary file not shown.
19 changes: 13 additions & 6 deletions translations/mystiq_es.ts
Original file line number Diff line number Diff line change
Expand Up @@ -181,12 +181,15 @@ p, li { white-space: pre-wrap; }
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:&apos;Fira Sans&apos;;&quot;&gt; - Added Russian language Pack&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:&apos;Fira Sans&apos;;&quot;&gt; - Partially added Polish language Pack&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:&apos;Fira Sans&apos;;&quot;&gt; - Added MystiQ&apos;s manpage (only GNU/Linux)&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:&apos;Fira Sans&apos;;&quot;&gt; - Added (temporarily) 32-bit Windows installer&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:&apos;Fira Sans&apos;;&quot;&gt; - Fixed Media Preview in Windows systems&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:&apos;Fira Sans&apos;;&quot;&gt; - Changed to QUrl::fromLocalFile to generate the correct file:// url&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:&apos;Fira Sans&apos;;&quot;&gt; - Fixed all Warnings of Qt 5.14&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:&apos;Fira Sans&apos;;&quot;&gt; - Added missing namespace to demuxing_formats&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:&apos;Fira Sans&apos;;&quot;&gt; - Fixed crop math scalar functions&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:&apos;Fira Sans&apos;;&quot;&gt; - Fixed packaging error for MacOS&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:&apos;Fira Sans&apos;;&quot;&gt; - Changed background for mystiq logo to dark and light themes&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:&apos;Fira Sans&apos;;&quot;&gt; - Fixed minimum width in mainwindow affecting small screens or tiling window managers&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:&apos;Fira Sans&apos;;&quot;&gt; - Fixed subtitles burning&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:&apos;Fira Sans&apos;;&quot;&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:&apos;Fira Sans&apos;; font-weight:600;&quot;&gt;Version 20.01.09 (2020-01-09)&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:&apos;Fira Sans&apos;; font-weight:600;&quot;&gt; &lt;/span&gt;&lt;span style=&quot; font-family:&apos;Fira Sans&apos;;&quot;&gt;- Changed version numbering system. Now we use the exact release date as version number.&lt;/span&gt;&lt;/p&gt;
Expand Down Expand Up @@ -244,7 +247,7 @@ p, li { white-space: pre-wrap; }
&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:&apos;Fira Sans&apos;;&quot;&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:&apos;Fira Sans&apos;; font-size:medium; font-weight:600;&quot;&gt;Version 0.0.1 (2019-08-12)&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:&apos;Fira Sans&apos;; font-size:medium;&quot;&gt; - First stable release.&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
<translation type="unfinished"></translation>
<translation></translation>
</message>
<message>
<source>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
Expand Down Expand Up @@ -1671,9 +1674,13 @@ p, li { white-space: pre-wrap; }
</message>
<message>
<location filename="../ui/aboutdialog.cpp" line="74"/>
<source>Aplication Name:&lt;br&gt; %1</source>
<source>Application Name:&lt;br&gt; %1</source>
<translation>Nombre de la Aplicación:&lt;br&gt; %1</translation>
</message>
<message>
<source>Aplication Name:&lt;br&gt; %1</source>
<translation type="vanished">Nombre de la Aplicación:&lt;br&gt; %1</translation>
</message>
<message>
<location filename="../ui/aboutdialog.cpp" line="133"/>
<source>Japanese (Japan)</source>
Expand Down Expand Up @@ -2750,9 +2757,8 @@ p, li { white-space: pre-wrap; }
<translation>Cortar</translation>
</message>
<message>
<location filename="../ui/mainwindow.cpp" line="126"/>
<source>Conversion finished successfully.</source>
<translation>Conversión finalizada exitosamente.</translation>
<translation type="vanished">Conversión finalizada exitosamente.</translation>
</message>
<message>
<location filename="../ui/mainwindow.cpp" line="130"/>
Expand Down Expand Up @@ -2901,7 +2907,8 @@ p, li { white-space: pre-wrap; }
<location filename="../converter/mediaconverter.cpp" line="111"/>
<source> FFmpeg, FFPlay o FFprobe %1 have not been found in the system. Please consider installing them before running MystiQ</source>
<extracomment>%1 is a computer program</extracomment>
<translation type="unfinished"></translation>
<translatorcomment>%1 es un programa de computadora</translatorcomment>
<translation> FFmpeg, FFPlay o FFprobe %1 no se han encontrado en el sistema. Por favor considere instalarlos antes de ejecutar MystiQ</translation>
</message>
</context>
<context>
Expand Down
Loading

0 comments on commit 90af21f

Please sign in to comment.