From fde9ad535667e25869879fcde2dd24d8c7d8ca51 Mon Sep 17 00:00:00 2001
From: Diadlo
Date: Sat, 10 Sep 2016 22:25:16 +0300
Subject: [PATCH 1/4] fix(i18n): Removed extra tag from translation
---
src/widget/form/settings/advancedform.cpp | 2 +-
translations/ar.ts | 2 +-
translations/be.ts | 6 +++---
translations/bg.ts | 2 +-
translations/cs.ts | 2 +-
translations/da.ts | 2 +-
translations/de.ts | 2 +-
translations/el.ts | 2 +-
translations/eo.ts | 2 +-
translations/es.ts | 2 +-
translations/et.ts | 4 ++--
translations/fi.ts | 2 +-
translations/fr.ts | 2 +-
translations/he.ts | 2 +-
translations/hr.ts | 2 +-
translations/hu.ts | 2 +-
translations/it.ts | 2 +-
translations/ja.ts | 2 +-
translations/jbo.ts | 2 +-
translations/lt.ts | 2 +-
translations/nl.ts | 2 +-
translations/no_nb.ts | 2 +-
translations/pl.ts | 2 +-
translations/pt.ts | 2 +-
translations/ru.ts | 2 +-
translations/sl.ts | 2 +-
translations/sv.ts | 2 +-
translations/tr.ts | 2 +-
translations/ug.ts | 2 +-
translations/uk.ts | 2 +-
translations/zh.ts | 2 +-
31 files changed, 34 insertions(+), 34 deletions(-)
diff --git a/src/widget/form/settings/advancedform.cpp b/src/widget/form/settings/advancedform.cpp
index 4333b8968..fa842b961 100644
--- a/src/widget/form/settings/advancedform.cpp
+++ b/src/widget/form/settings/advancedform.cpp
@@ -67,7 +67,7 @@ AdvancedForm::AdvancedForm()
QString warningBody = tr("Unless you %1 know what you are doing, "
"please do %2 change anything here. Changes "
"made here may lead to problems with qTox, and even "
- "to loss of your data, e.g. history.
")
+ "to loss of your data, e.g. history.")
.arg(QString("%1").arg(tr("really")))
.arg(QString("%1").arg(tr("not")));
diff --git a/translations/ar.ts b/translations/ar.ts
index 7826bc820..e357d113f 100644
--- a/translations/ar.ts
+++ b/translations/ar.ts
@@ -303,7 +303,7 @@ which may lead to problems with video calls.
خصائص
-
+
diff --git a/translations/be.ts b/translations/be.ts
index e62fba98e..1d950c8f0 100644
--- a/translations/be.ts
+++ b/translations/be.ts
@@ -21,7 +21,7 @@
- Карыстайцеся паўзунком для змянення ўзмацнення вашай прылады запісу ў дыяпазоне ад %1 дБ да %2 дБ.
+ Карыстайцеся паўзунком для змянення ўзмацнення вашай прылады запісу ў дыяпазоне ад %1 дБ да %2 дБ.
@@ -305,8 +305,8 @@ which may lead to problems with video calls.
Пашыраныя
-
- Пакуль вы %1 не ведаце, што вы робіце, калі ласка, %2 змяняйце тут нічога. Змены, зробленыя тут, могуць прывесці да праблем з qTox і нават да страты вашых дадзеных, напрыклад, гісторыі.</p>
+
+ Пакуль вы %1 не ведаце, што вы робіце, калі ласка, %2 змяняйце тут нічога. Змены, зробленыя тут, могуць прывесці да праблем з qTox і нават да страты вашых дадзеных, напрыклад, гісторыі.
diff --git a/translations/bg.ts b/translations/bg.ts
index 648bdfeef..fae0e6dd9 100644
--- a/translations/bg.ts
+++ b/translations/bg.ts
@@ -304,7 +304,7 @@ which may lead to problems with video calls.
За напреднали
-
+
diff --git a/translations/cs.ts b/translations/cs.ts
index d4a01199e..ef0051b3a 100644
--- a/translations/cs.ts
+++ b/translations/cs.ts
@@ -303,7 +303,7 @@ může způsobovat problémy během videohovorů.
Pokročilé
-
+
diff --git a/translations/da.ts b/translations/da.ts
index fa1aa188a..ad269dda2 100644
--- a/translations/da.ts
+++ b/translations/da.ts
@@ -299,7 +299,7 @@ which may lead to problems with video calls.
Avanceret
-
+
diff --git a/translations/de.ts b/translations/de.ts
index 52b3e96f1..aeb1c02b9 100644
--- a/translations/de.ts
+++ b/translations/de.ts
@@ -303,7 +303,7 @@ Zu hohe Auflösungen können daher zu Problemen in Videoanrufen führen.Erweitert
-
+
diff --git a/translations/el.ts b/translations/el.ts
index 7cac005be..b9d10e4d9 100644
--- a/translations/el.ts
+++ b/translations/el.ts
@@ -305,7 +305,7 @@ which may lead to problems with video calls.
-
+
diff --git a/translations/eo.ts b/translations/eo.ts
index 14ad2df74..c13f59cfe 100644
--- a/translations/eo.ts
+++ b/translations/eo.ts
@@ -299,7 +299,7 @@ which may lead to problems with video calls.
-
+
diff --git a/translations/es.ts b/translations/es.ts
index a4710331b..6e2e8e4a7 100644
--- a/translations/es.ts
+++ b/translations/es.ts
@@ -303,7 +303,7 @@ se pueden producir problemas con las videollamadas.
Avanzado
-
+
diff --git a/translations/et.ts b/translations/et.ts
index 4c2d5669f..46bad37eb 100644
--- a/translations/et.ts
+++ b/translations/et.ts
@@ -303,8 +303,8 @@ mis omakorda võib tekitada videokõnede pidamisel probleeme.
Edasijõudnud
-
- Kui sa %1 tea, mida teed, siis palun %2 muuda siin midagi. Siin tehtud muudatused võivad põhjustada probleeme qToxi töös ja isegi sinu andmete, nt ajaloo, kadumise.</p>
+
+ Kui sa %1 tea, mida teed, siis palun %2 muuda siin midagi. Siin tehtud muudatused võivad põhjustada probleeme qToxi töös ja isegi sinu andmete, nt ajaloo, kadumise.
diff --git a/translations/fi.ts b/translations/fi.ts
index 622913d7c..47962a321 100644
--- a/translations/fi.ts
+++ b/translations/fi.ts
@@ -302,7 +302,7 @@ Joskus yhteytesi ei välttämättä ole tarpeeksi hyvä korkeaa kuvanlaatua vart
-
+
diff --git a/translations/fr.ts b/translations/fr.ts
index 2d947356b..0a6b83925 100644
--- a/translations/fr.ts
+++ b/translations/fr.ts
@@ -303,7 +303,7 @@ ce qui peut conduire à des problèmes avec les appels vidéo.
Avancé
-
+
diff --git a/translations/he.ts b/translations/he.ts
index 4d07c9c9d..5b6c5e28e 100644
--- a/translations/he.ts
+++ b/translations/he.ts
@@ -299,7 +299,7 @@ which may lead to problems with video calls.
-
+
diff --git a/translations/hr.ts b/translations/hr.ts
index c1dde341a..999d7b7ff 100644
--- a/translations/hr.ts
+++ b/translations/hr.ts
@@ -306,7 +306,7 @@ Ponekad vaša internetska veza nije dovoljno dobra da podnese visoku video kvali
Napredno
-
+
diff --git a/translations/hu.ts b/translations/hu.ts
index 586115c71..3737a031a 100644
--- a/translations/hu.ts
+++ b/translations/hu.ts
@@ -303,7 +303,7 @@ ami a videóhívások problémáihoz vezethet.
Haladó
-
+
diff --git a/translations/it.ts b/translations/it.ts
index fa5753268..6f6eb1649 100644
--- a/translations/it.ts
+++ b/translations/it.ts
@@ -303,7 +303,7 @@ qualità video elevate, questo può causare problemi con le chiamate video.Avanzate
-
+
diff --git a/translations/ja.ts b/translations/ja.ts
index 86f351266..48d4f1b2b 100644
--- a/translations/ja.ts
+++ b/translations/ja.ts
@@ -303,7 +303,7 @@ which may lead to problems with video calls.
上級者向け
-
+
diff --git a/translations/jbo.ts b/translations/jbo.ts
index 9c51002f9..c518aab9c 100644
--- a/translations/jbo.ts
+++ b/translations/jbo.ts
@@ -301,7 +301,7 @@ which may lead to problems with video calls.
-
+
diff --git a/translations/lt.ts b/translations/lt.ts
index 07ff55fa2..c29cebb3b 100644
--- a/translations/lt.ts
+++ b/translations/lt.ts
@@ -303,7 +303,7 @@ vaizdo skambučiais.
Kita
-
+
diff --git a/translations/nl.ts b/translations/nl.ts
index 22ebbe1f6..75b930a31 100644
--- a/translations/nl.ts
+++ b/translations/nl.ts
@@ -303,7 +303,7 @@ wat tot problemen kan leiden met videogesprekken.
Geavanceerd
-
+
diff --git a/translations/no_nb.ts b/translations/no_nb.ts
index 5d85e10ee..b44504754 100644
--- a/translations/no_nb.ts
+++ b/translations/no_nb.ts
@@ -306,7 +306,7 @@ Det kan oppstå problemer med videosamtalene hvis du har valgt høyere videokval
Avansert
-
+
diff --git a/translations/pl.ts b/translations/pl.ts
index 5d4e85c70..b632a96c6 100644
--- a/translations/pl.ts
+++ b/translations/pl.ts
@@ -307,7 +307,7 @@ co może spowodować problemy z połączeniami wideo.
Zaawansowane
-
+
diff --git a/translations/pt.ts b/translations/pt.ts
index 94f68ddbd..9fe8daea3 100644
--- a/translations/pt.ts
+++ b/translations/pt.ts
@@ -302,7 +302,7 @@ Eventualmente sua conexão pode não ser suficiente para uma qualiade de vídeo
Avançado
-
+
diff --git a/translations/ru.ts b/translations/ru.ts
index c9a972a4b..fdf9187b9 100644
--- a/translations/ru.ts
+++ b/translations/ru.ts
@@ -306,7 +306,7 @@ which may lead to problems with video calls.
Расширенные
-
+
diff --git a/translations/sl.ts b/translations/sl.ts
index f12ca48c6..9f78855a1 100644
--- a/translations/sl.ts
+++ b/translations/sl.ts
@@ -303,7 +303,7 @@ in zato lahko pride do problemov pri video pogovorih.
Napredno
-
+
diff --git a/translations/sv.ts b/translations/sv.ts
index a84ff74aa..6596f2ffb 100644
--- a/translations/sv.ts
+++ b/translations/sv.ts
@@ -299,7 +299,7 @@ which may lead to problems with video calls.
-
+
diff --git a/translations/tr.ts b/translations/tr.ts
index 7f1b19c17..8f334df92 100644
--- a/translations/tr.ts
+++ b/translations/tr.ts
@@ -306,7 +306,7 @@ Fakat daha iyi bir internet bağlantısına ihtiyacınız olacaktır.
İleri-düzey Ayarlar
-
+
diff --git a/translations/ug.ts b/translations/ug.ts
index aa2717eff..394c856cd 100644
--- a/translations/ug.ts
+++ b/translations/ug.ts
@@ -305,7 +305,7 @@ which may lead to problems with video calls.
-
+
diff --git a/translations/uk.ts b/translations/uk.ts
index e28be42a0..ecb70694a 100644
--- a/translations/uk.ts
+++ b/translations/uk.ts
@@ -310,7 +310,7 @@ It's difficult to translate "Tox me maybe" because in Ukrainian n
Додатково
-
+
diff --git a/translations/zh.ts b/translations/zh.ts
index 74a2358fd..b04a65633 100644
--- a/translations/zh.ts
+++ b/translations/zh.ts
@@ -303,7 +303,7 @@ which may lead to problems with video calls.
高级
-
+
From 2d63e441d4a1d7de74f0a6b9fadb0c82d7eba2ac Mon Sep 17 00:00:00 2001
From: Diadlo
Date: Sat, 10 Sep 2016 23:55:02 +0300
Subject: [PATCH 2/4] refactor(about): Removed HTML tags from translation
---
src/widget/form/settings/aboutform.cpp | 13 +++++++++----
src/widget/form/settings/aboutsettings.ui | 14 +++++++-------
2 files changed, 16 insertions(+), 11 deletions(-)
diff --git a/src/widget/form/settings/aboutform.cpp b/src/widget/form/settings/aboutform.cpp
index 99b617ac7..fe1daccf5 100644
--- a/src/widget/form/settings/aboutform.cpp
+++ b/src/widget/form/settings/aboutform.cpp
@@ -77,10 +77,15 @@ void AboutForm::replaceVersions()
QString::number(TOX_VERSION_MINOR) + "." +
QString::number(TOX_VERSION_PATCH);
- bodyUI->youareusing->setText(bodyUI->youareusing->text().replace("$GIT_DESCRIBE", QString(GIT_DESCRIBE)));
- bodyUI->gitVersion->setText(bodyUI->gitVersion->text().replace("$GIT_VERSION", QString(GIT_VERSION)));
- bodyUI->toxCoreVersion->setText(bodyUI->toxCoreVersion->text().replace("$TOXCOREVERSION", TOXCORE_VERSION));
- bodyUI->qtVersion->setText(bodyUI->qtVersion->text().replace("$QTVERSION", QT_VERSION_STR));
+ bodyUI->youAreUsing->setText(tr("You are using qTox version %1.")
+ .arg(QString(GIT_DESCRIBE)));
+
+ QString commitLink = "https://github.com/qTox/qTox/commit/" + QString(GIT_VERSION);
+ bodyUI->gitVersion->setText(tr("Commit hash: %1")
+ .arg(createLink(commitLink, QString(GIT_VERSION))));
+
+ bodyUI->toxCoreVersion->setText(tr("toxcore version: %1").arg(TOXCORE_VERSION));
+ bodyUI->qtVersion->setText(tr("Qt version: %1").arg(QT_VERSION_STR));
QString issueBody = QString(
"##### Brief Description\n\n"
diff --git a/src/widget/form/settings/aboutsettings.ui b/src/widget/form/settings/aboutsettings.ui
index ebca76feb..15297fb85 100644
--- a/src/widget/form/settings/aboutsettings.ui
+++ b/src/widget/form/settings/aboutsettings.ui
@@ -30,8 +30,8 @@
00
- 514
- 537
+ 496
+ 554
@@ -70,7 +70,7 @@
true
- toxcore version: $TOXCOREVERSION
+ {TOXCOREVERSION}Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse
@@ -85,7 +85,7 @@
- Qt version: $QTVERSION
+ {QTVERSION}Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse
@@ -109,7 +109,7 @@
true
- Commit hash: <a href="https://github.com/qTox/qTox/commit/$GIT_VERSION">$GIT_VERSION</a>
+ {GIT_VERSION}true
@@ -120,7 +120,7 @@
-
+ 0
@@ -136,7 +136,7 @@
QFrame::NoFrame
- You are using qTox version $GIT_DESCRIBE.
+ {GIT_DESCRIBE}-1
From a7ddf5ef56782e6d92c8f6cad33ad940fe687158 Mon Sep 17 00:00:00 2001
From: Diadlo
Date: Sat, 10 Sep 2016 23:55:51 +0300
Subject: [PATCH 3/4] refactor(profileform): Removed HTML tags from translation
---
src/widget/form/profileform.cpp | 12 +++++++++---
src/widget/form/profileform.ui | 6 +++---
2 files changed, 12 insertions(+), 6 deletions(-)
diff --git a/src/widget/form/profileform.cpp b/src/widget/form/profileform.cpp
index e9c3b0f53..556ab204e 100644
--- a/src/widget/form/profileform.cpp
+++ b/src/widget/form/profileform.cpp
@@ -174,9 +174,15 @@ void ProfileForm::show(ContentLayout* contentLayout)
head->show();
QWidget::show();
prFileLabelUpdate();
- QString DirPath = Settings::getInstance().getMakeToxPortable() ? QApplication::applicationDirPath() :
- QDir(Settings::getInstance().getSettingsDirPath()).path().trimmed();
- bodyUI->dirPrLink->setText(bodyUI->dirPrLink->text().replace("Dir_Path",DirPath));
+ bool portable = Settings::getInstance().getMakeToxPortable();
+ QString defaultPath = QDir(Settings::getInstance().getSettingsDirPath()).path().trimmed();
+ QString appPath = QApplication::applicationDirPath();
+ QString dirPath = portable ? appPath : defaultPath;
+
+ QString dirPrLink = tr("Current profile location: %1")
+ .arg(QString("%1").arg(dirPath));
+
+ bodyUI->dirPrLink->setText(dirPrLink);
bodyUI->dirPrLink->setOpenExternalLinks(true);
bodyUI->dirPrLink->setTextInteractionFlags(Qt::LinksAccessibleByMouse | Qt::TextSelectableByMouse);
bodyUI->dirPrLink->setMaximumSize(bodyUI->dirPrLink->sizeHint());
diff --git a/src/widget/form/profileform.ui b/src/widget/form/profileform.ui
index 9118a4c6c..b45140f91 100644
--- a/src/widget/form/profileform.ui
+++ b/src/widget/form/profileform.ui
@@ -39,8 +39,8 @@
00
- 536
- 844
+ 577
+ 796
@@ -292,7 +292,7 @@ Share it with your friends to communicate.
Qt::ClickFocus
- <p><a href="file:///Dir_Path"><span style=" text-decoration: NONE; color:#000000;">Current profile location: Dir_Path</span></a></p>
+ {Current profile location}Qt::RichText
From da9366c70d998e2d9267cb9bc1aa64d577b152cb Mon Sep 17 00:00:00 2001
From: Diadlo
Date: Sun, 11 Sep 2016 00:00:26 +0300
Subject: [PATCH 4/4] refactor: Removed HTML tags from translation
Fixed #2985.
---
src/widget/form/removefrienddialog.ui | 2 +-
src/widget/tool/removefrienddialog.cpp | 6 +++++-
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/widget/form/removefrienddialog.ui b/src/widget/form/removefrienddialog.ui
index 3f8b9c733..0cade345f 100644
--- a/src/widget/form/removefrienddialog.ui
+++ b/src/widget/form/removefrienddialog.ui
@@ -23,7 +23,7 @@
- <html><head/><body><p>Are you sure you want to remove <span style=" font-weight:600;"><name></span> from your contacts list?</p></body></html>
+ {Text message}Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop
diff --git a/src/widget/tool/removefrienddialog.cpp b/src/widget/tool/removefrienddialog.cpp
index 20d9e0354..d79928331 100644
--- a/src/widget/tool/removefrienddialog.cpp
+++ b/src/widget/tool/removefrienddialog.cpp
@@ -8,7 +8,11 @@ RemoveFriendDialog::RemoveFriendDialog(QWidget *parent, const Friend *f)
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
setAttribute(Qt::WA_QuitOnClose, false);
ui.setupUi(this);
- ui.label->setText(ui.label->text().replace("<name>", f->getDisplayedName().toHtmlEscaped()));
+ QString name = f->getDisplayedName().toHtmlEscaped();
+ QString text = tr("Are you sure you want to remove %1 from your contacts list?")
+ .arg(QString("%1").arg(name));
+
+ ui.label->setText(text);
auto removeButton = ui.buttonBox->button(QDialogButtonBox::Ok);
auto cancelButton = ui.buttonBox->button(QDialogButtonBox::Cancel);
removeButton->setText(tr("Remove"));