Commit 1a9495d0 authored by Edric Milaret's avatar Edric Milaret

i18n: make the client translation ready

- add tx config file
- add source translation file
- changed some formatted string to be included in tr in case the
argument order need to be changed
- moved some ui text to code (e.g Credits)

Issue: #80359
Change-Id: I8ca846942a879f1e5753d042bb4cb44626c4c5ef
parent 53ac6e5a
[main]
host = https://www.transifex.com
[ring.ring_client_windowsts]
file_filter = translations/ring_client_windows_<lang>.ts
source_file = translations/ring_client_windows.ts
source_lang = en
type = TS
......@@ -105,7 +105,7 @@ RESOURCES += \
RC_FILE = ico.rc
TRANSLATIONS =
TRANSLATIONS = translations/ring_client_windows.ts
maketranslationdir.target = customtarget
maketranslationdir.commands = $(MKDIR) $$OUT_PWD/share/ring/translations/
......
......@@ -34,6 +34,27 @@ AboutDialog::AboutDialog(QWidget *parent) :
QString("<html><head/><body><p><span style=\" font-weight:600;\">"
"%1 v%2</span></p></body></html>").arg(tr("Windows Ring"), VERSION));
ui->gitVersionLabel->setText(QString("%1: %2").arg(tr("version"), GIT_VERSION));
ui->creditsBrowser->setHtml("<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\" \"http://www.w3.org/TR/REC-html40/strict.dtd\">"
"<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">"
"p, li { white-space: pre-wrap; }"
"</style></head><body style=\" font-family:'Cantarell'; font-size:11pt; font-weight:400; font-style:normal;\">"
"<p align=\"center\" style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-weight:600;\">"
+ tr("Created by:") + "</span></p>"
"<p align=\"center\" style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">Adrien Béraud</p>"
"<p align=\"center\" style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">Alexandre Lision</p>"
"<p align=\"center\" style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">Édric Milaret</p>"
"<p align=\"center\" style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">Éloi Bail</p>"
"<p align=\"center\" style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">Emmanuel Lepage-Vallée</p>"
"<p align=\"center\" style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">Guillaume Roguez</p>"
"<p align=\"center\" style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">Stepan Salenikovich</p>"
"<p align=\"center\" style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-weight:600;\">"
+ tr("Artwork by:") + "</span></p>"
"<p align=\"center\" style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">Marianne Forget</p>"
"<p align=\"center\" style=\"-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><br /></p>"
"<p align=\"center\" style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">"
+ tr("Based on the SFLPhone project") + "</p>"
"<p align=\"center\" style=\"-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><br /></p></body></html>");
}
AboutDialog::~AboutDialog()
......
......@@ -542,7 +542,10 @@
<item alignment="Qt::AlignHCenter">
<widget class="QLabel" name="clientVersionLabel">
<property name="text">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;span style=&quot; font-weight:600;&quot;&gt;Windows Ring v&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
<string notr="true">Windows Ring v</string>
</property>
<property name="textFormat">
<enum>Qt::AutoText</enum>
</property>
<property name="margin">
<number>15</number>
......@@ -552,7 +555,7 @@
<item alignment="Qt::AlignHCenter">
<widget class="QLabel" name="gitVersionLabel">
<property name="text">
<string>version : </string>
<string notr="true">version : </string>
</property>
<property name="margin">
<number>5</number>
......@@ -562,7 +565,10 @@
<item alignment="Qt::AlignHCenter">
<widget class="QLabel" name="releaseLabel">
<property name="text">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Release : Samuel de Champlain&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
<string>Release : Samuel de Champlain</string>
</property>
<property name="textFormat">
<enum>Qt::PlainText</enum>
</property>
<property name="margin">
<number>0</number>
......@@ -575,10 +581,11 @@
<enum>Qt::LeftToRight</enum>
</property>
<property name="text">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p align=&quot;center&quot;&gt;The Microsoft Windows client for Ring. &lt;BR&gt;Ring is a secured and distributed communication software.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
<string>The Microsoft Windows client for Ring.
Ring is a secured and distributed communication software.</string>
</property>
<property name="textFormat">
<enum>Qt::AutoText</enum>
<enum>Qt::PlainText</enum>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
......@@ -599,7 +606,7 @@
<cursorShape>PointingHandCursor</cursorShape>
</property>
<property name="text">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;a href=&quot;www.ring.cx&quot;&gt;&lt;span style=&quot; font-size:9pt; text-decoration: underline; color:#0000ff;&quot;&gt;www.ring.cx&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
<string notr="true">&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;a href=&quot;www.ring.cx&quot;&gt;&lt;span style=&quot; font-size:9pt; text-decoration: underline; color:#0000ff;&quot;&gt;www.ring.cx&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="textFormat">
<enum>Qt::RichText</enum>
......@@ -636,7 +643,7 @@
</font>
</property>
<property name="text">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;© 2015 Savoir-faire Linux&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
<string notr="true">&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;© 2015 Savoir-faire Linux&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="margin">
<number>5</number>
......@@ -654,7 +661,7 @@
<cursorShape>PointingHandCursor</cursorShape>
</property>
<property name="text">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;This program comes with absolutely no warranty. &lt;br/&gt;See the &lt;a href=&quot;http://www.gnu.org/licenses/gpl-3.0.html&quot;&gt;&lt;span style=&quot; text-decoration: underline; color:#0000ff;&quot;&gt;GNU General Public License, version 3 or later&lt;/span&gt;&lt;/a&gt; for details.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
<string notr="true">&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;This program comes with absolutely no warranty. &lt;br/&gt;See the &lt;a href=&quot;http://www.gnu.org/licenses/gpl-3.0.html&quot;&gt;&lt;span style=&quot; text-decoration: underline; color:#0000ff;&quot;&gt;GNU General Public License, version 3 or later&lt;/span&gt;&lt;/a&gt; for details.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="textFormat">
<enum>Qt::RichText</enum>
......@@ -680,25 +687,13 @@
<number>1</number>
</property>
<item>
<widget class="QTextBrowser" name="textBrowser">
<widget class="QTextBrowser" name="creditsBrowser">
<property name="html">
<string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
<string notr="true">&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
p, li { white-space: pre-wrap; }
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'Cantarell'; font-size:11pt; font-weight:400; font-style:normal;&quot;&gt;
&lt;p align=&quot;center&quot; 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-weight:600;&quot;&gt;Created by: &lt;/span&gt;&lt;/p&gt;
&lt;p align=&quot;center&quot; style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;Adrien Béraud&lt;/p&gt;
&lt;p align=&quot;center&quot; style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;Alexandre Lision&lt;/p&gt;
&lt;p align=&quot;center&quot; style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;Édric Milaret&lt;/p&gt;
&lt;p align=&quot;center&quot; style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;Éloi Bail&lt;/p&gt;
&lt;p align=&quot;center&quot; style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;Emmanuel Lepage-Vallée&lt;/p&gt;
&lt;p align=&quot;center&quot; style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;Guillaume Roguez&lt;/p&gt;
&lt;p align=&quot;center&quot; style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;Stepan Salenikovich&lt;/p&gt;
&lt;p align=&quot;center&quot; 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-weight:600;&quot;&gt;Artwork by:&lt;/span&gt;&lt;/p&gt;
&lt;p align=&quot;center&quot; style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;Marianne Forget&lt;/p&gt;
&lt;p align=&quot;center&quot; 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;&quot;&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p align=&quot;center&quot; style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;Based on the SFLPhone project&lt;/p&gt;
&lt;p align=&quot;center&quot; 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;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
&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;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
</widget>
</item>
......
......@@ -17,7 +17,7 @@
</sizepolicy>
</property>
<property name="windowTitle">
<string>Form</string>
<string>Settings</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
......@@ -29,7 +29,7 @@
</sizepolicy>
</property>
<property name="currentIndex">
<number>4</number>
<number>0</number>
</property>
<widget class="QWidget" name="gen_tab">
<property name="sizePolicy">
......@@ -154,7 +154,7 @@
</sizepolicy>
</property>
<property name="text">
<string>TextLabel</string>
<string/>
</property>
</widget>
</item>
......@@ -641,7 +641,7 @@
<property name="geometry">
<rect>
<x>0</x>
<y>-40</y>
<y>0</y>
<width>733</width>
<height>685</height>
</rect>
......@@ -799,7 +799,7 @@
<item>
<widget class="QLabel" name="label_12">
<property name="text">
<string>Adress</string>
<string>Address</string>
</property>
<property name="buddy">
<cstring>lrcfg_publishedAddress</cstring>
......@@ -1417,7 +1417,7 @@
<enum>Qt::RightToLeft</enum>
</property>
<property name="text">
<string>PushButton</string>
<string/>
</property>
<property name="icon">
<iconset resource="ressources.qrc">
......@@ -1434,7 +1434,7 @@
<enum>Qt::RightToLeft</enum>
</property>
<property name="text">
<string>PushButton</string>
<string/>
</property>
<property name="icon">
<iconset resource="ressources.qrc">
......@@ -1451,7 +1451,7 @@
<enum>Qt::RightToLeft</enum>
</property>
<property name="text">
<string>PushButton</string>
<string/>
</property>
<property name="icon">
<iconset resource="ressources.qrc">
......
......@@ -171,7 +171,7 @@ CallWidget::findRingAccount(QModelIndex idx1, QModelIndex idx2, QVector<int> vec
if ((Account::Protocol)protocol.toUInt() == Account::Protocol::RING) {
auto username = idx.data(static_cast<int>(Account::Role::Username));
ui->ringIdLabel->setText(
QString("%1: %2").arg(tr("Your RingID"), username.toString()));
QString(tr("Your RingID: %1", "%1 is the RingID")).arg(username.toString()));
found = true;
return;
}
......@@ -241,7 +241,7 @@ CallWidget::findRingAccount()
account->displayName() = account->alias();
auto username = account->username();
ui->ringIdLabel->setText(
QString("%1: %2").arg(tr("Your RingID"), username));
QString(tr("Your RingID: %1", "%1 is the RingID")).arg(username));
found = true;
return;
}
......@@ -257,7 +257,8 @@ void
CallWidget::callIncoming(Call *call)
{
if (!call->account()->isAutoAnswer()) {
ui->callLabel->setText(QString("%1 %2").arg(tr("Call from"), call->formattedName()));
ui->callLabel->setText(QString(tr("Call from %1", "%1 is the name of the caller"))
.arg(call->formattedName()));
ui->callInvite->setVisible(true);
ui->callInvite->raise();
}
......@@ -315,8 +316,8 @@ CallWidget::callStateChanged(Call* call, Call::State previousState)
displaySpinner(false);
ui->videoWidget->show();
}
ui->callStateLabel->setText(QString("%1: %2")
.arg(tr("Call State"), call->toHumanStateName()));
ui->callStateLabel->setText(QString(tr("Call State: %1", "%1 is the state of the call"))
.arg(call->toHumanStateName()));
}
void
......
......@@ -181,7 +181,7 @@
</sizepolicy>
</property>
<property name="text">
<string>Call State :</string>
<string notr="true"/>
</property>
</widget>
</item>
......@@ -228,7 +228,7 @@
</size>
</property>
<property name="text">
<string>Your Ring ID:</string>
<string notr="true">Your RingID:</string>
</property>
<property name="margin">
<number>0</number>
......
......@@ -17,7 +17,7 @@
</sizepolicy>
</property>
<property name="windowTitle">
<string>Form</string>
<string>Settings</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
......@@ -29,7 +29,7 @@
</sizepolicy>
</property>
<property name="currentIndex">
<number>2</number>
<number>0</number>
</property>
<widget class="QWidget" name="generalTab">
<attribute name="title">
......
......@@ -11,7 +11,7 @@
</rect>
</property>
<property name="windowTitle">
<string>Dialog</string>
<string/>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<property name="spacing">
......
......@@ -11,7 +11,7 @@
</rect>
</property>
<property name="windowTitle">
<string>Dialog</string>
<string/>
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="0" colspan="2">
......
......@@ -17,7 +17,7 @@
</sizepolicy>
</property>
<property name="windowTitle">
<string>Form</string>
<string/>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
......
......@@ -444,7 +444,7 @@
</palette>
</property>
<property name="windowTitle">
<string>Form</string>
<string/>
</property>
<layout class="QHBoxLayout" name="horizontalLayout">
<property name="leftMargin">
......
......@@ -17,7 +17,7 @@
</sizepolicy>
</property>
<property name="windowTitle">
<string>Form</string>
<string/>
</property>
<layout class="QHBoxLayout" name="horizontalLayout">
<property name="leftMargin">
......
This diff is collapsed.
......@@ -20,7 +20,7 @@
<bool>false</bool>
</property>
<property name="windowTitle">
<string>Form</string>
<string/>
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="1" column="1">
......
......@@ -20,7 +20,7 @@
<bool>true</bool>
</property>
<property name="windowTitle">
<string>Form</string>
<string/>
</property>
<layout class="QGridLayout" name="gridLayout">
<property name="leftMargin">
......
......@@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>462</width>
<height>336</height>
<width>602</width>
<height>352</height>
</rect>
</property>
<property name="palette">
......@@ -426,7 +426,7 @@
</palette>
</property>
<property name="windowTitle">
<string>Dialog</string>
<string>Wizard</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_2">
<item>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment