Commit graph

366 commits

Author SHA1 Message Date
Oğuz Ersen
6bacae1cd9 Translated using Weblate (Turkish)
Currently translated at 100.0% (258 of 258 strings)

Co-authored-by: Oğuz Ersen <oguzersen@protonmail.com>
Translate-URL: https://hosted.weblate.org/projects/i-hate-money/i-hate-money/tr/
Translation: I Hate Money/I Hate Money
2021-07-25 22:27:23 +02:00
ToldYouThat
510154f0d3 Translated using Weblate (Turkish)
Currently translated at 93.0% (240 of 258 strings)

Co-authored-by: ToldYouThat <itoldyouthat@protonmail.com>
Translate-URL: https://hosted.weblate.org/projects/i-hate-money/i-hate-money/tr/
Translation: I Hate Money/I Hate Money
2021-07-25 22:27:23 +02:00
Oğuz Ersen
63a9ba0ae4 Translated using Weblate (Turkish)
Currently translated at 93.0% (240 of 258 strings)

Co-authored-by: Oğuz Ersen <oguzersen@protonmail.com>
Translate-URL: https://hosted.weblate.org/projects/i-hate-money/i-hate-money/tr/
Translation: I Hate Money/I Hate Money
2021-07-25 22:27:23 +02:00
Parham
de311b5eab Added translation using Weblate (Persian)
Co-authored-by: Parham <parham.parnian@gmail.com>
2021-07-25 22:27:23 +02:00
Kristoffer Grundström
b97636b5c1 Translated using Weblate (Swedish)
Currently translated at 71.3% (184 of 258 strings)

Co-authored-by: Kristoffer Grundström <swedishsailfishosuser@tutanota.com>
Translate-URL: https://hosted.weblate.org/projects/i-hate-money/i-hate-money/sv/
Translation: I Hate Money/I Hate Money
2021-07-25 22:27:23 +02:00
Baptiste Jonglez
9217360973 Localize month names in the statistics view 2021-07-20 19:42:14 +02:00
Allan Nordhøy
591c91af49 Translated using Weblate (Norwegian Bokmål)
Currently translated at 77.9% (201 of 258 strings)

Co-authored-by: Allan Nordhøy <epost@anotheragency.no>
Translate-URL: https://hosted.weblate.org/projects/i-hate-money/i-hate-money/nb_NO/
Translation: I Hate Money/I Hate Money
2021-07-18 23:33:59 +02:00
Kemystra
a6d341e3b4 Translated using Weblate (Malay)
Currently translated at 10.4% (27 of 258 strings)

Added translation using Weblate (Malay)

Co-authored-by: Kemystra <izzmin97@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/i-hate-money/i-hate-money/ms/
Translation: I Hate Money/I Hate Money
2021-07-18 23:33:59 +02:00
Oleg
0d8d57c5b0 Fix language list scrollable on mobile (#811) 2021-07-18 23:28:27 +02:00
Glandos
81c3b8edc7 Fix unusable LOCALTZ
Fix #803

On some systems, there is no configured local timezone, so LOCALTZ is
a fallback object, that don't fit use case for flask-babel.
Detect this and use 'UTC' instead
2021-07-18 22:48:29 +02:00
Baptiste Jonglez
9444c1099a Display and highlight current language in dropdown list
Currently, we don't display the current language in the list.  This is
confusing because the list changes when switching language.

Now we always display the full list, and we highlight the current
language.
2021-07-18 14:32:09 +02:00
Baptiste
f7245f6c80 Translated using Weblate (French)
Currently translated at 100.0% (258 of 258 strings)

Co-authored-by: Baptiste <weblate@bitsofnetworks.org>
Translate-URL: https://hosted.weblate.org/projects/i-hate-money/i-hate-money/fr/
Translation: I Hate Money/I Hate Money
2021-07-17 23:53:29 +02:00
Baptiste Jonglez
b1ab7b89c8 Regenerate translations 2021-07-17 17:32:44 +02:00
Baptiste Jonglez
bb047f1596 Add Greek, Esperanto, Italian and Swedish to default languages 2021-07-17 14:28:45 +02:00
Baptiste Jonglez
82f3f067ef Fix layout of history deletion modals 2021-07-17 13:54:11 +02:00
Baptiste Jonglez
c69b8d66eb Use existing form errors to flash error messages
This is nice because we can reuse the translated strings of form error
messages in another context.

Suggested by Glandos.
2021-07-17 13:54:11 +02:00
zorun
439282356c Improve "confirm deletion" behaviour
* add the event listener only once, instead of every time the form is clicked

* use a standard button by default, so that the second state with a
  "danger" button is more visible

* reset confirmation button to original state when losing focus

Co-authored-by: Glandos <bugs-github@antipoul.fr>
2021-07-17 13:54:11 +02:00
Baptiste Jonglez
da49012d58 Add test cases to ensure we can't delete objects with a GET 2021-07-17 13:54:11 +02:00
Baptiste Jonglez
255aacefb3 Fix tests for history deletion 2021-07-17 13:54:11 +02:00
Baptiste Jonglez
95b2cf870b Fix test for project deletion 2021-07-17 13:54:11 +02:00
Baptiste Jonglez
db982572aa History: also ask for private code to confirm deletion
This is the same idea as deleting a project: deleting history is also a
major destructive action.  We reuse the same form as for project deletion
to ask for the private code and provide CSRF validation.
2021-07-17 13:54:11 +02:00
Baptiste Jonglez
969029a811 Add CSRF validation to project history deletion 2021-07-17 13:54:11 +02:00
Baptiste Jonglez
2bb6f2b6a7 Rework project deletion to add CSRF validation
It requires reworking the user interface, but it's probably for the best.
2021-07-17 13:54:11 +02:00
Baptiste Jonglez
109d7fca17 Add CSRF validation to most disruptive actions
This also switches all such actions to POST requests.

Deleting the project is handled in another commit because it requires more
changes.
2021-07-17 13:54:11 +02:00
Baptiste Jonglez
078f9e8b6b Fix invalid HTML 2021-07-14 16:10:13 +02:00
Baptiste Jonglez
2e4bb0ec8c tests: ensure that /tmp/ihatemoney.db does not get overwritten
Most of the tests are using a separate database, but we have a few tests
that are loading default values and are writing to /tmp/ihatemoney.db.

This is annoying because it's also the database used for development:
running the test suite breaks the dev database.

To fix this, always use a separate testing database to avoid interference.
2021-07-14 10:36:39 +02:00
Reza Almanda
686c60e7c5 Translated using Weblate (Indonesian)
Currently translated at 100.0% (235 of 235 strings)

Co-authored-by: Reza Almanda <rezaalmanda27@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/i-hate-money/i-hate-money/id/
Translation: I Hate Money/I Hate Money
2021-07-12 23:30:30 +02:00
Andrew Dickinson
72230448a7
Improve localization on the History page using string replacement (#587) 2021-07-12 22:48:19 +02:00
Glandos
2f42afbc69 Translated using Weblate (French)
Currently translated at 100.0% (235 of 235 strings)

Co-authored-by: Glandos <bugs-github@antipoul.fr>
Translate-URL: https://hosted.weblate.org/projects/i-hate-money/i-hate-money/fr/
Translation: I Hate Money/I Hate Money
2021-07-11 00:25:19 +02:00
phlostically
12167a09bf Translated using Weblate (Esperanto)
Currently translated at 100.0% (235 of 235 strings)

Co-authored-by: phlostically <phlostically@mailinator.com>
Translate-URL: https://hosted.weblate.org/projects/i-hate-money/i-hate-money/eo/
Translation: I Hate Money/I Hate Money
2021-07-11 00:25:19 +02:00
Oğuz Ersen
e377bc6443 Translated using Weblate (Turkish)
Currently translated at 100.0% (235 of 235 strings)

Co-authored-by: Oğuz Ersen <oguzersen@protonmail.com>
Translate-URL: https://hosted.weblate.org/projects/i-hate-money/i-hate-money/tr/
Translation: I Hate Money/I Hate Money
2021-07-11 00:25:19 +02:00
Glandos
526db044b2 Use "No one" instead of "Noone", that is really too old. 2021-07-10 00:40:06 +02:00
Glandos
ccad5ac859 align translation with existing tokens 2021-07-10 00:40:06 +02:00
Glandos
3f9303d5b5 badges for selectors, and payees in column 2021-07-10 00:40:06 +02:00
Glandos
e9afc539c8 slightly more margin for details 2021-07-10 00:40:06 +02:00
Glandos
c4f98580c1 move extra options to bottom 2021-07-10 00:40:06 +02:00
Glandos
6e2283f915 draft 2021-07-10 00:40:06 +02:00
Baptiste Jonglez
7ceb66f01b Enable CI builds with postgresql and mariadb 2021-07-10 00:39:54 +02:00
Baptiste Jonglez
33aad60352 Clarify that the test config files are not used for all tests... 2021-07-10 00:39:54 +02:00
Baptiste Jonglez
2616bed4ff Fix SQL query in has_multiple_currencies
The previous query was working fine on sqlite and mariadb, but not on
postgresql :

    return self.get_bills_unordered().group_by(Bill.original_currency).count() > 1

    psycopg2.errors.GroupingError: column "bill.id" must appear in the GROUP BY clause or be used in an aggregate function

The failing SQL query was:

    [SQL: SELECT count(*) AS count_1
    FROM (SELECT bill.id AS bill_id, ...
    FROM bill JOIN person ON person.id = bill.payer_id JOIN project ON project.id = person.project_id
    WHERE bill.payer_id = person.id AND person.project_id = project.id AND project.id = %(id_1)s GROUP BY bill.original_currency) AS anon_1]

The problem is that sqlalchemy creates a subquery for postgresql, and the
internal query does not make sense.

GROUP BY is not actually useful, we simply need to count the number of
distinct currencies in the list of bills.
2021-07-10 00:34:43 +02:00
Eugenia Russell
df5d27da50 Translated using Weblate (Greek)
Currently translated at 63.6% (147 of 231 strings)

Co-authored-by: Eugenia Russell <eugenia.russell2019@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/i-hate-money/i-hate-money/el/
Translation: I Hate Money/I Hate Money
2021-07-09 10:05:06 +02:00
Baptiste Jonglez
8b2da3757c Add missing field description from #774 2021-07-09 01:24:29 +02:00
Baptiste Jonglez
42dd2d6f7d Regenerate translation files 2021-07-09 01:20:50 +02:00
Baptiste Jonglez
ec1e6cf26e project edit form: allow empty private code (= no change)
Currently, the private code is mandatory in the edit form, and it's not
clear whether it's meant to **check** for the right private code or to
**change** the private code.

Make the field optional and rename the help message to make it clearer
it's only meant to **change** the private code.

Also change the field type to "password" instead of simple string.
2021-07-09 01:20:50 +02:00
Baptiste Jonglez
856412a70d project forms: Clarify relation between inheriting classes
The save() function is used to create a new project, so it belongs to the
form creation class.

Also clarify overriden form fields.
2021-07-09 01:20:50 +02:00
Baptiste Jonglez
dae7870b12 Fix error message syntax to allow translation extraction 2021-07-07 01:01:00 +02:00
Glandos
07b86bc580
Rework currency switching (#661)
Co-authored-by: Alexis Métaireau <alexis@notmyidea.org>

Currency switching is both simpler and less powerful. This was done primarily for users, to have a clear and logical understanding, but the code is also simpler. The main change is that it is now forbidden to switch a project to "no currency" if bills don't share the same currency.

Also, tests assume that projects are created without currency, as in the web UI.
2021-07-06 21:51:32 +02:00
Eugenia Russell
6f662e9dae Translated using Weblate (Greek)
Currently translated at 63.2% (146 of 231 strings)

Co-authored-by: Eugenia Russell <eugenia.russell2019@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/i-hate-money/i-hate-money/el/
Translation: I Hate Money/I Hate Money
2021-06-24 23:00:00 +02:00
Glandos
27d95f2d01 fix flake8 2021-06-10 00:09:59 +02:00
Glandos
c62965d4bf fix basic deprecation warnings 2021-06-10 00:09:59 +02:00