aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPhilip Kaufmann <[email protected]>2013-02-01 07:28:32 +0100
committerPhilip Kaufmann <[email protected]>2013-02-01 08:52:01 +0100
commit8823b4ac3b585306bfdbfd2fc1f37f50552881ac (patch)
treeffd4532bded4db49f4994deab56c350b01a42441 /src
parentMerge pull request #2245 from gavinandresen/check216116 (diff)
downloaddiscoin-8823b4ac3b585306bfdbfd2fc1f37f50552881ac.tar.xz
discoin-8823b4ac3b585306bfdbfd2fc1f37f50552881ac.zip
Bitcoin-Qt: better copyright year handling in AboutDialog
- this change allows us to keep the translation without the need to re-translate any string, when we update the copyright year - copyright symbol is changed to HTML to ensure we get no encoding issues and it's removed from the translation string so translators don't break it by mistake
Diffstat (limited to 'src')
-rw-r--r--src/qt/aboutdialog.cpp8
-rw-r--r--src/qt/aboutdialog.h1
-rw-r--r--src/qt/forms/aboutdialog.ui5
3 files changed, 12 insertions, 2 deletions
diff --git a/src/qt/aboutdialog.cpp b/src/qt/aboutdialog.cpp
index 0b98befe8..755413b2b 100644
--- a/src/qt/aboutdialog.cpp
+++ b/src/qt/aboutdialog.cpp
@@ -1,14 +1,20 @@
#include "aboutdialog.h"
#include "ui_aboutdialog.h"
+
#include "clientmodel.h"
-#include "version.h"
+// Copyright year (2009-this)
+// Todo: update this when changing our copyright comments in the source
+const int ABOUTDIALOG_COPYRIGHT_YEAR = 2013;
AboutDialog::AboutDialog(QWidget *parent) :
QDialog(parent),
ui(new Ui::AboutDialog)
{
ui->setupUi(this);
+
+ // Set current copyright year
+ ui->copyrightLabel->setText(tr("Copyright") + QString(" &copy; ") + tr("2009-%1 The Bitcoin developers").arg(ABOUTDIALOG_COPYRIGHT_YEAR));
}
void AboutDialog::setModel(ClientModel *model)
diff --git a/src/qt/aboutdialog.h b/src/qt/aboutdialog.h
index 2ed9e9e7c..33b143767 100644
--- a/src/qt/aboutdialog.h
+++ b/src/qt/aboutdialog.h
@@ -18,6 +18,7 @@ public:
~AboutDialog();
void setModel(ClientModel *model);
+
private:
Ui::AboutDialog *ui;
diff --git a/src/qt/forms/aboutdialog.ui b/src/qt/forms/aboutdialog.ui
index b59c2445d..80768f89b 100644
--- a/src/qt/forms/aboutdialog.ui
+++ b/src/qt/forms/aboutdialog.ui
@@ -91,7 +91,10 @@
<cursorShape>IBeamCursor</cursorShape>
</property>
<property name="text">
- <string>Copyright © 2009-2012 The Bitcoin developers</string>
+ <string notr="true">Copyright &amp;copy; 2009-YYYY The Bitcoin developers</string>
+ </property>
+ <property name="textFormat">
+ <enum>Qt::RichText</enum>
</property>
<property name="textInteractionFlags">
<set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>