Commit 93c91c65 authored by Karl Ove Hufthammer's avatar Karl Ove Hufthammer
Browse files

Correct formatting of year of discovery

The year of discovery was formatted as an amount,
instead of a number, so instead of being displayed
as, e.g., ‘1961’, it was being displayed as
‘1,961’, ‘1.961’ or ‘1 961’, depending on the locale.

The old KUIT tag ‘<numid>’ was supposed to fix the
formatting, but is no longer supported. The recommended
fix is to use QString::number(), as documented in:

The ‘<numid>’ tags have not be removed from the string,
as that would break string freeze in the stable branch.
I will remove them in a separate commit in ‘master’.
parent 242b7b73
......@@ -129,7 +129,8 @@ QString KalziumUtils::prettyUnit(const Element* el, ChemicalDataObject::BlueObel
int v_int = el->dataAsVariant(kind).toInt();
if (v_int > 1600) {
result = i18n("This element was discovered in the year <numid>%1</numid>.", v_int);
result = i18n("This element was discovered in the year <numid>%1</numid>.",
} else if (v_int == -1) {
result = i18n("The element has not yet been officially recognized by the IUPAC.");
} else { // this should now really be 0. If not there is a bug in the database
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