Browse Source

refactor(profileform): Removed HTML tags from translation

pull/3703/head
Diadlo 9 years ago
parent
commit
a7ddf5ef56
No known key found for this signature in database
GPG Key ID: 5AF9F2E29107C727
  1. 12
      src/widget/form/profileform.cpp
  2. 6
      src/widget/form/profileform.ui

12
src/widget/form/profileform.cpp

@ -174,9 +174,15 @@ void ProfileForm::show(ContentLayout* contentLayout) @@ -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("<a href=\"file://%1\">%1</a>").arg(dirPath));
bodyUI->dirPrLink->setText(dirPrLink);
bodyUI->dirPrLink->setOpenExternalLinks(true);
bodyUI->dirPrLink->setTextInteractionFlags(Qt::LinksAccessibleByMouse | Qt::TextSelectableByMouse);
bodyUI->dirPrLink->setMaximumSize(bodyUI->dirPrLink->sizeHint());

6
src/widget/form/profileform.ui

@ -39,8 +39,8 @@ @@ -39,8 +39,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>536</width>
<height>844</height>
<width>577</width>
<height>796</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_4" stretch="0,0,0,1">
@ -292,7 +292,7 @@ Share it with your friends to communicate.</string> @@ -292,7 +292,7 @@ Share it with your friends to communicate.</string>
<enum>Qt::ClickFocus</enum>
</property>
<property name="text">
<string>&lt;p&gt;&lt;a href=&quot;file:///Dir_Path&quot;&gt;&lt;span style=&quot; text-decoration: NONE; color:#000000;&quot;&gt;Current profile location: Dir_Path&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;</string>
<string notr="true">{Current profile location}</string>
</property>
<property name="textFormat">
<enum>Qt::RichText</enum>

Loading…
Cancel
Save