From b535a1201460ba6d62cb148d096f84fba1fbf48c Mon Sep 17 00:00:00 2001 From: Herculino Trotta Date: Sat, 25 Jan 2025 15:55:42 -0300 Subject: [PATCH] feat: enable Dutch (Nederlands) language choice --- app/WYGIWYH/settings.py | 2 +- .../0016_alter_usersettings_language.py | 18 ++++++ app/locale/nl/LC_MESSAGES/django.po | 62 +++---------------- frontend/src/application/datepicker.js | 4 +- 4 files changed, 30 insertions(+), 56 deletions(-) create mode 100644 app/apps/users/migrations/0016_alter_usersettings_language.py diff --git a/app/WYGIWYH/settings.py b/app/WYGIWYH/settings.py index bb5ddf1..d5c581e 100644 --- a/app/WYGIWYH/settings.py +++ b/app/WYGIWYH/settings.py @@ -163,7 +163,7 @@ AUTH_USER_MODEL = "users.User" LANGUAGE_CODE = "en" LANGUAGES = ( ("en", "English"), - # ("nl", "Nederlands"), + ("nl", "Nederlands"), ("pt-br", "Português (Brasil)"), ) diff --git a/app/apps/users/migrations/0016_alter_usersettings_language.py b/app/apps/users/migrations/0016_alter_usersettings_language.py new file mode 100644 index 0000000..c0e1aef --- /dev/null +++ b/app/apps/users/migrations/0016_alter_usersettings_language.py @@ -0,0 +1,18 @@ +# Generated by Django 5.1.5 on 2025-01-25 18:55 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('users', '0015_alter_usersettings_language'), + ] + + operations = [ + migrations.AlterField( + model_name='usersettings', + name='language', + field=models.CharField(choices=[('auto', 'Auto'), ('en', 'English'), ('nl', 'Nederlands'), ('pt-br', 'Português (Brasil)')], default='auto', max_length=10, verbose_name='Language'), + ), + ] diff --git a/app/locale/nl/LC_MESSAGES/django.po b/app/locale/nl/LC_MESSAGES/django.po index 1d6ca49..a5d6da9 100644 --- a/app/locale/nl/LC_MESSAGES/django.po +++ b/app/locale/nl/LC_MESSAGES/django.po @@ -2,25 +2,17 @@ # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the PACKAGE package. # FIRST AUTHOR , YEAR. -# +# #, fuzzy msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" -<<<<<<< HEAD -"POT-Creation-Date: 2025-01-22 13:17+0000\n" -"PO-Revision-Date: 2025-01-25 18:43+0100\n" -"Last-Translator: Dimitri Decrock \n" -"Language-Team: \n" -"Language: nl\n" -======= -"POT-Creation-Date: 2025-01-25 16:51+0000\n" +"POT-Creation-Date: 2025-01-25 18:49+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "Language: \n" ->>>>>>> c9d1b5b5f39ec7c11a75a90d37c0a99ad6976b1d "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" @@ -568,7 +560,7 @@ msgstr "" #: templates/installment_plans/fragments/list.html:24 #: templates/recurring_transactions/fragments/list.html:27 msgid "Finished" -msgstr "" +msgstr "Voltooid" #: apps/import_app/models.py:54 msgid "Status" @@ -1535,48 +1527,22 @@ msgstr "Alles selecteren" msgid "Unselect All" msgstr "Alles deselecteren" -<<<<<<< HEAD -#: templates/cotton/ui/transactions_action_bar.html:34 -msgid "Mark as paid" -msgstr "Markeren als betaald" - -#: templates/cotton/ui/transactions_action_bar.html:41 -msgid "Mark as unpaid" -msgstr "Markeren als niet betaald" - -#: templates/cotton/ui/transactions_action_bar.html:54 -msgid "Yes, delete them!" -msgstr "Ja, verwijder ze!" - -#: templates/cotton/ui/transactions_action_bar.html:101 -#: templates/cotton/ui/transactions_action_bar.html:125 -#: templates/cotton/ui/transactions_action_bar.html:145 -#: templates/cotton/ui/transactions_action_bar.html:165 -#: templates/cotton/ui/transactions_action_bar.html:185 -#: templates/cotton/ui/transactions_action_bar.html:205 -#: templates/cotton/ui/transactions_action_bar.html:225 -msgid "copied!" -msgstr "gekopieerd!" - -#: templates/cotton/ui/transactions_action_bar.html:110 -======= #: templates/cotton/ui/transactions_action_bar.html:48 #: templates/cotton/ui/transactions_action_bar.html:139 ->>>>>>> c9d1b5b5f39ec7c11a75a90d37c0a99ad6976b1d msgid "Toggle Dropdown" msgstr "In- Uitklapbaar" #: templates/cotton/ui/transactions_action_bar.html:56 msgid "Mark as unpaid" -msgstr "" +msgstr "Markeren als niet betaald" #: templates/cotton/ui/transactions_action_bar.html:63 msgid "Mark as paid" -msgstr "" +msgstr "Markeren als betaald" #: templates/cotton/ui/transactions_action_bar.html:84 msgid "Yes, delete them!" -msgstr "" +msgstr "Ja, verwijder ze!" #: templates/cotton/ui/transactions_action_bar.html:130 #: templates/cotton/ui/transactions_action_bar.html:154 @@ -1586,7 +1552,7 @@ msgstr "" #: templates/cotton/ui/transactions_action_bar.html:234 #: templates/cotton/ui/transactions_action_bar.html:254 msgid "copied!" -msgstr "" +msgstr "gekopieerd!" #: templates/cotton/ui/transactions_action_bar.html:147 msgid "Flat Total" @@ -1608,12 +1574,8 @@ msgstr "Maximaal" msgid "Min" msgstr "Minimaal" -<<<<<<< HEAD -#: templates/cotton/ui/transactions_action_bar.html:218 -#, fuzzy -======= #: templates/cotton/ui/transactions_action_bar.html:247 ->>>>>>> c9d1b5b5f39ec7c11a75a90d37c0a99ad6976b1d +#, fuzzy msgid "Count" msgstr "Rekenen" @@ -1972,14 +1934,6 @@ msgstr "Afbetalingsplan toevoegen" msgid "Edit installment plan" msgstr "Afbetalingsplan bewerken" -<<<<<<< HEAD -#: templates/installment_plans/fragments/list.html:24 -#: templates/recurring_transactions/fragments/list.html:27 -msgid "Finished" -msgstr "Voltooid" - -======= ->>>>>>> c9d1b5b5f39ec7c11a75a90d37c0a99ad6976b1d #: templates/installment_plans/fragments/list_transactions.html:5 #: templates/installment_plans/fragments/table.html:35 msgid "Installments" diff --git a/frontend/src/application/datepicker.js b/frontend/src/application/datepicker.js index f8bfd7e..df0ab94 100644 --- a/frontend/src/application/datepicker.js +++ b/frontend/src/application/datepicker.js @@ -1,11 +1,13 @@ import AirDatepicker from 'air-datepicker'; import en from 'air-datepicker/locale/en'; import ptBr from 'air-datepicker/locale/pt-BR'; +import nl from 'air-datepicker/locale/nl'; import {createPopper} from '@popperjs/core'; const locales = { 'pt': ptBr, - 'en': en + 'en': en, + 'nl': nl }; function isMobileDevice() {