Support for Multiple Translator

This commit is contained in:
Syping 2018-01-16 22:28:37 +01:00
parent 3b7542d361
commit 885045d4fd
10 changed files with 90 additions and 106 deletions

View File

@ -37,41 +37,30 @@ AboutDialog::AboutDialog(QWidget *parent) :
QString buildStr = GTA5SYNC_BUILDSTRING;
// Translator Comments
//: Using specific library, example Using libmyfuck
QString usingStr = tr("Using %1 %2");
//: Translated by translator, example Translated by Syping
QString translatedByStr = tr("Translated by %1");
//: Enter your name there
QString translatedByVal = tr("NAME_OF_TRANSLATOR");
//: Enter your proilfe there, example a GitHub profile, E-Mail with "mailto: afucker@sumfuck.com" or a webpage
QString translatorProfile = tr("TRANSLATOR_PROFILE");
QString additionalContent = "";
if (translatedByVal != "NAME_OF_TRANSLATOR")
//: Insert your name here and profile here in following scheme, First Translator,First Profile\\nSecond Translator\\nThird Translator,Second Profile
QString translatorVal = tr("TRANSLATOR");
QStringList translatorContent;
if (translatorVal != "TRANSLATOR")
{
if (translatorProfile != "TRANSLATOR_PROFILE")
const QStringList translatorList = translatorVal.split('\n');
for (const QString &translatorStr : translatorList)
{
additionalContent += translatedByStr.arg(QString("<a href=\"%1\">%2</a>").arg(translatorProfile, translatedByVal));
}
else
{
additionalContent += translatedByStr.arg(translatedByVal);
QStringList translatorStrList = translatorStr.split(',');
QString translatorName = translatorStrList.at(0);
translatorStrList.removeFirst();
QString translatorProfile = translatorStrList.join(QString());
if (!translatorProfile.isEmpty())
{
translatorContent += QString("<a href=\"%1\">%2</a>").arg(translatorProfile, translatorName);
}
else
{
translatorContent += translatorName;
}
}
}
#ifdef WITH_LIBJPEGTURBO // DONT USE IT FOR NOW
bool additionalContentClip = false;
if (!additionalContent.isEmpty())
{
additionalContentClip = true;
additionalContent += " (";
}
additionalContent += usingStr.arg("libjpegturbo", WITH_LIBJPEGTURBO);
if (additionalContentClip)
{
additionalContent += ")";
}
#else
Q_UNUSED(usingStr)
#endif
// Project Description
#ifdef GTA5SYNC_ENABLED
@ -86,9 +75,9 @@ AboutDialog::AboutDialog(QWidget *parent) :
QString copyrightDes2 = tr("%1 is licensed under <a href=\"https://www.gnu.org/licenses/gpl-3.0.html#content\">GNU GPLv3</a>");
copyrightDes2 = copyrightDes2.arg(GTA5SYNC_APPSTR);
QString copyrightDesA;
if (!additionalContent.isEmpty())
if (!translatorContent.isEmpty())
{
copyrightDesA = copyrightDes1 % "<br/>" % additionalContent % "<br/>" % copyrightDes2;
copyrightDesA = copyrightDes1 % "<br/>" % translatedByStr.arg(translatorContent.join(", ")) % "<br/>" % copyrightDes2;
}
else
{
@ -114,7 +103,7 @@ AboutDialog::AboutDialog(QWidget *parent) :
// DPI calculation
qreal screenRatio = AppEnv::screenRatio();
if (!additionalContent.isEmpty())
if (!translatorContent.isEmpty())
{
resize(375 * screenRatio, 270 * screenRatio);
}

View File

@ -29,47 +29,35 @@ Running with Qt %6&lt;br/&gt;
</message>
<message>
<location filename="../AboutDialog.cpp" line="41"/>
<source>Using %1 %2</source>
<extracomment>Using specific library, example Using libmyfuck</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../AboutDialog.cpp" line="43"/>
<source>Translated by %1</source>
<extracomment>Translated by translator, example Translated by Syping</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../AboutDialog.cpp" line="45"/>
<source>NAME_OF_TRANSLATOR</source>
<extracomment>Enter your name there</extracomment>
<location filename="../AboutDialog.cpp" line="43"/>
<source>TRANSLATOR</source>
<extracomment>Insert your name here and profile here in following scheme, First Translator,First Profile\nSecond Translator\nThird Translator,Second Profile</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../AboutDialog.cpp" line="47"/>
<source>TRANSLATOR_PROFILE</source>
<extracomment>Enter your proilfe there, example a GitHub profile, E-Mail with &quot;mailto: afucker@sumfuck.com&quot; or a webpage</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../AboutDialog.cpp" line="78"/>
<location filename="../AboutDialog.cpp" line="67"/>
<source>A project for viewing and sync Grand Theft Auto V Snapmatic&lt;br/&gt;
Pictures and Savegames</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../AboutDialog.cpp" line="80"/>
<location filename="../AboutDialog.cpp" line="69"/>
<source>A project for viewing Grand Theft Auto V Snapmatic&lt;br/&gt;
Pictures and Savegames</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../AboutDialog.cpp" line="84"/>
<location filename="../AboutDialog.cpp" line="73"/>
<source>Copyright &amp;copy; &lt;a href=&quot;%1&quot;&gt;%2&lt;/a&gt; %3</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../AboutDialog.cpp" line="86"/>
<location filename="../AboutDialog.cpp" line="75"/>
<source>%1 is licensed under &lt;a href=&quot;https://www.gnu.org/licenses/gpl-3.0.html#content&quot;&gt;GNU GPLv3&lt;/a&gt;</source>
<translation type="unfinished"></translation>
</message>

Binary file not shown.

View File

@ -147,13 +147,12 @@ Copyright &amp;copy; &lt;a href=&quot;%5&quot;&gt;%6&lt;/a&gt; %7&lt;br/&gt;%8 i
<translation type="obsolete">&lt;span style=&quot; font-weight:600;&quot;&gt;gta5sync&lt;/span&gt;&lt;br/&gt;&lt;br/&gt;Ein Projekt zum ansehen und synchronisieren von Grand Theft Auto 5 Snapmatic Bilder und Spielständen&lt;br/&gt;&lt;br/&gt;Projektversion: %1&lt;br/&gt;Gebaut mit Qt %2&lt;br/&gt;Läuft auf Qt %3&lt;br/&gt;&lt;br/&gt;Copyright &amp;copy; &lt;a href=&quot;https://github.com/Syping/&quot;&gt;Syping&lt;/a&gt; 2016&lt;br/&gt;gta5sync is lizenziert unter &lt;a href=&quot;https://www.gnu.org/licenses/gpl-3.0.html#content&quot;&gt;GNU GPLv3&lt;/a&gt;</translation>
</message>
<message>
<location filename="../AboutDialog.cpp" line="41"/>
<source>Using %1 %2</source>
<extracomment>Using specific library, example Using libmyfuck</extracomment>
<translation>Verwendet %1 %2</translation>
<translation type="vanished">Verwendet %1 %2</translation>
</message>
<message>
<location filename="../AboutDialog.cpp" line="43"/>
<location filename="../AboutDialog.cpp" line="41"/>
<source>Translated by %1</source>
<extracomment>Translated by translator, example Translated by Syping</extracomment>
<translation>Übersetzt von %1</translation>
@ -179,31 +178,35 @@ Copyright &amp;copy; &lt;a href=&quot;%5&quot;&gt;%6&lt;/a&gt; %7&lt;br/&gt;%8 i
<translation type="vanished">https://github.com/Syping/</translation>
</message>
<message>
<location filename="../AboutDialog.cpp" line="45"/>
<source>NAME_OF_TRANSLATOR</source>
<extracomment>Enter your name there</extracomment>
<translation>Syping</translation>
<extracomment>Insert your name here in following scheme, First Translator\nSecond Translator</extracomment>
<translation type="vanished">Syping</translation>
</message>
<message>
<location filename="../AboutDialog.cpp" line="47"/>
<source>TRANSLATOR_PROFILE</source>
<extracomment>Enter your proilfe there, example a GitHub profile, E-Mail with &quot;mailto: afucker@sumfuck.com&quot; or a webpage</extracomment>
<translation>https://github.com/Syping/</translation>
<extracomment>Insert your profile here in following scheme, First Translator,https://my.profile\nSecond Translator,mailto: my@mail.com</extracomment>
<translation type="vanished">Syping,https://github.com/Syping/</translation>
</message>
<message>
<location filename="../AboutDialog.cpp" line="80"/>
<location filename="../AboutDialog.cpp" line="43"/>
<source>TRANSLATOR</source>
<extracomment>Insert your name here and profile here in following scheme, First Translator,First Profile\nSecond Translator\nThird Translator,Second Profile</extracomment>
<translation>Syping,https://github.com/Syping/</translation>
</message>
<message>
<location filename="../AboutDialog.cpp" line="69"/>
<source>A project for viewing Grand Theft Auto V Snapmatic&lt;br/&gt;
Pictures and Savegames</source>
<translation>Ein Projekt zum ansehen von Grand Theft Auto V&lt;br/&gt;
Snapmatic Bilder und Spielständen</translation>
</message>
<message>
<location filename="../AboutDialog.cpp" line="84"/>
<location filename="../AboutDialog.cpp" line="73"/>
<source>Copyright &amp;copy; &lt;a href=&quot;%1&quot;&gt;%2&lt;/a&gt; %3</source>
<translation>Copyright &amp;copy; &lt;a href=&quot;%1&quot;&gt;%2&lt;/a&gt; %3</translation>
</message>
<message>
<location filename="../AboutDialog.cpp" line="86"/>
<location filename="../AboutDialog.cpp" line="75"/>
<source>%1 is licensed under &lt;a href=&quot;https://www.gnu.org/licenses/gpl-3.0.html#content&quot;&gt;GNU GPLv3&lt;/a&gt;</source>
<translation>%1 ist lizenziert unter &lt;a href=&quot;https://www.gnu.org/licenses/gpl-3.0.html#content&quot;&gt;GNU GPLv3&lt;/a&gt;</translation>
</message>
@ -212,7 +215,7 @@ Snapmatic Bilder und Spielständen</translation>
<translation type="vanished">Copyright &amp;copy; &lt;a href=&quot;%1&quot;&gt;%2&lt;/a&gt; %3&lt;br/&gt;%4 ist lizenziert unter &lt;a href=&quot;https://www.gnu.org/licenses/gpl-3.0.html#content&quot;&gt;GNU GPLv3&lt;/a&gt;</translation>
</message>
<message>
<location filename="../AboutDialog.cpp" line="78"/>
<location filename="../AboutDialog.cpp" line="67"/>
<source>A project for viewing and sync Grand Theft Auto V Snapmatic&lt;br/&gt;
Pictures and Savegames</source>
<translation>Ein Projekt zum ansehen und synchronisieren von&lt;br/&gt;

Binary file not shown.

View File

@ -29,47 +29,45 @@ Running with Qt %6&lt;br/&gt;
</message>
<message>
<location filename="../AboutDialog.cpp" line="41"/>
<source>Using %1 %2</source>
<extracomment>Using specific library, example Using libmyfuck</extracomment>
<translation></translation>
</message>
<message>
<location filename="../AboutDialog.cpp" line="43"/>
<source>Translated by %1</source>
<extracomment>Translated by translator, example Translated by Syping</extracomment>
<translation></translation>
</message>
<message>
<location filename="../AboutDialog.cpp" line="45"/>
<source>NAME_OF_TRANSLATOR</source>
<extracomment>Enter your name there</extracomment>
<translation>Syping</translation>
<extracomment>Insert your name here in following scheme, First Translator\nSecond Translator</extracomment>
<translation type="vanished">Syping</translation>
</message>
<message>
<location filename="../AboutDialog.cpp" line="47"/>
<source>TRANSLATOR_PROFILE</source>
<extracomment>Enter your proilfe there, example a GitHub profile, E-Mail with &quot;mailto: afucker@sumfuck.com&quot; or a webpage</extracomment>
<translation>https://github.com/Syping/</translation>
<extracomment>Insert your profile here in following scheme, First Translator,https://my.profile\nSecond Translator,mailto: my@mail.com</extracomment>
<translation type="vanished">https://github.com/Syping/</translation>
</message>
<message>
<location filename="../AboutDialog.cpp" line="78"/>
<location filename="../AboutDialog.cpp" line="43"/>
<source>TRANSLATOR</source>
<extracomment>Insert your name here and profile here in following scheme, First Translator,First Profile\nSecond Translator\nThird Translator,Second Profile</extracomment>
<translation>Syping,https://github.com/Syping/</translation>
</message>
<message>
<location filename="../AboutDialog.cpp" line="67"/>
<source>A project for viewing and sync Grand Theft Auto V Snapmatic&lt;br/&gt;
Pictures and Savegames</source>
<translation></translation>
</message>
<message>
<location filename="../AboutDialog.cpp" line="80"/>
<location filename="../AboutDialog.cpp" line="69"/>
<source>A project for viewing Grand Theft Auto V Snapmatic&lt;br/&gt;
Pictures and Savegames</source>
<translation></translation>
</message>
<message>
<location filename="../AboutDialog.cpp" line="84"/>
<location filename="../AboutDialog.cpp" line="73"/>
<source>Copyright &amp;copy; &lt;a href=&quot;%1&quot;&gt;%2&lt;/a&gt; %3</source>
<translation></translation>
</message>
<message>
<location filename="../AboutDialog.cpp" line="86"/>
<location filename="../AboutDialog.cpp" line="75"/>
<source>%1 is licensed under &lt;a href=&quot;https://www.gnu.org/licenses/gpl-3.0.html#content&quot;&gt;GNU GPLv3&lt;/a&gt;</source>
<translation></translation>
</message>

Binary file not shown.

View File

@ -131,43 +131,46 @@ Copyright &amp;copy; &lt;a href=&quot;%5&quot;&gt;%6&lt;/a&gt; %7&lt;br/&gt;
<translation type="vanished">https://github.com/Ganjalo/</translation>
</message>
<message>
<location filename="../AboutDialog.cpp" line="41"/>
<source>Using %1 %2</source>
<extracomment>Using specific library, example Using libmyfuck</extracomment>
<translation>Utilise %1 %2</translation>
<translation type="vanished">Utilise %1 %2</translation>
</message>
<message>
<location filename="../AboutDialog.cpp" line="43"/>
<location filename="../AboutDialog.cpp" line="41"/>
<source>Translated by %1</source>
<extracomment>Translated by translator, example Translated by Syping</extracomment>
<translation>Traduit par %1</translation>
</message>
<message>
<location filename="../AboutDialog.cpp" line="45"/>
<source>NAME_OF_TRANSLATOR</source>
<extracomment>Enter your name there</extracomment>
<translation>Ganjalo</translation>
<extracomment>Insert your name here in following scheme, First Translator\nSecond Translator</extracomment>
<translation type="vanished">Ganjalo</translation>
</message>
<message>
<location filename="../AboutDialog.cpp" line="47"/>
<source>TRANSLATOR_PROFILE</source>
<extracomment>Enter your proilfe there, example a GitHub profile, E-Mail with &quot;mailto: afucker@sumfuck.com&quot; or a webpage</extracomment>
<translation>https://github.com/Ganjalo/</translation>
<extracomment>Insert your profile here in following scheme, First Translator,https://my.profile\nSecond Translator,mailto: my@mail.com</extracomment>
<translation type="vanished">https://github.com/Ganjalo/</translation>
</message>
<message>
<location filename="../AboutDialog.cpp" line="80"/>
<location filename="../AboutDialog.cpp" line="43"/>
<source>TRANSLATOR</source>
<extracomment>Insert your name here and profile here in following scheme, First Translator,First Profile\nSecond Translator\nThird Translator,Second Profile</extracomment>
<translation>Ganjalo,https://github.com/Ganjalo/</translation>
</message>
<message>
<location filename="../AboutDialog.cpp" line="69"/>
<source>A project for viewing Grand Theft Auto V Snapmatic&lt;br/&gt;
Pictures and Savegames</source>
<translation>Un outil pour gérer les photos Snapmatic&lt;br/&gt;
et les fichiers de sauvegarde de Grand Theft Auto V</translation>
</message>
<message>
<location filename="../AboutDialog.cpp" line="84"/>
<location filename="../AboutDialog.cpp" line="73"/>
<source>Copyright &amp;copy; &lt;a href=&quot;%1&quot;&gt;%2&lt;/a&gt; %3</source>
<translation>Copyright &amp;copy; &lt;a href=&quot;%1&quot;&gt;%2&lt;/a&gt; %3</translation>
</message>
<message>
<location filename="../AboutDialog.cpp" line="86"/>
<location filename="../AboutDialog.cpp" line="75"/>
<source>%1 is licensed under &lt;a href=&quot;https://www.gnu.org/licenses/gpl-3.0.html#content&quot;&gt;GNU GPLv3&lt;/a&gt;</source>
<translation>%1 est distribué sous license &lt;a href=&quot;https://www.gnu.org/licenses/gpl-3.0.html#content&quot;&gt;GNU GPLv3&lt;/a&gt;</translation>
</message>
@ -176,7 +179,7 @@ et les fichiers de sauvegarde de Grand Theft Auto V</translation>
<translation type="vanished">Copyright &amp;copy; &lt;a href=&quot;%1&quot;&gt;%2&lt;/a&gt; %3&lt;br/&gt;%4 est distribué sous license &lt;a href=&quot;https://www.gnu.org/licenses/gpl-3.0.html#content&quot;&gt;GNU GPLv3&lt;/a&gt;</translation>
</message>
<message>
<location filename="../AboutDialog.cpp" line="78"/>
<location filename="../AboutDialog.cpp" line="67"/>
<source>A project for viewing and sync Grand Theft Auto V Snapmatic&lt;br/&gt;
Pictures and Savegames</source>
<translation>Un outil pour gérer et synchroniser les photos Snapmatic&lt;br/&gt;

Binary file not shown.

View File

@ -91,43 +91,46 @@ Running with Qt %6&lt;br/&gt;
<translation type="vanished">https://github.com/VADemon/</translation>
</message>
<message>
<location filename="../AboutDialog.cpp" line="41"/>
<source>Using %1 %2</source>
<extracomment>Using specific library, example Using libmyfuck</extracomment>
<translation>Использует %1 %2</translation>
<translation type="vanished">Использует %1 %2</translation>
</message>
<message>
<location filename="../AboutDialog.cpp" line="43"/>
<location filename="../AboutDialog.cpp" line="41"/>
<source>Translated by %1</source>
<extracomment>Translated by translator, example Translated by Syping</extracomment>
<translation>Перевёл %1</translation>
</message>
<message>
<location filename="../AboutDialog.cpp" line="45"/>
<source>NAME_OF_TRANSLATOR</source>
<extracomment>Enter your name there</extracomment>
<translation>VADemon</translation>
<extracomment>Insert your name here in following scheme, First Translator\nSecond Translator</extracomment>
<translation type="vanished">VADemon</translation>
</message>
<message>
<location filename="../AboutDialog.cpp" line="47"/>
<source>TRANSLATOR_PROFILE</source>
<extracomment>Enter your proilfe there, example a GitHub profile, E-Mail with &quot;mailto: afucker@sumfuck.com&quot; or a webpage</extracomment>
<translation>https://github.com/VADemon/</translation>
<extracomment>Insert your profile here in following scheme, First Translator,https://my.profile\nSecond Translator,mailto: my@mail.com</extracomment>
<translation type="vanished">https://github.com/VADemon/</translation>
</message>
<message>
<location filename="../AboutDialog.cpp" line="80"/>
<location filename="../AboutDialog.cpp" line="43"/>
<source>TRANSLATOR</source>
<extracomment>Insert your name here and profile here in following scheme, First Translator,First Profile\nSecond Translator\nThird Translator,Second Profile</extracomment>
<translation>VADemon,https://github.com/VADemon/</translation>
</message>
<message>
<location filename="../AboutDialog.cpp" line="69"/>
<source>A project for viewing Grand Theft Auto V Snapmatic&lt;br/&gt;
Pictures and Savegames</source>
<translation>Проект для просмотра Grand Theft Auto V Snapmatic&lt;br/&gt;
картинок и сохранений</translation>
</message>
<message>
<location filename="../AboutDialog.cpp" line="84"/>
<location filename="../AboutDialog.cpp" line="73"/>
<source>Copyright &amp;copy; &lt;a href=&quot;%1&quot;&gt;%2&lt;/a&gt; %3</source>
<translation>Copyright &amp;copy; &lt;a href=&quot;%1&quot;&gt;%2&lt;/a&gt; %3</translation>
</message>
<message>
<location filename="../AboutDialog.cpp" line="86"/>
<location filename="../AboutDialog.cpp" line="75"/>
<source>%1 is licensed under &lt;a href=&quot;https://www.gnu.org/licenses/gpl-3.0.html#content&quot;&gt;GNU GPLv3&lt;/a&gt;</source>
<translation>%1 под лицензией &lt;a href=&quot;https://www.gnu.org/licenses/gpl-3.0.html#content&quot;&gt;GNU GPLv3&lt;/a&gt;</translation>
</message>
@ -136,7 +139,7 @@ Pictures and Savegames</source>
<translation type="vanished">Copyright &amp;copy; &lt;a href=&quot;%1&quot;&gt;%2&lt;/a&gt; %3&lt;br/&gt;%4 под лицензией &lt;a href=&quot;https://www.gnu.org/licenses/gpl-3.0.html#content&quot;&gt;GNU GPLv3&lt;/a&gt;</translation>
</message>
<message>
<location filename="../AboutDialog.cpp" line="78"/>
<location filename="../AboutDialog.cpp" line="67"/>
<source>A project for viewing and sync Grand Theft Auto V Snapmatic&lt;br/&gt;
Pictures and Savegames</source>
<translation>Проект для просмотра и синхронизирования &lt;br/&gt;