Skip to content

Commit

Permalink
Treat non-breaking narrow space as regular narrow space when deciding…
Browse files Browse the repository at this point in the history
… if element in matrix/vector needs parenthesis; Increment version number; Update exchange rates; Update translations
  • Loading branch information
hanna-kn committed Mar 14, 2022
1 parent 033a130 commit d267a95
Show file tree
Hide file tree
Showing 25 changed files with 72 additions and 73 deletions.
4 changes: 2 additions & 2 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ dnl ----------------------
dnl | initialize autotools |---------------------------------------------------
dnl ----------------------

AC_INIT([libqalculate],[4.0.0])
AC_INIT([libqalculate],[4.1.0])
AC_CONFIG_SRCDIR(libqalculate/Calculator.cc)
AM_INIT_AUTOMAKE
AC_CONFIG_HEADERS(config.h)
Expand Down Expand Up @@ -73,7 +73,7 @@ QALCULATE_CURRENT=38

dnl increment any time the source changes; set to
dnl 0 if you increment CURRENT
QALCULATE_REVISION=0
QALCULATE_REVISION=1

dnl increment if any interfaces have been added; set to 0
dnl if any interfaces have been removed. removal has
Expand Down
63 changes: 31 additions & 32 deletions data/eurofxref-daily.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,39 +5,38 @@
<gesmes:name>European Central Bank</gesmes:name>
</gesmes:Sender>
<Cube>
<Cube time='2022-02-07'>
<Cube currency='USD' rate='1.1447'/>
<Cube currency='JPY' rate='131.59'/>
<Cube time='2022-03-04'>
<Cube currency='USD' rate='1.0929'/>
<Cube currency='JPY' rate='126.17'/>
<Cube currency='BGN' rate='1.9558'/>
<Cube currency='CZK' rate='24.222'/>
<Cube currency='DKK' rate='7.4443'/>
<Cube currency='GBP' rate='0.84685'/>
<Cube currency='HUF' rate='353.48'/>
<Cube currency='PLN' rate='4.5432'/>
<Cube currency='RON' rate='4.9461'/>
<Cube currency='SEK' rate='10.4483'/>
<Cube currency='CHF' rate='1.0571'/>
<Cube currency='ISK' rate='143.40'/>
<Cube currency='NOK' rate='10.0658'/>
<Cube currency='HRK' rate='7.5200'/>
<Cube currency='RUB' rate='86.5824'/>
<Cube currency='TRY' rate='15.5235'/>
<Cube currency='AUD' rate='1.6097'/>
<Cube currency='BRL' rate='6.0541'/>
<Cube currency='CAD' rate='1.4546'/>
<Cube currency='CNY' rate='7.2807'/>
<Cube currency='HKD' rate='8.9202'/>
<Cube currency='IDR' rate='16478.97'/>
<Cube currency='ILS' rate='3.6547'/>
<Cube currency='INR' rate='85.5345'/>
<Cube currency='KRW' rate='1371.76'/>
<Cube currency='MXN' rate='23.5750'/>
<Cube currency='MYR' rate='4.7909'/>
<Cube currency='NZD' rate='1.7278'/>
<Cube currency='PHP' rate='58.978'/>
<Cube currency='SGD' rate='1.5389'/>
<Cube currency='THB' rate='37.735'/>
<Cube currency='ZAR' rate='17.7000'/>
<Cube currency='CZK' rate='25.737'/>
<Cube currency='DKK' rate='7.4394'/>
<Cube currency='GBP' rate='0.82388'/>
<Cube currency='HUF' rate='386.54'/>
<Cube currency='PLN' rate='4.8530'/>
<Cube currency='RON' rate='4.9495'/>
<Cube currency='SEK' rate='10.7935'/>
<Cube currency='CHF' rate='1.0056'/>
<Cube currency='ISK' rate='144.20'/>
<Cube currency='NOK' rate='9.8358'/>
<Cube currency='HRK' rate='7.5584'/>
<Cube currency='TRY' rate='15.5681'/>
<Cube currency='AUD' rate='1.4872'/>
<Cube currency='BRL' rate='5.5313'/>
<Cube currency='CAD' rate='1.3937'/>
<Cube currency='CNY' rate='6.9065'/>
<Cube currency='HKD' rate='8.5411'/>
<Cube currency='IDR' rate='15725.30'/>
<Cube currency='ILS' rate='3.5603'/>
<Cube currency='INR' rate='83.4354'/>
<Cube currency='KRW' rate='1332.23'/>
<Cube currency='MXN' rate='22.7543'/>
<Cube currency='MYR' rate='4.5661'/>
<Cube currency='NZD' rate='1.6005'/>
<Cube currency='PHP' rate='56.814'/>
<Cube currency='SGD' rate='1.4872'/>
<Cube currency='THB' rate='35.776'/>
<Cube currency='ZAR' rate='16.8044'/>
</Cube>
</Cube>
</gesmes:Envelope>
2 changes: 1 addition & 1 deletion docs/reference/Doxyfile
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ DOXYFILE_ENCODING = UTF-8
# title of most generated pages and in a few other places.
# The default value is: My Project.

PROJECT_NAME = libqalculate-4.0.0
PROJECT_NAME = libqalculate-4.1.0

# The PROJECT_NUMBER tag can be used to enter a project or revision number. This
# could be handy for archiving the generated documentation or if some version
Expand Down
2 changes: 1 addition & 1 deletion libqalculate/Calculator-definitions.cc
Original file line number Diff line number Diff line change
Expand Up @@ -816,7 +816,7 @@ int Calculator::loadDefinitions(const char* file_name, bool is_user_defs, bool c
xmlFreeDoc(doc);
return false;
}
int version_numbers[] = {4, 0, 0};
int version_numbers[] = {4, 1, 0};
parse_qalculate_version(version, version_numbers);

bool new_names = version_numbers[0] > 0 || version_numbers[1] > 9 || (version_numbers[1] == 9 && version_numbers[2] >= 4);
Expand Down
20 changes: 10 additions & 10 deletions libqalculate/Calculator.cc
Original file line number Diff line number Diff line change
Expand Up @@ -168,13 +168,13 @@ Calculator::Calculator() {
srand(time(NULL));

exchange_rates_time[0] = 0;
exchange_rates_time[1] = (time_t) 456720L * (time_t) 3600;
exchange_rates_time[1] = (time_t) 457416L * (time_t) 3600;
exchange_rates_time[2] = 0;
priv->exchange_rates_time2[0] = (time_t) 456720L * (time_t) 3600;
priv->exchange_rates_time2[0] = (time_t) 457416L * (time_t) 3600;
exchange_rates_check_time[0] = 0;
exchange_rates_check_time[1] = (time_t) 456720L * (time_t) 3600;
exchange_rates_check_time[1] = (time_t) 457416L * (time_t) 3600;
exchange_rates_check_time[2] = 0;
priv->exchange_rates_check_time2[0] = (time_t) 456720L * (time_t) 3600;
priv->exchange_rates_check_time2[0] = (time_t) 457416L * (time_t) 3600;
b_exchange_rates_warning_enabled = true;
b_exchange_rates_used = 0;

Expand Down Expand Up @@ -406,13 +406,13 @@ Calculator::Calculator(bool ignore_locale) {
srand(time(NULL));

exchange_rates_time[0] = 0;
exchange_rates_time[1] = (time_t) 456720L * (time_t) 3600;
exchange_rates_time[1] = (time_t) 457416L * (time_t) 3600;
exchange_rates_time[2] = 0;
priv->exchange_rates_time2[0] = (time_t) 456720L * (time_t) 3600;
priv->exchange_rates_time2[0] = (time_t) 457416L * (time_t) 3600;
exchange_rates_check_time[0] = 0;
exchange_rates_check_time[1] = (time_t) 456720L * (time_t) 3600;
exchange_rates_check_time[1] = (time_t) 457416L * (time_t) 3600;
exchange_rates_check_time[2] = 0;
priv->exchange_rates_check_time2[0] = (time_t) 456720L * (time_t) 3600;
priv->exchange_rates_check_time2[0] = (time_t) 457416L * (time_t) 3600;
b_exchange_rates_warning_enabled = true;
b_exchange_rates_used = 0;

Expand Down Expand Up @@ -1694,11 +1694,11 @@ void Calculator::addBuiltinFunctions() {
}
void Calculator::addBuiltinUnits() {
u_euro = addUnit(new Unit(_("Currency"), "EUR", "euros", "euro", "European Euros", false, true, true));
u_btc = addUnit(new AliasUnit(_("Currency"), "BTC", "bitcoins", "bitcoin", "Bitcoins", u_euro, "38360.43", 1, "", false, true, true));
u_btc = addUnit(new AliasUnit(_("Currency"), "BTC", "bitcoins", "bitcoin", "Bitcoins", u_euro, "35749.12", 1, "", false, true, true));
u_btc->setApproximate();
u_btc->setPrecision(-2);
u_btc->setChanged(false);
priv->u_byn = addUnit(new AliasUnit(_("Currency"), "BYN", "", "", "Belarusian Ruble", u_euro, "1/2.9563", 1, "", false, true, true));
priv->u_byn = addUnit(new AliasUnit(_("Currency"), "BYN", "", "", "Belarusian Ruble", u_euro, "1/3.3784", 1, "", false, true, true));
priv->u_byn->setApproximate();
priv->u_byn->setPrecision(-2);
priv->u_byn->setChanged(false);
Expand Down
2 changes: 1 addition & 1 deletion libqalculate/MathStructure-print.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2967,7 +2967,7 @@ bool MathStructure::needsParenthesis(const PrintOptions &po, const InternalPrint
break;
}
default: {
if(!in_cit1 && !in_cit2 && brackets == 0 && pars == 0 && (str_e[i] == ';' || (str_e[i] == ',' && po.decimalpoint() != ",") || str_e[i] == ' ' || ((unsigned char) str_e[i] == 0xE2 && i + 2 < str_e.size() && (unsigned char) str_e[i + 1] == 0x80 && (unsigned char) str_e[i + 2] == 0x89))) {
if(!in_cit1 && !in_cit2 && brackets == 0 && pars == 0 && (str_e[i] == ';' || (str_e[i] == ',' && po.decimalpoint() != ",") || str_e[i] == ' ' || ((unsigned char) str_e[i] == 0xE2 && i + 2 < str_e.size() && (unsigned char) str_e[i + 1] == 0x80 && ((unsigned char) str_e[i + 2] == 0x89 || (unsigned char) str_e[i + 2] == 0xAF)))) {
return true;
}
}
Expand Down
2 changes: 1 addition & 1 deletion libqalculate/includes.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
#include <stdint.h>

#define QALCULATE_MAJOR_VERSION (4)
#define QALCULATE_MINOR_VERSION (0)
#define QALCULATE_MINOR_VERSION (1)
#define QALCULATE_MICRO_VERSION (0)

static std::string empty_string;
Expand Down
2 changes: 1 addition & 1 deletion po-defs/ca.po
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: libqalculate-defs\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2022-02-13 14:19+0100\n"
"POT-Creation-Date: 2022-03-13 08:58+0100\n"
"PO-Revision-Date: 2021-06-06 21:44-0600\n"
"Last-Translator: Alex Henrie <alexhenrie24@gmail.com>\n"
"Language-Team: Catalan <ca@dodds.net>\n"
Expand Down
2 changes: 1 addition & 1 deletion po-defs/es.po
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Qalculate!\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2022-02-13 14:19+0100\n"
"POT-Creation-Date: 2022-03-13 08:58+0100\n"
"PO-Revision-Date: 2021-07-11 18:00-0300\n"
"Last-Translator: VicSanRoPe\n"
"Language-Team: none\n"
Expand Down
2 changes: 1 addition & 1 deletion po-defs/fr.po
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: fr\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2022-02-13 14:19+0100\n"
"POT-Creation-Date: 2022-03-13 08:58+0100\n"
"PO-Revision-Date: 2020-12-02 13:25+0100\n"
"Last-Translator: Polakrity\n"
"Language-Team: Français <fr@li.org>\n"
Expand Down
2 changes: 1 addition & 1 deletion po-defs/libqalculate.pot
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2022-03-02 10:08+0100\n"
"POT-Creation-Date: 2022-03-13 08:59+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
Expand Down
2 changes: 1 addition & 1 deletion po-defs/nl.po
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ msgid ""
msgstr ""
"Project-Id-Version: libqalculate-defs\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2022-02-13 14:19+0100\n"
"POT-Creation-Date: 2022-03-13 08:59+0100\n"
"PO-Revision-Date: 2007-05-18 15:47+0200\n"
"Last-Translator: Jaap Woldringh <jjh.woldringh@planet.nl>\n"
"Language-Team: <kde-i18n-nl@kde.org>\n"
Expand Down
16 changes: 8 additions & 8 deletions po-defs/ru.po
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,16 @@ msgid ""
msgstr ""
"Project-Id-Version: libqalculate\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2022-02-13 14:19+0100\n"
"POT-Creation-Date: 2022-03-13 08:58+0100\n"
"PO-Revision-Date: 2022-02-19 14:54+0700\n"
"Last-Translator: Damir Islamov <damir@secretlaboratory.ru>\n"
"Language-Team: Russian <kde-russian@lists.kde.ru>\n"
"Language: ru\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<"
"=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n"
"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
"X-Generator: Lokalize 21.08.0\n"

#: ../data/currencies.xml.in.h:1
Expand Down Expand Up @@ -8011,11 +8011,11 @@ msgid ""
"the end of each period.&#10;&#10;Note that the optional guess is needed "
"because there can be more than one valid result. It defaults to 10%."
msgstr ""
"Рассчитывает доходность.&#10;&#10;Если тип = 1, то оплата производится в"
" начале периода. Если тип = 0 (или опущен), это делается в конце каждого"
" периода.&#10;&#10;Обратите внимание, что необходимо необязательное"
" предположение, поскольку допустимых результатов может быть несколько. По"
" умолчанию это 10%."
"Рассчитывает доходность.&#10;&#10;Если тип = 1, то оплата производится в "
"начале периода. Если тип = 0 (или опущен), это делается в конце каждого "
"периода.&#10;&#10;Обратите внимание, что необходимо необязательное "
"предположение, поскольку допустимых результатов может быть несколько. По "
"умолчанию это 10%."

#: ../data/functions.xml.in.h:1168
msgid "Guess"
Expand Down
2 changes: 1 addition & 1 deletion po-defs/sv.po
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ msgid ""
msgstr ""
"Project-Id-Version: sv\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2022-03-02 10:08+0100\n"
"POT-Creation-Date: 2022-03-13 08:58+0100\n"
"PO-Revision-Date: 2007-06-15 11:13+0100\n"
"Last-Translator: Hanna Knutsson <hanna.knutsson@protonmail.com>\n"
"Language-Team: Swedish\n"
Expand Down
2 changes: 1 addition & 1 deletion po-defs/zh_CN.po
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ msgid ""
msgstr ""
"Project-Id-Version: zh_CN\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2022-02-13 14:19+0100\n"
"POT-Creation-Date: 2022-03-13 08:58+0100\n"
"PO-Revision-Date: 2021-08-23 09:54+0800\n"
"Last-Translator: tuberry <orzun@foxmail.com>\n"
"Language-Team: Chinese (Simplified) <orzun@foxmail.com>\n"
Expand Down
2 changes: 1 addition & 1 deletion po/ca.po
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: libqalculate\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2022-03-05 09:20+0100\n"
"POT-Creation-Date: 2022-03-13 08:58+0100\n"
"PO-Revision-Date: 2021-06-06 21:41-0600\n"
"Last-Translator: Alex Henrie <alexhenrie24@gmail.com>\n"
"Language-Team: Catalan <ca@dodds.net>\n"
Expand Down
2 changes: 1 addition & 1 deletion po/de.po
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: de\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2022-03-05 09:20+0100\n"
"POT-Creation-Date: 2022-03-13 08:58+0100\n"
"PO-Revision-Date: 2021-05-15 10:13+0100\n"
"Last-Translator: Alexander Krause <akay.devel@protonmail.com>\n"
"Language-Team: German\n"
Expand Down
2 changes: 1 addition & 1 deletion po/es.po
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Qalculate!\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2022-03-05 09:20+0100\n"
"POT-Creation-Date: 2022-03-13 08:58+0100\n"
"PO-Revision-Date: 2021-07-10 11:30-0300\n"
"Last-Translator: VicSanRoPe\n"
"Language-Team: none\n"
Expand Down
2 changes: 1 addition & 1 deletion po/fr.po
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: fr\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2022-03-05 09:20+0100\n"
"POT-Creation-Date: 2022-03-13 08:58+0100\n"
"PO-Revision-Date: 2020-12-02 13:25-0100\n"
"Last-Translator: Polakrity\n"
"Language-Team: Français <fr@li.org>\n"
Expand Down
2 changes: 1 addition & 1 deletion po/libqalculate.pot
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2022-03-05 09:20+0100\n"
"POT-Creation-Date: 2022-03-13 08:58+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
Expand Down
2 changes: 1 addition & 1 deletion po/nl.po
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ msgid ""
msgstr ""
"Project-Id-Version: libqalculate\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2022-03-05 09:20+0100\n"
"POT-Creation-Date: 2022-03-13 08:58+0100\n"
"PO-Revision-Date: 2007-05-18 16:19+0200\n"
"Last-Translator: Jaap Woldringh <jjh.woldringh@planet.nl>\n"
"Language-Team: <kde-i18n-nl@kde.org>\n"
Expand Down
2 changes: 1 addition & 1 deletion po/ru.po
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ msgid ""
msgstr ""
"Project-Id-Version: libqalculate\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2022-03-05 09:20+0100\n"
"POT-Creation-Date: 2022-03-13 08:58+0100\n"
"PO-Revision-Date: 2022-02-19 14:49+0700\n"
"Last-Translator: Damir Islamov <damir@secretlaboratory.ru>\n"
"Language-Team: Russian <kde-russian@lists.kde.ru>\n"
Expand Down
2 changes: 1 addition & 1 deletion po/sv.po
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: sv\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2022-03-05 09:20+0100\n"
"POT-Creation-Date: 2022-03-13 08:58+0100\n"
"PO-Revision-Date: 2006-05-04 12:29+0200\n"
"Last-Translator: Hanna Knutsson <hanna.knutsson@protonmail.com>\n"
"Language-Team: Swedish\n"
Expand Down
2 changes: 1 addition & 1 deletion po/zh_CN.po
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ msgid ""
msgstr ""
"Project-Id-Version: libqalculate 3.16\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2022-03-05 09:20+0100\n"
"POT-Creation-Date: 2022-03-13 08:58+0100\n"
"PO-Revision-Date: 2021-08-23 10:33+0800\n"
"Last-Translator: tuberry <orzun@foxmail.com>\n"
"Language-Team: Chinese (Simplified) <orzun@foxmail.com>\n"
Expand Down
2 changes: 1 addition & 1 deletion src/qalc.cc
Original file line number Diff line number Diff line change
Expand Up @@ -6836,7 +6836,7 @@ void load_preferences() {
#endif


int version_numbers[] = {4, 0, 0};
int version_numbers[] = {4, 1, 0};

if(file) {
char line[10000];
Expand Down

0 comments on commit d267a95

Please sign in to comment.