Compare commits

...

6 Commits

Author SHA1 Message Date
eitchtee
c7e32d1576 chore(locale): update translation files
[skip ci] Automatically generated by Django makemessages workflow
2025-04-21 18:45:41 +00:00
Herculino Trotta
157e59a1d1 Merge pull request #250
fix(transactions): save and add similar not initializing dates properly
2025-04-21 15:45:05 -03:00
Herculino Trotta
d9c505ac79 fix(transactions): save and add similar not initializing dates properly
Fixes #248
2025-04-21 15:44:42 -03:00
Herculino Trotta
7274a13f3c Merge pull request #249
fix(accounts): unable to share some accounts; wrong url getting used
2025-04-21 14:33:41 -03:00
Herculino Trotta
5d64665ddd fix(accounts): unable to share some accounts; wrong url getting used 2025-04-21 14:33:11 -03:00
Herculino Trotta
e0d92d15c8 locale(Portuguese (Brazil)): update translation
Currently translated at 100.0% (650 of 650 strings)

Translation: WYGIWYH/App
Translate-URL: https://translations.herculino.com/projects/wygiwyh/app/pt_BR/
2025-04-20 21:16:53 +00:00
11 changed files with 118 additions and 80 deletions

View File

@@ -51,7 +51,7 @@ urlpatterns = [
),
path(
"account-groups/<int:pk>/share/",
views.account_share,
views.account_group_share,
name="account_group_share_settings",
),
]

View File

@@ -145,7 +145,7 @@ def account_group_take_ownership(request, pk):
@only_htmx
@login_required
@require_http_methods(["GET", "POST"])
def account_share(request, pk):
def account_group_share(request, pk):
obj = get_object_or_404(AccountGroup, id=pk)
if obj.owner and obj.owner != request.user:

View File

@@ -48,7 +48,7 @@ def transaction_add(request):
if request.method == "POST":
form = TransactionForm(request.POST)
if form.is_valid():
form.save()
saved_instance = form.save()
messages.success(request, _("Transaction added successfully"))
if "submit" in request.POST:
@@ -65,10 +65,48 @@ def transaction_add(request):
)
update = True
elif "submit_and_similar" in request.POST:
form = TransactionForm(
initial=request.POST.dict(),
)
update = True
initial_data = {}
# Define fields to copy from the SAVED instance
direct_fields_to_copy = [
"account", # ForeignKey -> will copy the ID
"type", # ChoiceField -> will copy the value
"is_paid", # BooleanField -> will copy True/False
"date", # DateField -> will copy the date object
"reference_date", # DateField -> will copy the date object
"amount", # DecimalField -> will copy the decimal
"description", # CharField -> will copy the string
"notes", # TextField -> will copy the string
"category", # ForeignKey -> will copy the ID
]
m2m_fields_to_copy = [
"tags", # ManyToManyField -> will copy list of IDs
"entities", # ManyToManyField -> will copy list of IDs
]
# Copy direct fields from the saved instance
for field_name in direct_fields_to_copy:
value = getattr(saved_instance, field_name, None)
if value is not None:
# Handle ForeignKey: use the pk
if hasattr(value, "pk"):
initial_data[field_name] = value.pk
# Handle Date/DateTime/Decimal/Boolean/etc.: use the Python object directly
else:
initial_data[field_name] = (
value # This correctly handles date objects!
)
# Copy M2M fields: provide a list of related object pks
for field_name in m2m_fields_to_copy:
m2m_manager = getattr(saved_instance, field_name)
initial_data[field_name] = list(
m2m_manager.values_list("name", flat=True)
)
# Create a new form instance pre-filled with the correctly typed initial data
form = TransactionForm(initial=initial_data)
update = True # Signal HTMX to update the form area
else:
form = TransactionForm(

View File

@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2025-04-20 18:57+0000\n"
"POT-Creation-Date: 2025-04-21 18:45+0000\n"
"PO-Revision-Date: 2025-04-13 02:40+0000\n"
"Last-Translator: Prefill add-on <noreply-addon-prefill@weblate.org>\n"
"Language-Team: German <https://translations.herculino.com/projects/wygiwyh/"
@@ -1623,34 +1623,34 @@ msgid "Tag deleted successfully"
msgstr "Tag erfolgreich gelöscht"
#: apps/transactions/views/transactions.py:52
#: apps/transactions/views/transactions.py:110
#: apps/transactions/views/transactions.py:148
msgid "Transaction added successfully"
msgstr "Transaktion erfolgreich hinzugefügt"
#: apps/transactions/views/transactions.py:144
#: apps/transactions/views/transactions.py:182
msgid "Transaction updated successfully"
msgstr "Transaktion erfolgreich aktualisiert"
#: apps/transactions/views/transactions.py:194
#: apps/transactions/views/transactions.py:232
#, python-format
msgid "%(count)s transaction updated successfully"
msgid_plural "%(count)s transactions updated successfully"
msgstr[0] "%(count)s Transaktion erfolgreich aktualisiert"
msgstr[1] "%(count)s Transaktionen erfolgreich aktualisiert"
#: apps/transactions/views/transactions.py:230
#: apps/transactions/views/transactions.py:268
msgid "Transaction duplicated successfully"
msgstr "Transaktion erfolgreich duplisiert"
#: apps/transactions/views/transactions.py:272
#: apps/transactions/views/transactions.py:310
msgid "Transaction deleted successfully"
msgstr "Transaktion erfolgreich gelöscht"
#: apps/transactions/views/transactions.py:290
#: apps/transactions/views/transactions.py:328
msgid "Transaction restored successfully"
msgstr "Transaktion erfolgreich wiederhergestellt"
#: apps/transactions/views/transactions.py:316
#: apps/transactions/views/transactions.py:354
msgid "Transfer added successfully"
msgstr "Transfer erfolgreich hinzugefügt"

View File

@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2025-04-20 18:57+0000\n"
"POT-Creation-Date: 2025-04-21 18:45+0000\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"
@@ -1585,34 +1585,34 @@ msgid "Tag deleted successfully"
msgstr ""
#: apps/transactions/views/transactions.py:52
#: apps/transactions/views/transactions.py:110
#: apps/transactions/views/transactions.py:148
msgid "Transaction added successfully"
msgstr ""
#: apps/transactions/views/transactions.py:144
#: apps/transactions/views/transactions.py:182
msgid "Transaction updated successfully"
msgstr ""
#: apps/transactions/views/transactions.py:194
#: apps/transactions/views/transactions.py:232
#, python-format
msgid "%(count)s transaction updated successfully"
msgid_plural "%(count)s transactions updated successfully"
msgstr[0] ""
msgstr[1] ""
#: apps/transactions/views/transactions.py:230
#: apps/transactions/views/transactions.py:268
msgid "Transaction duplicated successfully"
msgstr ""
#: apps/transactions/views/transactions.py:272
#: apps/transactions/views/transactions.py:310
msgid "Transaction deleted successfully"
msgstr ""
#: apps/transactions/views/transactions.py:290
#: apps/transactions/views/transactions.py:328
msgid "Transaction restored successfully"
msgstr ""
#: apps/transactions/views/transactions.py:316
#: apps/transactions/views/transactions.py:354
msgid "Transfer added successfully"
msgstr ""

View File

@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2025-04-20 18:57+0000\n"
"POT-Creation-Date: 2025-04-21 18:45+0000\n"
"PO-Revision-Date: 2025-04-13 02:40+0000\n"
"Last-Translator: Prefill add-on <noreply-addon-prefill@weblate.org>\n"
"Language-Team: Spanish <https://translations.herculino.com/projects/wygiwyh/"
@@ -1908,39 +1908,39 @@ msgid "Tag deleted successfully"
msgstr "Tag deleted successfully"
#: apps/transactions/views/transactions.py:52
#: apps/transactions/views/transactions.py:110
#: apps/transactions/views/transactions.py:148
#, fuzzy
msgid "Transaction added successfully"
msgstr "Transaction added successfully"
#: apps/transactions/views/transactions.py:144
#: apps/transactions/views/transactions.py:182
#, fuzzy
msgid "Transaction updated successfully"
msgstr "Transaction updated successfully"
#: apps/transactions/views/transactions.py:194
#: apps/transactions/views/transactions.py:232
#, fuzzy, python-format
msgid "%(count)s transaction updated successfully"
msgid_plural "%(count)s transactions updated successfully"
msgstr[0] "%(count)s transaction updated successfully"
msgstr[1] "%(count)s transactions updated successfully"
#: apps/transactions/views/transactions.py:230
#: apps/transactions/views/transactions.py:268
#, fuzzy
msgid "Transaction duplicated successfully"
msgstr "Transaction duplicated successfully"
#: apps/transactions/views/transactions.py:272
#: apps/transactions/views/transactions.py:310
#, fuzzy
msgid "Transaction deleted successfully"
msgstr "Transaction deleted successfully"
#: apps/transactions/views/transactions.py:290
#: apps/transactions/views/transactions.py:328
#, fuzzy
msgid "Transaction restored successfully"
msgstr "Transaction restored successfully"
#: apps/transactions/views/transactions.py:316
#: apps/transactions/views/transactions.py:354
#, fuzzy
msgid "Transfer added successfully"
msgstr "Transfer added successfully"

View File

@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2025-04-20 18:57+0000\n"
"POT-Creation-Date: 2025-04-21 18:45+0000\n"
"PO-Revision-Date: 2025-04-13 02:40+0000\n"
"Last-Translator: Prefill add-on <noreply-addon-prefill@weblate.org>\n"
"Language-Team: French <https://translations.herculino.com/projects/wygiwyh/"
@@ -1752,39 +1752,39 @@ msgid "Tag deleted successfully"
msgstr "Tag deleted successfully"
#: apps/transactions/views/transactions.py:52
#: apps/transactions/views/transactions.py:110
#: apps/transactions/views/transactions.py:148
#, fuzzy
msgid "Transaction added successfully"
msgstr "Transaction added successfully"
#: apps/transactions/views/transactions.py:144
#: apps/transactions/views/transactions.py:182
#, fuzzy
msgid "Transaction updated successfully"
msgstr "Transaction updated successfully"
#: apps/transactions/views/transactions.py:194
#: apps/transactions/views/transactions.py:232
#, fuzzy, python-format
msgid "%(count)s transaction updated successfully"
msgid_plural "%(count)s transactions updated successfully"
msgstr[0] "%(count)s transaction updated successfully"
msgstr[1] "%(count)s transactions updated successfully"
#: apps/transactions/views/transactions.py:230
#: apps/transactions/views/transactions.py:268
#, fuzzy
msgid "Transaction duplicated successfully"
msgstr "Transaction duplicated successfully"
#: apps/transactions/views/transactions.py:272
#: apps/transactions/views/transactions.py:310
#, fuzzy
msgid "Transaction deleted successfully"
msgstr "Transaction deleted successfully"
#: apps/transactions/views/transactions.py:290
#: apps/transactions/views/transactions.py:328
#, fuzzy
msgid "Transaction restored successfully"
msgstr "Transaction restored successfully"
#: apps/transactions/views/transactions.py:316
#: apps/transactions/views/transactions.py:354
#, fuzzy
msgid "Transfer added successfully"
msgstr "Transfer added successfully"

View File

@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2025-04-20 18:57+0000\n"
"POT-Creation-Date: 2025-04-21 18:45+0000\n"
"PO-Revision-Date: 2025-04-14 08:16+0000\n"
"Last-Translator: Dimitri Decrock <dj.flashpower@gmail.com>\n"
"Language-Team: Dutch <https://translations.herculino.com/projects/wygiwyh/"
@@ -1616,34 +1616,34 @@ msgid "Tag deleted successfully"
msgstr "Label succesvol verwijderd"
#: apps/transactions/views/transactions.py:52
#: apps/transactions/views/transactions.py:110
#: apps/transactions/views/transactions.py:148
msgid "Transaction added successfully"
msgstr "Verrichting succesvol toegevoegd"
#: apps/transactions/views/transactions.py:144
#: apps/transactions/views/transactions.py:182
msgid "Transaction updated successfully"
msgstr "Verrichting succesvol bijgewerkt"
#: apps/transactions/views/transactions.py:194
#: apps/transactions/views/transactions.py:232
#, python-format
msgid "%(count)s transaction updated successfully"
msgid_plural "%(count)s transactions updated successfully"
msgstr[0] "%(count)s verrichting succesvol bijgewerkt"
msgstr[1] "%(count)s verrichtingen succesvol bijgewerkt"
#: apps/transactions/views/transactions.py:230
#: apps/transactions/views/transactions.py:268
msgid "Transaction duplicated successfully"
msgstr "Verrichting succesvol gedupliceerd"
#: apps/transactions/views/transactions.py:272
#: apps/transactions/views/transactions.py:310
msgid "Transaction deleted successfully"
msgstr "Verrichting succesvol verwijderd"
#: apps/transactions/views/transactions.py:290
#: apps/transactions/views/transactions.py:328
msgid "Transaction restored successfully"
msgstr "Verrichting succesvol hersteld"
#: apps/transactions/views/transactions.py:316
#: apps/transactions/views/transactions.py:354
msgid "Transfer added successfully"
msgstr "Transactie succesvol toegevoegd"

View File

@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2025-04-20 18:57+0000\n"
"POT-Creation-Date: 2025-04-21 18:45+0000\n"
"PO-Revision-Date: 2025-04-13 08:16+0000\n"
"Last-Translator: Herculino Trotta <netotrotta@gmail.com>\n"
"Language-Team: Portuguese <https://translations.herculino.com/projects/"
@@ -1613,34 +1613,34 @@ msgid "Tag deleted successfully"
msgstr "Tag apagada com sucesso"
#: apps/transactions/views/transactions.py:52
#: apps/transactions/views/transactions.py:110
#: apps/transactions/views/transactions.py:148
msgid "Transaction added successfully"
msgstr "Transação adicionada com sucesso"
#: apps/transactions/views/transactions.py:144
#: apps/transactions/views/transactions.py:182
msgid "Transaction updated successfully"
msgstr "Transação atualizada com sucesso"
#: apps/transactions/views/transactions.py:194
#: apps/transactions/views/transactions.py:232
#, python-format
msgid "%(count)s transaction updated successfully"
msgid_plural "%(count)s transactions updated successfully"
msgstr[0] "%(count)s transação atualizada com sucesso"
msgstr[1] "%(count)s transações atualizadas com sucesso"
#: apps/transactions/views/transactions.py:230
#: apps/transactions/views/transactions.py:268
msgid "Transaction duplicated successfully"
msgstr "Transação duplicada com sucesso"
#: apps/transactions/views/transactions.py:272
#: apps/transactions/views/transactions.py:310
msgid "Transaction deleted successfully"
msgstr "Transação apagada com sucesso"
#: apps/transactions/views/transactions.py:290
#: apps/transactions/views/transactions.py:328
msgid "Transaction restored successfully"
msgstr "Transação restaurada com sucesso"
#: apps/transactions/views/transactions.py:316
#: apps/transactions/views/transactions.py:354
msgid "Transfer added successfully"
msgstr "Transferência adicionada com sucesso"

View File

@@ -7,8 +7,8 @@ msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2025-04-20 18:57+0000\n"
"PO-Revision-Date: 2025-04-13 23:16+0000\n"
"POT-Creation-Date: 2025-04-21 18:45+0000\n"
"PO-Revision-Date: 2025-04-20 21:16+0000\n"
"Last-Translator: Herculino Trotta <netotrotta@gmail.com>\n"
"Language-Team: Portuguese (Brazil) <https://translations.herculino.com/"
"projects/wygiwyh/app/pt_BR/>\n"
@@ -1267,11 +1267,11 @@ msgstr "Mais"
#: apps/transactions/forms.py:216
msgid "Save and add similar"
msgstr ""
msgstr "Salvar e adicionar similar"
#: apps/transactions/forms.py:221
msgid "Save and add another"
msgstr ""
msgstr "Salvar e adicionar outra"
#: apps/transactions/forms.py:302
msgid "From Amount"
@@ -1613,34 +1613,34 @@ msgid "Tag deleted successfully"
msgstr "Tag apagada com sucesso"
#: apps/transactions/views/transactions.py:52
#: apps/transactions/views/transactions.py:110
#: apps/transactions/views/transactions.py:148
msgid "Transaction added successfully"
msgstr "Transação adicionada com sucesso"
#: apps/transactions/views/transactions.py:144
#: apps/transactions/views/transactions.py:182
msgid "Transaction updated successfully"
msgstr "Transação atualizada com sucesso"
#: apps/transactions/views/transactions.py:194
#: apps/transactions/views/transactions.py:232
#, python-format
msgid "%(count)s transaction updated successfully"
msgid_plural "%(count)s transactions updated successfully"
msgstr[0] "%(count)s transação atualizada com sucesso"
msgstr[1] "%(count)s transações atualizadas com sucesso"
#: apps/transactions/views/transactions.py:230
#: apps/transactions/views/transactions.py:268
msgid "Transaction duplicated successfully"
msgstr "Transação duplicada com sucesso"
#: apps/transactions/views/transactions.py:272
#: apps/transactions/views/transactions.py:310
msgid "Transaction deleted successfully"
msgstr "Transação apagada com sucesso"
#: apps/transactions/views/transactions.py:290
#: apps/transactions/views/transactions.py:328
msgid "Transaction restored successfully"
msgstr "Transação restaurada com sucesso"
#: apps/transactions/views/transactions.py:316
#: apps/transactions/views/transactions.py:354
msgid "Transfer added successfully"
msgstr "Transferência adicionada com sucesso"
@@ -2691,23 +2691,23 @@ msgstr "Gasto/Despesa por Moeda"
#: templates/insights/fragments/category_overview/index.html:14
msgid "Table"
msgstr ""
msgstr "Tabela"
#: templates/insights/fragments/category_overview/index.html:24
msgid "Bars"
msgstr ""
msgstr "Barras"
#: templates/insights/fragments/category_overview/index.html:38
msgid ""
"Transaction amounts associated with multiple tags will be counted once for "
"each tag"
msgstr ""
"Os valores das transações associadas a várias tags serão contados uma vez "
"para cada tag"
#: templates/insights/fragments/category_overview/index.html:54
#, fuzzy
#| msgid "final total"
msgid "Final total"
msgstr "total final"
msgstr "Total final"
#: templates/insights/fragments/category_overview/index.html:66
#: templates/monthly_overview/fragments/monthly_summary.html:167
@@ -2716,7 +2716,7 @@ msgstr "Total"
#: templates/insights/fragments/category_overview/index.html:166
msgid "Untagged"
msgstr ""
msgstr "Sem tag"
#: templates/insights/fragments/category_overview/index.html:407
msgid "Final Total"

View File

@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2025-04-20 18:57+0000\n"
"POT-Creation-Date: 2025-04-21 18:45+0000\n"
"PO-Revision-Date: 2025-04-14 06:16+0000\n"
"Last-Translator: Emil <emil.bjorkroth@gmail.com>\n"
"Language-Team: Swedish <https://translations.herculino.com/projects/wygiwyh/"
@@ -1586,34 +1586,34 @@ msgid "Tag deleted successfully"
msgstr ""
#: apps/transactions/views/transactions.py:52
#: apps/transactions/views/transactions.py:110
#: apps/transactions/views/transactions.py:148
msgid "Transaction added successfully"
msgstr ""
#: apps/transactions/views/transactions.py:144
#: apps/transactions/views/transactions.py:182
msgid "Transaction updated successfully"
msgstr ""
#: apps/transactions/views/transactions.py:194
#: apps/transactions/views/transactions.py:232
#, python-format
msgid "%(count)s transaction updated successfully"
msgid_plural "%(count)s transactions updated successfully"
msgstr[0] ""
msgstr[1] ""
#: apps/transactions/views/transactions.py:230
#: apps/transactions/views/transactions.py:268
msgid "Transaction duplicated successfully"
msgstr ""
#: apps/transactions/views/transactions.py:272
#: apps/transactions/views/transactions.py:310
msgid "Transaction deleted successfully"
msgstr ""
#: apps/transactions/views/transactions.py:290
#: apps/transactions/views/transactions.py:328
msgid "Transaction restored successfully"
msgstr ""
#: apps/transactions/views/transactions.py:316
#: apps/transactions/views/transactions.py:354
msgid "Transfer added successfully"
msgstr ""