Add the skeleton of the web application
It does nothing more than to server a single page that does nothing
interesting.
This time i do not use a router. Instead, i am trying out a technique
i have seen in an article[0] that i have tried in other, smaller,
projects and seems to work surprisingly well: it just “cuts off” the
URI path by path, passing the request from handler to handler until
it finds its way to a handler that actually serves the request.
That helps to loosen the coupling between the application and lower
handlers, and makes dependencies explicit, because i need to pass the
locale, company, etc. down instead of storing them in contexts. Let’s
see if i do not regret it on a later date.
I also made a lot more packages that in Numerus. In Numerus i actually
only have the single pkg package, and it works, kind of, but i notice
how i name my methods to avoid clashing instead of using packages for
that. That is, instead of pkg.NewApp i now have app.New.
Initially i thought that Locale should be inside app, but then there was
a circular dependency between app and template. That is why i created a
separate package, but now i am wondering if template should be inside
app too, but then i would have app.MustRenderTemplate instead of
template.MustRender.
The CSS is the most bare-bones file i could write because i am focusing
in markup right now; Oriol will fill in the file once the application is
working.
[0]: https://blog.merovius.de/posts/2017-06-18-how-not-to-use-an-http-router/
2023-07-22 22:11:00 +00:00
# Catalan translations for camper package
# Traduccions al català del paquet «camper».
# Copyright (C) 2023 THE camper'S COPYRIGHT HOLDER
# This file is distributed under the same license as the camper package.
# jordi fita mas <jordi@tandem.blog>, 2023.
#
msgid ""
msgstr ""
"Project-Id-Version: camper\n"
"Report-Msgid-Bugs-To: jordi@tandem.blog\n"
2024-05-13 08:40:21 +00:00
"POT-Creation-Date: 2024-05-13 10:37+0200\n"
2024-02-06 09:55:29 +00:00
"PO-Revision-Date: 2024-02-06 10:04+0100\n"
Add the skeleton of the web application
It does nothing more than to server a single page that does nothing
interesting.
This time i do not use a router. Instead, i am trying out a technique
i have seen in an article[0] that i have tried in other, smaller,
projects and seems to work surprisingly well: it just “cuts off” the
URI path by path, passing the request from handler to handler until
it finds its way to a handler that actually serves the request.
That helps to loosen the coupling between the application and lower
handlers, and makes dependencies explicit, because i need to pass the
locale, company, etc. down instead of storing them in contexts. Let’s
see if i do not regret it on a later date.
I also made a lot more packages that in Numerus. In Numerus i actually
only have the single pkg package, and it works, kind of, but i notice
how i name my methods to avoid clashing instead of using packages for
that. That is, instead of pkg.NewApp i now have app.New.
Initially i thought that Locale should be inside app, but then there was
a circular dependency between app and template. That is why i created a
separate package, but now i am wondering if template should be inside
app too, but then i would have app.MustRenderTemplate instead of
template.MustRender.
The CSS is the most bare-bones file i could write because i am focusing
in markup right now; Oriol will fill in the file once the application is
working.
[0]: https://blog.merovius.de/posts/2017-06-18-how-not-to-use-an-http-router/
2023-07-22 22:11:00 +00:00
"Last-Translator: jordi fita mas <jordi@tandem.blog>\n"
"Language-Team: Catalan <ca@dodds.net>\n"
"Language: ca\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
2024-02-06 09:55:29 +00:00
"X-Generator: Poedit 3.4.2\n"
Add the skeleton of the web application
It does nothing more than to server a single page that does nothing
interesting.
This time i do not use a router. Instead, i am trying out a technique
i have seen in an article[0] that i have tried in other, smaller,
projects and seems to work surprisingly well: it just “cuts off” the
URI path by path, passing the request from handler to handler until
it finds its way to a handler that actually serves the request.
That helps to loosen the coupling between the application and lower
handlers, and makes dependencies explicit, because i need to pass the
locale, company, etc. down instead of storing them in contexts. Let’s
see if i do not regret it on a later date.
I also made a lot more packages that in Numerus. In Numerus i actually
only have the single pkg package, and it works, kind of, but i notice
how i name my methods to avoid clashing instead of using packages for
that. That is, instead of pkg.NewApp i now have app.New.
Initially i thought that Locale should be inside app, but then there was
a circular dependency between app and template. That is why i created a
separate package, but now i am wondering if template should be inside
app too, but then i would have app.MustRenderTemplate instead of
template.MustRender.
The CSS is the most bare-bones file i could write because i am focusing
in markup right now; Oriol will fill in the file once the application is
working.
[0]: https://blog.merovius.de/posts/2017-06-18-how-not-to-use-an-http-router/
2023-07-22 22:11:00 +00:00
2024-01-31 14:12:11 +00:00
#: web/templates/campground_map.svg:1598
msgctxt "title"
msgid "Zones"
msgstr "Zones"
#: web/templates/campground_map.svg:1599
msgctxt "tooltip"
msgid "Zone 7"
msgstr "Zona 7"
#: web/templates/campground_map.svg:1600
msgctxt "tooltip"
msgid "Zone 6"
msgstr "Zona 6"
#: web/templates/campground_map.svg:1601
msgctxt "tooltip"
msgid "Zone 5"
msgstr "Zona 5"
#: web/templates/campground_map.svg:1602
msgctxt "tooltip"
msgid "Zone 4"
msgstr "Zona 4"
#: web/templates/campground_map.svg:1603
msgctxt "tooltip"
msgid "Zone 3"
msgstr "Zona 3"
#: web/templates/campground_map.svg:1604
msgctxt "tooltip"
msgid "Zone 2"
msgstr "Zona 2"
#: web/templates/campground_map.svg:1605
msgctxt "tooltip"
msgid "Zone 1"
msgstr "Zona 1"
2024-02-29 15:59:30 +00:00
#: web/templates/mail/payment/details.gotxt:1
2024-02-13 04:20:35 +00:00
#: web/templates/mail/payment/body.gohtml:33
#: web/templates/mail/payment/body.gotxt:1
msgid "Hi %s,"
msgstr "Hola %s,"
2024-02-29 15:59:30 +00:00
#: web/templates/mail/payment/details.gotxt:3
2024-02-13 04:20:35 +00:00
#: web/templates/mail/payment/body.gohtml:35
#: web/templates/mail/payment/body.gotxt:3
msgid "We have successfully received the payment for the booking with the following details:"
msgstr "Hem rebut amb èxit el pagament de la reserva amb els següents detalls:"
2024-02-29 15:59:30 +00:00
#: web/templates/mail/payment/details.gotxt:7
2024-03-24 21:06:59 +00:00
#: web/templates/admin/payment/details.gohtml:49
2024-02-29 15:59:30 +00:00
msgctxt "title"
msgid "Payment"
msgstr "Pagament"
#: web/templates/mail/payment/details.gotxt:9
2024-05-03 18:09:07 +00:00
#: web/templates/admin/payment/index.gohtml:73
2024-03-24 21:06:59 +00:00
#: web/templates/admin/payment/details.gohtml:52
2024-05-02 23:01:01 +00:00
#: web/templates/admin/prebooking/index.gohtml:59
#: web/templates/admin/booking/index.gohtml:73
2024-02-29 15:59:30 +00:00
msgctxt "header"
msgid "Reference"
msgstr "Referència"
#: web/templates/mail/payment/details.gotxt:10
2024-05-03 18:09:07 +00:00
#: web/templates/admin/payment/index.gohtml:74
2024-03-24 21:06:59 +00:00
#: web/templates/admin/payment/details.gohtml:56
2024-05-02 23:01:01 +00:00
#: web/templates/admin/booking/index.gohtml:77
2024-02-29 15:59:30 +00:00
msgctxt "header"
msgid "Status"
msgstr "Estat"
#: web/templates/mail/payment/details.gotxt:11
2024-03-24 21:06:59 +00:00
#: web/templates/admin/payment/details.gohtml:60
2024-02-29 15:59:30 +00:00
msgctxt "payment header"
msgid "Created at"
msgstr "Creat el"
#: web/templates/mail/payment/details.gotxt:12
2024-03-24 21:06:59 +00:00
#: web/templates/admin/payment/details.gohtml:64
2024-02-29 15:59:30 +00:00
msgctxt "payment header"
msgid "Last updated at"
msgstr "Actualitzat per darrera vegada el"
#: web/templates/mail/payment/details.gotxt:14
#: web/templates/public/layout.gohtml:71
#: web/templates/public/booking/page.gohtml:7
2024-03-24 21:06:59 +00:00
#: web/templates/admin/payment/details.gohtml:71
2024-02-29 15:59:30 +00:00
msgctxt "title"
msgid "Booking"
msgstr "Reserva"
#: web/templates/mail/payment/details.gotxt:16
#: web/templates/public/booking/fields.gohtml:14
2024-03-24 21:06:59 +00:00
#: web/templates/admin/payment/details.gohtml:74
2024-04-26 15:09:36 +00:00
#: web/templates/admin/booking/fields.gohtml:13
2024-02-29 15:59:30 +00:00
msgctxt "title"
msgid "Accommodation"
msgstr "Allotjament"
#: web/templates/mail/payment/details.gotxt:17
2024-03-24 21:06:59 +00:00
#: web/templates/admin/payment/details.gohtml:78
2024-02-29 15:59:30 +00:00
msgctxt "header"
msgid "Area preferences"
msgstr "Preferències d’ àrea"
#: web/templates/mail/payment/details.gotxt:18
2024-03-24 21:06:59 +00:00
#: web/templates/admin/payment/details.gohtml:82
2024-03-14 21:08:01 +00:00
msgctxt "input"
2024-05-13 08:40:21 +00:00
msgid "ACSI / ANWB card?"
msgstr "Targeta ACSI / ANWB?"
2024-03-14 21:08:01 +00:00
#: web/templates/mail/payment/details.gotxt:18
2024-03-24 21:06:59 +00:00
#: web/templates/admin/payment/details.gohtml:83
2024-03-14 21:08:01 +00:00
#: web/templates/admin/campsite/type/index.gohtml:53
#: web/templates/admin/season/index.gohtml:44
2024-05-13 08:40:21 +00:00
#: web/templates/admin/user/results.gohtml:6
2024-03-14 21:08:01 +00:00
#: web/templates/admin/amenity/index.gohtml:40
msgid "Yes"
msgstr "Sí"
#: web/templates/mail/payment/details.gotxt:18
2024-03-24 21:06:59 +00:00
#: web/templates/admin/payment/details.gohtml:83
2024-03-14 21:08:01 +00:00
#: web/templates/admin/campsite/type/index.gohtml:53
#: web/templates/admin/season/index.gohtml:44
2024-05-13 08:40:21 +00:00
#: web/templates/admin/user/results.gohtml:6
2024-03-14 21:08:01 +00:00
#: web/templates/admin/amenity/index.gohtml:40
msgid "No"
msgstr "No"
#: web/templates/mail/payment/details.gotxt:19
2024-02-29 15:59:30 +00:00
#: web/templates/public/campsite/dates.gohtml:4
#: web/templates/public/booking/fields.gohtml:30
2024-03-24 21:06:59 +00:00
#: web/templates/admin/payment/details.gohtml:86
2024-04-26 15:09:36 +00:00
#: web/templates/admin/booking/fields.gohtml:32
2024-02-29 15:59:30 +00:00
msgctxt "input"
msgid "Arrival date"
msgstr "Data d’ arribada"
2024-03-14 21:08:01 +00:00
#: web/templates/mail/payment/details.gotxt:20
2024-02-29 15:59:30 +00:00
#: web/templates/public/campsite/dates.gohtml:15
#: web/templates/public/booking/fields.gohtml:41
2024-03-24 21:06:59 +00:00
#: web/templates/admin/payment/details.gohtml:90
2024-04-26 15:09:36 +00:00
#: web/templates/admin/booking/fields.gohtml:43
2024-02-29 15:59:30 +00:00
msgctxt "input"
msgid "Departure date"
msgstr "Data de sortida"
2024-03-14 21:08:01 +00:00
#: web/templates/mail/payment/details.gotxt:21
2024-03-24 21:06:59 +00:00
#: web/templates/admin/payment/details.gohtml:94
2024-02-29 15:59:30 +00:00
msgctxt "cart"
msgid "Nights"
msgstr "Nits"
2024-03-14 21:08:01 +00:00
#: web/templates/mail/payment/details.gotxt:22
2024-02-29 15:59:30 +00:00
#: web/templates/public/booking/fields.gohtml:60
2024-03-24 21:06:59 +00:00
#: web/templates/admin/payment/details.gohtml:98
2024-05-03 17:13:49 +00:00
#: web/templates/admin/booking/fields.gohtml:93 pkg/invoice/admin.go:964
2024-02-29 15:59:30 +00:00
msgctxt "input"
msgid "Adults aged 17 or older"
msgstr "Adults de 17 anys o més"
2024-03-14 21:08:01 +00:00
#: web/templates/mail/payment/details.gotxt:23
2024-02-29 15:59:30 +00:00
#: web/templates/public/booking/fields.gohtml:71
2024-03-24 21:06:59 +00:00
#: web/templates/admin/payment/details.gohtml:102
2024-05-03 17:13:49 +00:00
#: web/templates/admin/booking/fields.gohtml:109 pkg/invoice/admin.go:965
2024-02-29 15:59:30 +00:00
msgctxt "input"
msgid "Teenagers from 11 to 16 years old"
msgstr "Adolescents d’ entre 11 i 16 anys"
2024-03-14 21:08:01 +00:00
#: web/templates/mail/payment/details.gotxt:24
2024-02-29 15:59:30 +00:00
#: web/templates/public/booking/fields.gohtml:82
2024-03-24 21:06:59 +00:00
#: web/templates/admin/payment/details.gohtml:106
2024-05-03 17:13:49 +00:00
#: web/templates/admin/booking/fields.gohtml:125 pkg/invoice/admin.go:966
2024-02-29 15:59:30 +00:00
msgctxt "input"
msgid "Children from 2 to 10 years old"
msgstr "Nens d’ entre 2 i 10 anys"
2024-03-14 21:08:01 +00:00
#: web/templates/mail/payment/details.gotxt:25
2024-02-29 15:59:30 +00:00
#: web/templates/public/booking/fields.gohtml:100
2024-03-24 21:06:59 +00:00
#: web/templates/admin/payment/details.gohtml:110
2024-05-03 17:13:49 +00:00
#: web/templates/admin/booking/fields.gohtml:140 pkg/invoice/admin.go:967
2024-02-29 15:59:30 +00:00
msgctxt "input"
msgid "Dogs"
msgstr "Gossos"
2024-03-14 21:08:01 +00:00
#: web/templates/mail/payment/details.gotxt:26
“Finish” the new booking form
Had to bring the same fields that i have for a payment to booking,
except that some of those should be nullable, because it is unreasonable
to ask front desk to gather all customer data when they have a booking
via phone, for instance.
Therefore, i can not take advantage of the validation for customer data
that i use in the public-facing form, but, fortunately, most of the
validations where in separated functions, thus only had to rewrite that
one for this case.
I already have to create a booking from a payment, when receiving a
payment from the public instance, thus i made that function and reused
it here. Then i “overwrite” the newly created pre-booking with the
customer data from the form, and set is as confirmed, as we do not see
any point of allowing pre-bookings from employees.
2024-04-24 18:12:29 +00:00
#: web/templates/admin/payment/details.gohtml:114
2024-05-03 17:13:49 +00:00
#: web/templates/admin/booking/fields.gohtml:167 pkg/invoice/admin.go:968
2024-04-28 20:36:21 +00:00
#: pkg/booking/cart.go:242
2024-02-29 15:59:30 +00:00
msgctxt "cart"
msgid "Tourist tax"
msgstr "Impost turístic"
2024-03-14 21:08:01 +00:00
#: web/templates/mail/payment/details.gotxt:27
“Finish” the new booking form
Had to bring the same fields that i have for a payment to booking,
except that some of those should be nullable, because it is unreasonable
to ask front desk to gather all customer data when they have a booking
via phone, for instance.
Therefore, i can not take advantage of the validation for customer data
that i use in the public-facing form, but, fortunately, most of the
validations where in separated functions, thus only had to rewrite that
one for this case.
I already have to create a booking from a payment, when receiving a
payment from the public instance, thus i made that function and reused
it here. Then i “overwrite” the newly created pre-booking with the
customer data from the form, and set is as confirmed, as we do not see
any point of allowing pre-bookings from employees.
2024-04-24 18:12:29 +00:00
#: web/templates/public/booking/fields.gohtml:230
2024-02-29 15:59:30 +00:00
msgctxt "cart"
msgid "Total"
msgstr "Total"
2024-03-14 21:08:01 +00:00
#: web/templates/mail/payment/details.gotxt:28
“Finish” the new booking form
Had to bring the same fields that i have for a payment to booking,
except that some of those should be nullable, because it is unreasonable
to ask front desk to gather all customer data when they have a booking
via phone, for instance.
Therefore, i can not take advantage of the validation for customer data
that i use in the public-facing form, but, fortunately, most of the
validations where in separated functions, thus only had to rewrite that
one for this case.
I already have to create a booking from a payment, when receiving a
payment from the public instance, thus i made that function and reused
it here. Then i “overwrite” the newly created pre-booking with the
customer data from the form, and set is as confirmed, as we do not see
any point of allowing pre-bookings from employees.
2024-04-24 18:12:29 +00:00
#: web/templates/public/booking/fields.gohtml:235
2024-03-24 21:06:59 +00:00
#: web/templates/admin/payment/details.gohtml:118
2024-02-29 15:59:30 +00:00
msgctxt "cart"
msgid "Down payment"
msgstr "A compte"
2024-03-14 21:08:01 +00:00
#: web/templates/mail/payment/details.gotxt:31
2024-03-24 21:06:59 +00:00
#: web/templates/admin/payment/details.gohtml:126
2024-02-29 15:59:30 +00:00
#: web/templates/admin/campsite/type/option/form.gohtml:18
#: web/templates/admin/campsite/type/option/index.gohtml:6
#: web/templates/admin/campsite/type/option/index.gohtml:17
msgctxt "title"
msgid "Campsite Type Options"
msgstr "Opcions del tipus d’ allotjament"
2024-03-14 21:08:01 +00:00
#: web/templates/mail/payment/details.gotxt:39
2024-02-29 15:59:30 +00:00
#: web/templates/public/booking/fields.gohtml:146
2024-03-24 21:06:59 +00:00
#: web/templates/admin/payment/details.gohtml:140
2024-04-28 20:36:21 +00:00
#: web/templates/admin/customer/contact.gohtml:3
2024-04-26 15:09:36 +00:00
#: web/templates/admin/booking/fields.gohtml:188
2024-02-29 15:59:30 +00:00
msgctxt "title"
msgid "Customer Details"
msgstr "Detalls del client"
2024-03-14 21:08:01 +00:00
#: web/templates/mail/payment/details.gotxt:41
2024-02-29 15:59:30 +00:00
#: web/templates/public/booking/fields.gohtml:149
2024-03-24 21:06:59 +00:00
#: web/templates/admin/payment/details.gohtml:143
2024-04-28 20:36:21 +00:00
#: web/templates/admin/customer/contact.gohtml:6
2024-04-26 15:09:36 +00:00
#: web/templates/admin/booking/fields.gohtml:191
2024-02-29 15:59:30 +00:00
msgctxt "input"
msgid "Full name"
msgstr "Nom i cognoms"
2024-03-14 21:08:01 +00:00
#: web/templates/mail/payment/details.gotxt:42
2024-02-29 15:59:30 +00:00
#: web/templates/public/booking/fields.gohtml:158
2024-03-24 21:06:59 +00:00
#: web/templates/admin/payment/details.gohtml:147
2024-04-28 20:36:21 +00:00
#: web/templates/admin/customer/contact.gohtml:44
2024-02-29 15:59:30 +00:00
#: web/templates/admin/taxDetails.gohtml:69
msgctxt "input"
msgid "Address"
msgstr "Adreça"
2024-03-14 21:08:01 +00:00
#: web/templates/mail/payment/details.gotxt:43
2024-02-29 15:59:30 +00:00
#: web/templates/public/booking/fields.gohtml:167
2024-03-24 21:06:59 +00:00
#: web/templates/admin/payment/details.gohtml:151
2024-04-28 20:36:21 +00:00
#: web/templates/admin/customer/contact.gohtml:80
2024-02-29 15:59:30 +00:00
#: web/templates/admin/taxDetails.gohtml:93
msgctxt "input"
msgid "Postcode"
msgstr "Codi postal"
2024-03-14 21:08:01 +00:00
#: web/templates/mail/payment/details.gotxt:44
2024-03-24 21:06:59 +00:00
#: web/templates/admin/payment/details.gohtml:155
2024-02-29 15:59:30 +00:00
#: web/templates/admin/taxDetails.gohtml:77
msgctxt "input"
msgid "City"
msgstr "Població"
2024-03-14 21:08:01 +00:00
#: web/templates/mail/payment/details.gotxt:45
“Finish” the new booking form
Had to bring the same fields that i have for a payment to booking,
except that some of those should be nullable, because it is unreasonable
to ask front desk to gather all customer data when they have a booking
via phone, for instance.
Therefore, i can not take advantage of the validation for customer data
that i use in the public-facing form, but, fortunately, most of the
validations where in separated functions, thus only had to rewrite that
one for this case.
I already have to create a booking from a payment, when receiving a
payment from the public instance, thus i made that function and reused
it here. Then i “overwrite” the newly created pre-booking with the
customer data from the form, and set is as confirmed, as we do not see
any point of allowing pre-bookings from employees.
2024-04-24 18:12:29 +00:00
#: web/templates/public/booking/fields.gohtml:187
2024-03-24 21:06:59 +00:00
#: web/templates/admin/payment/details.gohtml:159
2024-04-28 20:36:21 +00:00
#: web/templates/admin/customer/contact.gohtml:92
2024-02-29 15:59:30 +00:00
#: web/templates/admin/taxDetails.gohtml:101
msgctxt "input"
msgid "Country"
msgstr "País"
2024-03-14 21:08:01 +00:00
#: web/templates/mail/payment/details.gotxt:46
“Finish” the new booking form
Had to bring the same fields that i have for a payment to booking,
except that some of those should be nullable, because it is unreasonable
to ask front desk to gather all customer data when they have a booking
via phone, for instance.
Therefore, i can not take advantage of the validation for customer data
that i use in the public-facing form, but, fortunately, most of the
validations where in separated functions, thus only had to rewrite that
one for this case.
I already have to create a booking from a payment, when receiving a
payment from the public instance, thus i made that function and reused
it here. Then i “overwrite” the newly created pre-booking with the
customer data from the form, and set is as confirmed, as we do not see
any point of allowing pre-bookings from employees.
2024-04-24 18:12:29 +00:00
#: web/templates/public/booking/fields.gohtml:201
2024-03-24 21:06:59 +00:00
#: web/templates/admin/payment/details.gohtml:163
2024-05-03 17:13:49 +00:00
#: web/templates/admin/customer/index.gohtml:33
2024-02-29 15:59:30 +00:00
#: web/templates/admin/login.gohtml:27 web/templates/admin/profile.gohtml:38
#: web/templates/admin/taxDetails.gohtml:53
msgctxt "input"
msgid "Email"
msgstr "Correu-e"
2024-03-14 21:08:01 +00:00
#: web/templates/mail/payment/details.gotxt:47
“Finish” the new booking form
Had to bring the same fields that i have for a payment to booking,
except that some of those should be nullable, because it is unreasonable
to ask front desk to gather all customer data when they have a booking
via phone, for instance.
Therefore, i can not take advantage of the validation for customer data
that i use in the public-facing form, but, fortunately, most of the
validations where in separated functions, thus only had to rewrite that
one for this case.
I already have to create a booking from a payment, when receiving a
payment from the public instance, thus i made that function and reused
it here. Then i “overwrite” the newly created pre-booking with the
customer data from the form, and set is as confirmed, as we do not see
any point of allowing pre-bookings from employees.
2024-04-24 18:12:29 +00:00
#: web/templates/public/booking/fields.gohtml:210
2024-03-24 21:06:59 +00:00
#: web/templates/admin/payment/details.gohtml:167
2024-02-29 15:59:30 +00:00
#: web/templates/admin/taxDetails.gohtml:45
msgctxt "input"
msgid "Phone"
msgstr "Telèfon"
2024-03-14 21:08:01 +00:00
#: web/templates/mail/payment/details.gotxt:48
2024-03-24 21:06:59 +00:00
#: web/templates/admin/payment/details.gohtml:171
2024-02-29 15:59:30 +00:00
#: web/templates/admin/profile.gohtml:68
msgctxt "input"
msgid "Language"
msgstr "Idioma"
#: web/templates/mail/payment/details.gotxt:54
msgid "Best regards,"
msgstr "Salutacions,"
#: web/templates/mail/payment/body.gohtml:6
msgctxt "title"
msgid "Booking Payment Notification"
msgstr "Notificació de pagament de reserva"
2024-02-13 04:20:35 +00:00
#: web/templates/mail/payment/body.gohtml:37
msgid "Payment reference: <strong>%s</strong>"
msgstr "Referència de pagament: <strong>%s</strong>"
#: web/templates/mail/payment/body.gohtml:39
msgid "Accommodation: <strong>%s</strong>"
msgstr "Allotjament: <strong>%s</strong>"
#: web/templates/mail/payment/body.gohtml:41
msgid "Arrival Date: <strong>%s</strong>"
msgstr "Data d’ arribada: <strong>%s</strong>"
#: web/templates/mail/payment/body.gohtml:43
msgid "Departure Date: <strong>%s</strong>"
msgstr "Data de sortida: <strong>%s</strong>"
#: web/templates/mail/payment/body.gohtml:45
msgid "Total: <strong>%s</strong>"
msgstr "Total: <strong>%s</strong>"
#: web/templates/mail/payment/body.gohtml:48
2024-02-13 22:45:25 +00:00
msgid "Down payment: <strong>%s</strong>"
msgstr "A compte: <strong>%s</strong>"
#: web/templates/mail/payment/body.gohtml:52
#: web/templates/mail/payment/body.gotxt:12
2024-02-13 04:20:35 +00:00
msgid "Thank you for your booking, and see you soon!"
msgstr "Moltes gràcies per la reserva i fins aviat!"
#: web/templates/mail/payment/body.gotxt:5
msgid "Payment reference: **%s**"
msgstr "Referència de pagament: **%s**"
#: web/templates/mail/payment/body.gotxt:6
msgid "Accommodation: **%s**"
msgstr "Allotjament: **%s**"
#: web/templates/mail/payment/body.gotxt:7
msgid "Arrival Date: **%s**"
msgstr "Data d’ arribada: **%s**"
#: web/templates/mail/payment/body.gotxt:8
msgid "Departure Date: **%s**"
msgstr "Data de sortida: **%s**"
#: web/templates/mail/payment/body.gotxt:9
msgid "Total: **%s**"
msgstr "Total: **%s**"
2024-02-13 22:45:25 +00:00
#: web/templates/mail/payment/body.gotxt:10
msgid "Down payment: **%s**"
msgstr "A compte: **%s**"
Add the first draft of the booking and payment forms
The form is based on the one in the current website, but in a single
page instead of split into many pages; possibly each <fieldset> should
be in a separate page/view. The idea is for Oriol to check the design
and decide how it would be presented to the user, so i needed something
to show him first.
I hardcoded the **test** data for the customer’s Redsys account. Is
this bad? I hope not, but i am not really, really sure.
The data sent to Redsys is just a placeholder because there are booking
details that i do not know, like what i have to do with the “teenagers”
field or the area preferences, thus i can not yet have a booking
relation. Nevertheless, had to generate a random order number up to
12-chars in length or Redsys would refuse the payment, claiming that
the order is duplicated.
The Redsys package is based on the PHP code provided by Redsys
themselves, plus some hints at the implementations from various Go
packages that did not know why they were so complicated.
Had to grant select on table country to guest in order to show the
select with the country options.
I have changed the “Postal code” input in taxDetails for “Postcode”
because this is the spell that it is used in the current web, i did not
see a reason to change it—it is an accepted form—, and i did not want to
have inconsistencies between forms.
2023-10-19 19:37:34 +00:00
#: web/templates/public/payment/success.gohtml:6
msgctxt "title"
msgid "Payment Successful"
msgstr "Pagament amb èxit"
2024-02-12 17:06:17 +00:00
#: web/templates/public/payment/success.gohtml:12
msgid "We have received the payment. Thank you."
msgstr "Hem rebut el vostre pagament. Gràcies."
Add the first draft of the booking and payment forms
The form is based on the one in the current website, but in a single
page instead of split into many pages; possibly each <fieldset> should
be in a separate page/view. The idea is for Oriol to check the design
and decide how it would be presented to the user, so i needed something
to show him first.
I hardcoded the **test** data for the customer’s Redsys account. Is
this bad? I hope not, but i am not really, really sure.
The data sent to Redsys is just a placeholder because there are booking
details that i do not know, like what i have to do with the “teenagers”
field or the area preferences, thus i can not yet have a booking
relation. Nevertheless, had to generate a random order number up to
12-chars in length or Redsys would refuse the payment, claiming that
the order is duplicated.
The Redsys package is based on the PHP code provided by Redsys
themselves, plus some hints at the implementations from various Go
packages that did not know why they were so complicated.
Had to grant select on table country to guest in order to show the
select with the country options.
I have changed the “Postal code” input in taxDetails for “Postcode”
because this is the spell that it is used in the current web, i did not
see a reason to change it—it is an accepted form—, and i did not want to
have inconsistencies between forms.
2023-10-19 19:37:34 +00:00
#: web/templates/public/payment/request.gohtml:6
msgctxt "title"
2024-02-12 17:06:17 +00:00
msgid "Booking Payment"
msgstr "Pagament de la reserva"
#: web/templates/public/payment/request.gohtml:18
msgid "Thank you for your booking. Please, click the button below to pay with a credit card via Servired/Redsys."
msgstr "Gràcies per la vostra reserva. Feu clic al botó de sota per pagar amb targeta de crèdit via Servired/Redsys."
Add the first draft of the booking and payment forms
The form is based on the one in the current website, but in a single
page instead of split into many pages; possibly each <fieldset> should
be in a separate page/view. The idea is for Oriol to check the design
and decide how it would be presented to the user, so i needed something
to show him first.
I hardcoded the **test** data for the customer’s Redsys account. Is
this bad? I hope not, but i am not really, really sure.
The data sent to Redsys is just a placeholder because there are booking
details that i do not know, like what i have to do with the “teenagers”
field or the area preferences, thus i can not yet have a booking
relation. Nevertheless, had to generate a random order number up to
12-chars in length or Redsys would refuse the payment, claiming that
the order is duplicated.
The Redsys package is based on the PHP code provided by Redsys
themselves, plus some hints at the implementations from various Go
packages that did not know why they were so complicated.
Had to grant select on table country to guest in order to show the
select with the country options.
I have changed the “Postal code” input in taxDetails for “Postcode”
because this is the spell that it is used in the current web, i did not
see a reason to change it—it is an accepted form—, and i did not want to
have inconsistencies between forms.
2023-10-19 19:37:34 +00:00
2024-02-12 17:06:17 +00:00
#: web/templates/public/payment/request.gohtml:27
Add the first draft of the booking and payment forms
The form is based on the one in the current website, but in a single
page instead of split into many pages; possibly each <fieldset> should
be in a separate page/view. The idea is for Oriol to check the design
and decide how it would be presented to the user, so i needed something
to show him first.
I hardcoded the **test** data for the customer’s Redsys account. Is
this bad? I hope not, but i am not really, really sure.
The data sent to Redsys is just a placeholder because there are booking
details that i do not know, like what i have to do with the “teenagers”
field or the area preferences, thus i can not yet have a booking
relation. Nevertheless, had to generate a random order number up to
12-chars in length or Redsys would refuse the payment, claiming that
the order is duplicated.
The Redsys package is based on the PHP code provided by Redsys
themselves, plus some hints at the implementations from various Go
packages that did not know why they were so complicated.
Had to grant select on table country to guest in order to show the
select with the country options.
I have changed the “Postal code” input in taxDetails for “Postcode”
because this is the spell that it is used in the current web, i did not
see a reason to change it—it is an accepted form—, and i did not want to
have inconsistencies between forms.
2023-10-19 19:37:34 +00:00
msgctxt "action"
2024-02-12 17:06:17 +00:00
msgid "Pay with credit card"
msgstr "Paga amb targeta de crèdit"
#: web/templates/public/payment/request.gohtml:30
msgid "Please, wait until we redirect you to the payment page."
msgstr "Espereu mentre us enviem a la pàgina de pagament."
Add the first draft of the booking and payment forms
The form is based on the one in the current website, but in a single
page instead of split into many pages; possibly each <fieldset> should
be in a separate page/view. The idea is for Oriol to check the design
and decide how it would be presented to the user, so i needed something
to show him first.
I hardcoded the **test** data for the customer’s Redsys account. Is
this bad? I hope not, but i am not really, really sure.
The data sent to Redsys is just a placeholder because there are booking
details that i do not know, like what i have to do with the “teenagers”
field or the area preferences, thus i can not yet have a booking
relation. Nevertheless, had to generate a random order number up to
12-chars in length or Redsys would refuse the payment, claiming that
the order is duplicated.
The Redsys package is based on the PHP code provided by Redsys
themselves, plus some hints at the implementations from various Go
packages that did not know why they were so complicated.
Had to grant select on table country to guest in order to show the
select with the country options.
I have changed the “Postal code” input in taxDetails for “Postcode”
because this is the spell that it is used in the current web, i did not
see a reason to change it—it is an accepted form—, and i did not want to
have inconsistencies between forms.
2023-10-19 19:37:34 +00:00
#: web/templates/public/payment/failure.gohtml:6
msgctxt "title"
msgid "Payment Failed"
msgstr "Ha fallat el pagament"
2024-02-12 17:06:17 +00:00
#: web/templates/public/payment/failure.gohtml:12
msgid "We could not process the payment. Please, contact us for support."
msgstr "No hem pogut processar el pagament. Poseu-vos en contacte amb nosaltres per solucionar el problema."
#: web/templates/public/payment/details.gohtml:4
msgctxt "title"
msgid "Order Number"
msgstr "Número de comanda"
#: web/templates/public/payment/details.gohtml:8
2024-05-03 17:13:49 +00:00
#: web/templates/admin/invoice/index.gohtml:104
2024-04-28 18:28:45 +00:00
#: web/templates/admin/invoice/view.gohtml:26
2024-02-12 17:06:17 +00:00
msgctxt "title"
msgid "Date"
msgstr "Data"
#: web/templates/public/payment/details.gohtml:12
2024-04-28 20:36:21 +00:00
#: web/templates/admin/invoice/form.gohtml:111
2024-04-28 18:28:45 +00:00
#: web/templates/admin/invoice/view.gohtml:63
#: web/templates/admin/invoice/view.gohtml:103
2024-02-12 17:06:17 +00:00
msgctxt "title"
msgid "Total"
msgstr "Total"
2024-02-13 22:45:25 +00:00
#: web/templates/public/payment/details.gohtml:17
msgctxt "title"
msgid "Down Payment"
msgstr "A compte"
Add home’s cover carousel
This is a separate carousel from the one displayed at the bottom with
location info; it is, i suppose, a carousel for the hero image.
For the database, it works exactly as the home carousel, but on the
front had to use AlpineJS instead of Slick because it needs to show a
text popping up from the bottom when the slide is show, something i do
not know how to do in Slick.
It now makes no sense to have the carousel inside the “nature” section,
because the heading is no longer in there, and moved it out into a new
“hero” div.
Since i now have two carousels in home, i had to add additional
attributes to carousel.AdminHandler to know which URL to point to when
POSTing, PUTting, or redirecting.
2024-01-16 20:05:52 +00:00
#: web/templates/public/services.gohtml:7
#: web/templates/public/services.gohtml:16
2024-02-29 15:59:30 +00:00
#: web/templates/public/layout.gohtml:68 web/templates/public/layout.gohtml:96
2024-01-21 21:44:04 +00:00
#: web/templates/admin/services/index.gohtml:59
Add the services page
This page is more or less similar to home, in terms of database: it
has a carousel and a list of items; in this case, the definition of
campsite services.
As i said early, when adding the home carousel, this carousel has its
own relation and set of functions to manage slides. They are also
duplicated in Go code, but i think i will need to refactor it later to
a carousel package or something like that, because both relations have
the exact same fields and types, so it makes no sense to have twice the
same code.
I already did it with the CSS and JavaScript code, mostly because it was
easier to replace the `.surroundings div` selector with `.carousel`, and
because that way i can have a single template that loads and initializes
Slick.
There is no UI to create or edit service definitions, although there are
the SQL functions, because i have no more time now, and Oriol needs to
check that the style is correct for that page.
2023-09-17 01:42:16 +00:00
msgctxt "title"
msgid "Services"
msgstr "Serveis"
Add home’s cover carousel
This is a separate carousel from the one displayed at the bottom with
location info; it is, i suppose, a carousel for the hero image.
For the database, it works exactly as the home carousel, but on the
front had to use AlpineJS instead of Slick because it needs to show a
text popping up from the bottom when the slide is show, something i do
not know how to do in Slick.
It now makes no sense to have the carousel inside the “nature” section,
because the heading is no longer in there, and moved it out into a new
“hero” div.
Since i now have two carousels in home, i had to add additional
attributes to carousel.AdminHandler to know which URL to point to when
POSTing, PUTting, or redirecting.
2024-01-16 20:05:52 +00:00
#: web/templates/public/services.gohtml:19
Add the services page
This page is more or less similar to home, in terms of database: it
has a carousel and a list of items; in this case, the definition of
campsite services.
As i said early, when adding the home carousel, this carousel has its
own relation and set of functions to manage slides. They are also
duplicated in Go code, but i think i will need to refactor it later to
a carousel package or something like that, because both relations have
the exact same fields and types, so it makes no sense to have twice the
same code.
I already did it with the CSS and JavaScript code, mostly because it was
easier to replace the `.surroundings div` selector with `.carousel`, and
because that way i can have a single template that loads and initializes
Slick.
There is no UI to create or edit service definitions, although there are
the SQL functions, because i have no more time now, and Oriol needs to
check that the style is correct for that page.
2023-09-17 01:42:16 +00:00
msgid "The campsite offers many different services."
msgstr "El càmping disposa de diversos serveis."
2024-01-27 21:51:41 +00:00
#: web/templates/public/amenity.gohtml:39
2024-02-11 20:45:00 +00:00
#: web/templates/public/campsite/type.gohtml:114
2024-01-27 21:51:41 +00:00
#: web/templates/public/campsite/page.gohtml:39
msgctxt "title"
msgid "Features"
msgstr "Característiques"
Add home’s cover carousel
This is a separate carousel from the one displayed at the bottom with
location info; it is, i suppose, a carousel for the hero image.
For the database, it works exactly as the home carousel, but on the
front had to use AlpineJS instead of Slick because it needs to show a
text popping up from the bottom when the slide is show, something i do
not know how to do in Slick.
It now makes no sense to have the carousel inside the “nature” section,
because the heading is no longer in there, and moved it out into a new
“hero” div.
Since i now have two carousels in home, i had to add additional
attributes to carousel.AdminHandler to know which URL to point to when
POSTing, PUTting, or redirecting.
2024-01-16 20:05:52 +00:00
#: web/templates/public/location.gohtml:7
#: web/templates/public/location.gohtml:13
2024-02-29 15:59:30 +00:00
#: web/templates/public/layout.gohtml:70 web/templates/public/layout.gohtml:98
2024-01-27 21:51:41 +00:00
#: web/templates/admin/layout.gohtml:64
2023-12-21 20:17:04 +00:00
msgctxt "title"
msgid "Location"
msgstr "Com arribar"
2024-02-29 15:59:30 +00:00
#: web/templates/public/home.gohtml:7 web/templates/public/layout.gohtml:54
#: web/templates/public/layout.gohtml:94
Split templates and handlers into admin and public
I need to check that the user is an employee (or admin) in
administration handlers, but i do not want to do it for each handler,
because i am bound to forget it. Thus, i added the /admin sub-path for
these resources.
The public-facing web is the rest of the resources outside /admin, but
for now there is only home, to test whether it works as expected or not.
The public-facing web can not relay on the user’s language settings, as
the guest user has no way to set that. I would be happy to just use the
Accept-Language header for that, but apparently Google does not use that
header[0], and they give four alternatives: a country-specific domain,
a subdomain with a generic top-level domain (gTLD), subdirectories with
a gTLD, or URL parameters (e.g., site.com?loc=de).
Of the four, Google does not recommend URL parameters, and the customer
is already using subdirectories with the current site, therefor that’s
what i have chosen.
Google also tells me that it is a very good idea to have links between
localized version of the same resources, either with <link> elements,
Link HTTP response headers, or a sitemap file[1]; they are all
equivalent in the eyes of Google.
I have choosen the Link response headers way, because for that i can
simply “augment” ResponseHeader to automatically add these headers when
the response status is 2xx, otherwise i would need to pass down the
original URL path until it reaches the template.
Even though Camper is supposed to be a “generic”, multi-company
application, i think i will stick to the easiest route and write the
templates for just the “first” customer.
[0]: https://developers.google.com/search/docs/specialty/international/managing-multi-regional-sites
[1]: https://developers.google.com/search/docs/specialty/international/localized-versions
2023-08-05 01:42:37 +00:00
msgctxt "title"
msgid "Home"
msgstr "Inici"
Add admin page to list the users
There is no way, for now, to add, edit or remove users, because
currently we only need to list users.
I can not give admins access to the user table, for security
permissions, so i had to create a new view. I could name it also ‘user’
in ‘camper’ scheme, but then i was afraid i would have problems with
unit tests and their search_path, so instead i called it
‘company_user_profile’, which is like ‘user_profile’ but for all users
in ‘company_user’.
I created a new Go package for it, rather than add the admin handler in
‘auth’, because ‘template’ depends on ‘auth’, and rendering from ‘auth’
would cause a dependency loop.
I needed to have the roles in gettext to translate them, but there is
no obvious place where to put the call to PgettextNoop. For now, there
are in ‘NewAdminHandler’ because it is called once in the application’s
lifetime and they actually do not matter much.
2024-01-17 18:42:47 +00:00
#: web/templates/public/home.gohtml:25
2023-09-05 02:40:48 +00:00
msgctxt "link"
msgid "Booking"
msgstr "Reserva"
Add admin page to list the users
There is no way, for now, to add, edit or remove users, because
currently we only need to list users.
I can not give admins access to the user table, for security
permissions, so i had to create a new view. I could name it also ‘user’
in ‘camper’ scheme, but then i was afraid i would have problems with
unit tests and their search_path, so instead i called it
‘company_user_profile’, which is like ‘user_profile’ but for all users
in ‘company_user’.
I created a new Go package for it, rather than add the admin handler in
‘auth’, because ‘template’ depends on ‘auth’, and rendering from ‘auth’
would cause a dependency loop.
I needed to have the roles in gettext to translate them, but there is
no obvious place where to put the call to PgettextNoop. For now, there
are in ‘NewAdminHandler’ because it is called once in the application’s
lifetime and they actually do not matter much.
2024-01-17 18:42:47 +00:00
#: web/templates/public/home.gohtml:28
Add home’s cover carousel
This is a separate carousel from the one displayed at the bottom with
location info; it is, i suppose, a carousel for the hero image.
For the database, it works exactly as the home carousel, but on the
front had to use AlpineJS instead of Slick because it needs to show a
text popping up from the bottom when the slide is show, something i do
not know how to do in Slick.
It now makes no sense to have the carousel inside the “nature” section,
because the heading is no longer in there, and moved it out into a new
“hero” div.
Since i now have two carousels in home, i had to add additional
attributes to carousel.AdminHandler to know which URL to point to when
POSTing, PUTting, or redirecting.
2024-01-16 20:05:52 +00:00
msgid "The pleasure of camping in the middle of nature…"
msgstr "El plaer d’ acampar en plena natura…"
Add admin page to list the users
There is no way, for now, to add, edit or remove users, because
currently we only need to list users.
I can not give admins access to the user table, for security
permissions, so i had to create a new view. I could name it also ‘user’
in ‘camper’ scheme, but then i was afraid i would have problems with
unit tests and their search_path, so instead i called it
‘company_user_profile’, which is like ‘user_profile’ but for all users
in ‘company_user’.
I created a new Go package for it, rather than add the admin handler in
‘auth’, because ‘template’ depends on ‘auth’, and rendering from ‘auth’
would cause a dependency loop.
I needed to have the roles in gettext to translate them, but there is
no obvious place where to put the call to PgettextNoop. For now, there
are in ‘NewAdminHandler’ because it is called once in the application’s
lifetime and they actually do not matter much.
2024-01-17 18:42:47 +00:00
#: web/templates/public/home.gohtml:40
2023-09-05 02:40:48 +00:00
msgid "Our services"
msgstr "Els nostres serveis"
Add admin page to list the users
There is no way, for now, to add, edit or remove users, because
currently we only need to list users.
I can not give admins access to the user table, for security
permissions, so i had to create a new view. I could name it also ‘user’
in ‘camper’ scheme, but then i was afraid i would have problems with
unit tests and their search_path, so instead i called it
‘company_user_profile’, which is like ‘user_profile’ but for all users
in ‘company_user’.
I created a new Go package for it, rather than add the admin handler in
‘auth’, because ‘template’ depends on ‘auth’, and rendering from ‘auth’
would cause a dependency loop.
I needed to have the roles in gettext to translate them, but there is
no obvious place where to put the call to PgettextNoop. For now, there
are in ‘NewAdminHandler’ because it is called once in the application’s
lifetime and they actually do not matter much.
2024-01-17 18:42:47 +00:00
#: web/templates/public/home.gohtml:44
Add home’s cover carousel
This is a separate carousel from the one displayed at the bottom with
location info; it is, i suppose, a carousel for the hero image.
For the database, it works exactly as the home carousel, but on the
front had to use AlpineJS instead of Slick because it needs to show a
text popping up from the bottom when the slide is show, something i do
not know how to do in Slick.
It now makes no sense to have the carousel inside the “nature” section,
because the heading is no longer in there, and moved it out into a new
“hero” div.
Since i now have two carousels in home, i had to add additional
attributes to carousel.AdminHandler to know which URL to point to when
POSTing, PUTting, or redirecting.
2024-01-16 20:05:52 +00:00
#: web/templates/public/surroundings.gohtml:7
#: web/templates/public/surroundings.gohtml:12
2024-02-29 15:59:30 +00:00
#: web/templates/public/layout.gohtml:69 web/templates/public/layout.gohtml:97
2024-01-21 21:44:04 +00:00
#: web/templates/admin/surroundings/form.gohtml:15
2024-01-27 21:51:41 +00:00
#: web/templates/admin/layout.gohtml:67
Add the services page
This page is more or less similar to home, in terms of database: it
has a carousel and a list of items; in this case, the definition of
campsite services.
As i said early, when adding the home carousel, this carousel has its
own relation and set of functions to manage slides. They are also
duplicated in Go code, but i think i will need to refactor it later to
a carousel package or something like that, because both relations have
the exact same fields and types, so it makes no sense to have twice the
same code.
I already did it with the CSS and JavaScript code, mostly because it was
easier to replace the `.surroundings div` selector with `.carousel`, and
because that way i can have a single template that loads and initializes
Slick.
There is no UI to create or edit service definitions, although there are
the SQL functions, because i have no more time now, and Oriol needs to
check that the style is correct for that page.
2023-09-17 01:42:16 +00:00
msgctxt "title"
2023-09-11 02:20:21 +00:00
msgid "Surroundings"
Add the services page
This page is more or less similar to home, in terms of database: it
has a carousel and a list of items; in this case, the definition of
campsite services.
As i said early, when adding the home carousel, this carousel has its
own relation and set of functions to manage slides. They are also
duplicated in Go code, but i think i will need to refactor it later to
a carousel package or something like that, because both relations have
the exact same fields and types, so it makes no sense to have twice the
same code.
I already did it with the CSS and JavaScript code, mostly because it was
easier to replace the `.surroundings div` selector with `.carousel`, and
because that way i can have a single template that loads and initializes
Slick.
There is no UI to create or edit service definitions, although there are
the SQL functions, because i have no more time now, and Oriol needs to
check that the style is correct for that page.
2023-09-17 01:42:16 +00:00
msgstr "L’ entorn"
2023-09-05 02:40:48 +00:00
Add admin page to list the users
There is no way, for now, to add, edit or remove users, because
currently we only need to list users.
I can not give admins access to the user table, for security
permissions, so i had to create a new view. I could name it also ‘user’
in ‘camper’ scheme, but then i was afraid i would have problems with
unit tests and their search_path, so instead i called it
‘company_user_profile’, which is like ‘user_profile’ but for all users
in ‘company_user’.
I created a new Go package for it, rather than add the admin handler in
‘auth’, because ‘template’ depends on ‘auth’, and rendering from ‘auth’
would cause a dependency loop.
I needed to have the roles in gettext to translate them, but there is
no obvious place where to put the call to PgettextNoop. For now, there
are in ‘NewAdminHandler’ because it is called once in the application’s
lifetime and they actually do not matter much.
2024-01-17 18:42:47 +00:00
#: web/templates/public/home.gohtml:47
2023-09-11 02:20:21 +00:00
msgid "Located in <strong>Alta Garrotxa</strong>, between the <strong>Pyrenees</strong> and the <strong>Costa Brava</strong>."
msgstr "Situats a l’ <strong>Alta Garrotxa</strong>, entre els <strong>Pirineus</strong> i la <strong>Costa Brava</strong>."
Add admin page to list the users
There is no way, for now, to add, edit or remove users, because
currently we only need to list users.
I can not give admins access to the user table, for security
permissions, so i had to create a new view. I could name it also ‘user’
in ‘camper’ scheme, but then i was afraid i would have problems with
unit tests and their search_path, so instead i called it
‘company_user_profile’, which is like ‘user_profile’ but for all users
in ‘company_user’.
I created a new Go package for it, rather than add the admin handler in
‘auth’, because ‘template’ depends on ‘auth’, and rendering from ‘auth’
would cause a dependency loop.
I needed to have the roles in gettext to translate them, but there is
no obvious place where to put the call to PgettextNoop. For now, there
are in ‘NewAdminHandler’ because it is called once in the application’s
lifetime and they actually do not matter much.
2024-01-17 18:42:47 +00:00
#: web/templates/public/home.gohtml:48
2023-09-11 02:20:21 +00:00
msgid "Nearby there are the <strong>gorges of Sadernes</strong>, <strong>volcanoes</strong>, <strong>La Fageda d’ en Jordà</strong>, the Jewish quarter of <strong>Besalú</strong>, the basaltic cliff of <strong>Castellfollit de la Roca</strong>… much to see and much to do."
msgstr "A prop teniu els <strong>gorgs de Sadernes</strong>, <strong>volcans</strong>, <strong>La Fageda d’ en Jordà</strong>, el call jueu de <strong>Besalú</strong>, la cinglera basàltica de <strong>Castellfollit de la Roca</strong>… molt per veure i molt per fer."
Add admin page to list the users
There is no way, for now, to add, edit or remove users, because
currently we only need to list users.
I can not give admins access to the user table, for security
permissions, so i had to create a new view. I could name it also ‘user’
in ‘camper’ scheme, but then i was afraid i would have problems with
unit tests and their search_path, so instead i called it
‘company_user_profile’, which is like ‘user_profile’ but for all users
in ‘company_user’.
I created a new Go package for it, rather than add the admin handler in
‘auth’, because ‘template’ depends on ‘auth’, and rendering from ‘auth’
would cause a dependency loop.
I needed to have the roles in gettext to translate them, but there is
no obvious place where to put the call to PgettextNoop. For now, there
are in ‘NewAdminHandler’ because it is called once in the application’s
lifetime and they actually do not matter much.
2024-01-17 18:42:47 +00:00
#: web/templates/public/home.gohtml:49
2023-09-11 02:20:21 +00:00
msgid "Less than an hour from <strong>Girona</strong>, one from <strong>La Bisbal d’ Empordà</strong>, and two from <strong>Barcelona</strong>."
msgstr "A menys d’ una hora de <strong>Girona</strong>, a una de <strong>La Bisbal d’ Empordà</strong> i a dues de <strong>Barcelona</strong>."
Add admin page to list the users
There is no way, for now, to add, edit or remove users, because
currently we only need to list users.
I can not give admins access to the user table, for security
permissions, so i had to create a new view. I could name it also ‘user’
in ‘camper’ scheme, but then i was afraid i would have problems with
unit tests and their search_path, so instead i called it
‘company_user_profile’, which is like ‘user_profile’ but for all users
in ‘company_user’.
I created a new Go package for it, rather than add the admin handler in
‘auth’, because ‘template’ depends on ‘auth’, and rendering from ‘auth’
would cause a dependency loop.
I needed to have the roles in gettext to translate them, but there is
no obvious place where to put the call to PgettextNoop. For now, there
are in ‘NewAdminHandler’ because it is called once in the application’s
lifetime and they actually do not matter much.
2024-01-17 18:42:47 +00:00
#: web/templates/public/home.gohtml:50
2024-02-06 09:55:29 +00:00
msgid "Discover"
msgstr "Descobreix"
2023-09-11 02:20:21 +00:00
2024-04-19 09:29:43 +00:00
#: web/templates/public/form.gohtml:28 web/templates/admin/form.gohtml:28
msgctxt "input"
msgid "Month"
msgstr "Mes"
#: web/templates/public/form.gohtml:30 web/templates/admin/form.gohtml:30
#: pkg/season/admin.go:183
msgctxt "month"
msgid "January"
msgstr "gener"
#: web/templates/public/form.gohtml:31 web/templates/admin/form.gohtml:31
#: pkg/season/admin.go:184
msgctxt "month"
msgid "February"
msgstr "febrer"
#: web/templates/public/form.gohtml:32 web/templates/admin/form.gohtml:32
#: pkg/season/admin.go:185
msgctxt "month"
msgid "March"
msgstr "març"
#: web/templates/public/form.gohtml:33 web/templates/admin/form.gohtml:33
#: pkg/season/admin.go:186
msgctxt "month"
msgid "April"
msgstr "abril"
#: web/templates/public/form.gohtml:34 web/templates/admin/form.gohtml:34
#: pkg/season/admin.go:187
msgctxt "month"
msgid "May"
msgstr "maig"
#: web/templates/public/form.gohtml:35 web/templates/admin/form.gohtml:35
#: pkg/season/admin.go:188
msgctxt "month"
msgid "June"
msgstr "juny"
#: web/templates/public/form.gohtml:36 web/templates/admin/form.gohtml:36
#: pkg/season/admin.go:189
msgctxt "month"
msgid "July"
msgstr "juliol"
#: web/templates/public/form.gohtml:37 web/templates/admin/form.gohtml:37
#: pkg/season/admin.go:190
msgctxt "month"
msgid "August"
msgstr "agost"
#: web/templates/public/form.gohtml:38 web/templates/admin/form.gohtml:38
#: pkg/season/admin.go:191
msgctxt "month"
msgid "September"
msgstr "setembre"
#: web/templates/public/form.gohtml:39 web/templates/admin/form.gohtml:39
#: pkg/season/admin.go:192
msgctxt "month"
msgid "October"
msgstr "octubre"
#: web/templates/public/form.gohtml:40 web/templates/admin/form.gohtml:40
#: pkg/season/admin.go:193
msgctxt "month"
msgid "November"
msgstr "novembre"
#: web/templates/public/form.gohtml:41 web/templates/admin/form.gohtml:41
#: pkg/season/admin.go:194
msgctxt "month"
msgid "December"
msgstr "desembre"
#: web/templates/public/form.gohtml:45 web/templates/admin/form.gohtml:45
msgctxt "input"
msgid "Year"
msgstr "Any"
2024-04-28 18:28:45 +00:00
#: web/templates/public/form.gohtml:83 web/templates/admin/form.gohtml:83
msgctxt "action"
msgid "Filters"
msgstr "Filtres"
2024-05-03 17:13:49 +00:00
#: web/templates/public/form.gohtml:93 web/templates/admin/form.gohtml:93
#: web/templates/admin/prebooking/results.gohtml:20
msgctxt "action"
msgid "Load more"
msgstr "Carrega’ n més"
Handle the booking cart entirely with HTMx
Besides the dynamic final cart, that was already handled by HTMx, i had
to check the maximum number of guests, whether the accommodation allows
“overflow”, whether dogs are allowed, and that the booking dates were
within the campground’s opening and closing dates.
I could do all of this with AlpineJS, but then i would have to add the
same validation to the backend, prior to accept the payment. Would not
make more sense to have them in a single place, namely the backend? With
HTMx i can do that.
However, i now have to create the form “piecemeal”, because i may not
have the whole information when the visitor arrives to the booking page,
and i still had the same problem as in commit d2858302efa—parsing the
whole form as is would leave guests and options field empty, rather than
at their minimum values.
One of the fieldsets in that booking form are the arrival and departure
dates, that are the sames we use in the campsite type’s page to
“preselect” these values. Since now are in a separate struct, i can
reuse the same type and validation logic for both pages, making my
JavaScript code useless, but requiring HTMx. I think this is a good
tradeoff, in fact.
2024-02-10 02:49:44 +00:00
#: web/templates/public/campsite/type.gohtml:49
“Finish” the new booking form
Had to bring the same fields that i have for a payment to booking,
except that some of those should be nullable, because it is unreasonable
to ask front desk to gather all customer data when they have a booking
via phone, for instance.
Therefore, i can not take advantage of the validation for customer data
that i use in the public-facing form, but, fortunately, most of the
validations where in separated functions, thus only had to rewrite that
one for this case.
I already have to create a booking from a payment, when receiving a
payment from the public instance, thus i made that function and reused
it here. Then i “overwrite” the newly created pre-booking with the
customer data from the form, and set is as confirmed, as we do not see
any point of allowing pre-bookings from employees.
2024-04-24 18:12:29 +00:00
#: web/templates/public/booking/fields.gohtml:278
2023-10-13 19:59:45 +00:00
msgctxt "action"
msgid "Book"
msgstr "Reserva"
Handle the booking cart entirely with HTMx
Besides the dynamic final cart, that was already handled by HTMx, i had
to check the maximum number of guests, whether the accommodation allows
“overflow”, whether dogs are allowed, and that the booking dates were
within the campground’s opening and closing dates.
I could do all of this with AlpineJS, but then i would have to add the
same validation to the backend, prior to accept the payment. Would not
make more sense to have them in a single place, namely the backend? With
HTMx i can do that.
However, i now have to create the form “piecemeal”, because i may not
have the whole information when the visitor arrives to the booking page,
and i still had the same problem as in commit d2858302efa—parsing the
whole form as is would leave guests and options field empty, rather than
at their minimum values.
One of the fieldsets in that booking form are the arrival and departure
dates, that are the sames we use in the campsite type’s page to
“preselect” these values. Since now are in a separate struct, i can
reuse the same type and validation logic for both pages, making my
JavaScript code useless, but requiring HTMx. I think this is a good
tradeoff, in fact.
2024-02-10 02:49:44 +00:00
#: web/templates/public/campsite/type.gohtml:57
2024-01-21 21:44:04 +00:00
#: web/templates/admin/season/index.gohtml:54
2023-12-22 02:32:40 +00:00
msgctxt "title"
msgid "Calendar"
msgstr "Calendari"
Handle the booking cart entirely with HTMx
Besides the dynamic final cart, that was already handled by HTMx, i had
to check the maximum number of guests, whether the accommodation allows
“overflow”, whether dogs are allowed, and that the booking dates were
within the campground’s opening and closing dates.
I could do all of this with AlpineJS, but then i would have to add the
same validation to the backend, prior to accept the payment. Would not
make more sense to have them in a single place, namely the backend? With
HTMx i can do that.
However, i now have to create the form “piecemeal”, because i may not
have the whole information when the visitor arrives to the booking page,
and i still had the same problem as in commit d2858302efa—parsing the
whole form as is would leave guests and options field empty, rather than
at their minimum values.
One of the fieldsets in that booking form are the arrival and departure
dates, that are the sames we use in the campsite type’s page to
“preselect” these values. Since now are in a separate struct, i can
reuse the same type and validation logic for both pages, making my
JavaScript code useless, but requiring HTMx. I think this is a good
tradeoff, in fact.
2024-02-10 02:49:44 +00:00
#: web/templates/public/campsite/type.gohtml:68
Add campsite_type_pet_cost relation to hold price of dogs in campsites
It is a separate relation, instead of having a field in campsite_type,
because not all campsite types allow dogs. I could have added a new
field to campsite_type, but then its values it would be meaningless for
campsites that do not allow dogs, and a nullable field is not a valid
solution because NULL means “unknown”, but we **do** know the price —
none.
A separate relation encodes the same information without ambiguities nor
null values, and, in fact, removed the dogs_allowed field from
campsite_type to prevent erroneous status, such as a campsite type that
allows dogs without having a cost — even if the cost is zero, it has to
be added to the new relation.
2024-02-10 05:18:30 +00:00
#: web/templates/admin/campsite/type/form.gohtml:153
2024-02-11 21:06:00 +00:00
#: web/templates/admin/campsite/type/option/form.gohtml:70
2023-10-01 19:14:39 +00:00
msgctxt "title"
msgid "Prices"
msgstr "Preus"
2024-02-11 20:45:00 +00:00
#: web/templates/public/campsite/type.gohtml:82
Compute and show the “cart” for the booking form
I have to ask number and age ranges of hosts of guests for all campsite
types, not only those that have price options for adults, children, etc.
because i must compute the tourist tax for adults. These numbers will
be used to generate de rows for guests when actually creating the
booking, which is not done already.
To satisfy the campsite types that do have a price per guest, not only
per night, i had to add the prices for each range in the
campsite_type_cost relation. If a campsite type does not have price
per person, then that should be zero; the website then does not display
the price.
The minimal price for any campsite type is one adult for one night,
thus to compute the price i need at least the campsite type, the dates,
and the number of adults, that has a minimum of one. I changed the
order of the form to ask for these values first, so i can compute the
initial price as soon as possible. To help further, i show the
<fieldset>s progressively when visitors select options.
2024-02-04 05:37:25 +00:00
msgid "%s: %s/night"
msgstr "%s: %s/nit"
2023-12-22 02:32:40 +00:00
2024-02-11 20:45:00 +00:00
#: web/templates/public/campsite/type.gohtml:84
msgid "%s: %s"
msgstr "%s: %s"
#: web/templates/public/campsite/type.gohtml:88
Compute and show the “cart” for the booking form
I have to ask number and age ranges of hosts of guests for all campsite
types, not only those that have price options for adults, children, etc.
because i must compute the tourist tax for adults. These numbers will
be used to generate de rows for guests when actually creating the
booking, which is not done already.
To satisfy the campsite types that do have a price per guest, not only
per night, i had to add the prices for each range in the
campsite_type_cost relation. If a campsite type does not have price
per person, then that should be zero; the website then does not display
the price.
The minimal price for any campsite type is one adult for one night,
thus to compute the price i need at least the campsite type, the dates,
and the number of adults, that has a minimum of one. I changed the
order of the form to ask for these values first, so i can compute the
initial price as soon as possible. To help further, i show the
<fieldset>s progressively when visitors select options.
2024-02-04 05:37:25 +00:00
msgid "%s/night"
msgstr "%s/nit"
2024-01-14 01:09:17 +00:00
2024-02-11 20:45:00 +00:00
#: web/templates/public/campsite/type.gohtml:96
2023-10-01 19:14:39 +00:00
msgid "*Minimum %d nights per stay"
msgstr "*Mínim %d nits per estada"
2024-02-11 20:45:00 +00:00
#: web/templates/public/campsite/type.gohtml:101
2024-01-15 00:45:58 +00:00
msgid "10 % VAT included."
msgstr "IVA del 10 % inclòs."
2024-02-11 20:45:00 +00:00
#: web/templates/public/campsite/type.gohtml:102
2024-02-27 18:45:47 +00:00
msgid "Tourist tax: %s/night per person aged 17 or older. Maximum %d nights."
msgstr "Impost turístic: %s/nit per persona major de 16 anys. Màxim %d nits."
2024-01-15 00:45:58 +00:00
2024-02-11 20:45:00 +00:00
#: web/templates/public/campsite/type.gohtml:104
2024-01-15 01:07:32 +00:00
msgid "Dogs: %s/night, tied, accompanied, and minimal barking."
Compute and show the “cart” for the booking form
I have to ask number and age ranges of hosts of guests for all campsite
types, not only those that have price options for adults, children, etc.
because i must compute the tourist tax for adults. These numbers will
be used to generate de rows for guests when actually creating the
booking, which is not done already.
To satisfy the campsite types that do have a price per guest, not only
per night, i had to add the prices for each range in the
campsite_type_cost relation. If a campsite type does not have price
per person, then that should be zero; the website then does not display
the price.
The minimal price for any campsite type is one adult for one night,
thus to compute the price i need at least the campsite type, the dates,
and the number of adults, that has a minimum of one. I changed the
order of the form to ask for these values first, so i can compute the
initial price as soon as possible. To help further, i show the
<fieldset>s progressively when visitors select options.
2024-02-04 05:37:25 +00:00
msgstr "Gossos: %s/nit, lligats, acompanyats i el mínim de lladrucs."
2024-01-15 01:07:32 +00:00
2024-02-11 20:45:00 +00:00
#: web/templates/public/campsite/type.gohtml:106
2024-01-15 01:07:32 +00:00
msgid "No dogs allowed."
msgstr "No es permeten gossos."
2024-02-11 20:45:00 +00:00
#: web/templates/public/campsite/type.gohtml:125
2023-10-13 11:40:48 +00:00
msgctxt "title"
msgid "Info"
msgstr "Informació"
2024-02-11 20:45:00 +00:00
#: web/templates/public/campsite/type.gohtml:129
2023-10-13 11:40:48 +00:00
msgctxt "title"
msgid "Facilities"
msgstr "Equipaments"
2024-02-11 20:45:00 +00:00
#: web/templates/public/campsite/type.gohtml:133
2023-10-13 11:40:48 +00:00
msgctxt "title"
msgid "Description"
msgstr "Descripció"
2024-02-11 20:45:00 +00:00
#: web/templates/public/campsite/type.gohtml:137
2024-01-14 23:28:34 +00:00
msgctxt "title"
msgid "Additional Information"
msgstr "Informació addicional"
2024-02-11 20:45:00 +00:00
#: web/templates/public/campsite/type.gohtml:140
2024-01-15 00:02:50 +00:00
msgctxt "time"
2024-01-22 19:19:19 +00:00
msgid "Check-in"
2024-01-15 00:02:50 +00:00
msgstr "Entrada"
2024-02-11 20:45:00 +00:00
#: web/templates/public/campsite/type.gohtml:144
2024-01-15 00:02:50 +00:00
msgctxt "time"
2024-01-22 19:19:19 +00:00
msgid "Check-out"
2024-01-15 00:02:50 +00:00
msgstr "Sortida"
Add the first draft of the booking and payment forms
The form is based on the one in the current website, but in a single
page instead of split into many pages; possibly each <fieldset> should
be in a separate page/view. The idea is for Oriol to check the design
and decide how it would be presented to the user, so i needed something
to show him first.
I hardcoded the **test** data for the customer’s Redsys account. Is
this bad? I hope not, but i am not really, really sure.
The data sent to Redsys is just a placeholder because there are booking
details that i do not know, like what i have to do with the “teenagers”
field or the area preferences, thus i can not yet have a booking
relation. Nevertheless, had to generate a random order number up to
12-chars in length or Redsys would refuse the payment, claiming that
the order is duplicated.
The Redsys package is based on the PHP code provided by Redsys
themselves, plus some hints at the implementations from various Go
packages that did not know why they were so complicated.
Had to grant select on table country to guest in order to show the
select with the country options.
I have changed the “Postal code” input in taxDetails for “Postcode”
because this is the spell that it is used in the current web, i did not
see a reason to change it—it is an accepted form—, and i did not want to
have inconsistencies between forms.
2023-10-19 19:37:34 +00:00
#: web/templates/public/campsite/calendar.gohtml:18
#: web/templates/admin/season/calendar.gohtml:16
msgctxt "day"
msgid "Mon"
msgstr "dl"
#: web/templates/public/campsite/calendar.gohtml:19
#: web/templates/admin/season/calendar.gohtml:17
msgctxt "day"
msgid "Tue"
msgstr "dt"
#: web/templates/public/campsite/calendar.gohtml:20
#: web/templates/admin/season/calendar.gohtml:18
msgctxt "day"
msgid "Wed"
msgstr "dc"
#: web/templates/public/campsite/calendar.gohtml:21
#: web/templates/admin/season/calendar.gohtml:19
msgctxt "day"
msgid "Thu"
msgstr "dj"
#: web/templates/public/campsite/calendar.gohtml:22
#: web/templates/admin/season/calendar.gohtml:20
msgctxt "day"
msgid "Fri"
msgstr "dv"
#: web/templates/public/campsite/calendar.gohtml:23
#: web/templates/admin/season/calendar.gohtml:21
msgctxt "day"
msgid "Sat"
msgstr "ds"
#: web/templates/public/campsite/calendar.gohtml:24
#: web/templates/admin/season/calendar.gohtml:22
msgctxt "day"
msgid "Sun"
msgstr "dg"
2024-01-23 13:53:15 +00:00
#: web/templates/public/surroundings.gohtml:30
Add the surroundings static page
This page is “highly stylized”, with a masonry-like grid, that i did not
know how to generate automatically from data defined in PostgreSQL,
therefore with Oriol we agreed to have this one as a static page and
we will see what we can do if the customer asks to be able to change
it.
I was a bit undecided on whether the icons in the bottom part of the
page should be defined in the CSS or with style="" and CSS variables,
like i do for the campsite type in the home page.
At first i thought that it should use CSS variables, mostly for
coherence: if another section of the web does it for its background
image, why no this one. The difference is that the home page is
dynamically created from the database, while this page is static and we
know what icons we need, thus it makes more sense to move it to the
stylesheet file, because then it will be downloaded by user agents that
actually want to use it (e.g., browsers, but not Braille terminals).
2023-09-16 22:11:39 +00:00
msgctxt "title"
msgid "What to Do Outside the Campsite?"
msgstr "Què fer des del càmping?"
2024-01-23 13:53:15 +00:00
#: web/templates/public/surroundings.gohtml:50
Add the surroundings static page
This page is “highly stylized”, with a masonry-like grid, that i did not
know how to generate automatically from data defined in PostgreSQL,
therefore with Oriol we agreed to have this one as a static page and
we will see what we can do if the customer asks to be able to change
it.
I was a bit undecided on whether the icons in the bottom part of the
page should be defined in the CSS or with style="" and CSS variables,
like i do for the campsite type in the home page.
At first i thought that it should use CSS variables, mostly for
coherence: if another section of the web does it for its background
image, why no this one. The difference is that the home page is
dynamically created from the database, while this page is static and we
know what icons we need, thus it makes more sense to move it to the
stylesheet file, because then it will be downloaded by user agents that
actually want to use it (e.g., browsers, but not Braille terminals).
2023-09-16 22:11:39 +00:00
msgctxt "title"
msgid "Once at the Campsite, We Can Inform You about What Activities are Available"
msgstr "Un cop en el càmping, us podem informar de quines activitats fer"
2024-01-23 13:53:15 +00:00
#: web/templates/public/surroundings.gohtml:53
Add the surroundings static page
This page is “highly stylized”, with a masonry-like grid, that i did not
know how to generate automatically from data defined in PostgreSQL,
therefore with Oriol we agreed to have this one as a static page and
we will see what we can do if the customer asks to be able to change
it.
I was a bit undecided on whether the icons in the bottom part of the
page should be defined in the CSS or with style="" and CSS variables,
like i do for the campsite type in the home page.
At first i thought that it should use CSS variables, mostly for
coherence: if another section of the web does it for its background
image, why no this one. The difference is that the home page is
dynamically created from the database, while this page is static and we
know what icons we need, thus it makes more sense to move it to the
stylesheet file, because then it will be downloaded by user agents that
actually want to use it (e.g., browsers, but not Braille terminals).
2023-09-16 22:11:39 +00:00
msgid "Cycle routes"
msgstr "Rutes amb bicicleta"
2024-01-23 13:53:15 +00:00
#: web/templates/public/surroundings.gohtml:54
Add the surroundings static page
This page is “highly stylized”, with a masonry-like grid, that i did not
know how to generate automatically from data defined in PostgreSQL,
therefore with Oriol we agreed to have this one as a static page and
we will see what we can do if the customer asks to be able to change
it.
I was a bit undecided on whether the icons in the bottom part of the
page should be defined in the CSS or with style="" and CSS variables,
like i do for the campsite type in the home page.
At first i thought that it should use CSS variables, mostly for
coherence: if another section of the web does it for its background
image, why no this one. The difference is that the home page is
dynamically created from the database, while this page is static and we
know what icons we need, thus it makes more sense to move it to the
stylesheet file, because then it will be downloaded by user agents that
actually want to use it (e.g., browsers, but not Braille terminals).
2023-09-16 22:11:39 +00:00
msgid "There are many bicycle rental companies in Olot."
msgstr "A Olot podeu trobar empreses de lloguer de bicicletes."
2024-01-23 13:53:15 +00:00
#: web/templates/public/surroundings.gohtml:58
Add the surroundings static page
This page is “highly stylized”, with a masonry-like grid, that i did not
know how to generate automatically from data defined in PostgreSQL,
therefore with Oriol we agreed to have this one as a static page and
we will see what we can do if the customer asks to be able to change
it.
I was a bit undecided on whether the icons in the bottom part of the
page should be defined in the CSS or with style="" and CSS variables,
like i do for the campsite type in the home page.
At first i thought that it should use CSS variables, mostly for
coherence: if another section of the web does it for its background
image, why no this one. The difference is that the home page is
dynamically created from the database, while this page is static and we
know what icons we need, thus it makes more sense to move it to the
stylesheet file, because then it will be downloaded by user agents that
actually want to use it (e.g., browsers, but not Braille terminals).
2023-09-16 22:11:39 +00:00
msgid "Routes"
msgstr "Rutes"
2024-01-23 13:53:15 +00:00
#: web/templates/public/surroundings.gohtml:59
Add the surroundings static page
This page is “highly stylized”, with a masonry-like grid, that i did not
know how to generate automatically from data defined in PostgreSQL,
therefore with Oriol we agreed to have this one as a static page and
we will see what we can do if the customer asks to be able to change
it.
I was a bit undecided on whether the icons in the bottom part of the
page should be defined in the CSS or with style="" and CSS variables,
like i do for the campsite type in the home page.
At first i thought that it should use CSS variables, mostly for
coherence: if another section of the web does it for its background
image, why no this one. The difference is that the home page is
dynamically created from the database, while this page is static and we
know what icons we need, thus it makes more sense to move it to the
stylesheet file, because then it will be downloaded by user agents that
actually want to use it (e.g., browsers, but not Braille terminals).
2023-09-16 22:11:39 +00:00
msgid "Routes of all kinds, climbing, mountain passes, for all levels."
msgstr "Rutes de tota mena, escalada, ports de muntanya, per a tots els nivells."
2024-01-23 13:53:15 +00:00
#: web/templates/public/surroundings.gohtml:63
Add the surroundings static page
This page is “highly stylized”, with a masonry-like grid, that i did not
know how to generate automatically from data defined in PostgreSQL,
therefore with Oriol we agreed to have this one as a static page and
we will see what we can do if the customer asks to be able to change
it.
I was a bit undecided on whether the icons in the bottom part of the
page should be defined in the CSS or with style="" and CSS variables,
like i do for the campsite type in the home page.
At first i thought that it should use CSS variables, mostly for
coherence: if another section of the web does it for its background
image, why no this one. The difference is that the home page is
dynamically created from the database, while this page is static and we
know what icons we need, thus it makes more sense to move it to the
stylesheet file, because then it will be downloaded by user agents that
actually want to use it (e.g., browsers, but not Braille terminals).
2023-09-16 22:11:39 +00:00
msgid "Family outing"
msgstr "Excursions familiars"
2024-01-23 13:53:15 +00:00
#: web/templates/public/surroundings.gohtml:64
Add the surroundings static page
This page is “highly stylized”, with a masonry-like grid, that i did not
know how to generate automatically from data defined in PostgreSQL,
therefore with Oriol we agreed to have this one as a static page and
we will see what we can do if the customer asks to be able to change
it.
I was a bit undecided on whether the icons in the bottom part of the
page should be defined in the CSS or with style="" and CSS variables,
like i do for the campsite type in the home page.
At first i thought that it should use CSS variables, mostly for
coherence: if another section of the web does it for its background
image, why no this one. The difference is that the home page is
dynamically created from the database, while this page is static and we
know what icons we need, thus it makes more sense to move it to the
stylesheet file, because then it will be downloaded by user agents that
actually want to use it (e.g., browsers, but not Braille terminals).
2023-09-16 22:11:39 +00:00
msgid "Many outing possibilities, for all ages."
msgstr "Múltiples excursions per a totes les edats."
2024-01-23 13:53:15 +00:00
#: web/templates/public/surroundings.gohtml:68
Add the surroundings static page
This page is “highly stylized”, with a masonry-like grid, that i did not
know how to generate automatically from data defined in PostgreSQL,
therefore with Oriol we agreed to have this one as a static page and
we will see what we can do if the customer asks to be able to change
it.
I was a bit undecided on whether the icons in the bottom part of the
page should be defined in the CSS or with style="" and CSS variables,
like i do for the campsite type in the home page.
At first i thought that it should use CSS variables, mostly for
coherence: if another section of the web does it for its background
image, why no this one. The difference is that the home page is
dynamically created from the database, while this page is static and we
know what icons we need, thus it makes more sense to move it to the
stylesheet file, because then it will be downloaded by user agents that
actually want to use it (e.g., browsers, but not Braille terminals).
2023-09-16 22:11:39 +00:00
msgid "Kayak"
msgstr "Caiac"
2024-01-23 13:53:15 +00:00
#: web/templates/public/surroundings.gohtml:69
Add the surroundings static page
This page is “highly stylized”, with a masonry-like grid, that i did not
know how to generate automatically from data defined in PostgreSQL,
therefore with Oriol we agreed to have this one as a static page and
we will see what we can do if the customer asks to be able to change
it.
I was a bit undecided on whether the icons in the bottom part of the
page should be defined in the CSS or with style="" and CSS variables,
like i do for the campsite type in the home page.
At first i thought that it should use CSS variables, mostly for
coherence: if another section of the web does it for its background
image, why no this one. The difference is that the home page is
dynamically created from the database, while this page is static and we
know what icons we need, thus it makes more sense to move it to the
stylesheet file, because then it will be downloaded by user agents that
actually want to use it (e.g., browsers, but not Braille terminals).
2023-09-16 22:11:39 +00:00
msgid "There are several points where you can go by kayak, from sections of the Ter river as well as on the coast…."
msgstr "Hi ha diversos punts on poder anar amb caiac, des de trams del riu Ter com també a la costa…."
Add home’s cover carousel
This is a separate carousel from the one displayed at the bottom with
location info; it is, i suppose, a carousel for the hero image.
For the database, it works exactly as the home carousel, but on the
front had to use AlpineJS instead of Slick because it needs to show a
text popping up from the bottom when the slide is show, something i do
not know how to do in Slick.
It now makes no sense to have the carousel inside the “nature” section,
because the heading is no longer in there, and moved it out into a new
“hero” div.
Since i now have two carousels in home, i had to add additional
attributes to carousel.AdminHandler to know which URL to point to when
POSTing, PUTting, or redirecting.
2024-01-16 20:05:52 +00:00
#: web/templates/public/campground.gohtml:7
#: web/templates/public/campground.gohtml:16
2024-02-29 15:59:30 +00:00
#: web/templates/public/layout.gohtml:55 web/templates/public/layout.gohtml:95
2023-10-06 20:14:11 +00:00
msgctxt "title"
msgid "Campground"
msgstr "El càmping"
2024-01-29 13:37:27 +00:00
#: web/templates/public/campground.gohtml:20
msgctxt "title"
msgid "Legend"
msgstr "Llegenda"
#: web/templates/public/campground.gohtml:21
msgctxt "title"
msgid "Entrance"
msgstr "Entrada"
#: web/templates/public/campground.gohtml:23
msgctxt "legend"
msgid "Information"
msgstr "Informació"
#: web/templates/public/campground.gohtml:24
msgctxt "legend"
msgid "Shop"
msgstr "Botiga"
#: web/templates/public/campground.gohtml:25
msgctxt "legend"
msgid "Restaurant"
msgstr "Restaurant"
#: web/templates/public/campground.gohtml:26
msgctxt "legend"
msgid "Bar"
msgstr "Bar"
#: web/templates/public/campground.gohtml:27
msgctxt "legend"
msgid "TV room"
msgstr "Sala de televisió"
#: web/templates/public/campground.gohtml:28
msgctxt "legend"
msgid "Game room"
msgstr " Sala de jocs"
#: web/templates/public/campground.gohtml:29
msgctxt "legend"
msgid "Recycling"
msgstr "Reciclatge"
#: web/templates/public/campground.gohtml:30
msgctxt "legend"
msgid "Waste"
msgstr "Escombraries"
#: web/templates/public/campground.gohtml:31
msgctxt "legend"
msgid "Service station"
msgstr "Estació de servei"
#: web/templates/public/campground.gohtml:33
msgctxt "title"
msgid "Playtime"
msgstr "Esbarjo"
#: web/templates/public/campground.gohtml:35
msgctxt "legend"
msgid "Pool"
msgstr "Piscina"
#: web/templates/public/campground.gohtml:36
msgctxt "legend"
msgid "Playground"
msgstr "Parc infantil"
#: web/templates/public/campground.gohtml:37
msgctxt "legend"
msgid "Sports field"
msgstr " Camp d’ esports"
#: web/templates/public/campground.gohtml:39
msgctxt "title"
“Finish” the new booking form
Had to bring the same fields that i have for a payment to booking,
except that some of those should be nullable, because it is unreasonable
to ask front desk to gather all customer data when they have a booking
via phone, for instance.
Therefore, i can not take advantage of the validation for customer data
that i use in the public-facing form, but, fortunately, most of the
validations where in separated functions, thus only had to rewrite that
one for this case.
I already have to create a booking from a payment, when receiving a
payment from the public instance, thus i made that function and reused
it here. Then i “overwrite” the newly created pre-booking with the
customer data from the form, and set is as confirmed, as we do not see
any point of allowing pre-bookings from employees.
2024-04-24 18:12:29 +00:00
msgid "Accommodations"
2024-01-29 13:37:27 +00:00
msgstr "Allotjaments"
#: web/templates/public/campground.gohtml:41
msgctxt "legend"
msgid "Wooden lodge"
msgstr "Cabana de fusta"
#: web/templates/public/campground.gohtml:42
msgctxt "legend"
msgid "Bungalow"
msgstr "Bungalou"
#: web/templates/public/campground.gohtml:43
msgctxt "legend"
msgid "Safari tent"
msgstr "Safari tent"
#: web/templates/public/campground.gohtml:45
msgctxt "title"
msgid "Main Building"
msgstr "Edifici central"
#: web/templates/public/campground.gohtml:47
msgctxt "legend"
msgid "Restroom"
msgstr "Lavabo"
#: web/templates/public/campground.gohtml:48
msgctxt "legend"
msgid "Shower"
msgstr "Dutxes"
#: web/templates/public/campground.gohtml:49
msgctxt "legend"
msgid "Baby bath"
msgstr "Bany per nadons"
#: web/templates/public/campground.gohtml:50
msgctxt "legend"
msgid "Washing machine"
msgstr "Rentador"
#: web/templates/public/campground.gohtml:51
msgctxt "legend"
msgid "Clothesline"
msgstr "Estenedors"
#: web/templates/public/campground.gohtml:52
msgctxt "legend"
msgid "Barbecue"
msgstr "Barbacoa"
#: web/templates/public/campground.gohtml:53
msgctxt "legend"
msgid "Chemical waste disposal"
msgstr "Buidatge vàters químic"
#: web/templates/public/campground.gohtml:55
msgctxt "title"
msgid "Throughout the Campground"
msgstr "A tot el càmping"
#: web/templates/public/campground.gohtml:57
msgctxt "legend"
msgid "Fire extinguisher"
msgstr "Extintors"
#: web/templates/public/campground.gohtml:58
msgctxt "legend"
msgid "Faucet"
msgstr "Aixeta"
2024-02-29 15:59:30 +00:00
#: web/templates/public/layout.gohtml:12 web/templates/public/layout.gohtml:49
Compute and show the “cart” for the booking form
I have to ask number and age ranges of hosts of guests for all campsite
types, not only those that have price options for adults, children, etc.
because i must compute the tourist tax for adults. These numbers will
be used to generate de rows for guests when actually creating the
booking, which is not done already.
To satisfy the campsite types that do have a price per guest, not only
per night, i had to add the prices for each range in the
campsite_type_cost relation. If a campsite type does not have price
per person, then that should be zero; the website then does not display
the price.
The minimal price for any campsite type is one adult for one night,
thus to compute the price i need at least the campsite type, the dates,
and the number of adults, that has a minimum of one. I changed the
order of the form to ask for these values first, so i can compute the
initial price as soon as possible. To help further, i show the
<fieldset>s progressively when visitors select options.
2024-02-04 05:37:25 +00:00
msgid "Campsite Montagut"
msgstr "Càmping Montagut"
2024-02-29 15:59:30 +00:00
#: web/templates/public/layout.gohtml:25 web/templates/admin/layout.gohtml:21
Compute and show the “cart” for the booking form
I have to ask number and age ranges of hosts of guests for all campsite
types, not only those that have price options for adults, children, etc.
because i must compute the tourist tax for adults. These numbers will
be used to generate de rows for guests when actually creating the
booking, which is not done already.
To satisfy the campsite types that do have a price per guest, not only
per night, i had to add the prices for each range in the
campsite_type_cost relation. If a campsite type does not have price
per person, then that should be zero; the website then does not display
the price.
The minimal price for any campsite type is one adult for one night,
thus to compute the price i need at least the campsite type, the dates,
and the number of adults, that has a minimum of one. I changed the
order of the form to ask for these values first, so i can compute the
initial price as soon as possible. To help further, i show the
<fieldset>s progressively when visitors select options.
2024-02-04 05:37:25 +00:00
msgid "Skip to main content"
msgstr "Salta al contingut principal"
2024-02-29 15:59:30 +00:00
#: web/templates/public/layout.gohtml:51
Compute and show the “cart” for the booking form
I have to ask number and age ranges of hosts of guests for all campsite
types, not only those that have price options for adults, children, etc.
because i must compute the tourist tax for adults. These numbers will
be used to generate de rows for guests when actually creating the
booking, which is not done already.
To satisfy the campsite types that do have a price per guest, not only
per night, i had to add the prices for each range in the
campsite_type_cost relation. If a campsite type does not have price
per person, then that should be zero; the website then does not display
the price.
The minimal price for any campsite type is one adult for one night,
thus to compute the price i need at least the campsite type, the dates,
and the number of adults, that has a minimum of one. I changed the
order of the form to ask for these values first, so i can compute the
initial price as soon as possible. To help further, i show the
<fieldset>s progressively when visitors select options.
2024-02-04 05:37:25 +00:00
msgid "Menu"
msgstr "Menú"
2024-02-29 15:59:30 +00:00
#: web/templates/public/layout.gohtml:59 web/templates/public/layout.gohtml:105
Compute and show the “cart” for the booking form
I have to ask number and age ranges of hosts of guests for all campsite
types, not only those that have price options for adults, children, etc.
because i must compute the tourist tax for adults. These numbers will
be used to generate de rows for guests when actually creating the
booking, which is not done already.
To satisfy the campsite types that do have a price per guest, not only
per night, i had to add the prices for each range in the
campsite_type_cost relation. If a campsite type does not have price
per person, then that should be zero; the website then does not display
the price.
The minimal price for any campsite type is one adult for one night,
thus to compute the price i need at least the campsite type, the dates,
and the number of adults, that has a minimum of one. I changed the
order of the form to ask for these values first, so i can compute the
initial price as soon as possible. To help further, i show the
<fieldset>s progressively when visitors select options.
2024-02-04 05:37:25 +00:00
#: web/templates/admin/campsite/feature/form.gohtml:16
#: web/templates/admin/campsite/feature/index.gohtml:10
#: web/templates/admin/campsite/carousel/form.gohtml:16
#: web/templates/admin/campsite/carousel/index.gohtml:10
#: web/templates/admin/campsite/form.gohtml:15
#: web/templates/admin/campsite/index.gohtml:6
2024-04-19 19:09:28 +00:00
#: web/templates/admin/campsite/index.gohtml:18
Compute and show the “cart” for the booking form
I have to ask number and age ranges of hosts of guests for all campsite
types, not only those that have price options for adults, children, etc.
because i must compute the tourist tax for adults. These numbers will
be used to generate de rows for guests when actually creating the
booking, which is not done already.
To satisfy the campsite types that do have a price per guest, not only
per night, i had to add the prices for each range in the
campsite_type_cost relation. If a campsite type does not have price
per person, then that should be zero; the website then does not display
the price.
The minimal price for any campsite type is one adult for one night,
thus to compute the price i need at least the campsite type, the dates,
and the number of adults, that has a minimum of one. I changed the
order of the form to ask for these values first, so i can compute the
initial price as soon as possible. To help further, i show the
<fieldset>s progressively when visitors select options.
2024-02-04 05:37:25 +00:00
#: web/templates/admin/campsite/type/feature/form.gohtml:16
#: web/templates/admin/campsite/type/feature/index.gohtml:10
#: web/templates/admin/campsite/type/carousel/form.gohtml:16
#: web/templates/admin/campsite/type/carousel/index.gohtml:10
#: web/templates/admin/campsite/type/form.gohtml:15
#: web/templates/admin/campsite/type/option/form.gohtml:16
#: web/templates/admin/campsite/type/option/index.gohtml:10
#: web/templates/admin/campsite/type/index.gohtml:10
2024-05-02 23:01:01 +00:00
#: web/templates/admin/layout.gohtml:46 web/templates/admin/layout.gohtml:104
2024-04-26 15:09:36 +00:00
#: web/templates/admin/booking/fields.gohtml:266
Compute and show the “cart” for the booking form
I have to ask number and age ranges of hosts of guests for all campsite
types, not only those that have price options for adults, children, etc.
because i must compute the tourist tax for adults. These numbers will
be used to generate de rows for guests when actually creating the
booking, which is not done already.
To satisfy the campsite types that do have a price per guest, not only
per night, i had to add the prices for each range in the
campsite_type_cost relation. If a campsite type does not have price
per person, then that should be zero; the website then does not display
the price.
The minimal price for any campsite type is one adult for one night,
thus to compute the price i need at least the campsite type, the dates,
and the number of adults, that has a minimum of one. I changed the
order of the form to ask for these values first, so i can compute the
initial price as soon as possible. To help further, i show the
<fieldset>s progressively when visitors select options.
2024-02-04 05:37:25 +00:00
msgctxt "title"
msgid "Campsites"
msgstr "Allotjaments"
2024-02-29 15:59:30 +00:00
#: web/templates/public/layout.gohtml:92
Compute and show the “cart” for the booking form
I have to ask number and age ranges of hosts of guests for all campsite
types, not only those that have price options for adults, children, etc.
because i must compute the tourist tax for adults. These numbers will
be used to generate de rows for guests when actually creating the
booking, which is not done already.
To satisfy the campsite types that do have a price per guest, not only
per night, i had to add the prices for each range in the
campsite_type_cost relation. If a campsite type does not have price
per person, then that should be zero; the website then does not display
the price.
The minimal price for any campsite type is one adult for one night,
thus to compute the price i need at least the campsite type, the dates,
and the number of adults, that has a minimum of one. I changed the
order of the form to ask for these values first, so i can compute the
initial price as soon as possible. To help further, i show the
<fieldset>s progressively when visitors select options.
2024-02-04 05:37:25 +00:00
msgctxt "title"
msgid "Sections"
msgstr "Apartats"
2024-02-29 15:59:30 +00:00
#: web/templates/public/layout.gohtml:116
Compute and show the “cart” for the booking form
I have to ask number and age ranges of hosts of guests for all campsite
types, not only those that have price options for adults, children, etc.
because i must compute the tourist tax for adults. These numbers will
be used to generate de rows for guests when actually creating the
booking, which is not done already.
To satisfy the campsite types that do have a price per guest, not only
per night, i had to add the prices for each range in the
campsite_type_cost relation. If a campsite type does not have price
per person, then that should be zero; the website then does not display
the price.
The minimal price for any campsite type is one adult for one night,
thus to compute the price i need at least the campsite type, the dates,
and the number of adults, that has a minimum of one. I changed the
order of the form to ask for these values first, so i can compute the
initial price as soon as possible. To help further, i show the
<fieldset>s progressively when visitors select options.
2024-02-04 05:37:25 +00:00
msgctxt "title"
msgid "Opening"
msgstr "Obertura"
2024-02-29 15:59:30 +00:00
#: web/templates/public/layout.gohtml:123
Compute and show the “cart” for the booking form
I have to ask number and age ranges of hosts of guests for all campsite
types, not only those that have price options for adults, children, etc.
because i must compute the tourist tax for adults. These numbers will
be used to generate de rows for guests when actually creating the
booking, which is not done already.
To satisfy the campsite types that do have a price per guest, not only
per night, i had to add the prices for each range in the
campsite_type_cost relation. If a campsite type does not have price
per person, then that should be zero; the website then does not display
the price.
The minimal price for any campsite type is one adult for one night,
thus to compute the price i need at least the campsite type, the dates,
and the number of adults, that has a minimum of one. I changed the
order of the form to ask for these values first, so i can compute the
initial price as soon as possible. To help further, i show the
<fieldset>s progressively when visitors select options.
2024-02-04 05:37:25 +00:00
msgid "<abbr title=\"Catalonia Tourism Registry\">RTC</abbr> <abbr title=\"Number\">#</abbr>%s"
msgstr "<abbr title=\"Número\">Núm.</abbr> <abbr title=\"Registre de Turisme de Catalunya\">RTC</abbr> %s"
2024-02-29 15:59:30 +00:00
#: web/templates/public/layout.gohtml:132
2024-02-26 18:13:17 +00:00
msgctxt "title"
msgid "Credits"
msgstr "Crèdits"
2024-02-29 15:59:30 +00:00
#: web/templates/public/layout.gohtml:132
2024-02-26 18:13:17 +00:00
msgctxt "title"
msgid "Terms and Conditions"
msgstr "Avís legal"
2024-02-29 15:59:30 +00:00
#: web/templates/public/layout.gohtml:132
2024-02-26 18:13:17 +00:00
msgctxt "title"
msgid "Reservation Conditions"
msgstr "Condicions de reserva"
2024-02-29 15:59:30 +00:00
#: web/templates/public/booking/page.gohtml:19
2024-02-24 19:03:11 +00:00
msgid "Sorry, there was a problem. You’ ll find more details highlighted below."
msgstr "Hi ha hagut un problema. Trobeu més informació ressaltada a baix."
2024-02-29 15:59:30 +00:00
#: web/templates/public/booking/page.gohtml:24
2024-02-26 15:00:29 +00:00
msgid "Payment is in test mode. You can make the booking regardless, but no money will be charged. We will send you an additional email with instructions on how to perform the payment."
msgstr "El pagament està en mode de proves. Igualment podeu fer la reserva, però no se us farà cap càrrec. Us enviarem un correu addicional amb instruccions sobre com realitzar el pagament."
2024-02-29 15:59:30 +00:00
#: web/templates/public/booking/fields.gohtml:27
Compute and show the “cart” for the booking form
I have to ask number and age ranges of hosts of guests for all campsite
types, not only those that have price options for adults, children, etc.
because i must compute the tourist tax for adults. These numbers will
be used to generate de rows for guests when actually creating the
booking, which is not done already.
To satisfy the campsite types that do have a price per guest, not only
per night, i had to add the prices for each range in the
campsite_type_cost relation. If a campsite type does not have price
per person, then that should be zero; the website then does not display
the price.
The minimal price for any campsite type is one adult for one night,
thus to compute the price i need at least the campsite type, the dates,
and the number of adults, that has a minimum of one. I changed the
order of the form to ask for these values first, so i can compute the
initial price as soon as possible. To help further, i show the
<fieldset>s progressively when visitors select options.
2024-02-04 05:37:25 +00:00
msgctxt "title"
msgid "Booking Period"
msgstr "Període de reserva"
2024-02-29 15:59:30 +00:00
#: web/templates/public/booking/fields.gohtml:56
2024-04-26 15:09:36 +00:00
#: web/templates/admin/booking/checkin.gohtml:20
Compute and show the “cart” for the booking form
I have to ask number and age ranges of hosts of guests for all campsite
types, not only those that have price options for adults, children, etc.
because i must compute the tourist tax for adults. These numbers will
be used to generate de rows for guests when actually creating the
booking, which is not done already.
To satisfy the campsite types that do have a price per guest, not only
per night, i had to add the prices for each range in the
campsite_type_cost relation. If a campsite type does not have price
per person, then that should be zero; the website then does not display
the price.
The minimal price for any campsite type is one adult for one night,
thus to compute the price i need at least the campsite type, the dates,
and the number of adults, that has a minimum of one. I changed the
order of the form to ask for these values first, so i can compute the
initial price as soon as possible. To help further, i show the
<fieldset>s progressively when visitors select options.
2024-02-04 05:37:25 +00:00
msgctxt "title"
msgid "Guests"
msgstr "Hostes"
2024-02-29 15:59:30 +00:00
#: web/templates/public/booking/fields.gohtml:92
“Finish” the new booking form
Had to bring the same fields that i have for a payment to booking,
except that some of those should be nullable, because it is unreasonable
to ask front desk to gather all customer data when they have a booking
via phone, for instance.
Therefore, i can not take advantage of the validation for customer data
that i use in the public-facing form, but, fortunately, most of the
validations where in separated functions, thus only had to rewrite that
one for this case.
I already have to create a booking from a payment, when receiving a
payment from the public instance, thus i made that function and reused
it here. Then i “overwrite” the newly created pre-booking with the
customer data from the form, and set is as confirmed, as we do not see
any point of allowing pre-bookings from employees.
2024-04-24 18:12:29 +00:00
msgid "Note: Due to guest capacity, we have added more accommodations to the booking, but we <strong>cannot</strong> guarantee that they will be next to each other."
2024-02-11 21:06:00 +00:00
msgstr "Nota: S’ han afegit més allotjaments a la reserva degut a la capacitat de cadascuna, però <strong>no</strong> es garanteix que estiguin de costat."
2024-02-29 15:59:30 +00:00
#: web/templates/public/booking/fields.gohtml:109
2024-04-26 15:09:36 +00:00
#: web/templates/admin/booking/fields.gohtml:179
Handle the booking cart entirely with HTMx
Besides the dynamic final cart, that was already handled by HTMx, i had
to check the maximum number of guests, whether the accommodation allows
“overflow”, whether dogs are allowed, and that the booking dates were
within the campground’s opening and closing dates.
I could do all of this with AlpineJS, but then i would have to add the
same validation to the backend, prior to accept the payment. Would not
make more sense to have them in a single place, namely the backend? With
HTMx i can do that.
However, i now have to create the form “piecemeal”, because i may not
have the whole information when the visitor arrives to the booking page,
and i still had the same problem as in commit d2858302efa—parsing the
whole form as is would leave guests and options field empty, rather than
at their minimum values.
One of the fieldsets in that booking form are the arrival and departure
dates, that are the sames we use in the campsite type’s page to
“preselect” these values. Since now are in a separate struct, i can
reuse the same type and validation logic for both pages, making my
JavaScript code useless, but requiring HTMx. I think this is a good
tradeoff, in fact.
2024-02-10 02:49:44 +00:00
msgid "Note: This accommodation does <strong>not</strong> allow dogs."
msgstr "Nota: A aquest allotjament <strong>no</strong> s’ hi permeten gossos."
2024-02-29 15:59:30 +00:00
#: web/templates/public/booking/fields.gohtml:121
2024-04-26 15:09:36 +00:00
#: web/templates/admin/booking/fields.gohtml:56
Compute and show the “cart” for the booking form
I have to ask number and age ranges of hosts of guests for all campsite
types, not only those that have price options for adults, children, etc.
because i must compute the tourist tax for adults. These numbers will
be used to generate de rows for guests when actually creating the
booking, which is not done already.
To satisfy the campsite types that do have a price per guest, not only
per night, i had to add the prices for each range in the
campsite_type_cost relation. If a campsite type does not have price
per person, then that should be zero; the website then does not display
the price.
The minimal price for any campsite type is one adult for one night,
thus to compute the price i need at least the campsite type, the dates,
and the number of adults, that has a minimum of one. I changed the
order of the form to ask for these values first, so i can compute the
initial price as soon as possible. To help further, i show the
<fieldset>s progressively when visitors select options.
2024-02-04 05:37:25 +00:00
msgctxt "input"
msgid "Area preferences (optional)"
msgstr "Preferències d’ àrea (opcional)"
2024-02-29 15:59:30 +00:00
#: web/templates/public/booking/fields.gohtml:123
2024-04-26 15:09:36 +00:00
#: web/templates/admin/booking/fields.gohtml:60
Compute and show the “cart” for the booking form
I have to ask number and age ranges of hosts of guests for all campsite
types, not only those that have price options for adults, children, etc.
because i must compute the tourist tax for adults. These numbers will
be used to generate de rows for guests when actually creating the
booking, which is not done already.
To satisfy the campsite types that do have a price per guest, not only
per night, i had to add the prices for each range in the
campsite_type_cost relation. If a campsite type does not have price
per person, then that should be zero; the website then does not display
the price.
The minimal price for any campsite type is one adult for one night,
thus to compute the price i need at least the campsite type, the dates,
and the number of adults, that has a minimum of one. I changed the
order of the form to ask for these values first, so i can compute the
initial price as soon as possible. To help further, i show the
<fieldset>s progressively when visitors select options.
2024-02-04 05:37:25 +00:00
msgid "Campground map"
msgstr "Mapa del càmping"
2024-02-29 15:59:30 +00:00
#: web/templates/public/booking/fields.gohtml:176
2024-04-28 20:36:21 +00:00
#: web/templates/admin/customer/contact.gohtml:56
Add the first draft of the booking and payment forms
The form is based on the one in the current website, but in a single
page instead of split into many pages; possibly each <fieldset> should
be in a separate page/view. The idea is for Oriol to check the design
and decide how it would be presented to the user, so i needed something
to show him first.
I hardcoded the **test** data for the customer’s Redsys account. Is
this bad? I hope not, but i am not really, really sure.
The data sent to Redsys is just a placeholder because there are booking
details that i do not know, like what i have to do with the “teenagers”
field or the area preferences, thus i can not yet have a booking
relation. Nevertheless, had to generate a random order number up to
12-chars in length or Redsys would refuse the payment, claiming that
the order is duplicated.
The Redsys package is based on the PHP code provided by Redsys
themselves, plus some hints at the implementations from various Go
packages that did not know why they were so complicated.
Had to grant select on table country to guest in order to show the
select with the country options.
I have changed the “Postal code” input in taxDetails for “Postcode”
because this is the spell that it is used in the current web, i did not
see a reason to change it—it is an accepted form—, and i did not want to
have inconsistencies between forms.
2023-10-19 19:37:34 +00:00
msgctxt "input"
2024-02-24 19:03:11 +00:00
msgid "Town or village"
msgstr "Població"
Add the first draft of the booking and payment forms
The form is based on the one in the current website, but in a single
page instead of split into many pages; possibly each <fieldset> should
be in a separate page/view. The idea is for Oriol to check the design
and decide how it would be presented to the user, so i needed something
to show him first.
I hardcoded the **test** data for the customer’s Redsys account. Is
this bad? I hope not, but i am not really, really sure.
The data sent to Redsys is just a placeholder because there are booking
details that i do not know, like what i have to do with the “teenagers”
field or the area preferences, thus i can not yet have a booking
relation. Nevertheless, had to generate a random order number up to
12-chars in length or Redsys would refuse the payment, claiming that
the order is duplicated.
The Redsys package is based on the PHP code provided by Redsys
themselves, plus some hints at the implementations from various Go
packages that did not know why they were so complicated.
Had to grant select on table country to guest in order to show the
select with the country options.
I have changed the “Postal code” input in taxDetails for “Postcode”
because this is the spell that it is used in the current web, i did not
see a reason to change it—it is an accepted form—, and i did not want to
have inconsistencies between forms.
2023-10-19 19:37:34 +00:00
“Finish” the new booking form
Had to bring the same fields that i have for a payment to booking,
except that some of those should be nullable, because it is unreasonable
to ask front desk to gather all customer data when they have a booking
via phone, for instance.
Therefore, i can not take advantage of the validation for customer data
that i use in the public-facing form, but, fortunately, most of the
validations where in separated functions, thus only had to rewrite that
one for this case.
I already have to create a booking from a payment, when receiving a
payment from the public instance, thus i made that function and reused
it here. Then i “overwrite” the newly created pre-booking with the
customer data from the form, and set is as confirmed, as we do not see
any point of allowing pre-bookings from employees.
2024-04-24 18:12:29 +00:00
#: web/templates/public/booking/fields.gohtml:193
2024-04-28 20:36:21 +00:00
#: web/templates/admin/customer/contact.gohtml:96
2024-04-26 15:09:36 +00:00
#: web/templates/admin/booking/fields.gohtml:204
2024-04-28 18:28:45 +00:00
#: web/templates/admin/booking/guest.gohtml:111
Add the first draft of the booking and payment forms
The form is based on the one in the current website, but in a single
page instead of split into many pages; possibly each <fieldset> should
be in a separate page/view. The idea is for Oriol to check the design
and decide how it would be presented to the user, so i needed something
to show him first.
I hardcoded the **test** data for the customer’s Redsys account. Is
this bad? I hope not, but i am not really, really sure.
The data sent to Redsys is just a placeholder because there are booking
details that i do not know, like what i have to do with the “teenagers”
field or the area preferences, thus i can not yet have a booking
relation. Nevertheless, had to generate a random order number up to
12-chars in length or Redsys would refuse the payment, claiming that
the order is duplicated.
The Redsys package is based on the PHP code provided by Redsys
themselves, plus some hints at the implementations from various Go
packages that did not know why they were so complicated.
Had to grant select on table country to guest in order to show the
select with the country options.
I have changed the “Postal code” input in taxDetails for “Postcode”
because this is the spell that it is used in the current web, i did not
see a reason to change it—it is an accepted form—, and i did not want to
have inconsistencies between forms.
2023-10-19 19:37:34 +00:00
msgid "Choose a country"
msgstr "Esculli un país"
“Finish” the new booking form
Had to bring the same fields that i have for a payment to booking,
except that some of those should be nullable, because it is unreasonable
to ask front desk to gather all customer data when they have a booking
via phone, for instance.
Therefore, i can not take advantage of the validation for customer data
that i use in the public-facing form, but, fortunately, most of the
validations where in separated functions, thus only had to rewrite that
one for this case.
I already have to create a booking from a payment, when receiving a
payment from the public instance, thus i made that function and reused
it here. Then i “overwrite” the newly created pre-booking with the
customer data from the form, and set is as confirmed, as we do not see
any point of allowing pre-bookings from employees.
2024-04-24 18:12:29 +00:00
#: web/templates/public/booking/fields.gohtml:247
2024-04-26 15:09:36 +00:00
#: web/templates/admin/booking/fields.gohtml:259
Add the first draft of the booking and payment forms
The form is based on the one in the current website, but in a single
page instead of split into many pages; possibly each <fieldset> should
be in a separate page/view. The idea is for Oriol to check the design
and decide how it would be presented to the user, so i needed something
to show him first.
I hardcoded the **test** data for the customer’s Redsys account. Is
this bad? I hope not, but i am not really, really sure.
The data sent to Redsys is just a placeholder because there are booking
details that i do not know, like what i have to do with the “teenagers”
field or the area preferences, thus i can not yet have a booking
relation. Nevertheless, had to generate a random order number up to
12-chars in length or Redsys would refuse the payment, claiming that
the order is duplicated.
The Redsys package is based on the PHP code provided by Redsys
themselves, plus some hints at the implementations from various Go
packages that did not know why they were so complicated.
Had to grant select on table country to guest in order to show the
select with the country options.
I have changed the “Postal code” input in taxDetails for “Postcode”
because this is the spell that it is used in the current web, i did not
see a reason to change it—it is an accepted form—, and i did not want to
have inconsistencies between forms.
2023-10-19 19:37:34 +00:00
msgctxt "input"
2024-05-13 08:40:21 +00:00
msgid "ACSI / ANWB card? (optional)"
msgstr "Targeta ACSI / ANWB? (opcional)"
Add the first draft of the booking and payment forms
The form is based on the one in the current website, but in a single
page instead of split into many pages; possibly each <fieldset> should
be in a separate page/view. The idea is for Oriol to check the design
and decide how it would be presented to the user, so i needed something
to show him first.
I hardcoded the **test** data for the customer’s Redsys account. Is
this bad? I hope not, but i am not really, really sure.
The data sent to Redsys is just a placeholder because there are booking
details that i do not know, like what i have to do with the “teenagers”
field or the area preferences, thus i can not yet have a booking
relation. Nevertheless, had to generate a random order number up to
12-chars in length or Redsys would refuse the payment, claiming that
the order is duplicated.
The Redsys package is based on the PHP code provided by Redsys
themselves, plus some hints at the implementations from various Go
packages that did not know why they were so complicated.
Had to grant select on table country to guest in order to show the
select with the country options.
I have changed the “Postal code” input in taxDetails for “Postcode”
because this is the spell that it is used in the current web, i did not
see a reason to change it—it is an accepted form—, and i did not want to
have inconsistencies between forms.
2023-10-19 19:37:34 +00:00
“Finish” the new booking form
Had to bring the same fields that i have for a payment to booking,
except that some of those should be nullable, because it is unreasonable
to ask front desk to gather all customer data when they have a booking
via phone, for instance.
Therefore, i can not take advantage of the validation for customer data
that i use in the public-facing form, but, fortunately, most of the
validations where in separated functions, thus only had to rewrite that
one for this case.
I already have to create a booking from a payment, when receiving a
payment from the public instance, thus i made that function and reused
it here. Then i “overwrite” the newly created pre-booking with the
customer data from the form, and set is as confirmed, as we do not see
any point of allowing pre-bookings from employees.
2024-04-24 18:12:29 +00:00
#: web/templates/public/booking/fields.gohtml:255
Add the first draft of the booking and payment forms
The form is based on the one in the current website, but in a single
page instead of split into many pages; possibly each <fieldset> should
be in a separate page/view. The idea is for Oriol to check the design
and decide how it would be presented to the user, so i needed something
to show him first.
I hardcoded the **test** data for the customer’s Redsys account. Is
this bad? I hope not, but i am not really, really sure.
The data sent to Redsys is just a placeholder because there are booking
details that i do not know, like what i have to do with the “teenagers”
field or the area preferences, thus i can not yet have a booking
relation. Nevertheless, had to generate a random order number up to
12-chars in length or Redsys would refuse the payment, claiming that
the order is duplicated.
The Redsys package is based on the PHP code provided by Redsys
themselves, plus some hints at the implementations from various Go
packages that did not know why they were so complicated.
Had to grant select on table country to guest in order to show the
select with the country options.
I have changed the “Postal code” input in taxDetails for “Postcode”
because this is the spell that it is used in the current web, i did not
see a reason to change it—it is an accepted form—, and i did not want to
have inconsistencies between forms.
2023-10-19 19:37:34 +00:00
msgctxt "input"
2024-01-22 02:41:54 +00:00
msgid "I have read and I accept %[1]sthe reservation conditions%[2]s"
msgstr "He llegit i accepto %[1]sles condicions de reserves%[2]s"
Add the first draft of the booking and payment forms
The form is based on the one in the current website, but in a single
page instead of split into many pages; possibly each <fieldset> should
be in a separate page/view. The idea is for Oriol to check the design
and decide how it would be presented to the user, so i needed something
to show him first.
I hardcoded the **test** data for the customer’s Redsys account. Is
this bad? I hope not, but i am not really, really sure.
The data sent to Redsys is just a placeholder because there are booking
details that i do not know, like what i have to do with the “teenagers”
field or the area preferences, thus i can not yet have a booking
relation. Nevertheless, had to generate a random order number up to
12-chars in length or Redsys would refuse the payment, claiming that
the order is duplicated.
The Redsys package is based on the PHP code provided by Redsys
themselves, plus some hints at the implementations from various Go
packages that did not know why they were so complicated.
Had to grant select on table country to guest in order to show the
select with the country options.
I have changed the “Postal code” input in taxDetails for “Postcode”
because this is the spell that it is used in the current web, i did not
see a reason to change it—it is an accepted form—, and i did not want to
have inconsistencies between forms.
2023-10-19 19:37:34 +00:00
“Finish” the new booking form
Had to bring the same fields that i have for a payment to booking,
except that some of those should be nullable, because it is unreasonable
to ask front desk to gather all customer data when they have a booking
via phone, for instance.
Therefore, i can not take advantage of the validation for customer data
that i use in the public-facing form, but, fortunately, most of the
validations where in separated functions, thus only had to rewrite that
one for this case.
I already have to create a booking from a payment, when receiving a
payment from the public instance, thus i made that function and reused
it here. Then i “overwrite” the newly created pre-booking with the
customer data from the form, and set is as confirmed, as we do not see
any point of allowing pre-bookings from employees.
2024-04-24 18:12:29 +00:00
#: web/templates/public/booking/fields.gohtml:263
2024-02-15 14:54:22 +00:00
msgid "By down paying the %d %% of the total, you are pre-booking your preferences. We will respond within 24 hours and this percentage will be charged if accepted."
msgstr "En tramitar el %d %% del total esteu realitzant la prereserva de les vostres preferències. Us respondrem en un termini de 24 hores i us cobrarem aquest percentatge en cas que sigui acceptada."
“Finish” the new booking form
Had to bring the same fields that i have for a payment to booking,
except that some of those should be nullable, because it is unreasonable
to ask front desk to gather all customer data when they have a booking
via phone, for instance.
Therefore, i can not take advantage of the validation for customer data
that i use in the public-facing form, but, fortunately, most of the
validations where in separated functions, thus only had to rewrite that
one for this case.
I already have to create a booking from a payment, when receiving a
payment from the public instance, thus i made that function and reused
it here. Then i “overwrite” the newly created pre-booking with the
customer data from the form, and set is as confirmed, as we do not see
any point of allowing pre-bookings from employees.
2024-04-24 18:12:29 +00:00
#: web/templates/public/booking/fields.gohtml:265
2024-02-15 14:54:22 +00:00
msgid "By paying the total you are pre-booking your preferences. We will respond within 24 hours and this amount will be charged if accepted."
msgstr "En tramitar el pagament del total esteu realitzant la prereserva de les vostres preferències. Us respondrem en un termini de 24 hores i us cobrarem aquesta quantitat en cas que sigui acceptada."
“Finish” the new booking form
Had to bring the same fields that i have for a payment to booking,
except that some of those should be nullable, because it is unreasonable
to ask front desk to gather all customer data when they have a booking
via phone, for instance.
Therefore, i can not take advantage of the validation for customer data
that i use in the public-facing form, but, fortunately, most of the
validations where in separated functions, thus only had to rewrite that
one for this case.
I already have to create a booking from a payment, when receiving a
payment from the public instance, thus i made that function and reused
it here. Then i “overwrite” the newly created pre-booking with the
customer data from the form, and set is as confirmed, as we do not see
any point of allowing pre-bookings from employees.
2024-04-24 18:12:29 +00:00
#: web/templates/public/booking/fields.gohtml:269
2024-02-15 14:54:22 +00:00
msgid "See <%s>our conditions</%s> for more information."
msgstr "Consulteu <%s>les nostres condicions</%s> per a més informació."
2024-02-14 03:54:42 +00:00
#: web/templates/admin/payment/settings.gohtml:6
#: web/templates/admin/payment/index.gohtml:14
msgctxt "title"
msgid "Payment Settings"
msgstr "Paràmetres de pagament"
#: web/templates/admin/payment/settings.gohtml:10
#: web/templates/admin/payment/index.gohtml:6
#: web/templates/admin/payment/details.gohtml:11
#: web/templates/admin/layout.gohtml:40
msgctxt "title"
msgid "Payments"
msgstr "Pagaments"
#: web/templates/admin/payment/settings.gohtml:21
msgctxt "input"
msgid "Merchant Code"
msgstr "Codi del comerç"
#: web/templates/admin/payment/settings.gohtml:30
msgctxt "input"
msgid "Terminal Number"
msgstr "Número de terminal"
#: web/templates/admin/payment/settings.gohtml:40
msgctxt "input"
msgid "Merchant Key (only if must change it)"
msgstr "Clau del comerç (només si s’ ha de canviar)"
#: web/templates/admin/payment/settings.gohtml:42
msgctxt "input"
msgid "Merchant Key"
msgstr "Clau del comerç"
#: web/templates/admin/payment/settings.gohtml:52
msgctxt "title"
msgid "Environment"
msgstr "Entorn"
#: web/templates/admin/payment/settings.gohtml:59
msgctxt "title"
msgid "Integration"
msgstr "Integració"
#: web/templates/admin/payment/settings.gohtml:66
#: web/templates/admin/location.gohtml:53 web/templates/admin/profile.gohtml:78
2024-02-27 18:45:47 +00:00
#: web/templates/admin/taxDetails.gohtml:179
2024-02-14 03:54:42 +00:00
msgctxt "action"
msgid "Save changes"
msgstr "Desa els canvis"
2024-05-03 18:09:07 +00:00
#: web/templates/admin/payment/index.gohtml:24
msgctxt "input"
msgid "Payment status"
msgstr "Estat del pagament"
#: web/templates/admin/payment/index.gohtml:28
#: web/templates/admin/invoice/index.gohtml:55
#: web/templates/admin/booking/index.gohtml:38
msgid "All statuses"
msgstr "Tots els estats"
#: web/templates/admin/payment/index.gohtml:36
#: web/templates/admin/invoice/index.gohtml:63
#: web/templates/admin/prebooking/index.gohtml:32
2024-05-13 08:40:21 +00:00
#: web/templates/admin/user/login-attempts.gohtml:24
2024-05-03 18:09:07 +00:00
#: web/templates/admin/booking/index.gohtml:46
msgctxt "input"
msgid "From date"
msgstr "De la data"
#: web/templates/admin/payment/index.gohtml:45
#: web/templates/admin/invoice/index.gohtml:72
#: web/templates/admin/prebooking/index.gohtml:41
2024-05-13 08:40:21 +00:00
#: web/templates/admin/user/login-attempts.gohtml:33
2024-05-03 18:09:07 +00:00
#: web/templates/admin/booking/index.gohtml:55
msgctxt "input"
msgid "To date"
msgstr "A la data"
#: web/templates/admin/payment/index.gohtml:54
msgctxt "input"
msgid "Reference"
msgstr "Referència"
#: web/templates/admin/payment/index.gohtml:64
#: web/templates/admin/customer/index.gohtml:43
#: web/templates/admin/invoice/index.gohtml:94
#: web/templates/admin/prebooking/index.gohtml:51
2024-05-13 08:40:21 +00:00
#: web/templates/admin/user/login-attempts.gohtml:43
2024-05-03 18:09:07 +00:00
#: web/templates/admin/booking/index.gohtml:65
msgctxt "action"
msgid "Reset"
msgstr "Restableix"
#: web/templates/admin/payment/index.gohtml:72
2024-05-13 08:40:21 +00:00
#: web/templates/admin/user/login-attempts.gohtml:51
2024-02-14 03:54:42 +00:00
msgctxt "header"
msgid "Date"
msgstr "Data"
2024-05-03 18:09:07 +00:00
#: web/templates/admin/payment/index.gohtml:75
2024-02-14 03:54:42 +00:00
msgctxt "header"
msgid "Down payment"
msgstr "A compte"
2024-05-03 18:09:07 +00:00
#: web/templates/admin/payment/index.gohtml:76
2024-04-26 15:09:36 +00:00
#: web/templates/admin/booking/fields.gohtml:75
#: web/templates/admin/booking/fields.gohtml:173
2024-02-14 03:54:42 +00:00
msgctxt "header"
msgid "Total"
msgstr "Total"
2024-05-03 18:09:07 +00:00
#: web/templates/admin/payment/index.gohtml:84
2024-02-14 03:54:42 +00:00
msgid "No payments found."
msgstr "No s’ ha trobat cap pagament."
#: web/templates/admin/payment/details.gohtml:7
msgctxt "title"
msgid "Payment %s"
msgstr "Pagament %s"
2024-03-24 21:06:59 +00:00
#: web/templates/admin/payment/details.gohtml:20
msgid "Are you sure you wish to accept this pre-authorization?"
msgstr "Esteu segur de voler acceptar aquesta pre-autorització?"
#: web/templates/admin/payment/details.gohtml:29
msgctxt "action"
msgid "Accept pre-authorization"
msgstr "Accepta pre-autorització"
#: web/templates/admin/payment/details.gohtml:34
msgid "Are you sure you wish to void this pre-authorization?"
msgstr "Esteu segur de voler anuŀlar aquesta opció?"
#: web/templates/admin/payment/details.gohtml:43
msgctxt "action"
msgid "Void pre-authorization"
msgstr "Anuŀla pre-autorització"
2023-12-22 01:23:18 +00:00
#: web/templates/admin/legal/form.gohtml:8
2024-01-21 21:44:04 +00:00
#: web/templates/admin/legal/form.gohtml:29
Manage all media uploads in a single place
It made no sense to have a file upload in each form that needs a media,
because to reuse an existing media users would need to upload the exact
same file again; this is very unusual and unfriendly.
A better option is to have a “centralized” media section, where people
can upload files there, and then have a picker to select from there.
Ideally, there would be an upload option in the picker, but i did not
add it yet.
I’ve split the content from the media because i want users to have the
option to update a media, for instance when they need to upload a
reduced or cropped version of the same photo, without an edit they would
need to upload the file as a new media and then update all places where
the old version was used. And i did not want to trouble people that
uploads the same photo twice: without the separate relation, doing so
would throw a constraint error.
I do not believe there is any security problem to have all companies
link their media to the same file, as they were already readable by
everyone and could upload the data from a different company to their
own; in other words, it is not worse than it was now.
2023-09-20 23:56:44 +00:00
msgctxt "title"
2023-12-22 01:23:18 +00:00
msgid "Edit Legal Text"
msgstr "Edició del text legal"
Manage all media uploads in a single place
It made no sense to have a file upload in each form that needs a media,
because to reuse an existing media users would need to upload the exact
same file again; this is very unusual and unfriendly.
A better option is to have a “centralized” media section, where people
can upload files there, and then have a picker to select from there.
Ideally, there would be an upload option in the picker, but i did not
add it yet.
I’ve split the content from the media because i want users to have the
option to update a media, for instance when they need to upload a
reduced or cropped version of the same photo, without an edit they would
need to upload the file as a new media and then update all places where
the old version was used. And i did not want to trouble people that
uploads the same photo twice: without the separate relation, doing so
would throw a constraint error.
I do not believe there is any security problem to have all companies
link their media to the same file, as they were already readable by
everyone and could upload the data from a different company to their
own; in other words, it is not worse than it was now.
2023-09-20 23:56:44 +00:00
2023-12-22 01:23:18 +00:00
#: web/templates/admin/legal/form.gohtml:10
2024-01-21 21:44:04 +00:00
#: web/templates/admin/legal/form.gohtml:31
Manage all media uploads in a single place
It made no sense to have a file upload in each form that needs a media,
because to reuse an existing media users would need to upload the exact
same file again; this is very unusual and unfriendly.
A better option is to have a “centralized” media section, where people
can upload files there, and then have a picker to select from there.
Ideally, there would be an upload option in the picker, but i did not
add it yet.
I’ve split the content from the media because i want users to have the
option to update a media, for instance when they need to upload a
reduced or cropped version of the same photo, without an edit they would
need to upload the file as a new media and then update all places where
the old version was used. And i did not want to trouble people that
uploads the same photo twice: without the separate relation, doing so
would throw a constraint error.
I do not believe there is any security problem to have all companies
link their media to the same file, as they were already readable by
everyone and could upload the data from a different company to their
own; in other words, it is not worse than it was now.
2023-09-20 23:56:44 +00:00
msgctxt "title"
2023-12-22 01:23:18 +00:00
msgid "New Legal Text"
msgstr "Nou text legal"
Manage all media uploads in a single place
It made no sense to have a file upload in each form that needs a media,
because to reuse an existing media users would need to upload the exact
same file again; this is very unusual and unfriendly.
A better option is to have a “centralized” media section, where people
can upload files there, and then have a picker to select from there.
Ideally, there would be an upload option in the picker, but i did not
add it yet.
I’ve split the content from the media because i want users to have the
option to update a media, for instance when they need to upload a
reduced or cropped version of the same photo, without an edit they would
need to upload the file as a new media and then update all places where
the old version was used. And i did not want to trouble people that
uploads the same photo twice: without the separate relation, doing so
would throw a constraint error.
I do not believe there is any security problem to have all companies
link their media to the same file, as they were already readable by
everyone and could upload the data from a different company to their
own; in other words, it is not worse than it was now.
2023-09-20 23:56:44 +00:00
2024-01-21 21:44:04 +00:00
#: web/templates/admin/legal/form.gohtml:15
#: web/templates/admin/legal/index.gohtml:6
#: web/templates/admin/legal/index.gohtml:15
2024-01-27 21:51:41 +00:00
#: web/templates/admin/layout.gohtml:70
2024-01-21 21:44:04 +00:00
msgctxt "title"
msgid "Legal Texts"
msgstr "Texts legals"
#: web/templates/admin/legal/form.gohtml:41
Manage all media uploads in a single place
It made no sense to have a file upload in each form that needs a media,
because to reuse an existing media users would need to upload the exact
same file again; this is very unusual and unfriendly.
A better option is to have a “centralized” media section, where people
can upload files there, and then have a picker to select from there.
Ideally, there would be an upload option in the picker, but i did not
add it yet.
I’ve split the content from the media because i want users to have the
option to update a media, for instance when they need to upload a
reduced or cropped version of the same photo, without an edit they would
need to upload the file as a new media and then update all places where
the old version was used. And i did not want to trouble people that
uploads the same photo twice: without the separate relation, doing so
would throw a constraint error.
I do not believe there is any security problem to have all companies
link their media to the same file, as they were already readable by
everyone and could upload the data from a different company to their
own; in other words, it is not worse than it was now.
2023-09-20 23:56:44 +00:00
msgctxt "input"
2023-12-22 01:23:18 +00:00
msgid "Slug"
msgstr "Àlies"
2024-01-21 21:44:04 +00:00
#: web/templates/admin/legal/form.gohtml:50
2024-04-19 09:29:43 +00:00
#: web/templates/admin/campsite/feature/form.gohtml:51
2024-01-26 21:27:54 +00:00
#: web/templates/admin/campsite/type/feature/form.gohtml:59
2024-01-21 21:44:04 +00:00
#: web/templates/admin/campsite/type/form.gohtml:51
2024-02-11 21:06:00 +00:00
#: web/templates/admin/campsite/type/option/form.gohtml:41
2024-01-21 21:44:04 +00:00
#: web/templates/admin/season/form.gohtml:50
2024-05-03 17:13:49 +00:00
#: web/templates/admin/customer/index.gohtml:24
2024-04-28 18:28:45 +00:00
#: web/templates/admin/invoice/product-form.gohtml:16
2024-01-24 10:13:39 +00:00
#: web/templates/admin/services/form.gohtml:53
2024-01-21 21:44:04 +00:00
#: web/templates/admin/profile.gohtml:29
#: web/templates/admin/surroundings/form.gohtml:41
2024-01-27 21:51:41 +00:00
#: web/templates/admin/amenity/feature/form.gohtml:50
#: web/templates/admin/amenity/form.gohtml:50
2023-12-22 01:23:18 +00:00
msgctxt "input"
msgid "Name"
msgstr "Nom"
Manage all media uploads in a single place
It made no sense to have a file upload in each form that needs a media,
because to reuse an existing media users would need to upload the exact
same file again; this is very unusual and unfriendly.
A better option is to have a “centralized” media section, where people
can upload files there, and then have a picker to select from there.
Ideally, there would be an upload option in the picker, but i did not
add it yet.
I’ve split the content from the media because i want users to have the
option to update a media, for instance when they need to upload a
reduced or cropped version of the same photo, without an edit they would
need to upload the file as a new media and then update all places where
the old version was used. And i did not want to trouble people that
uploads the same photo twice: without the separate relation, doing so
would throw a constraint error.
I do not believe there is any security problem to have all companies
link their media to the same file, as they were already readable by
everyone and could upload the data from a different company to their
own; in other words, it is not worse than it was now.
2023-09-20 23:56:44 +00:00
2024-01-21 21:44:04 +00:00
#: web/templates/admin/legal/form.gohtml:68
2023-12-22 01:23:18 +00:00
msgctxt "input"
msgid "Content"
msgstr "Contingut"
2024-01-21 21:44:04 +00:00
#: web/templates/admin/legal/form.gohtml:88
#: web/templates/admin/carousel/form.gohtml:55
2024-04-19 09:29:43 +00:00
#: web/templates/admin/campsite/feature/form.gohtml:66
#: web/templates/admin/campsite/carousel/form.gohtml:51
#: web/templates/admin/campsite/form.gohtml:96
2024-01-26 21:27:54 +00:00
#: web/templates/admin/campsite/type/feature/form.gohtml:74
#: web/templates/admin/campsite/type/carousel/form.gohtml:59
Add campsite_type_pet_cost relation to hold price of dogs in campsites
It is a separate relation, instead of having a field in campsite_type,
because not all campsite types allow dogs. I could have added a new
field to campsite_type, but then its values it would be meaningless for
campsites that do not allow dogs, and a nullable field is not a valid
solution because NULL means “unknown”, but we **do** know the price —
none.
A separate relation encodes the same information without ambiguities nor
null values, and, in fact, removed the dogs_allowed field from
campsite_type to prevent erroneous status, such as a campsite type that
allows dogs without having a cost — even if the cost is zero, it has to
be added to the new relation.
2024-02-10 05:18:30 +00:00
#: web/templates/admin/campsite/type/form.gohtml:287
2024-02-11 21:06:00 +00:00
#: web/templates/admin/campsite/type/option/form.gohtml:98
2024-01-21 21:44:04 +00:00
#: web/templates/admin/season/form.gohtml:73
2024-04-28 20:36:21 +00:00
#: web/templates/admin/customer/form.gohtml:34
#: web/templates/admin/invoice/form.gohtml:129
2024-01-24 10:13:39 +00:00
#: web/templates/admin/services/form.gohtml:81
2024-01-21 21:44:04 +00:00
#: web/templates/admin/surroundings/form.gohtml:69
2024-01-23 13:53:15 +00:00
#: web/templates/admin/surroundings/index.gohtml:58
2024-01-27 21:51:41 +00:00
#: web/templates/admin/amenity/feature/form.gohtml:65
#: web/templates/admin/amenity/carousel/form.gohtml:50
#: web/templates/admin/amenity/form.gohtml:91
2024-01-23 10:52:39 +00:00
#: web/templates/admin/home/index.gohtml:34
2024-01-21 21:44:04 +00:00
#: web/templates/admin/media/form.gohtml:39
2024-05-02 23:01:01 +00:00
#: web/templates/admin/booking/form.gohtml:52
Manage all media uploads in a single place
It made no sense to have a file upload in each form that needs a media,
because to reuse an existing media users would need to upload the exact
same file again; this is very unusual and unfriendly.
A better option is to have a “centralized” media section, where people
can upload files there, and then have a picker to select from there.
Ideally, there would be an upload option in the picker, but i did not
add it yet.
I’ve split the content from the media because i want users to have the
option to update a media, for instance when they need to upload a
reduced or cropped version of the same photo, without an edit they would
need to upload the file as a new media and then update all places where
the old version was used. And i did not want to trouble people that
uploads the same photo twice: without the separate relation, doing so
would throw a constraint error.
I do not believe there is any security problem to have all companies
link their media to the same file, as they were already readable by
everyone and could upload the data from a different company to their
own; in other words, it is not worse than it was now.
2023-09-20 23:56:44 +00:00
msgctxt "action"
msgid "Update"
msgstr "Actualitza"
2024-01-21 21:44:04 +00:00
#: web/templates/admin/legal/form.gohtml:90
#: web/templates/admin/carousel/form.gohtml:57
2024-04-19 09:29:43 +00:00
#: web/templates/admin/campsite/feature/form.gohtml:68
#: web/templates/admin/campsite/carousel/form.gohtml:53
#: web/templates/admin/campsite/form.gohtml:98
2024-01-26 21:27:54 +00:00
#: web/templates/admin/campsite/type/feature/form.gohtml:76
#: web/templates/admin/campsite/type/carousel/form.gohtml:61
Add campsite_type_pet_cost relation to hold price of dogs in campsites
It is a separate relation, instead of having a field in campsite_type,
because not all campsite types allow dogs. I could have added a new
field to campsite_type, but then its values it would be meaningless for
campsites that do not allow dogs, and a nullable field is not a valid
solution because NULL means “unknown”, but we **do** know the price —
none.
A separate relation encodes the same information without ambiguities nor
null values, and, in fact, removed the dogs_allowed field from
campsite_type to prevent erroneous status, such as a campsite type that
allows dogs without having a cost — even if the cost is zero, it has to
be added to the new relation.
2024-02-10 05:18:30 +00:00
#: web/templates/admin/campsite/type/form.gohtml:289
2024-02-11 21:06:00 +00:00
#: web/templates/admin/campsite/type/option/form.gohtml:100
2024-01-21 21:44:04 +00:00
#: web/templates/admin/season/form.gohtml:75
2024-04-28 20:36:21 +00:00
#: web/templates/admin/customer/form.gohtml:36
2024-01-24 10:13:39 +00:00
#: web/templates/admin/services/form.gohtml:83
2024-01-21 21:44:04 +00:00
#: web/templates/admin/surroundings/form.gohtml:71
2024-01-27 21:51:41 +00:00
#: web/templates/admin/amenity/feature/form.gohtml:67
#: web/templates/admin/amenity/carousel/form.gohtml:52
#: web/templates/admin/amenity/form.gohtml:93
2024-05-02 23:01:01 +00:00
#: web/templates/admin/booking/form.gohtml:54
Manage all media uploads in a single place
It made no sense to have a file upload in each form that needs a media,
because to reuse an existing media users would need to upload the exact
same file again; this is very unusual and unfriendly.
A better option is to have a “centralized” media section, where people
can upload files there, and then have a picker to select from there.
Ideally, there would be an upload option in the picker, but i did not
add it yet.
I’ve split the content from the media because i want users to have the
option to update a media, for instance when they need to upload a
reduced or cropped version of the same photo, without an edit they would
need to upload the file as a new media and then update all places where
the old version was used. And i did not want to trouble people that
uploads the same photo twice: without the separate relation, doing so
would throw a constraint error.
I do not believe there is any security problem to have all companies
link their media to the same file, as they were already readable by
everyone and could upload the data from a different company to their
own; in other words, it is not worse than it was now.
2023-09-20 23:56:44 +00:00
msgctxt "action"
msgid "Add"
msgstr "Afegeix"
2024-01-21 21:44:04 +00:00
#: web/templates/admin/legal/index.gohtml:14
2023-12-22 01:23:18 +00:00
msgctxt "action"
msgid "Add Legal Text"
msgstr "Afegeix text legal"
2024-01-21 21:44:04 +00:00
#: web/templates/admin/legal/index.gohtml:20
2024-04-19 09:29:43 +00:00
#: web/templates/admin/campsite/feature/index.gohtml:31
2024-01-26 21:27:54 +00:00
#: web/templates/admin/campsite/type/feature/index.gohtml:31
#: web/templates/admin/campsite/type/option/index.gohtml:30
2024-01-21 21:44:04 +00:00
#: web/templates/admin/campsite/type/index.gohtml:29
#: web/templates/admin/season/index.gohtml:29
2024-05-03 17:13:49 +00:00
#: web/templates/admin/customer/index.gohtml:51
2024-01-21 21:44:04 +00:00
#: web/templates/admin/user/index.gohtml:20
2024-01-23 13:53:15 +00:00
#: web/templates/admin/surroundings/index.gohtml:83
2024-01-27 21:51:41 +00:00
#: web/templates/admin/amenity/feature/index.gohtml:30
#: web/templates/admin/amenity/index.gohtml:21
2023-12-22 01:23:18 +00:00
msgctxt "header"
msgid "Name"
msgstr "Nom"
2024-01-21 21:44:04 +00:00
#: web/templates/admin/legal/index.gohtml:32
2023-12-22 01:23:18 +00:00
msgid "No legal texts added yet."
msgstr "No s’ ha afegit cap text legal encara."
#: web/templates/admin/carousel/form.gohtml:8
2024-01-21 21:44:04 +00:00
#: web/templates/admin/carousel/form.gohtml:28
2023-12-22 01:23:18 +00:00
msgctxt "title"
msgid "Edit Carousel Slide"
msgstr "Edició de la diapositiva del carrusel"
#: web/templates/admin/carousel/form.gohtml:10
2024-01-21 21:44:04 +00:00
#: web/templates/admin/carousel/form.gohtml:30
2023-12-22 01:23:18 +00:00
msgctxt "title"
msgid "New Carousel Slide"
msgstr "Nova diapositiva del carrusel"
2024-01-21 21:44:04 +00:00
#: web/templates/admin/carousel/form.gohtml:40
2024-04-19 09:29:43 +00:00
#: web/templates/admin/campsite/carousel/form.gohtml:36
2024-01-26 21:27:54 +00:00
#: web/templates/admin/campsite/type/carousel/form.gohtml:44
2024-01-27 21:51:41 +00:00
#: web/templates/admin/amenity/carousel/form.gohtml:35
2023-12-22 01:23:18 +00:00
msgctxt "input"
msgid "Caption"
msgstr "Llegenda"
2024-01-21 21:44:04 +00:00
#: web/templates/admin/location.gohtml:6 web/templates/admin/location.gohtml:15
2023-12-21 20:17:04 +00:00
msgctxt "title"
msgid "Location Settings"
msgstr "Paràmetres de com arribar"
2024-01-21 21:44:04 +00:00
#: web/templates/admin/location.gohtml:20
2023-12-21 20:17:04 +00:00
msgctxt "input"
msgid "Directions"
msgstr "Instruccions"
2024-01-24 10:13:39 +00:00
#: web/templates/admin/location.gohtml:33
2023-12-21 20:17:04 +00:00
msgctxt "input"
msgid "Opening Dates"
msgstr "Data d’ obertura"
2024-01-24 10:13:39 +00:00
#: web/templates/admin/location.gohtml:46
2023-12-21 20:17:04 +00:00
msgctxt "input"
msgid "Map Embed"
msgstr "Incrustació del mapa"
2023-10-13 18:30:31 +00:00
#: web/templates/admin/campsite/feature/form.gohtml:8
msgctxt "title"
2024-01-26 21:27:54 +00:00
msgid "Edit Campsite Feature"
msgstr "Edició de les característiques de l’ allotjament"
2023-10-13 18:30:31 +00:00
#: web/templates/admin/campsite/feature/form.gohtml:10
msgctxt "title"
2024-01-26 21:27:54 +00:00
msgid "New Campsite Feature"
msgstr "Nova característica de l’ allotjament"
2023-10-13 18:30:31 +00:00
2024-01-21 21:44:04 +00:00
#: web/templates/admin/campsite/feature/form.gohtml:17
2024-04-19 09:29:43 +00:00
#: web/templates/admin/campsite/feature/index.gohtml:11
#: web/templates/admin/campsite/carousel/form.gohtml:17
#: web/templates/admin/campsite/carousel/index.gohtml:11
#: web/templates/admin/campsite/form.gohtml:8
msgctxt "title"
msgid "Edit Campsite"
msgstr "Edició de l’ allotjament"
#: web/templates/admin/campsite/feature/form.gohtml:18
2023-10-13 18:30:31 +00:00
#: web/templates/admin/campsite/feature/index.gohtml:6
msgctxt "title"
2024-01-26 21:27:54 +00:00
msgid "Campsite Features"
msgstr "Característiques de l’ allotjament"
2023-10-13 18:30:31 +00:00
2024-04-19 09:29:43 +00:00
#: web/templates/admin/campsite/feature/form.gohtml:33
2024-01-26 21:27:54 +00:00
#: web/templates/admin/campsite/type/feature/form.gohtml:41
2024-01-24 10:13:39 +00:00
#: web/templates/admin/services/form.gohtml:35
2024-01-27 21:51:41 +00:00
#: web/templates/admin/amenity/feature/form.gohtml:32
2024-01-21 21:44:04 +00:00
msgctxt "input"
msgid "Icon"
msgstr "Icona"
2024-04-19 09:29:43 +00:00
#: web/templates/admin/campsite/feature/index.gohtml:16
2024-01-26 21:27:54 +00:00
#: web/templates/admin/campsite/type/feature/index.gohtml:16
2024-01-27 21:51:41 +00:00
#: web/templates/admin/amenity/feature/index.gohtml:15
2023-10-13 18:30:31 +00:00
msgctxt "action"
msgid "Add Feature"
msgstr "Afegeix característica"
2024-04-19 09:29:43 +00:00
#: web/templates/admin/campsite/feature/index.gohtml:32
#: web/templates/admin/campsite/carousel/index.gohtml:32
2024-01-26 21:54:19 +00:00
#: web/templates/admin/campsite/type/feature/index.gohtml:32
2024-01-26 21:27:54 +00:00
#: web/templates/admin/campsite/type/carousel/index.gohtml:32
#: web/templates/admin/campsite/type/option/index.gohtml:31
#: web/templates/admin/services/index.gohtml:30
#: web/templates/admin/services/index.gohtml:75
#: web/templates/admin/user/index.gohtml:23
#: web/templates/admin/surroundings/index.gohtml:84
2024-01-27 21:51:41 +00:00
#: web/templates/admin/amenity/feature/index.gohtml:31
#: web/templates/admin/amenity/carousel/index.gohtml:31
2024-01-29 02:38:11 +00:00
#: web/templates/admin/amenity/index.gohtml:25
2024-01-26 21:27:54 +00:00
#: web/templates/admin/home/index.gohtml:54
#: web/templates/admin/home/index.gohtml:99
msgctxt "header"
msgid "Actions"
msgstr "Accions"
2024-04-19 09:29:43 +00:00
#: web/templates/admin/campsite/feature/index.gohtml:36
2024-01-26 21:54:19 +00:00
#: web/templates/admin/campsite/type/feature/index.gohtml:36
2024-01-27 21:51:41 +00:00
#: web/templates/admin/amenity/feature/index.gohtml:35
2024-01-26 21:54:19 +00:00
msgid "Are you sure you wish to delete this feature?"
msgstr "Esteu segur de voler esborrar aquesta característica?"
2024-01-26 21:27:54 +00:00
2024-04-19 09:29:43 +00:00
#: web/templates/admin/campsite/feature/index.gohtml:48
#: web/templates/admin/campsite/carousel/index.gohtml:50
2024-01-26 21:54:19 +00:00
#: web/templates/admin/campsite/type/feature/index.gohtml:48
2024-01-26 21:27:54 +00:00
#: web/templates/admin/campsite/type/carousel/index.gohtml:50
#: web/templates/admin/campsite/type/option/index.gohtml:47
#: web/templates/admin/services/index.gohtml:47
#: web/templates/admin/services/index.gohtml:91
#: web/templates/admin/user/index.gohtml:37
#: web/templates/admin/surroundings/index.gohtml:63
#: web/templates/admin/surroundings/index.gohtml:101
2024-01-27 21:51:41 +00:00
#: web/templates/admin/amenity/feature/index.gohtml:47
#: web/templates/admin/amenity/carousel/index.gohtml:49
2024-01-29 02:38:11 +00:00
#: web/templates/admin/amenity/index.gohtml:45
2024-01-26 21:27:54 +00:00
#: web/templates/admin/home/index.gohtml:71
#: web/templates/admin/home/index.gohtml:116
msgctxt "action"
msgid "Delete"
msgstr "Esborra"
2024-04-19 09:29:43 +00:00
#: web/templates/admin/campsite/feature/index.gohtml:57
2024-01-26 21:27:54 +00:00
msgid "No campsite features added yet."
msgstr "No s’ ha afegit cap característica a l’ allotjament encara."
2023-10-13 18:30:31 +00:00
2023-10-12 14:33:45 +00:00
#: web/templates/admin/campsite/carousel/form.gohtml:8
msgctxt "title"
2024-01-26 21:27:54 +00:00
msgid "Edit Campsite Carousel Slide"
msgstr "Edició de la diapositiva del carrusel de l’ allotjament"
2023-10-12 14:33:45 +00:00
#: web/templates/admin/campsite/carousel/form.gohtml:10
msgctxt "title"
2024-01-26 21:27:54 +00:00
msgid "New Campsite Carousel Slide"
msgstr "Nova diapositiva del carrusel de l’ allotjament"
2023-10-12 14:33:45 +00:00
2024-04-19 09:29:43 +00:00
#: web/templates/admin/campsite/carousel/form.gohtml:18
2023-10-12 14:33:45 +00:00
#: web/templates/admin/campsite/carousel/index.gohtml:6
msgctxt "title"
2024-01-26 21:27:54 +00:00
msgid "Campsite Carousel"
msgstr "Carrusel de l’ allotjament"
2023-10-12 14:33:45 +00:00
2024-04-19 09:29:43 +00:00
#: web/templates/admin/campsite/carousel/index.gohtml:17
2024-01-26 21:27:54 +00:00
#: web/templates/admin/campsite/type/carousel/index.gohtml:17
2024-01-21 21:44:04 +00:00
#: web/templates/admin/services/index.gohtml:15
2024-01-27 21:51:41 +00:00
#: web/templates/admin/amenity/carousel/index.gohtml:16
2024-01-23 10:52:39 +00:00
#: web/templates/admin/home/index.gohtml:84
2023-10-12 14:33:45 +00:00
msgctxt "action"
msgid "Add slide"
msgstr "Afegeix diapositiva"
2024-04-19 09:29:43 +00:00
#: web/templates/admin/campsite/carousel/index.gohtml:30
2024-01-26 21:27:54 +00:00
#: web/templates/admin/campsite/type/carousel/index.gohtml:30
2024-01-21 21:44:04 +00:00
#: web/templates/admin/services/index.gohtml:28
2024-01-23 13:53:15 +00:00
#: web/templates/admin/surroundings/index.gohtml:82
2024-01-27 21:51:41 +00:00
#: web/templates/admin/amenity/carousel/index.gohtml:29
2024-01-23 10:52:39 +00:00
#: web/templates/admin/home/index.gohtml:52
#: web/templates/admin/home/index.gohtml:97
2023-10-12 14:33:45 +00:00
msgctxt "header"
msgid "Image"
msgstr "Imatge"
2024-04-19 09:29:43 +00:00
#: web/templates/admin/campsite/carousel/index.gohtml:31
2024-01-26 21:27:54 +00:00
#: web/templates/admin/campsite/type/carousel/index.gohtml:31
2024-01-21 21:44:04 +00:00
#: web/templates/admin/services/index.gohtml:29
2024-01-27 21:51:41 +00:00
#: web/templates/admin/amenity/carousel/index.gohtml:30
2024-01-23 10:52:39 +00:00
#: web/templates/admin/home/index.gohtml:53
#: web/templates/admin/home/index.gohtml:98
2023-10-12 14:33:45 +00:00
msgctxt "header"
msgid "Caption"
msgstr "Llegenda"
2024-04-19 09:29:43 +00:00
#: web/templates/admin/campsite/carousel/index.gohtml:36
2024-01-26 21:27:54 +00:00
#: web/templates/admin/campsite/type/carousel/index.gohtml:36
2024-01-21 21:44:04 +00:00
#: web/templates/admin/services/index.gohtml:34
2024-01-27 21:51:41 +00:00
#: web/templates/admin/amenity/carousel/index.gohtml:35
2024-01-23 10:52:39 +00:00
#: web/templates/admin/home/index.gohtml:103
2023-10-12 14:33:45 +00:00
msgid "Are you sure you wish to delete this slide?"
msgstr "Esteu segur de voler esborrar aquesta diapositiva?"
2024-04-19 09:29:43 +00:00
#: web/templates/admin/campsite/carousel/index.gohtml:59
2024-01-26 21:27:54 +00:00
#: web/templates/admin/campsite/type/carousel/index.gohtml:59
2024-01-21 21:44:04 +00:00
#: web/templates/admin/services/index.gohtml:56
2024-01-27 21:51:41 +00:00
#: web/templates/admin/amenity/carousel/index.gohtml:58
2024-01-23 10:52:39 +00:00
#: web/templates/admin/home/index.gohtml:125
2023-10-12 14:33:45 +00:00
msgid "No slides added yet."
msgstr "No s’ ha afegit cap diapositiva encara."
2023-08-14 18:18:26 +00:00
#: web/templates/admin/campsite/form.gohtml:10
2023-08-04 17:59:58 +00:00
msgctxt "title"
2023-08-14 18:18:26 +00:00
msgid "New Campsite"
msgstr "Nou allotjament"
2023-08-04 17:59:58 +00:00
2024-04-19 09:29:43 +00:00
#: web/templates/admin/campsite/form.gohtml:21
#: web/templates/admin/campsite/type/index.gohtml:45
#: web/templates/admin/amenity/index.gohtml:35
msgctxt "action"
msgid "Edit Features"
msgstr "Edita les característiques"
#: web/templates/admin/campsite/form.gohtml:22
#: web/templates/admin/campsite/type/index.gohtml:51
#: web/templates/admin/amenity/index.gohtml:38
msgctxt "action"
msgid "Edit Carousel"
msgstr "Edita el carrusel"
#: web/templates/admin/campsite/form.gohtml:37
Add seasons’ relation, functions, and admin section
Seasons have a color to show on the calendar. I need them in HTML format
(e.g., #123abc) in order to set as value to `<input type="color">`, but
i did not want to save them as text in the database, as integers are
better representations of colors—in fact, that’s what the HTML syntax
also is: an integer.
I think the best would be to create an extension that adds an HTML color
type, with functions to convert from many representations (e.g., CSS’
rgb or even color names) to integer and back. However, that’s a lot of
work and i can satisfy Camper’s needs with just a couple of functions
and a domain.
To show the color on the index, at first tried to use a read-only
`<input type="color">`, but seems that this type of input can not be
read-only and must be disabled instead. However, i do not know whether
it makes sense to have a disabled input outside a form “just” to show
a color; i suspect it does not. Thus, at the end i use SVG with a
single circle, which is better that a 50%-rounded div with a background
color, even if the result is the same—SVG **is** intended for showing
pictures, which is this case.
2023-08-16 18:15:57 +00:00
msgctxt "campsite"
2023-08-14 09:43:58 +00:00
msgid "Active"
msgstr "Actiu"
2024-04-19 09:29:43 +00:00
#: web/templates/admin/campsite/form.gohtml:46
2023-08-04 17:59:58 +00:00
msgctxt "input"
2023-08-14 18:18:26 +00:00
msgid "Campsite Type"
msgstr "Tipus d’ allotjament"
2023-08-04 17:59:58 +00:00
2024-04-19 09:29:43 +00:00
#: web/templates/admin/campsite/form.gohtml:51
2023-08-14 18:18:26 +00:00
msgid "Select campsite type"
msgstr "Escolliu un tipus d’ allotjament"
2024-04-19 09:29:43 +00:00
#: web/templates/admin/campsite/form.gohtml:60
2024-01-27 21:51:41 +00:00
#: web/templates/admin/amenity/form.gohtml:42
2023-08-04 17:59:58 +00:00
msgctxt "input"
2023-08-14 18:18:26 +00:00
msgid "Label"
msgstr "Etiqueta"
2023-08-04 17:59:58 +00:00
2024-04-19 09:29:43 +00:00
#: web/templates/admin/campsite/form.gohtml:68
2024-01-27 21:51:41 +00:00
#: web/templates/admin/amenity/form.gohtml:63
2023-10-06 11:26:01 +00:00
msgctxt "input"
2024-01-26 21:27:54 +00:00
msgid "Info (First Column)"
msgstr "Informació (primera columna)"
2023-10-06 11:26:01 +00:00
2024-04-19 09:29:43 +00:00
#: web/templates/admin/campsite/form.gohtml:81
2024-01-27 21:51:41 +00:00
#: web/templates/admin/amenity/form.gohtml:76
2023-10-06 11:26:01 +00:00
msgctxt "input"
2024-01-26 21:27:54 +00:00
msgid "Info (Second Column)"
msgstr "Informació (segona columna)"
2023-10-06 11:26:01 +00:00
2024-04-19 19:09:28 +00:00
#: web/templates/admin/campsite/index.gohtml:15
2023-08-14 18:18:26 +00:00
msgctxt "action"
msgid "Add Campsite"
msgstr "Afegeix allotjament"
“Finish” the new booking form
Had to bring the same fields that i have for a payment to booking,
except that some of those should be nullable, because it is unreasonable
to ask front desk to gather all customer data when they have a booking
via phone, for instance.
Therefore, i can not take advantage of the validation for customer data
that i use in the public-facing form, but, fortunately, most of the
validations where in separated functions, thus only had to rewrite that
one for this case.
I already have to create a booking from a payment, when receiving a
payment from the public instance, thus i made that function and reused
it here. Then i “overwrite” the newly created pre-booking with the
customer data from the form, and set is as confirmed, as we do not see
any point of allowing pre-bookings from employees.
2024-04-24 18:12:29 +00:00
#: web/templates/admin/campsite/index.gohtml:25
2024-04-19 09:29:43 +00:00
msgid "From Date"
msgstr "De la data"
2023-08-14 18:18:26 +00:00
“Finish” the new booking form
Had to bring the same fields that i have for a payment to booking,
except that some of those should be nullable, because it is unreasonable
to ask front desk to gather all customer data when they have a booking
via phone, for instance.
Therefore, i can not take advantage of the validation for customer data
that i use in the public-facing form, but, fortunately, most of the
validations where in separated functions, thus only had to rewrite that
one for this case.
I already have to create a booking from a payment, when receiving a
payment from the public instance, thus i made that function and reused
it here. Then i “overwrite” the newly created pre-booking with the
customer data from the form, and set is as confirmed, as we do not see
any point of allowing pre-bookings from employees.
2024-04-24 18:12:29 +00:00
#: web/templates/admin/campsite/index.gohtml:32
2024-04-19 09:29:43 +00:00
msgid "To Date"
msgstr "A la data"
2023-08-14 18:18:26 +00:00
“Finish” the new booking form
Had to bring the same fields that i have for a payment to booking,
except that some of those should be nullable, because it is unreasonable
to ask front desk to gather all customer data when they have a booking
via phone, for instance.
Therefore, i can not take advantage of the validation for customer data
that i use in the public-facing form, but, fortunately, most of the
validations where in separated functions, thus only had to rewrite that
one for this case.
I already have to create a booking from a payment, when receiving a
payment from the public instance, thus i made that function and reused
it here. Then i “overwrite” the newly created pre-booking with the
customer data from the form, and set is as confirmed, as we do not see
any point of allowing pre-bookings from employees.
2024-04-24 18:12:29 +00:00
#: web/templates/admin/campsite/index.gohtml:39
2024-01-26 21:27:54 +00:00
msgctxt "action"
2024-04-19 09:29:43 +00:00
msgid "Show"
msgstr "Mostra"
2024-01-26 21:27:54 +00:00
“Finish” the new booking form
Had to bring the same fields that i have for a payment to booking,
except that some of those should be nullable, because it is unreasonable
to ask front desk to gather all customer data when they have a booking
via phone, for instance.
Therefore, i can not take advantage of the validation for customer data
that i use in the public-facing form, but, fortunately, most of the
validations where in separated functions, thus only had to rewrite that
one for this case.
I already have to create a booking from a payment, when receiving a
payment from the public instance, thus i made that function and reused
it here. Then i “overwrite” the newly created pre-booking with the
customer data from the form, and set is as confirmed, as we do not see
any point of allowing pre-bookings from employees.
2024-04-24 18:12:29 +00:00
#: web/templates/admin/campsite/index.gohtml:43
2023-08-14 18:18:26 +00:00
msgid "No campsites added yet."
msgstr "No s’ ha afegit cap allotjament encara."
2024-01-26 21:27:54 +00:00
#: web/templates/admin/campsite/type/feature/form.gohtml:8
#: web/templates/admin/campsite/type/feature/form.gohtml:32
msgctxt "title"
msgid "Edit Campsite Type Feature"
msgstr "Edició de les característiques del tipus d’ allotjament"
#: web/templates/admin/campsite/type/feature/form.gohtml:10
#: web/templates/admin/campsite/type/feature/form.gohtml:34
msgctxt "title"
msgid "New Campsite Type Feature"
msgstr "Nova característica de tipus d’ allotjament"
#: web/templates/admin/campsite/type/feature/form.gohtml:17
#: web/templates/admin/campsite/type/feature/index.gohtml:11
#: web/templates/admin/campsite/type/carousel/form.gohtml:17
#: web/templates/admin/campsite/type/carousel/index.gohtml:11
#: web/templates/admin/campsite/type/form.gohtml:16
#: web/templates/admin/campsite/type/option/form.gohtml:17
#: web/templates/admin/campsite/type/option/index.gohtml:11
#: web/templates/admin/campsite/type/index.gohtml:6
#: web/templates/admin/campsite/type/index.gohtml:16
#: web/templates/admin/layout.gohtml:43
msgctxt "title"
msgid "Campsite Types"
msgstr "Tipus d’ allotjaments"
#: web/templates/admin/campsite/type/feature/form.gohtml:18
#: web/templates/admin/campsite/type/feature/index.gohtml:6
#: web/templates/admin/campsite/type/feature/index.gohtml:17
msgctxt "title"
msgid "Campsite Type Features"
msgstr "Característiques del tipus d’ allotjaments"
2024-01-26 21:54:19 +00:00
#: web/templates/admin/campsite/type/feature/index.gohtml:57
2024-01-26 21:27:54 +00:00
msgid "No campsite type features added yet."
msgstr "No s’ ha afegit cap característica al tipus d’ allotjament encara."
#: web/templates/admin/campsite/type/carousel/form.gohtml:8
#: web/templates/admin/campsite/type/carousel/form.gohtml:32
msgctxt "title"
msgid "Edit Campsite Type Carousel Slide"
msgstr "Edició de la diapositiva del carrusel del tipus d’ allotjament"
#: web/templates/admin/campsite/type/carousel/form.gohtml:10
#: web/templates/admin/campsite/type/carousel/form.gohtml:34
msgctxt "title"
msgid "New Campsite Type Carousel Slide"
msgstr "Nova diapositiva del carrusel del tipus d’ allotjament"
#: web/templates/admin/campsite/type/carousel/form.gohtml:18
#: web/templates/admin/campsite/type/carousel/index.gohtml:6
#: web/templates/admin/campsite/type/carousel/index.gohtml:16
msgctxt "title"
msgid "Campsite Type Carousel"
msgstr "Carrusel del tipus d’ allotjament"
2023-08-14 18:18:26 +00:00
#: web/templates/admin/campsite/type/form.gohtml:8
2024-01-21 21:44:04 +00:00
#: web/templates/admin/campsite/type/form.gohtml:30
2023-08-14 18:18:26 +00:00
msgctxt "title"
msgid "Edit Campsite Type"
msgstr "Edició del tipus d’ allotjament"
#: web/templates/admin/campsite/type/form.gohtml:10
2024-01-21 21:44:04 +00:00
#: web/templates/admin/campsite/type/form.gohtml:32
2023-08-14 18:18:26 +00:00
msgctxt "title"
msgid "New Campsite Type"
msgstr "Nou tipus d’ allotjament"
2024-01-21 21:44:04 +00:00
#: web/templates/admin/campsite/type/form.gohtml:42
#: web/templates/admin/campsite/type/index.gohtml:33
Add seasons’ relation, functions, and admin section
Seasons have a color to show on the calendar. I need them in HTML format
(e.g., #123abc) in order to set as value to `<input type="color">`, but
i did not want to save them as text in the database, as integers are
better representations of colors—in fact, that’s what the HTML syntax
also is: an integer.
I think the best would be to create an extension that adds an HTML color
type, with functions to convert from many representations (e.g., CSS’
rgb or even color names) to integer and back. However, that’s a lot of
work and i can satisfy Camper’s needs with just a couple of functions
and a domain.
To show the color on the index, at first tried to use a read-only
`<input type="color">`, but seems that this type of input can not be
read-only and must be disabled instead. However, i do not know whether
it makes sense to have a disabled input outside a form “just” to show
a color; i suspect it does not. Thus, at the end i use SVG with a
single circle, which is better that a 50%-rounded div with a background
color, even if the result is the same—SVG **is** intended for showing
pictures, which is this case.
2023-08-16 18:15:57 +00:00
msgctxt "campsite type"
msgid "Active"
msgstr "Actiu"
2024-01-21 21:44:04 +00:00
#: web/templates/admin/campsite/type/form.gohtml:67
2023-09-29 18:17:39 +00:00
msgctxt "input"
2024-01-22 19:19:19 +00:00
msgid "Check-in"
msgstr "Entrada"
#: web/templates/admin/campsite/type/form.gohtml:80
msgctxt "input"
msgid "Check-out"
msgstr "Sortida"
2024-01-31 22:06:45 +00:00
#: web/templates/admin/campsite/type/form.gohtml:93
msgctxt "input"
msgid "Minimum number of nights"
msgstr "Número mínim de nits"
#: web/templates/admin/campsite/type/form.gohtml:101
msgctxt "input"
msgid "Maximum number of nights"
msgstr "Número màxim de nits"
#: web/templates/admin/campsite/type/form.gohtml:110
2024-01-22 19:19:19 +00:00
msgctxt "input"
2023-09-29 18:17:39 +00:00
msgid "Maximum number of campers"
msgstr "Número màxim de persones"
2024-01-31 22:06:45 +00:00
#: web/templates/admin/campsite/type/form.gohtml:120
2024-01-29 02:38:11 +00:00
msgctxt "input"
msgid "Allow overflowing guests to neighbouring campsites"
msgstr "Permet reservar allotjaments veïns si es supera el màxim de persones"
2024-01-31 22:06:45 +00:00
#: web/templates/admin/campsite/type/form.gohtml:129
2024-01-29 02:38:11 +00:00
msgctxt "input"
msgid "Ask for zone preferences when booking"
msgstr "Demana la preferència de zona durant la reserva"
Add campsite_type_pet_cost relation to hold price of dogs in campsites
It is a separate relation, instead of having a field in campsite_type,
because not all campsite types allow dogs. I could have added a new
field to campsite_type, but then its values it would be meaningless for
campsites that do not allow dogs, and a nullable field is not a valid
solution because NULL means “unknown”, but we **do** know the price —
none.
A separate relation encodes the same information without ambiguities nor
null values, and, in fact, removed the dogs_allowed field from
campsite_type to prevent erroneous status, such as a campsite type that
allows dogs without having a cost — even if the cost is zero, it has to
be added to the new relation.
2024-02-10 05:18:30 +00:00
#: web/templates/admin/campsite/type/form.gohtml:139
2023-09-29 18:17:39 +00:00
msgctxt "input"
msgid "Dogs allowed"
msgstr "Es permeten gossos"
Add campsite_type_pet_cost relation to hold price of dogs in campsites
It is a separate relation, instead of having a field in campsite_type,
because not all campsite types allow dogs. I could have added a new
field to campsite_type, but then its values it would be meaningless for
campsites that do not allow dogs, and a nullable field is not a valid
solution because NULL means “unknown”, but we **do** know the price —
none.
A separate relation encodes the same information without ambiguities nor
null values, and, in fact, removed the dogs_allowed field from
campsite_type to prevent erroneous status, such as a campsite type that
allows dogs without having a cost — even if the cost is zero, it has to
be added to the new relation.
2024-02-10 05:18:30 +00:00
#: web/templates/admin/campsite/type/form.gohtml:144
msgctxt "input"
msgid "Dogs price"
msgstr "Preu dels gossos"
#: web/templates/admin/campsite/type/form.gohtml:157
Compute and show the “cart” for the booking form
I have to ask number and age ranges of hosts of guests for all campsite
types, not only those that have price options for adults, children, etc.
because i must compute the tourist tax for adults. These numbers will
be used to generate de rows for guests when actually creating the
booking, which is not done already.
To satisfy the campsite types that do have a price per guest, not only
per night, i had to add the prices for each range in the
campsite_type_cost relation. If a campsite type does not have price
per person, then that should be zero; the website then does not display
the price.
The minimal price for any campsite type is one adult for one night,
thus to compute the price i need at least the campsite type, the dates,
and the number of adults, that has a minimum of one. I changed the
order of the form to ask for these values first, so i can compute the
initial price as soon as possible. To help further, i show the
<fieldset>s progressively when visitors select options.
2024-02-04 05:37:25 +00:00
msgctxt "header"
msgid "Season"
msgstr "Temporada"
Add campsite_type_pet_cost relation to hold price of dogs in campsites
It is a separate relation, instead of having a field in campsite_type,
because not all campsite types allow dogs. I could have added a new
field to campsite_type, but then its values it would be meaningless for
campsites that do not allow dogs, and a nullable field is not a valid
solution because NULL means “unknown”, but we **do** know the price —
none.
A separate relation encodes the same information without ambiguities nor
null values, and, in fact, removed the dogs_allowed field from
campsite_type to prevent erroneous status, such as a campsite type that
allows dogs without having a cost — even if the cost is zero, it has to
be added to the new relation.
2024-02-10 05:18:30 +00:00
#: web/templates/admin/campsite/type/form.gohtml:158
Compute and show the “cart” for the booking form
I have to ask number and age ranges of hosts of guests for all campsite
types, not only those that have price options for adults, children, etc.
because i must compute the tourist tax for adults. These numbers will
be used to generate de rows for guests when actually creating the
booking, which is not done already.
To satisfy the campsite types that do have a price per guest, not only
per night, i had to add the prices for each range in the
campsite_type_cost relation. If a campsite type does not have price
per person, then that should be zero; the website then does not display
the price.
The minimal price for any campsite type is one adult for one night,
thus to compute the price i need at least the campsite type, the dates,
and the number of adults, that has a minimum of one. I changed the
order of the form to ask for these values first, so i can compute the
initial price as soon as possible. To help further, i show the
<fieldset>s progressively when visitors select options.
2024-02-04 05:37:25 +00:00
msgctxt "header"
msgid "Price per night"
msgstr "Preu per nit"
Add campsite_type_pet_cost relation to hold price of dogs in campsites
It is a separate relation, instead of having a field in campsite_type,
because not all campsite types allow dogs. I could have added a new
field to campsite_type, but then its values it would be meaningless for
campsites that do not allow dogs, and a nullable field is not a valid
solution because NULL means “unknown”, but we **do** know the price —
none.
A separate relation encodes the same information without ambiguities nor
null values, and, in fact, removed the dogs_allowed field from
campsite_type to prevent erroneous status, such as a campsite type that
allows dogs without having a cost — even if the cost is zero, it has to
be added to the new relation.
2024-02-10 05:18:30 +00:00
#: web/templates/admin/campsite/type/form.gohtml:159
Compute and show the “cart” for the booking form
I have to ask number and age ranges of hosts of guests for all campsite
types, not only those that have price options for adults, children, etc.
because i must compute the tourist tax for adults. These numbers will
be used to generate de rows for guests when actually creating the
booking, which is not done already.
To satisfy the campsite types that do have a price per guest, not only
per night, i had to add the prices for each range in the
campsite_type_cost relation. If a campsite type does not have price
per person, then that should be zero; the website then does not display
the price.
The minimal price for any campsite type is one adult for one night,
thus to compute the price i need at least the campsite type, the dates,
and the number of adults, that has a minimum of one. I changed the
order of the form to ask for these values first, so i can compute the
initial price as soon as possible. To help further, i show the
<fieldset>s progressively when visitors select options.
2024-02-04 05:37:25 +00:00
msgctxt "header"
msgid "Price per adult (> 16)"
msgstr "Preu per adult (> 16)"
Add campsite_type_pet_cost relation to hold price of dogs in campsites
It is a separate relation, instead of having a field in campsite_type,
because not all campsite types allow dogs. I could have added a new
field to campsite_type, but then its values it would be meaningless for
campsites that do not allow dogs, and a nullable field is not a valid
solution because NULL means “unknown”, but we **do** know the price —
none.
A separate relation encodes the same information without ambiguities nor
null values, and, in fact, removed the dogs_allowed field from
campsite_type to prevent erroneous status, such as a campsite type that
allows dogs without having a cost — even if the cost is zero, it has to
be added to the new relation.
2024-02-10 05:18:30 +00:00
#: web/templates/admin/campsite/type/form.gohtml:160
Compute and show the “cart” for the booking form
I have to ask number and age ranges of hosts of guests for all campsite
types, not only those that have price options for adults, children, etc.
because i must compute the tourist tax for adults. These numbers will
be used to generate de rows for guests when actually creating the
booking, which is not done already.
To satisfy the campsite types that do have a price per guest, not only
per night, i had to add the prices for each range in the
campsite_type_cost relation. If a campsite type does not have price
per person, then that should be zero; the website then does not display
the price.
The minimal price for any campsite type is one adult for one night,
thus to compute the price i need at least the campsite type, the dates,
and the number of adults, that has a minimum of one. I changed the
order of the form to ask for these values first, so i can compute the
initial price as soon as possible. To help further, i show the
<fieldset>s progressively when visitors select options.
2024-02-04 05:37:25 +00:00
msgctxt "header"
msgid "Price per teenager (11– 16)"
msgstr "Preu per adolescent (11– 16)"
Add campsite_type_pet_cost relation to hold price of dogs in campsites
It is a separate relation, instead of having a field in campsite_type,
because not all campsite types allow dogs. I could have added a new
field to campsite_type, but then its values it would be meaningless for
campsites that do not allow dogs, and a nullable field is not a valid
solution because NULL means “unknown”, but we **do** know the price —
none.
A separate relation encodes the same information without ambiguities nor
null values, and, in fact, removed the dogs_allowed field from
campsite_type to prevent erroneous status, such as a campsite type that
allows dogs without having a cost — even if the cost is zero, it has to
be added to the new relation.
2024-02-10 05:18:30 +00:00
#: web/templates/admin/campsite/type/form.gohtml:161
Compute and show the “cart” for the booking form
I have to ask number and age ranges of hosts of guests for all campsite
types, not only those that have price options for adults, children, etc.
because i must compute the tourist tax for adults. These numbers will
be used to generate de rows for guests when actually creating the
booking, which is not done already.
To satisfy the campsite types that do have a price per guest, not only
per night, i had to add the prices for each range in the
campsite_type_cost relation. If a campsite type does not have price
per person, then that should be zero; the website then does not display
the price.
The minimal price for any campsite type is one adult for one night,
thus to compute the price i need at least the campsite type, the dates,
and the number of adults, that has a minimum of one. I changed the
order of the form to ask for these values first, so i can compute the
initial price as soon as possible. To help further, i show the
<fieldset>s progressively when visitors select options.
2024-02-04 05:37:25 +00:00
msgctxt "header"
msgid "Price per child (2– 10)"
msgstr "Preu per nen (2– 10)"
Add campsite_type_pet_cost relation to hold price of dogs in campsites
It is a separate relation, instead of having a field in campsite_type,
because not all campsite types allow dogs. I could have added a new
field to campsite_type, but then its values it would be meaningless for
campsites that do not allow dogs, and a nullable field is not a valid
solution because NULL means “unknown”, but we **do** know the price —
none.
A separate relation encodes the same information without ambiguities nor
null values, and, in fact, removed the dogs_allowed field from
campsite_type to prevent erroneous status, such as a campsite type that
allows dogs without having a cost — even if the cost is zero, it has to
be added to the new relation.
2024-02-10 05:18:30 +00:00
#: web/templates/admin/campsite/type/form.gohtml:171
2024-01-26 21:27:54 +00:00
msgctxt "input"
msgid "Price per night"
msgstr "Preu per nit"
Add campsite_type_pet_cost relation to hold price of dogs in campsites
It is a separate relation, instead of having a field in campsite_type,
because not all campsite types allow dogs. I could have added a new
field to campsite_type, but then its values it would be meaningless for
campsites that do not allow dogs, and a nullable field is not a valid
solution because NULL means “unknown”, but we **do** know the price —
none.
A separate relation encodes the same information without ambiguities nor
null values, and, in fact, removed the dogs_allowed field from
campsite_type to prevent erroneous status, such as a campsite type that
allows dogs without having a cost — even if the cost is zero, it has to
be added to the new relation.
2024-02-10 05:18:30 +00:00
#: web/templates/admin/campsite/type/form.gohtml:182
Compute and show the “cart” for the booking form
I have to ask number and age ranges of hosts of guests for all campsite
types, not only those that have price options for adults, children, etc.
because i must compute the tourist tax for adults. These numbers will
be used to generate de rows for guests when actually creating the
booking, which is not done already.
To satisfy the campsite types that do have a price per guest, not only
per night, i had to add the prices for each range in the
campsite_type_cost relation. If a campsite type does not have price
per person, then that should be zero; the website then does not display
the price.
The minimal price for any campsite type is one adult for one night,
thus to compute the price i need at least the campsite type, the dates,
and the number of adults, that has a minimum of one. I changed the
order of the form to ask for these values first, so i can compute the
initial price as soon as possible. To help further, i show the
<fieldset>s progressively when visitors select options.
2024-02-04 05:37:25 +00:00
msgctxt "input"
msgid "Price per adult (> 16)"
msgstr "Per per adult (> 16)"
Add campsite_type_pet_cost relation to hold price of dogs in campsites
It is a separate relation, instead of having a field in campsite_type,
because not all campsite types allow dogs. I could have added a new
field to campsite_type, but then its values it would be meaningless for
campsites that do not allow dogs, and a nullable field is not a valid
solution because NULL means “unknown”, but we **do** know the price —
none.
A separate relation encodes the same information without ambiguities nor
null values, and, in fact, removed the dogs_allowed field from
campsite_type to prevent erroneous status, such as a campsite type that
allows dogs without having a cost — even if the cost is zero, it has to
be added to the new relation.
2024-02-10 05:18:30 +00:00
#: web/templates/admin/campsite/type/form.gohtml:193
Compute and show the “cart” for the booking form
I have to ask number and age ranges of hosts of guests for all campsite
types, not only those that have price options for adults, children, etc.
because i must compute the tourist tax for adults. These numbers will
be used to generate de rows for guests when actually creating the
booking, which is not done already.
To satisfy the campsite types that do have a price per guest, not only
per night, i had to add the prices for each range in the
campsite_type_cost relation. If a campsite type does not have price
per person, then that should be zero; the website then does not display
the price.
The minimal price for any campsite type is one adult for one night,
thus to compute the price i need at least the campsite type, the dates,
and the number of adults, that has a minimum of one. I changed the
order of the form to ask for these values first, so i can compute the
initial price as soon as possible. To help further, i show the
<fieldset>s progressively when visitors select options.
2024-02-04 05:37:25 +00:00
msgctxt "input"
msgid "Price per teenager (11– 16)"
msgstr "Preu per adolescent (11– 16)"
Add campsite_type_pet_cost relation to hold price of dogs in campsites
It is a separate relation, instead of having a field in campsite_type,
because not all campsite types allow dogs. I could have added a new
field to campsite_type, but then its values it would be meaningless for
campsites that do not allow dogs, and a nullable field is not a valid
solution because NULL means “unknown”, but we **do** know the price —
none.
A separate relation encodes the same information without ambiguities nor
null values, and, in fact, removed the dogs_allowed field from
campsite_type to prevent erroneous status, such as a campsite type that
allows dogs without having a cost — even if the cost is zero, it has to
be added to the new relation.
2024-02-10 05:18:30 +00:00
#: web/templates/admin/campsite/type/form.gohtml:204
Compute and show the “cart” for the booking form
I have to ask number and age ranges of hosts of guests for all campsite
types, not only those that have price options for adults, children, etc.
because i must compute the tourist tax for adults. These numbers will
be used to generate de rows for guests when actually creating the
booking, which is not done already.
To satisfy the campsite types that do have a price per guest, not only
per night, i had to add the prices for each range in the
campsite_type_cost relation. If a campsite type does not have price
per person, then that should be zero; the website then does not display
the price.
The minimal price for any campsite type is one adult for one night,
thus to compute the price i need at least the campsite type, the dates,
and the number of adults, that has a minimum of one. I changed the
order of the form to ask for these values first, so i can compute the
initial price as soon as possible. To help further, i show the
<fieldset>s progressively when visitors select options.
2024-02-04 05:37:25 +00:00
msgctxt "input"
msgid "Price per child (2– 10)"
msgstr "Preu per nene (2– 10)"
Add campsite_type_pet_cost relation to hold price of dogs in campsites
It is a separate relation, instead of having a field in campsite_type,
because not all campsite types allow dogs. I could have added a new
field to campsite_type, but then its values it would be meaningless for
campsites that do not allow dogs, and a nullable field is not a valid
solution because NULL means “unknown”, but we **do** know the price —
none.
A separate relation encodes the same information without ambiguities nor
null values, and, in fact, removed the dogs_allowed field from
campsite_type to prevent erroneous status, such as a campsite type that
allows dogs without having a cost — even if the cost is zero, it has to
be added to the new relation.
2024-02-10 05:18:30 +00:00
#: web/templates/admin/campsite/type/form.gohtml:220
2023-10-12 16:47:08 +00:00
msgctxt "input"
msgid "Spiel"
msgstr "Introducció"
Add campsite_type_pet_cost relation to hold price of dogs in campsites
It is a separate relation, instead of having a field in campsite_type,
because not all campsite types allow dogs. I could have added a new
field to campsite_type, but then its values it would be meaningless for
campsites that do not allow dogs, and a nullable field is not a valid
solution because NULL means “unknown”, but we **do** know the price —
none.
A separate relation encodes the same information without ambiguities nor
null values, and, in fact, removed the dogs_allowed field from
campsite_type to prevent erroneous status, such as a campsite type that
allows dogs without having a cost — even if the cost is zero, it has to
be added to the new relation.
2024-02-10 05:18:30 +00:00
#: web/templates/admin/campsite/type/form.gohtml:233
2023-10-13 11:40:48 +00:00
msgctxt "input"
msgid "Info"
msgstr "Informació"
Add campsite_type_pet_cost relation to hold price of dogs in campsites
It is a separate relation, instead of having a field in campsite_type,
because not all campsite types allow dogs. I could have added a new
field to campsite_type, but then its values it would be meaningless for
campsites that do not allow dogs, and a nullable field is not a valid
solution because NULL means “unknown”, but we **do** know the price —
none.
A separate relation encodes the same information without ambiguities nor
null values, and, in fact, removed the dogs_allowed field from
campsite_type to prevent erroneous status, such as a campsite type that
allows dogs without having a cost — even if the cost is zero, it has to
be added to the new relation.
2024-02-10 05:18:30 +00:00
#: web/templates/admin/campsite/type/form.gohtml:246
2023-10-13 11:40:48 +00:00
msgctxt "input"
msgid "Facilities"
msgstr "Equipaments"
Add campsite_type_pet_cost relation to hold price of dogs in campsites
It is a separate relation, instead of having a field in campsite_type,
because not all campsite types allow dogs. I could have added a new
field to campsite_type, but then its values it would be meaningless for
campsites that do not allow dogs, and a nullable field is not a valid
solution because NULL means “unknown”, but we **do** know the price —
none.
A separate relation encodes the same information without ambiguities nor
null values, and, in fact, removed the dogs_allowed field from
campsite_type to prevent erroneous status, such as a campsite type that
allows dogs without having a cost — even if the cost is zero, it has to
be added to the new relation.
2024-02-10 05:18:30 +00:00
#: web/templates/admin/campsite/type/form.gohtml:259
2024-01-24 10:13:39 +00:00
#: web/templates/admin/services/form.gohtml:66
2024-01-21 21:44:04 +00:00
#: web/templates/admin/surroundings/form.gohtml:54
2023-08-14 18:18:26 +00:00
msgctxt "input"
msgid "Description"
msgstr "Descripció"
Add campsite_type_pet_cost relation to hold price of dogs in campsites
It is a separate relation, instead of having a field in campsite_type,
because not all campsite types allow dogs. I could have added a new
field to campsite_type, but then its values it would be meaningless for
campsites that do not allow dogs, and a nullable field is not a valid
solution because NULL means “unknown”, but we **do** know the price —
none.
A separate relation encodes the same information without ambiguities nor
null values, and, in fact, removed the dogs_allowed field from
campsite_type to prevent erroneous status, such as a campsite type that
allows dogs without having a cost — even if the cost is zero, it has to
be added to the new relation.
2024-02-10 05:18:30 +00:00
#: web/templates/admin/campsite/type/form.gohtml:272
2024-01-14 23:28:34 +00:00
msgctxt "input"
msgid "Additional Information"
msgstr "Informació addicional"
2024-01-26 21:27:54 +00:00
#: web/templates/admin/campsite/type/option/form.gohtml:8
2024-02-11 21:06:00 +00:00
#: web/templates/admin/campsite/type/option/form.gohtml:32
2024-01-26 21:27:54 +00:00
msgctxt "title"
msgid "Edit Campsite Type Option"
msgstr "Edició de l’ opció del tipus d’ allotjament"
#: web/templates/admin/campsite/type/option/form.gohtml:10
2024-02-11 21:06:00 +00:00
#: web/templates/admin/campsite/type/option/form.gohtml:34
2024-01-26 21:27:54 +00:00
msgctxt "title"
msgid "New Campsite Type Option"
msgstr "Nova opció del tipus d’ allotjament"
2024-02-11 21:06:00 +00:00
#: web/templates/admin/campsite/type/option/form.gohtml:54
2024-01-26 21:27:54 +00:00
msgctxt "input"
msgid "Minimum"
msgstr "Mínim"
2024-02-11 21:06:00 +00:00
#: web/templates/admin/campsite/type/option/form.gohtml:62
2024-01-26 21:27:54 +00:00
msgctxt "input"
msgid "Maximum"
msgstr "Màxim"
2024-02-11 21:06:00 +00:00
#: web/templates/admin/campsite/type/option/form.gohtml:75
2024-02-11 20:45:00 +00:00
msgctxt "campsite type"
msgid "Per night"
msgstr "Per nit"
2024-02-11 21:06:00 +00:00
#: web/templates/admin/campsite/type/option/form.gohtml:84
2024-04-28 18:28:45 +00:00
#: web/templates/admin/invoice/product-form.gohtml:29
2024-02-11 20:45:00 +00:00
msgctxt "input"
msgid "Price"
msgstr "Preu"
2024-01-26 21:27:54 +00:00
#: web/templates/admin/campsite/type/option/index.gohtml:16
msgctxt "action"
msgid "Add Option"
msgstr "Afegeix opció"
2024-01-26 21:54:19 +00:00
#: web/templates/admin/campsite/type/option/index.gohtml:35
msgid "Are you sure you wish to delete this option?"
msgstr "Esteu segur de voler esborrar aquesta opció?"
2024-01-26 21:27:54 +00:00
#: web/templates/admin/campsite/type/option/index.gohtml:56
msgid "No campsite type options added yet."
msgstr "No s’ ha afegit cap opció al tipus d’ allotjament encara."
2024-01-21 21:44:04 +00:00
#: web/templates/admin/campsite/type/index.gohtml:15
2023-08-04 17:59:58 +00:00
msgctxt "action"
msgid "Add Type"
msgstr "Afegeix tipus"
2024-04-19 09:29:43 +00:00
#: web/templates/admin/campsite/type/index.gohtml:30
#: web/templates/admin/amenity/index.gohtml:22
msgctxt "header"
msgid "Features"
msgstr "Característiques"
2024-01-21 21:44:04 +00:00
#: web/templates/admin/campsite/type/index.gohtml:31
2023-10-13 18:30:31 +00:00
msgctxt "header"
2023-10-06 11:26:01 +00:00
msgid "Options"
msgstr "Opcions"
2023-08-04 17:59:58 +00:00
2024-04-19 09:29:43 +00:00
#: web/templates/admin/campsite/type/index.gohtml:32
#: web/templates/admin/amenity/index.gohtml:23
msgctxt "header"
msgid "Carousel"
msgstr "Carrusel"
2024-01-21 21:44:04 +00:00
#: web/templates/admin/campsite/type/index.gohtml:48
2023-10-06 11:26:01 +00:00
msgctxt "action"
msgid "Edit Options"
msgstr "Edita les opcions"
2023-09-12 18:20:23 +00:00
2024-01-21 21:44:04 +00:00
#: web/templates/admin/campsite/type/index.gohtml:60
2023-08-04 17:59:58 +00:00
msgid "No campsite types added yet."
msgstr "No s’ ha afegit cap tipus d’ allotjament encara."
Add seasons’ relation, functions, and admin section
Seasons have a color to show on the calendar. I need them in HTML format
(e.g., #123abc) in order to set as value to `<input type="color">`, but
i did not want to save them as text in the database, as integers are
better representations of colors—in fact, that’s what the HTML syntax
also is: an integer.
I think the best would be to create an extension that adds an HTML color
type, with functions to convert from many representations (e.g., CSS’
rgb or even color names) to integer and back. However, that’s a lot of
work and i can satisfy Camper’s needs with just a couple of functions
and a domain.
To show the color on the index, at first tried to use a read-only
`<input type="color">`, but seems that this type of input can not be
read-only and must be disabled instead. However, i do not know whether
it makes sense to have a disabled input outside a form “just” to show
a color; i suspect it does not. Thus, at the end i use SVG with a
single circle, which is better that a 50%-rounded div with a background
color, even if the result is the same—SVG **is** intended for showing
pictures, which is this case.
2023-08-16 18:15:57 +00:00
#: web/templates/admin/season/form.gohtml:8
2024-01-21 21:44:04 +00:00
#: web/templates/admin/season/form.gohtml:29
Add seasons’ relation, functions, and admin section
Seasons have a color to show on the calendar. I need them in HTML format
(e.g., #123abc) in order to set as value to `<input type="color">`, but
i did not want to save them as text in the database, as integers are
better representations of colors—in fact, that’s what the HTML syntax
also is: an integer.
I think the best would be to create an extension that adds an HTML color
type, with functions to convert from many representations (e.g., CSS’
rgb or even color names) to integer and back. However, that’s a lot of
work and i can satisfy Camper’s needs with just a couple of functions
and a domain.
To show the color on the index, at first tried to use a read-only
`<input type="color">`, but seems that this type of input can not be
read-only and must be disabled instead. However, i do not know whether
it makes sense to have a disabled input outside a form “just” to show
a color; i suspect it does not. Thus, at the end i use SVG with a
single circle, which is better that a 50%-rounded div with a background
color, even if the result is the same—SVG **is** intended for showing
pictures, which is this case.
2023-08-16 18:15:57 +00:00
msgctxt "title"
msgid "Edit Season"
msgstr "Edició de la temporada"
#: web/templates/admin/season/form.gohtml:10
2024-01-21 21:44:04 +00:00
#: web/templates/admin/season/form.gohtml:31
Add seasons’ relation, functions, and admin section
Seasons have a color to show on the calendar. I need them in HTML format
(e.g., #123abc) in order to set as value to `<input type="color">`, but
i did not want to save them as text in the database, as integers are
better representations of colors—in fact, that’s what the HTML syntax
also is: an integer.
I think the best would be to create an extension that adds an HTML color
type, with functions to convert from many representations (e.g., CSS’
rgb or even color names) to integer and back. However, that’s a lot of
work and i can satisfy Camper’s needs with just a couple of functions
and a domain.
To show the color on the index, at first tried to use a read-only
`<input type="color">`, but seems that this type of input can not be
read-only and must be disabled instead. However, i do not know whether
it makes sense to have a disabled input outside a form “just” to show
a color; i suspect it does not. Thus, at the end i use SVG with a
single circle, which is better that a 50%-rounded div with a background
color, even if the result is the same—SVG **is** intended for showing
pictures, which is this case.
2023-08-16 18:15:57 +00:00
msgctxt "title"
msgid "New Season"
msgstr "Nova temporada"
2024-01-21 21:44:04 +00:00
#: web/templates/admin/season/form.gohtml:15
2024-01-22 02:41:54 +00:00
#: web/templates/admin/season/index.gohtml:6
#: web/templates/admin/season/index.gohtml:15
2024-01-27 21:51:41 +00:00
#: web/templates/admin/layout.gohtml:52
2024-01-21 21:44:04 +00:00
msgctxt "title"
2024-01-22 02:41:54 +00:00
msgid "Seasons"
2024-01-21 21:44:04 +00:00
msgstr "Temporades"
#: web/templates/admin/season/form.gohtml:41
#: web/templates/admin/season/index.gohtml:30
Add seasons’ relation, functions, and admin section
Seasons have a color to show on the calendar. I need them in HTML format
(e.g., #123abc) in order to set as value to `<input type="color">`, but
i did not want to save them as text in the database, as integers are
better representations of colors—in fact, that’s what the HTML syntax
also is: an integer.
I think the best would be to create an extension that adds an HTML color
type, with functions to convert from many representations (e.g., CSS’
rgb or even color names) to integer and back. However, that’s a lot of
work and i can satisfy Camper’s needs with just a couple of functions
and a domain.
To show the color on the index, at first tried to use a read-only
`<input type="color">`, but seems that this type of input can not be
read-only and must be disabled instead. However, i do not know whether
it makes sense to have a disabled input outside a form “just” to show
a color; i suspect it does not. Thus, at the end i use SVG with a
single circle, which is better that a 50%-rounded div with a background
color, even if the result is the same—SVG **is** intended for showing
pictures, which is this case.
2023-08-16 18:15:57 +00:00
msgctxt "season"
msgid "Active"
msgstr "Activa"
2024-01-21 21:44:04 +00:00
#: web/templates/admin/season/form.gohtml:63
Add seasons’ relation, functions, and admin section
Seasons have a color to show on the calendar. I need them in HTML format
(e.g., #123abc) in order to set as value to `<input type="color">`, but
i did not want to save them as text in the database, as integers are
better representations of colors—in fact, that’s what the HTML syntax
also is: an integer.
I think the best would be to create an extension that adds an HTML color
type, with functions to convert from many representations (e.g., CSS’
rgb or even color names) to integer and back. However, that’s a lot of
work and i can satisfy Camper’s needs with just a couple of functions
and a domain.
To show the color on the index, at first tried to use a read-only
`<input type="color">`, but seems that this type of input can not be
read-only and must be disabled instead. However, i do not know whether
it makes sense to have a disabled input outside a form “just” to show
a color; i suspect it does not. Thus, at the end i use SVG with a
single circle, which is better that a 50%-rounded div with a background
color, even if the result is the same—SVG **is** intended for showing
pictures, which is this case.
2023-08-16 18:15:57 +00:00
msgctxt "input"
msgid "Color"
msgstr "Color"
2024-01-21 21:44:04 +00:00
#: web/templates/admin/season/index.gohtml:14
Add seasons’ relation, functions, and admin section
Seasons have a color to show on the calendar. I need them in HTML format
(e.g., #123abc) in order to set as value to `<input type="color">`, but
i did not want to save them as text in the database, as integers are
better representations of colors—in fact, that’s what the HTML syntax
also is: an integer.
I think the best would be to create an extension that adds an HTML color
type, with functions to convert from many representations (e.g., CSS’
rgb or even color names) to integer and back. However, that’s a lot of
work and i can satisfy Camper’s needs with just a couple of functions
and a domain.
To show the color on the index, at first tried to use a read-only
`<input type="color">`, but seems that this type of input can not be
read-only and must be disabled instead. However, i do not know whether
it makes sense to have a disabled input outside a form “just” to show
a color; i suspect it does not. Thus, at the end i use SVG with a
single circle, which is better that a 50%-rounded div with a background
color, even if the result is the same—SVG **is** intended for showing
pictures, which is this case.
2023-08-16 18:15:57 +00:00
msgctxt "action"
msgid "Add Season"
msgstr "Afegeix temporada"
2024-01-21 21:44:04 +00:00
#: web/templates/admin/season/index.gohtml:28
Add seasons’ relation, functions, and admin section
Seasons have a color to show on the calendar. I need them in HTML format
(e.g., #123abc) in order to set as value to `<input type="color">`, but
i did not want to save them as text in the database, as integers are
better representations of colors—in fact, that’s what the HTML syntax
also is: an integer.
I think the best would be to create an extension that adds an HTML color
type, with functions to convert from many representations (e.g., CSS’
rgb or even color names) to integer and back. However, that’s a lot of
work and i can satisfy Camper’s needs with just a couple of functions
and a domain.
To show the color on the index, at first tried to use a read-only
`<input type="color">`, but seems that this type of input can not be
read-only and must be disabled instead. However, i do not know whether
it makes sense to have a disabled input outside a form “just” to show
a color; i suspect it does not. Thus, at the end i use SVG with a
single circle, which is better that a 50%-rounded div with a background
color, even if the result is the same—SVG **is** intended for showing
pictures, which is this case.
2023-08-16 18:15:57 +00:00
msgctxt "header"
msgid "Color"
msgstr "Color"
2024-01-21 21:44:04 +00:00
#: web/templates/admin/season/index.gohtml:51
Add seasons’ relation, functions, and admin section
Seasons have a color to show on the calendar. I need them in HTML format
(e.g., #123abc) in order to set as value to `<input type="color">`, but
i did not want to save them as text in the database, as integers are
better representations of colors—in fact, that’s what the HTML syntax
also is: an integer.
I think the best would be to create an extension that adds an HTML color
type, with functions to convert from many representations (e.g., CSS’
rgb or even color names) to integer and back. However, that’s a lot of
work and i can satisfy Camper’s needs with just a couple of functions
and a domain.
To show the color on the index, at first tried to use a read-only
`<input type="color">`, but seems that this type of input can not be
read-only and must be disabled instead. However, i do not know whether
it makes sense to have a disabled input outside a form “just” to show
a color; i suspect it does not. Thus, at the end i use SVG with a
single circle, which is better that a 50%-rounded div with a background
color, even if the result is the same—SVG **is** intended for showing
pictures, which is this case.
2023-08-16 18:15:57 +00:00
msgid "No seasons added yet."
msgstr "No s’ ha afegit cap temporada encara."
2023-09-29 18:17:39 +00:00
#: web/templates/admin/season/calendar.gohtml:49
#: web/templates/admin/media/picker.gohtml:61
msgctxt "action"
msgid "Cancel"
msgstr "Canceŀla"
2024-04-28 18:28:45 +00:00
#: web/templates/admin/customer/form.gohtml:8
msgctxt "title"
msgid "Edit Customer"
msgstr "Edició del client"
#: web/templates/admin/customer/form.gohtml:10
msgctxt "title"
msgid "New Customer"
msgstr "Nou client"
#: web/templates/admin/customer/form.gohtml:15
2024-05-03 17:13:49 +00:00
#: web/templates/admin/invoice/index.gohtml:106
2024-04-28 18:28:45 +00:00
msgctxt "title"
msgid "Customer"
msgstr "Client"
2024-04-28 20:36:21 +00:00
#: web/templates/admin/customer/form.gohtml:21
msgctxt "action"
msgid "Invoice Customer"
msgstr "Factura al client"
#: web/templates/admin/customer/contact.gohtml:19
2024-04-28 18:28:45 +00:00
#: web/templates/admin/booking/guest.gohtml:8
msgctxt "input"
msgid "ID document number"
msgstr "Número de document d’ identitat"
2024-04-28 20:36:21 +00:00
#: web/templates/admin/customer/contact.gohtml:31
2024-04-28 18:28:45 +00:00
#: web/templates/admin/booking/guest.gohtml:20
msgctxt "input"
msgid "ID document type"
msgstr "Tipus de document"
2024-04-28 20:36:21 +00:00
#: web/templates/admin/customer/contact.gohtml:36
2024-04-28 18:28:45 +00:00
#: web/templates/admin/booking/guest.gohtml:25
msgid "Choose an ID document type"
msgstr "Esculli un tipus de document"
2024-04-28 20:36:21 +00:00
#: web/templates/admin/customer/contact.gohtml:68
2024-04-28 18:28:45 +00:00
#: web/templates/admin/taxDetails.gohtml:85
msgctxt "input"
msgid "Province"
msgstr "Província"
2024-04-28 20:36:21 +00:00
#: web/templates/admin/customer/contact.gohtml:104
2024-04-28 18:28:45 +00:00
#: web/templates/admin/booking/fields.gohtml:239
msgctxt "input"
msgid "Email (optional)"
msgstr "Correu-e (opcional)"
2024-04-28 20:36:21 +00:00
#: web/templates/admin/customer/contact.gohtml:115
2024-04-28 18:28:45 +00:00
#: web/templates/admin/booking/fields.gohtml:248
#: web/templates/admin/booking/guest.gohtml:119
msgctxt "input"
msgid "Phone (optional)"
msgstr "Telèfon (opcional)"
#: web/templates/admin/customer/index.gohtml:6
2024-05-02 23:01:01 +00:00
#: web/templates/admin/layout.gohtml:98
2024-04-28 18:28:45 +00:00
msgctxt "title"
msgid "Customers"
msgstr "Clients"
#: web/templates/admin/customer/index.gohtml:14
msgctxt "action"
msgid "Add Customer"
msgstr "Afegeix client"
2024-05-03 17:13:49 +00:00
#: web/templates/admin/customer/index.gohtml:52
2024-05-13 08:40:21 +00:00
#: web/templates/admin/user/login-attempts.gohtml:52
2024-04-28 18:28:45 +00:00
#: web/templates/admin/user/index.gohtml:21
msgctxt "header"
msgid "Email"
msgstr "Correu-e"
2024-05-03 17:13:49 +00:00
#: web/templates/admin/customer/index.gohtml:53
2024-04-28 18:28:45 +00:00
msgctxt "header"
msgid "Phone"
msgstr "Telèfon"
2024-05-03 17:13:49 +00:00
#: web/templates/admin/customer/index.gohtml:61
2024-04-28 18:28:45 +00:00
msgid "No customer found."
msgstr "No s’ ha trobat cap client."
Split templates and handlers into admin and public
I need to check that the user is an employee (or admin) in
administration handlers, but i do not want to do it for each handler,
because i am bound to forget it. Thus, i added the /admin sub-path for
these resources.
The public-facing web is the rest of the resources outside /admin, but
for now there is only home, to test whether it works as expected or not.
The public-facing web can not relay on the user’s language settings, as
the guest user has no way to set that. I would be happy to just use the
Accept-Language header for that, but apparently Google does not use that
header[0], and they give four alternatives: a country-specific domain,
a subdomain with a generic top-level domain (gTLD), subdirectories with
a gTLD, or URL parameters (e.g., site.com?loc=de).
Of the four, Google does not recommend URL parameters, and the customer
is already using subdirectories with the current site, therefor that’s
what i have chosen.
Google also tells me that it is a very good idea to have links between
localized version of the same resources, either with <link> elements,
Link HTTP response headers, or a sitemap file[1]; they are all
equivalent in the eyes of Google.
I have choosen the Link response headers way, because for that i can
simply “augment” ResponseHeader to automatically add these headers when
the response status is 2xx, otherwise i would need to pass down the
original URL path until it reaches the template.
Even though Camper is supposed to be a “generic”, multi-company
application, i think i will stick to the easiest route and write the
templates for just the “first” customer.
[0]: https://developers.google.com/search/docs/specialty/international/managing-multi-regional-sites
[1]: https://developers.google.com/search/docs/specialty/international/localized-versions
2023-08-05 01:42:37 +00:00
#: web/templates/admin/dashboard.gohtml:6
2024-01-27 21:51:41 +00:00
#: web/templates/admin/dashboard.gohtml:13 web/templates/admin/layout.gohtml:89
Get user from database based on cookie and serve login if not logged in
To get the user from the database i have to set the cookie first, that
was already done in database.MustAcquire, but i thought they were too
far apart, even thought they are so related. So, the cookie, and thus
the role, is set when getting the user, that is actually the first thing
to do once the connection is acquired. However, that way the database
package has no knowledge of cookies, and the code that sets the cookie
and retrieves the user are next to each other.
I applied the same logic to the changes of locale.Match: it has not
business knowing that the accept language string comes from a request;
it only needs the actual string. Also, the TODO comment about getting
the user’s locale made no sense, now, because app already knows that
locale, so there is no need to pass the user to the locale package.
Getting the locale is done after retrieving the user from the database,
for the same reason the connection is Acquired as far up as possible:
almost every request will need this value, together with the user and
the database connection.
I am a bit affraid that i will end up with functions that always expect
these three values. Maybe i can put the locale inside user, as it is
the user’s locale, after all, no matter if it came from the database or
the user agent, but connection and user must be separate, i think.
We’ll see.
2023-07-25 23:50:39 +00:00
msgctxt "title"
msgid "Dashboard"
msgstr "Tauler"
2024-04-28 18:28:45 +00:00
#: web/templates/admin/invoice/product-form.gohtml:11
#: web/templates/admin/booking/guest.gohtml:5
msgctxt "action"
msgid "Remove"
msgstr "Esborra"
#: web/templates/admin/invoice/product-form.gohtml:44
msgctxt "input"
msgid "Quantity"
msgstr "Quantitat"
#: web/templates/admin/invoice/product-form.gohtml:58
msgctxt "input"
msgid "Discount (%)"
msgstr "Descompte (%)"
#: web/templates/admin/invoice/product-form.gohtml:73
msgctxt "input"
msgid "Taxes"
msgstr "Imposts"
#: web/templates/admin/invoice/product-form.gohtml:79
msgid "Select a TAX"
msgstr "Escolliu un impost"
#: web/templates/admin/invoice/form.gohtml:4
msgctxt "title"
msgid "Edit Invoice “%s”"
msgstr "Edició de la factura «%s»"
#: web/templates/admin/invoice/form.gohtml:6
msgctxt "title"
msgid "New Invoice"
msgstr "Nova factura"
#: web/templates/admin/invoice/form.gohtml:15
#: web/templates/admin/invoice/index.gohtml:2
#: web/templates/admin/invoice/view.gohtml:6
2024-05-02 23:01:01 +00:00
#: web/templates/admin/layout.gohtml:101
2024-04-28 18:28:45 +00:00
msgctxt "title"
msgid "Invoices"
msgstr "Factures"
2024-04-28 20:36:21 +00:00
#: web/templates/admin/invoice/form.gohtml:34
2024-04-28 18:28:45 +00:00
msgid "Product “%s” removed"
msgstr "S’ ha esborrat el producte «%s»"
2024-04-28 20:36:21 +00:00
#: web/templates/admin/invoice/form.gohtml:38
2024-04-28 18:28:45 +00:00
msgctxt "action"
msgid "Undo"
msgstr "Desfes"
2024-04-28 20:36:21 +00:00
#: web/templates/admin/invoice/form.gohtml:53
2024-04-28 18:28:45 +00:00
msgctxt "input"
msgid "Invoice date"
msgstr "Data de la factura"
2024-04-28 20:36:21 +00:00
#: web/templates/admin/invoice/form.gohtml:66
2024-04-28 18:28:45 +00:00
#: web/templates/admin/invoice/index.gohtml:51
msgctxt "input"
msgid "Invoice status"
msgstr "Estat de la factura"
2024-04-28 20:36:21 +00:00
#: web/templates/admin/invoice/form.gohtml:81
2024-04-28 18:28:45 +00:00
msgctxt "input"
msgid "Notes (optional)"
msgstr "Notes (opcional)"
2024-04-28 20:36:21 +00:00
#: web/templates/admin/invoice/form.gohtml:93
msgctxt "title"
msgid "Products"
msgstr "Productes"
#: web/templates/admin/invoice/form.gohtml:101
2024-04-28 18:28:45 +00:00
#: web/templates/admin/invoice/view.gohtml:59
msgctxt "title"
msgid "Subtotal"
msgstr "Subtotal"
2024-04-28 20:36:21 +00:00
#: web/templates/admin/invoice/form.gohtml:125
2024-04-28 18:28:45 +00:00
msgctxt "action"
msgid "Add products"
msgstr "Afegeix productes"
2024-04-28 20:36:21 +00:00
#: web/templates/admin/invoice/form.gohtml:132
2024-04-28 18:28:45 +00:00
msgctxt "action"
msgid "Save"
msgstr "Desa"
#: web/templates/admin/invoice/index.gohtml:25
msgctxt "action"
msgid "Download invoices"
msgstr "Descarrega factures"
#: web/templates/admin/invoice/index.gohtml:28
msgctxt "action"
msgid "Export list"
msgstr "Exporta llista"
2024-04-28 20:36:21 +00:00
#: web/templates/admin/invoice/index.gohtml:39
msgctxt "input"
msgid "Customer"
msgstr "Client"
2024-04-28 18:28:45 +00:00
#: web/templates/admin/invoice/index.gohtml:43
msgid "All customers"
msgstr "Tots els clients"
#: web/templates/admin/invoice/index.gohtml:81
msgctxt "input"
msgid "Invoice number"
msgstr "Número de factura"
#: web/templates/admin/invoice/index.gohtml:91
msgctxt "action"
msgid "Filter"
msgstr "Filtra"
#: web/templates/admin/invoice/index.gohtml:97
msgctxt "action"
msgid "Add invoice"
msgstr "Afegeix factura"
2024-05-03 17:13:49 +00:00
#: web/templates/admin/invoice/index.gohtml:103
2024-04-28 18:28:45 +00:00
msgctxt "invoice"
msgid "All"
msgstr "Totes"
2024-05-03 17:13:49 +00:00
#: web/templates/admin/invoice/index.gohtml:105
2024-04-28 18:28:45 +00:00
msgctxt "title"
msgid "Invoice Num."
msgstr "Núm. de factura"
2024-05-03 17:13:49 +00:00
#: web/templates/admin/invoice/index.gohtml:107
2024-04-28 18:28:45 +00:00
msgctxt "title"
msgid "Status"
msgstr "Estat"
2024-05-03 17:13:49 +00:00
#: web/templates/admin/invoice/index.gohtml:108
2024-04-28 18:28:45 +00:00
msgctxt "title"
msgid "Download"
msgstr "Descàrrega"
2024-05-03 17:13:49 +00:00
#: web/templates/admin/invoice/index.gohtml:109
2024-04-28 18:28:45 +00:00
msgctxt "title"
msgid "Amount"
msgstr "Import"
2024-05-03 17:13:49 +00:00
#: web/templates/admin/invoice/index.gohtml:117
msgid "No invoices found."
msgstr "No s’ ha trobat cap factura."
2024-04-28 18:28:45 +00:00
#: web/templates/admin/invoice/view.gohtml:2
msgctxt "title"
msgid "Invoice %s"
msgstr "Factura %s"
#: web/templates/admin/invoice/view.gohtml:15
msgctxt "action"
msgid "Edit"
msgstr "Edita"
#: web/templates/admin/invoice/view.gohtml:18
msgctxt "action"
msgid "Download invoice"
msgstr "Descarrega factura"
#: web/templates/admin/invoice/view.gohtml:53
msgctxt "title"
msgid "Concept"
msgstr "Concepte"
#: web/templates/admin/invoice/view.gohtml:54
msgctxt "title"
msgid "Price"
msgstr "Preu"
#: web/templates/admin/invoice/view.gohtml:56
msgctxt "title"
msgid "Discount"
msgstr "Descompte"
#: web/templates/admin/invoice/view.gohtml:58
msgctxt "title"
msgid "Units"
msgstr "Unitats"
#: web/templates/admin/invoice/view.gohtml:93
msgctxt "title"
msgid "Tax Base"
msgstr "Base imposable"
2024-05-03 17:13:49 +00:00
#: web/templates/admin/invoice/results.gohtml:3
msgctxt "action"
msgid "Select invoice %v"
msgstr "Selecciona la factura %v"
#: web/templates/admin/invoice/results.gohtml:32
msgctxt "action"
msgid "Download invoice %s"
msgstr "Descarrega la factura %s"
2024-05-02 23:01:01 +00:00
#: web/templates/admin/prebooking/index.gohtml:6
#: web/templates/admin/layout.gohtml:92
#: web/templates/admin/booking/form.gohtml:20
msgctxt "title"
msgid "Prebookings"
msgstr "Pre-reserves"
#: web/templates/admin/prebooking/index.gohtml:23
#: web/templates/admin/booking/index.gohtml:25
msgctxt "input"
msgid "Holder name"
msgstr "Nom del titular"
#: web/templates/admin/prebooking/index.gohtml:54
#: web/templates/admin/layout.gohtml:95
#: web/templates/admin/booking/form.gohtml:22
#: web/templates/admin/booking/checkin.gohtml:10
#: web/templates/admin/booking/index.gohtml:6
#: web/templates/admin/booking/index.gohtml:68
msgctxt "title"
msgid "Bookings"
msgstr "Reserves"
#: web/templates/admin/prebooking/index.gohtml:60
#: web/templates/admin/booking/index.gohtml:74
msgctxt "header"
msgid "Arrival Date"
msgstr "Data d’ arribada"
#: web/templates/admin/prebooking/index.gohtml:61
#: web/templates/admin/booking/index.gohtml:75
msgctxt "header"
msgid "Departure Date"
msgstr "Data de sortida"
#: web/templates/admin/prebooking/index.gohtml:62
#: web/templates/admin/booking/index.gohtml:76
msgctxt "header"
msgid "Holder Name"
msgstr "Nom del titular"
#: web/templates/admin/prebooking/index.gohtml:70
msgid "No prebooking found."
msgstr "No s’ ha trobat cap pre-reserva."
2024-01-21 21:44:04 +00:00
#: web/templates/admin/login.gohtml:6 web/templates/admin/login.gohtml:18
Add the skeleton of the web application
It does nothing more than to server a single page that does nothing
interesting.
This time i do not use a router. Instead, i am trying out a technique
i have seen in an article[0] that i have tried in other, smaller,
projects and seems to work surprisingly well: it just “cuts off” the
URI path by path, passing the request from handler to handler until
it finds its way to a handler that actually serves the request.
That helps to loosen the coupling between the application and lower
handlers, and makes dependencies explicit, because i need to pass the
locale, company, etc. down instead of storing them in contexts. Let’s
see if i do not regret it on a later date.
I also made a lot more packages that in Numerus. In Numerus i actually
only have the single pkg package, and it works, kind of, but i notice
how i name my methods to avoid clashing instead of using packages for
that. That is, instead of pkg.NewApp i now have app.New.
Initially i thought that Locale should be inside app, but then there was
a circular dependency between app and template. That is why i created a
separate package, but now i am wondering if template should be inside
app too, but then i would have app.MustRenderTemplate instead of
template.MustRender.
The CSS is the most bare-bones file i could write because i am focusing
in markup right now; Oriol will fill in the file once the application is
working.
[0]: https://blog.merovius.de/posts/2017-06-18-how-not-to-use-an-http-router/
2023-07-22 22:11:00 +00:00
msgctxt "title"
msgid "Login"
msgstr "Entrada"
2024-01-21 21:44:04 +00:00
#: web/templates/admin/login.gohtml:36 web/templates/admin/profile.gohtml:49
Add the skeleton of the web application
It does nothing more than to server a single page that does nothing
interesting.
This time i do not use a router. Instead, i am trying out a technique
i have seen in an article[0] that i have tried in other, smaller,
projects and seems to work surprisingly well: it just “cuts off” the
URI path by path, passing the request from handler to handler until
it finds its way to a handler that actually serves the request.
That helps to loosen the coupling between the application and lower
handlers, and makes dependencies explicit, because i need to pass the
locale, company, etc. down instead of storing them in contexts. Let’s
see if i do not regret it on a later date.
I also made a lot more packages that in Numerus. In Numerus i actually
only have the single pkg package, and it works, kind of, but i notice
how i name my methods to avoid clashing instead of using packages for
that. That is, instead of pkg.NewApp i now have app.New.
Initially i thought that Locale should be inside app, but then there was
a circular dependency between app and template. That is why i created a
separate package, but now i am wondering if template should be inside
app too, but then i would have app.MustRenderTemplate instead of
template.MustRender.
The CSS is the most bare-bones file i could write because i am focusing
in markup right now; Oriol will fill in the file once the application is
working.
[0]: https://blog.merovius.de/posts/2017-06-18-how-not-to-use-an-http-router/
2023-07-22 22:11:00 +00:00
msgctxt "input"
msgid "Password"
msgstr "Contrasenya"
2024-01-21 21:44:04 +00:00
#: web/templates/admin/login.gohtml:45
Add the skeleton of the web application
It does nothing more than to server a single page that does nothing
interesting.
This time i do not use a router. Instead, i am trying out a technique
i have seen in an article[0] that i have tried in other, smaller,
projects and seems to work surprisingly well: it just “cuts off” the
URI path by path, passing the request from handler to handler until
it finds its way to a handler that actually serves the request.
That helps to loosen the coupling between the application and lower
handlers, and makes dependencies explicit, because i need to pass the
locale, company, etc. down instead of storing them in contexts. Let’s
see if i do not regret it on a later date.
I also made a lot more packages that in Numerus. In Numerus i actually
only have the single pkg package, and it works, kind of, but i notice
how i name my methods to avoid clashing instead of using packages for
that. That is, instead of pkg.NewApp i now have app.New.
Initially i thought that Locale should be inside app, but then there was
a circular dependency between app and template. That is why i created a
separate package, but now i am wondering if template should be inside
app too, but then i would have app.MustRenderTemplate instead of
template.MustRender.
The CSS is the most bare-bones file i could write because i am focusing
in markup right now; Oriol will fill in the file once the application is
working.
[0]: https://blog.merovius.de/posts/2017-06-18-how-not-to-use-an-http-router/
2023-07-22 22:11:00 +00:00
msgctxt "action"
msgid "Login"
msgstr "Entra"
2023-09-25 18:10:33 +00:00
#: web/templates/admin/services/form.gohtml:8
2024-01-24 10:13:39 +00:00
#: web/templates/admin/services/form.gohtml:26
2023-09-25 18:10:33 +00:00
msgctxt "title"
msgid "Edit Service"
msgstr "Edició de servei"
#: web/templates/admin/services/form.gohtml:10
2024-01-24 10:13:39 +00:00
#: web/templates/admin/services/form.gohtml:28
2023-09-25 18:10:33 +00:00
msgctxt "title"
msgid "New Service"
msgstr "Nou servei"
2024-01-24 10:13:39 +00:00
#: web/templates/admin/services/form.gohtml:15
Add the services page
This page is more or less similar to home, in terms of database: it
has a carousel and a list of items; in this case, the definition of
campsite services.
As i said early, when adding the home carousel, this carousel has its
own relation and set of functions to manage slides. They are also
duplicated in Go code, but i think i will need to refactor it later to
a carousel package or something like that, because both relations have
the exact same fields and types, so it makes no sense to have twice the
same code.
I already did it with the CSS and JavaScript code, mostly because it was
easier to replace the `.surroundings div` selector with `.carousel`, and
because that way i can have a single template that loads and initializes
Slick.
There is no UI to create or edit service definitions, although there are
the SQL functions, because i have no more time now, and Oriol needs to
check that the style is correct for that page.
2023-09-17 01:42:16 +00:00
#: web/templates/admin/services/index.gohtml:6
2024-01-27 21:51:41 +00:00
#: web/templates/admin/layout.gohtml:61
Add the services page
This page is more or less similar to home, in terms of database: it
has a carousel and a list of items; in this case, the definition of
campsite services.
As i said early, when adding the home carousel, this carousel has its
own relation and set of functions to manage slides. They are also
duplicated in Go code, but i think i will need to refactor it later to
a carousel package or something like that, because both relations have
the exact same fields and types, so it makes no sense to have twice the
same code.
I already did it with the CSS and JavaScript code, mostly because it was
easier to replace the `.surroundings div` selector with `.carousel`, and
because that way i can have a single template that loads and initializes
Slick.
There is no UI to create or edit service definitions, although there are
the SQL functions, because i have no more time now, and Oriol needs to
check that the style is correct for that page.
2023-09-17 01:42:16 +00:00
msgctxt "title"
Manage all media uploads in a single place
It made no sense to have a file upload in each form that needs a media,
because to reuse an existing media users would need to upload the exact
same file again; this is very unusual and unfriendly.
A better option is to have a “centralized” media section, where people
can upload files there, and then have a picker to select from there.
Ideally, there would be an upload option in the picker, but i did not
add it yet.
I’ve split the content from the media because i want users to have the
option to update a media, for instance when they need to upload a
reduced or cropped version of the same photo, without an edit they would
need to upload the file as a new media and then update all places where
the old version was used. And i did not want to trouble people that
uploads the same photo twice: without the separate relation, doing so
would throw a constraint error.
I do not believe there is any security problem to have all companies
link their media to the same file, as they were already readable by
everyone and could upload the data from a different company to their
own; in other words, it is not worse than it was now.
2023-09-20 23:56:44 +00:00
msgid "Services Page"
msgstr "Pàgina de serveis"
Add the services page
This page is more or less similar to home, in terms of database: it
has a carousel and a list of items; in this case, the definition of
campsite services.
As i said early, when adding the home carousel, this carousel has its
own relation and set of functions to manage slides. They are also
duplicated in Go code, but i think i will need to refactor it later to
a carousel package or something like that, because both relations have
the exact same fields and types, so it makes no sense to have twice the
same code.
I already did it with the CSS and JavaScript code, mostly because it was
easier to replace the `.surroundings div` selector with `.carousel`, and
because that way i can have a single template that loads and initializes
Slick.
There is no UI to create or edit service definitions, although there are
the SQL functions, because i have no more time now, and Oriol needs to
check that the style is correct for that page.
2023-09-17 01:42:16 +00:00
2024-01-21 21:44:04 +00:00
#: web/templates/admin/services/index.gohtml:14
2024-01-23 10:52:39 +00:00
#: web/templates/admin/home/index.gohtml:83
Add the services page
This page is more or less similar to home, in terms of database: it
has a carousel and a list of items; in this case, the definition of
campsite services.
As i said early, when adding the home carousel, this carousel has its
own relation and set of functions to manage slides. They are also
duplicated in Go code, but i think i will need to refactor it later to
a carousel package or something like that, because both relations have
the exact same fields and types, so it makes no sense to have twice the
same code.
I already did it with the CSS and JavaScript code, mostly because it was
easier to replace the `.surroundings div` selector with `.carousel`, and
because that way i can have a single template that loads and initializes
Slick.
There is no UI to create or edit service definitions, although there are
the SQL functions, because i have no more time now, and Oriol needs to
check that the style is correct for that page.
2023-09-17 01:42:16 +00:00
msgctxt "title"
msgid "Carousel"
msgstr "Carrusel"
2024-01-21 21:44:04 +00:00
#: web/templates/admin/services/index.gohtml:60
2023-09-26 14:51:35 +00:00
msgctxt "action"
msgid "Add service"
msgstr "Afegeix servei"
2024-01-21 21:44:04 +00:00
#: web/templates/admin/services/index.gohtml:73
2024-01-13 00:15:24 +00:00
msgctxt "header"
msgid "Order"
msgstr "Ordre"
2024-01-21 21:44:04 +00:00
#: web/templates/admin/services/index.gohtml:74
2023-09-25 18:10:33 +00:00
msgctxt "header"
msgid "Service"
msgstr "Servei"
2024-01-21 21:44:04 +00:00
#: web/templates/admin/services/index.gohtml:79
2023-09-26 15:00:22 +00:00
msgid "Are you sure you wish to delete this service?"
msgstr "Esteu segur de voler esborrar aquest servei?"
2024-01-21 21:44:04 +00:00
#: web/templates/admin/services/index.gohtml:100
2023-09-25 18:10:33 +00:00
msgid "No services added yet."
msgstr "No s’ ha afegit cap servei encara."
2024-01-21 21:44:04 +00:00
#: web/templates/admin/profile.gohtml:6 web/templates/admin/profile.gohtml:15
2024-01-16 00:25:25 +00:00
#: web/templates/admin/layout.gohtml:33
2023-07-26 18:46:09 +00:00
msgctxt "title"
msgid "Profile"
msgstr "Perfil"
2024-01-21 21:44:04 +00:00
#: web/templates/admin/profile.gohtml:20
Allow users to update their profile images
I do not see the profile image as an “integral part” of the user (i.e.,
no need for constraints), hence i do not want to store it in the
database, as would do for the identification image during check-in.
By default, i store the avatars in /var/lib/camper/avatars, but it is a
variable to allow packagers change this value using the linker.
This is also served as a test bed for uploading files to the server,
that now has a better interface and uses less resources that what i did
to Numerus.
Now the profile handler needs to keep a variable to know the path to the
avatars’ directory, thus i had to change it to a struct nested in app,
much like the fileHandler does. It still has to return the HandlerFunc,
however, as this function needs to close over the user and connection
variables.
Part of #7.
2023-07-28 18:15:09 +00:00
msgctxt "inut"
msgid "Profile Image"
msgstr "Imatge del perfil"
2024-01-21 21:44:04 +00:00
#: web/templates/admin/profile.gohtml:46
Allow users to update their profile images
I do not see the profile image as an “integral part” of the user (i.e.,
no need for constraints), hence i do not want to store it in the
database, as would do for the identification image during check-in.
By default, i store the avatars in /var/lib/camper/avatars, but it is a
variable to allow packagers change this value using the linker.
This is also served as a test bed for uploading files to the server,
that now has a better interface and uses less resources that what i did
to Numerus.
Now the profile handler needs to keep a variable to know the path to the
avatars’ directory, thus i had to change it to a struct nested in app,
much like the fileHandler does. It still has to return the HandlerFunc,
however, as this function needs to close over the user and connection
variables.
Part of #7.
2023-07-28 18:15:09 +00:00
msgctxt "legend"
msgid "Change password"
msgstr "Canvi de contrasenya"
2024-01-21 21:44:04 +00:00
#: web/templates/admin/profile.gohtml:58
2023-07-26 18:46:09 +00:00
msgctxt "input"
msgid "Password Confirmation"
msgstr "Confirmació de la contrasenya"
2024-01-17 19:28:42 +00:00
#: web/templates/admin/user/login-attempts.gohtml:6
2024-05-13 08:40:21 +00:00
#: web/templates/admin/user/login-attempts.gohtml:46
2024-01-17 19:28:42 +00:00
msgctxt "title"
msgid "Login Attempts"
msgstr "Intents d’ entrada"
2024-01-21 21:44:04 +00:00
#: web/templates/admin/user/login-attempts.gohtml:10
#: web/templates/admin/user/index.gohtml:6
#: web/templates/admin/user/index.gohtml:16
2024-01-27 21:51:41 +00:00
#: web/templates/admin/layout.gohtml:73
2024-01-21 21:44:04 +00:00
msgctxt "title"
msgid "Users"
msgstr "Usuaris"
2024-05-13 08:40:21 +00:00
#: web/templates/admin/user/login-attempts.gohtml:53
2024-01-17 19:28:42 +00:00
msgctxt "header"
msgid "IP Address"
msgstr "Adreça IP"
2024-05-13 08:40:21 +00:00
#: web/templates/admin/user/login-attempts.gohtml:54
2024-01-17 19:28:42 +00:00
msgctxt "header"
msgid "Success"
msgstr "Èxit"
2024-05-13 08:40:21 +00:00
#: web/templates/admin/user/login-attempts.gohtml:62
msgid "No logging attempts found."
msgstr "No s’ ha trobat cap intent d’ entrada."
2024-01-21 21:44:04 +00:00
#: web/templates/admin/user/index.gohtml:14
Add admin page to list the users
There is no way, for now, to add, edit or remove users, because
currently we only need to list users.
I can not give admins access to the user table, for security
permissions, so i had to create a new view. I could name it also ‘user’
in ‘camper’ scheme, but then i was afraid i would have problems with
unit tests and their search_path, so instead i called it
‘company_user_profile’, which is like ‘user_profile’ but for all users
in ‘company_user’.
I created a new Go package for it, rather than add the admin handler in
‘auth’, because ‘template’ depends on ‘auth’, and rendering from ‘auth’
would cause a dependency loop.
I needed to have the roles in gettext to translate them, but there is
no obvious place where to put the call to PgettextNoop. For now, there
are in ‘NewAdminHandler’ because it is called once in the application’s
lifetime and they actually do not matter much.
2024-01-17 18:42:47 +00:00
msgctxt "action"
msgid "Add User"
msgstr "Afegeix usuari"
2024-01-21 21:44:04 +00:00
#: web/templates/admin/user/index.gohtml:15
2024-01-17 19:28:42 +00:00
msgctxt "action"
msgid "Logs"
msgstr "Registres"
Add admin page to list the users
There is no way, for now, to add, edit or remove users, because
currently we only need to list users.
I can not give admins access to the user table, for security
permissions, so i had to create a new view. I could name it also ‘user’
in ‘camper’ scheme, but then i was afraid i would have problems with
unit tests and their search_path, so instead i called it
‘company_user_profile’, which is like ‘user_profile’ but for all users
in ‘company_user’.
I created a new Go package for it, rather than add the admin handler in
‘auth’, because ‘template’ depends on ‘auth’, and rendering from ‘auth’
would cause a dependency loop.
I needed to have the roles in gettext to translate them, but there is
no obvious place where to put the call to PgettextNoop. For now, there
are in ‘NewAdminHandler’ because it is called once in the application’s
lifetime and they actually do not matter much.
2024-01-17 18:42:47 +00:00
2024-01-21 21:44:04 +00:00
#: web/templates/admin/user/index.gohtml:22
Add admin page to list the users
There is no way, for now, to add, edit or remove users, because
currently we only need to list users.
I can not give admins access to the user table, for security
permissions, so i had to create a new view. I could name it also ‘user’
in ‘camper’ scheme, but then i was afraid i would have problems with
unit tests and their search_path, so instead i called it
‘company_user_profile’, which is like ‘user_profile’ but for all users
in ‘company_user’.
I created a new Go package for it, rather than add the admin handler in
‘auth’, because ‘template’ depends on ‘auth’, and rendering from ‘auth’
would cause a dependency loop.
I needed to have the roles in gettext to translate them, but there is
no obvious place where to put the call to PgettextNoop. For now, there
are in ‘NewAdminHandler’ because it is called once in the application’s
lifetime and they actually do not matter much.
2024-01-17 18:42:47 +00:00
msgctxt "header"
msgid "Role"
msgstr "Rol"
2024-01-21 21:44:04 +00:00
#: web/templates/admin/user/index.gohtml:27
Add admin page to list the users
There is no way, for now, to add, edit or remove users, because
currently we only need to list users.
I can not give admins access to the user table, for security
permissions, so i had to create a new view. I could name it also ‘user’
in ‘camper’ scheme, but then i was afraid i would have problems with
unit tests and their search_path, so instead i called it
‘company_user_profile’, which is like ‘user_profile’ but for all users
in ‘company_user’.
I created a new Go package for it, rather than add the admin handler in
‘auth’, because ‘template’ depends on ‘auth’, and rendering from ‘auth’
would cause a dependency loop.
I needed to have the roles in gettext to translate them, but there is
no obvious place where to put the call to PgettextNoop. For now, there
are in ‘NewAdminHandler’ because it is called once in the application’s
lifetime and they actually do not matter much.
2024-01-17 18:42:47 +00:00
msgid "Are you sure you wish to delete this user?"
msgstr "Esteu segur de voler esborrar aquest usuari?"
2023-08-15 20:35:21 +00:00
#: web/templates/admin/taxDetails.gohtml:6
2024-01-21 21:44:04 +00:00
#: web/templates/admin/taxDetails.gohtml:15
2023-08-15 20:35:21 +00:00
msgctxt "title"
msgid "Tax Details"
msgstr "Configuració fiscal"
2024-01-21 21:44:04 +00:00
#: web/templates/admin/taxDetails.gohtml:20
#: web/templates/admin/taxDetails.gohtml:61
2023-08-15 20:35:21 +00:00
msgctxt "input"
msgid "Business Name"
msgstr "Nom de l’ empresa"
2024-01-21 21:44:04 +00:00
#: web/templates/admin/taxDetails.gohtml:29
2023-08-15 20:35:21 +00:00
msgctxt "input"
msgid "VAT Number"
msgstr "NIF"
2024-01-21 21:44:04 +00:00
#: web/templates/admin/taxDetails.gohtml:37
2023-08-15 20:35:21 +00:00
msgctxt "input"
msgid "Trade Name"
msgstr "Nom comercial"
2024-01-21 21:44:04 +00:00
#: web/templates/admin/taxDetails.gohtml:111
2023-08-15 20:35:21 +00:00
msgctxt "input"
msgid "Currency"
msgstr "Moneda"
2024-01-21 21:44:04 +00:00
#: web/templates/admin/taxDetails.gohtml:121
2023-08-15 20:35:21 +00:00
msgctxt "input"
msgid "Default Language"
msgstr "Idioma per defecte"
2024-01-21 21:44:04 +00:00
#: web/templates/admin/taxDetails.gohtml:130
2024-01-14 01:09:17 +00:00
msgctxt "title"
msgid "Tourism"
msgstr "Turisme"
2024-01-21 21:44:04 +00:00
#: web/templates/admin/taxDetails.gohtml:133
2024-01-14 01:09:17 +00:00
msgctxt "input"
msgid "RTC number"
msgstr "Número RTC"
2024-01-21 21:44:04 +00:00
#: web/templates/admin/taxDetails.gohtml:141
2024-01-14 01:09:17 +00:00
msgctxt "input"
msgid "Tourist Tax"
msgstr "Impost turístic"
2024-01-21 21:44:04 +00:00
#: web/templates/admin/taxDetails.gohtml:150
2024-02-27 18:45:47 +00:00
msgctxt "input"
msgid "Tourist Tax Days"
msgstr "Dies de l’ impost turístic"
#: web/templates/admin/taxDetails.gohtml:159
2024-01-14 01:09:17 +00:00
msgctxt "title"
msgid "Invoicing"
msgstr "Facturació"
2024-02-27 18:45:47 +00:00
#: web/templates/admin/taxDetails.gohtml:162
2023-08-15 20:35:21 +00:00
msgctxt "input"
msgid "Invoice Number Format"
msgstr "Format del número de factura"
2024-02-27 18:45:47 +00:00
#: web/templates/admin/taxDetails.gohtml:170
2023-08-15 20:35:21 +00:00
msgctxt "input"
msgid "Legal Disclaimer"
msgstr "Nota legal"
2024-01-16 00:25:25 +00:00
#: web/templates/admin/surroundings/form.gohtml:8
2024-01-21 21:44:04 +00:00
#: web/templates/admin/surroundings/form.gohtml:29
2024-01-16 00:25:25 +00:00
msgctxt "title"
msgid "Edit Highlight"
msgstr "Edició del punt d’ interès"
#: web/templates/admin/surroundings/form.gohtml:10
2024-01-21 21:44:04 +00:00
#: web/templates/admin/surroundings/form.gohtml:31
2024-01-16 00:25:25 +00:00
msgctxt "title"
msgid "New Highlight"
msgstr "Nou punt d’ interès"
#: web/templates/admin/surroundings/index.gohtml:6
msgctxt "title"
msgid "Surroundings Page"
msgstr "Pàgina de l’ entorn"
2024-01-21 21:44:04 +00:00
#: web/templates/admin/surroundings/index.gohtml:14
2024-01-16 00:25:25 +00:00
msgctxt "title"
2024-01-23 13:53:15 +00:00
msgid "Ad"
msgstr "Anunci"
#: web/templates/admin/surroundings/index.gohtml:21
msgctxt "input"
msgid "Title"
msgstr "Títol"
#: web/templates/admin/surroundings/index.gohtml:37
msgctxt "input"
msgid "Link Text"
msgstr "Text de l’ enllaç"
#: web/templates/admin/surroundings/index.gohtml:50
msgctxt "input"
msgid "Link URL"
msgstr "Adreça de l’ enllaç"
#: web/templates/admin/surroundings/index.gohtml:59
msgid "Are you sure you wish to delete the ad?"
msgstr "Esteu segur de voler esborrar aquest anunci?"
#: web/templates/admin/surroundings/index.gohtml:68
msgctxt "title"
2024-01-16 00:25:25 +00:00
msgid "Highlights"
msgstr "Punts d’ interès"
2024-01-23 13:53:15 +00:00
#: web/templates/admin/surroundings/index.gohtml:69
2024-01-16 00:25:25 +00:00
msgctxt "action"
msgid "Add highlight"
msgstr "Afegeix punt d’ interès"
2024-01-23 13:53:15 +00:00
#: web/templates/admin/surroundings/index.gohtml:88
2024-01-16 00:25:25 +00:00
msgid "Are you sure you wish to delete this highlight?"
msgstr "Esteu segur de voler esborrar aquest punt d’ interès?"
2024-01-23 13:53:15 +00:00
#: web/templates/admin/surroundings/index.gohtml:110
2024-01-16 00:25:25 +00:00
msgid "No highlights added yet."
msgstr "No s’ ha afegit cap punt d’ interès encara."
2024-01-27 21:51:41 +00:00
#: web/templates/admin/amenity/feature/form.gohtml:8
msgctxt "title"
msgid "Edit Amenity Feature"
msgstr "Edició de les característiques de la instaŀlació"
#: web/templates/admin/amenity/feature/form.gohtml:10
msgctxt "title"
msgid "New Amenity Feature"
msgstr "Nova característica de la instaŀlació"
#: web/templates/admin/amenity/feature/form.gohtml:16
#: web/templates/admin/amenity/feature/index.gohtml:10
#: web/templates/admin/amenity/carousel/form.gohtml:16
#: web/templates/admin/amenity/carousel/index.gohtml:10
#: web/templates/admin/amenity/form.gohtml:15
#: web/templates/admin/amenity/index.gohtml:6
#: web/templates/admin/layout.gohtml:49
msgctxt "title"
msgid "Amenities"
msgstr "Instaŀlacions"
#: web/templates/admin/amenity/feature/form.gohtml:17
#: web/templates/admin/amenity/feature/index.gohtml:6
msgctxt "title"
msgid "Amenity Features"
msgstr "Característiques de la instaŀlació"
#: web/templates/admin/amenity/feature/index.gohtml:56
msgid "No amenity features added yet."
msgstr "No s’ ha afegit cap característica a la instaŀlació encara."
#: web/templates/admin/amenity/carousel/form.gohtml:8
msgctxt "title"
msgid "Edit Amenity Carousel Slide"
msgstr "Edició de la diapositiva del carrusel de la instaŀlació"
#: web/templates/admin/amenity/carousel/form.gohtml:10
msgctxt "title"
msgid "New Amenity Carousel Slide"
msgstr "Nova diapositiva del carrusel de la instaŀlació"
#: web/templates/admin/amenity/carousel/form.gohtml:17
#: web/templates/admin/amenity/carousel/index.gohtml:6
msgctxt "title"
msgid "Amenity Carousel"
msgstr "Carrusel de la instaŀlació"
#: web/templates/admin/amenity/form.gohtml:8
msgctxt "title"
msgid "Edit Amenity"
msgstr "Edició de la instaŀlació"
#: web/templates/admin/amenity/form.gohtml:10
msgctxt "title"
msgid "New Amenity"
msgstr "Nova instaŀlació"
#: web/templates/admin/amenity/form.gohtml:33
#: web/templates/admin/amenity/index.gohtml:24
msgctxt "amenity"
msgid "Active"
msgstr "Activa"
#: web/templates/admin/amenity/index.gohtml:14
msgctxt "action"
msgid "Add Amenity"
msgstr "Afegeix instaŀlació"
“Finish” the new booking form
Had to bring the same fields that i have for a payment to booking,
except that some of those should be nullable, because it is unreasonable
to ask front desk to gather all customer data when they have a booking
via phone, for instance.
Therefore, i can not take advantage of the validation for customer data
that i use in the public-facing form, but, fortunately, most of the
validations where in separated functions, thus only had to rewrite that
one for this case.
I already have to create a booking from a payment, when receiving a
payment from the public instance, thus i made that function and reused
it here. Then i “overwrite” the newly created pre-booking with the
customer data from the form, and set is as confirmed, as we do not see
any point of allowing pre-bookings from employees.
2024-04-24 18:12:29 +00:00
#: web/templates/admin/amenity/index.gohtml:20
2024-04-26 15:09:36 +00:00
#: web/templates/admin/booking/grid.gohtml:15
“Finish” the new booking form
Had to bring the same fields that i have for a payment to booking,
except that some of those should be nullable, because it is unreasonable
to ask front desk to gather all customer data when they have a booking
via phone, for instance.
Therefore, i can not take advantage of the validation for customer data
that i use in the public-facing form, but, fortunately, most of the
validations where in separated functions, thus only had to rewrite that
one for this case.
I already have to create a booking from a payment, when receiving a
payment from the public instance, thus i made that function and reused
it here. Then i “overwrite” the newly created pre-booking with the
customer data from the form, and set is as confirmed, as we do not see
any point of allowing pre-bookings from employees.
2024-04-24 18:12:29 +00:00
msgctxt "header"
msgid "Label"
msgstr "Etiqueta"
2024-01-29 02:38:11 +00:00
#: web/templates/admin/amenity/index.gohtml:29
msgid "Are you sure you wish to delete this amenity?"
msgstr "Esteu segur de voler esborrar aquesta instaŀlació?"
#: web/templates/admin/amenity/index.gohtml:53
2024-01-27 21:51:41 +00:00
msgid "No amenities added yet."
msgstr "No s’ ha afegit cap instaŀlació encara."
2024-01-16 00:25:25 +00:00
#: web/templates/admin/layout.gohtml:29
2023-07-26 18:46:09 +00:00
msgctxt "title"
msgid "User Menu"
msgstr "Menú d’ usuari"
2024-01-16 00:25:25 +00:00
#: web/templates/admin/layout.gohtml:37
2023-08-15 20:35:21 +00:00
msgctxt "title"
msgid "Company Settings"
msgstr "Paràmetres de l’ empresa"
2024-01-27 21:51:41 +00:00
#: web/templates/admin/layout.gohtml:55
2024-01-21 21:44:04 +00:00
#: web/templates/admin/media/form.gohtml:10
2023-09-25 18:10:33 +00:00
#: web/templates/admin/media/index.gohtml:6
2024-01-21 21:44:04 +00:00
#: web/templates/admin/media/index.gohtml:14
#: web/templates/admin/media/upload.gohtml:10
2023-09-25 18:10:33 +00:00
msgctxt "title"
msgid "Media"
msgstr "Mèdia"
Add the logout button
Conceptually, to logout we have to “delete the session”, thus the best
HTTP verb would be `DELETE`. However, there is no way to send a
`DELETE` request with a regular HTML form, and it seems that never will
be[0].
I could use a POST, optionally with a “method override” technique, but
i was planing to use HTMx anyway, so this was as good an opportunity to
include it as any.
In this application i am not concerned with people not having JavaScript
enabled, because it is for a customer that has a known environment, and
we do not have much time anyway. Therefore, i opted to forgo
progressive enhancement in cases like this: if `DELETE` is needed, use
`hx-delete`.
Unfortunately, i can not use a <form> with a hidden <input> for the
CSRF token, because `DELETE` requests do not have body and the value
should be added as query parameters, like a form with GET method, but
HTMx does the incorrect thing here: sends the values in the request’s
body. That’s why i have to use a custom header and the `hx-header`
directive to include the CSRF token.
Then, by default HTMx targets the triggered element for swap with the
response from the server, but after a logout i want to redirect the
user to the login form again. I could set the hx-target to button to
replace the whole body, or tell the client to redirect to the new
location. I actually do not know which one is “better”. Maybe the
hx-target is best because then everything is handled by the client, but
in the case of logout, since it is possible that i might want to load
scripts only for logged-in users in the future, i opted for the full
page reload.
However, HTMx does not want to reload a page that return HTTP 401,
hence i had to include the GET method to /login in order to return the
login form with a response of HTTP 200, which also helps when
reloading in the browser after a failed login attempt. I am not worried
with the HTTP 401 when attempting to load a page as guest, because
this request most probably comes from the browser, not HTMx, and it will
show the login form as intended—even though it is not compliant, since
it does not return the WWW-Authenticate header, but this is the best i
can do given that no cookie-based authentication method has been
accepted[1].
[0]: https://www.w3.org/Bugs/Public/show_bug.cgi?id=10671#c16
[1]: https://datatracker.ietf.org/doc/id/draft-broyer-http-cookie-auth-00.html
2023-07-26 11:49:47 +00:00
2024-01-27 21:51:41 +00:00
#: web/templates/admin/layout.gohtml:58 web/templates/admin/home/index.gohtml:6
Make home page’s carousel manageable via the database
I debated with myself whether to create the home_carousel relation or
rather if it would be better to have a single carousel relation for all
pages. However, i thought that it would be actually harder to maintain
a single relation because i would need an additional column to tell one
carrousel from another, and what would that column be? An enum? A
foreign key to another relation? home_carousel carries no such issues.
I was starting to duplicate logic all over the packages, such as the
way to encode media paths or “localization” (l10n) input fields.
Therefore, i refactorized them.
In the case of media path, i added a function that accepts rows of
media, because always need the same columns from the row, and it was
yet another repetition if i needed to pass them all the time. Plus,
these kind of functions can be called as `table.function`, that make
them look like columns from the table; if PostgreSQL implemented virtual
generated columns, i would have used that instead.
I am not sure whether that media_path function can be immutable. An
immutable function is “guaranteed to return the same results given the
same arguments forever”, which would be true if the inputs where the
hash and the original_filename columns, instead of the whole rows, but
i left it as static because i did not know whether PostgreSQL interprets
the “same row but with different values” as a different input. That is,
whether PostgreSQL’s concept of row is the actual tuple or the space
that has a rowid, irrespective of contents; in the latter case, the
function can not be immutable. Just to be in the safe side, i left it
stable.
The home page was starting to grow a bit too much inside the app
package, new that it has its own admin handler, and moved it all to a
separate package.
2023-09-14 23:05:38 +00:00
msgctxt "title"
Manage all media uploads in a single place
It made no sense to have a file upload in each form that needs a media,
because to reuse an existing media users would need to upload the exact
same file again; this is very unusual and unfriendly.
A better option is to have a “centralized” media section, where people
can upload files there, and then have a picker to select from there.
Ideally, there would be an upload option in the picker, but i did not
add it yet.
I’ve split the content from the media because i want users to have the
option to update a media, for instance when they need to upload a
reduced or cropped version of the same photo, without an edit they would
need to upload the file as a new media and then update all places where
the old version was used. And i did not want to trouble people that
uploads the same photo twice: without the separate relation, doing so
would throw a constraint error.
I do not believe there is any security problem to have all companies
link their media to the same file, as they were already readable by
everyone and could upload the data from a different company to their
own; in other words, it is not worse than it was now.
2023-09-20 23:56:44 +00:00
msgid "Home Page"
msgstr "Pàgina d’ inici"
Make home page’s carousel manageable via the database
I debated with myself whether to create the home_carousel relation or
rather if it would be better to have a single carousel relation for all
pages. However, i thought that it would be actually harder to maintain
a single relation because i would need an additional column to tell one
carrousel from another, and what would that column be? An enum? A
foreign key to another relation? home_carousel carries no such issues.
I was starting to duplicate logic all over the packages, such as the
way to encode media paths or “localization” (l10n) input fields.
Therefore, i refactorized them.
In the case of media path, i added a function that accepts rows of
media, because always need the same columns from the row, and it was
yet another repetition if i needed to pass them all the time. Plus,
these kind of functions can be called as `table.function`, that make
them look like columns from the table; if PostgreSQL implemented virtual
generated columns, i would have used that instead.
I am not sure whether that media_path function can be immutable. An
immutable function is “guaranteed to return the same results given the
same arguments forever”, which would be true if the inputs where the
hash and the original_filename columns, instead of the whole rows, but
i left it as static because i did not know whether PostgreSQL interprets
the “same row but with different values” as a different input. That is,
whether PostgreSQL’s concept of row is the actual tuple or the space
that has a rowid, irrespective of contents; in the latter case, the
function can not be immutable. Just to be in the safe side, i left it
stable.
The home page was starting to grow a bit too much inside the app
package, new that it has its own admin handler, and moved it all to a
separate package.
2023-09-14 23:05:38 +00:00
2024-01-27 21:51:41 +00:00
#: web/templates/admin/layout.gohtml:78
2023-09-25 18:10:33 +00:00
msgctxt "action"
msgid "Logout"
msgstr "Surt"
Add the surroundings static page
This page is “highly stylized”, with a masonry-like grid, that i did not
know how to generate automatically from data defined in PostgreSQL,
therefore with Oriol we agreed to have this one as a static page and
we will see what we can do if the customer asks to be able to change
it.
I was a bit undecided on whether the icons in the bottom part of the
page should be defined in the CSS or with style="" and CSS variables,
like i do for the campsite type in the home page.
At first i thought that it should use CSS variables, mostly for
coherence: if another section of the web does it for its background
image, why no this one. The difference is that the home page is
dynamically created from the database, while this page is static and we
know what icons we need, thus it makes more sense to move it to the
stylesheet file, because then it will be downloaded by user agents that
actually want to use it (e.g., browsers, but not Braille terminals).
2023-09-16 22:11:39 +00:00
2024-05-02 23:01:01 +00:00
#: web/templates/admin/layout.gohtml:110
2024-01-21 21:44:04 +00:00
msgid "Breadcrumb"
msgstr "Fil d’ Ariadna"
2024-05-02 23:01:01 +00:00
#: web/templates/admin/layout.gohtml:122
2024-01-21 19:50:04 +00:00
msgid "Camper Version: %s"
msgstr "Camper versió: %s"
2024-01-23 10:52:39 +00:00
#: web/templates/admin/home/index.gohtml:15
msgctxt "title"
msgid "Slogan"
msgstr "Eslògan"
#: web/templates/admin/home/index.gohtml:21
msgctxt "input"
msgid "Slogan"
msgstr "Eslògan"
#: web/templates/admin/home/index.gohtml:38
Add home’s cover carousel
This is a separate carousel from the one displayed at the bottom with
location info; it is, i suppose, a carousel for the hero image.
For the database, it works exactly as the home carousel, but on the
front had to use AlpineJS instead of Slick because it needs to show a
text popping up from the bottom when the slide is show, something i do
not know how to do in Slick.
It now makes no sense to have the carousel inside the “nature” section,
because the heading is no longer in there, and moved it out into a new
“hero” div.
Since i now have two carousels in home, i had to add additional
attributes to carousel.AdminHandler to know which URL to point to when
POSTing, PUTting, or redirecting.
2024-01-16 20:05:52 +00:00
msgctxt "title"
msgid "Cover"
msgstr "Portada"
2024-01-23 10:52:39 +00:00
#: web/templates/admin/home/index.gohtml:39
Add home’s cover carousel
This is a separate carousel from the one displayed at the bottom with
location info; it is, i suppose, a carousel for the hero image.
For the database, it works exactly as the home carousel, but on the
front had to use AlpineJS instead of Slick because it needs to show a
text popping up from the bottom when the slide is show, something i do
not know how to do in Slick.
It now makes no sense to have the carousel inside the “nature” section,
because the heading is no longer in there, and moved it out into a new
“hero” div.
Since i now have two carousels in home, i had to add additional
attributes to carousel.AdminHandler to know which URL to point to when
POSTing, PUTting, or redirecting.
2024-01-16 20:05:52 +00:00
msgctxt "action"
msgid "Add cover image"
msgstr "Afegeix imatge de portada"
2024-01-23 10:52:39 +00:00
#: web/templates/admin/home/index.gohtml:58
Add home’s cover carousel
This is a separate carousel from the one displayed at the bottom with
location info; it is, i suppose, a carousel for the hero image.
For the database, it works exactly as the home carousel, but on the
front had to use AlpineJS instead of Slick because it needs to show a
text popping up from the bottom when the slide is show, something i do
not know how to do in Slick.
It now makes no sense to have the carousel inside the “nature” section,
because the heading is no longer in there, and moved it out into a new
“hero” div.
Since i now have two carousels in home, i had to add additional
attributes to carousel.AdminHandler to know which URL to point to when
POSTing, PUTting, or redirecting.
2024-01-16 20:05:52 +00:00
msgid "Are you sure you wish to delete this cover image?"
msgstr "Esteu segur de voler esborrar aquesta imatge de portada?"
2024-01-23 10:52:39 +00:00
#: web/templates/admin/home/index.gohtml:80
Add home’s cover carousel
This is a separate carousel from the one displayed at the bottom with
location info; it is, i suppose, a carousel for the hero image.
For the database, it works exactly as the home carousel, but on the
front had to use AlpineJS instead of Slick because it needs to show a
text popping up from the bottom when the slide is show, something i do
not know how to do in Slick.
It now makes no sense to have the carousel inside the “nature” section,
because the heading is no longer in there, and moved it out into a new
“hero” div.
Since i now have two carousels in home, i had to add additional
attributes to carousel.AdminHandler to know which URL to point to when
POSTing, PUTting, or redirecting.
2024-01-16 20:05:52 +00:00
msgid "No images added to the cover yet."
msgstr "No s’ ha afegit cap imatge de portada encara."
Add the upload form to the media picker
It makes easier to upload new images from the place where we need it,
instead of having to go to the media section each time.
It was a little messy, this one.
First of all, I realized that POSTint to /admin/media/picker to get the
new media field was wrong: i was not asking the server to “accept an
entity”, but only requesting a new HTML value, just like a GET to
/admin/media/upload requests the form to upload a new media, thus here
i should do the same, except i needed the query parameters to change the
field, which is fine—it is actually a different resource, thus a
different URL.
Then, i thought that i could not POST the upload to /admin/media,
because i returned a different HTML —the media field—, so i reused the
recently unused POST to /admin/media/picker to upload that file and
return the HTML for the field. It was wrong, because i was not
requesting the server to put the file as a subordinate of
/admin/media/picker, only /admin/media, but i did not come up with any
other solution.
Since i had two different upload functions now, i created uploadForm’s
Handle method to refactorize the duplicated logic to a single place.
Unfortunately, i did not work as i expected because uploadForm’s and
mediaPicker’s MustRender methods are different, and mediaPicker has to
embed uploadForm to render the form in the picker. That made me change
Handle’s output to a boolean and error in order for the HTTP handler
function know when to render the form with the error messages with the
proper MustRender handler.
However, I saw the opportunity of reusing that Handler method for
editMedia, that was doing mostly the same job, but had to call a
different Validate than uploadForm’s, because editMedia does not require
the uploaded file. That’s when i realized that i could use an interface
and that this interface could be reused not only within media but
throughout the application, and added HandleMultipart in form.
Had to create a different interface for multipart forms because they
need different parameters in Parse that non-multipart form, when i add
that interface, hence had to also change Parse to ParseForm to account
for the difference in signature; not a big deal.
After all that, i realized that i **could** POST to /admin/media in both
cases, because i always return “an HTML entity”, it just happens that
for the media section it is empty with a redirect, and for the picker is
the field. That made the whole Handle method a bit redundant, but i
left it nevertheless, as i find it slightly easier to read the
uploadMedia function now.
2023-09-21 23:40:22 +00:00
#: web/templates/admin/media/picker.gohtml:8
Manage all media uploads in a single place
It made no sense to have a file upload in each form that needs a media,
because to reuse an existing media users would need to upload the exact
same file again; this is very unusual and unfriendly.
A better option is to have a “centralized” media section, where people
can upload files there, and then have a picker to select from there.
Ideally, there would be an upload option in the picker, but i did not
add it yet.
I’ve split the content from the media because i want users to have the
option to update a media, for instance when they need to upload a
reduced or cropped version of the same photo, without an edit they would
need to upload the file as a new media and then update all places where
the old version was used. And i did not want to trouble people that
uploads the same photo twice: without the separate relation, doing so
would throw a constraint error.
I do not believe there is any security problem to have all companies
link their media to the same file, as they were already readable by
everyone and could upload the data from a different company to their
own; in other words, it is not worse than it was now.
2023-09-20 23:56:44 +00:00
msgctxt "title"
msgid "Media Picker"
msgstr "Selector de mèdia"
Add the surroundings static page
This page is “highly stylized”, with a masonry-like grid, that i did not
know how to generate automatically from data defined in PostgreSQL,
therefore with Oriol we agreed to have this one as a static page and
we will see what we can do if the customer asks to be able to change
it.
I was a bit undecided on whether the icons in the bottom part of the
page should be defined in the CSS or with style="" and CSS variables,
like i do for the campsite type in the home page.
At first i thought that it should use CSS variables, mostly for
coherence: if another section of the web does it for its background
image, why no this one. The difference is that the home page is
dynamically created from the database, while this page is static and we
know what icons we need, thus it makes more sense to move it to the
stylesheet file, because then it will be downloaded by user agents that
actually want to use it (e.g., browsers, but not Braille terminals).
2023-09-16 22:11:39 +00:00
Add the upload form to the media picker
It makes easier to upload new images from the place where we need it,
instead of having to go to the media section each time.
It was a little messy, this one.
First of all, I realized that POSTint to /admin/media/picker to get the
new media field was wrong: i was not asking the server to “accept an
entity”, but only requesting a new HTML value, just like a GET to
/admin/media/upload requests the form to upload a new media, thus here
i should do the same, except i needed the query parameters to change the
field, which is fine—it is actually a different resource, thus a
different URL.
Then, i thought that i could not POST the upload to /admin/media,
because i returned a different HTML —the media field—, so i reused the
recently unused POST to /admin/media/picker to upload that file and
return the HTML for the field. It was wrong, because i was not
requesting the server to put the file as a subordinate of
/admin/media/picker, only /admin/media, but i did not come up with any
other solution.
Since i had two different upload functions now, i created uploadForm’s
Handle method to refactorize the duplicated logic to a single place.
Unfortunately, i did not work as i expected because uploadForm’s and
mediaPicker’s MustRender methods are different, and mediaPicker has to
embed uploadForm to render the form in the picker. That made me change
Handle’s output to a boolean and error in order for the HTTP handler
function know when to render the form with the error messages with the
proper MustRender handler.
However, I saw the opportunity of reusing that Handler method for
editMedia, that was doing mostly the same job, but had to call a
different Validate than uploadForm’s, because editMedia does not require
the uploaded file. That’s when i realized that i could use an interface
and that this interface could be reused not only within media but
throughout the application, and added HandleMultipart in form.
Had to create a different interface for multipart forms because they
need different parameters in Parse that non-multipart form, when i add
that interface, hence had to also change Parse to ParseForm to account
for the difference in signature; not a big deal.
After all that, i realized that i **could** POST to /admin/media in both
cases, because i always return “an HTML entity”, it just happens that
for the media section it is empty with a redirect, and for the picker is
the field. That made the whole Handle method a bit redundant, but i
left it nevertheless, as i find it slightly easier to read the
uploadMedia function now.
2023-09-21 23:40:22 +00:00
#: web/templates/admin/media/picker.gohtml:19
msgctxt "title"
msgid "Upload New Media"
msgstr "Pujada de nou mèdia"
#: web/templates/admin/media/picker.gohtml:22
2024-01-21 21:44:04 +00:00
#: web/templates/admin/media/upload.gohtml:21
Add the upload form to the media picker
It makes easier to upload new images from the place where we need it,
instead of having to go to the media section each time.
It was a little messy, this one.
First of all, I realized that POSTint to /admin/media/picker to get the
new media field was wrong: i was not asking the server to “accept an
entity”, but only requesting a new HTML value, just like a GET to
/admin/media/upload requests the form to upload a new media, thus here
i should do the same, except i needed the query parameters to change the
field, which is fine—it is actually a different resource, thus a
different URL.
Then, i thought that i could not POST the upload to /admin/media,
because i returned a different HTML —the media field—, so i reused the
recently unused POST to /admin/media/picker to upload that file and
return the HTML for the field. It was wrong, because i was not
requesting the server to put the file as a subordinate of
/admin/media/picker, only /admin/media, but i did not come up with any
other solution.
Since i had two different upload functions now, i created uploadForm’s
Handle method to refactorize the duplicated logic to a single place.
Unfortunately, i did not work as i expected because uploadForm’s and
mediaPicker’s MustRender methods are different, and mediaPicker has to
embed uploadForm to render the form in the picker. That made me change
Handle’s output to a boolean and error in order for the HTTP handler
function know when to render the form with the error messages with the
proper MustRender handler.
However, I saw the opportunity of reusing that Handler method for
editMedia, that was doing mostly the same job, but had to call a
different Validate than uploadForm’s, because editMedia does not require
the uploaded file. That’s when i realized that i could use an interface
and that this interface could be reused not only within media but
throughout the application, and added HandleMultipart in form.
Had to create a different interface for multipart forms because they
need different parameters in Parse that non-multipart form, when i add
that interface, hence had to also change Parse to ParseForm to account
for the difference in signature; not a big deal.
After all that, i realized that i **could** POST to /admin/media in both
cases, because i always return “an HTML entity”, it just happens that
for the media section it is empty with a redirect, and for the picker is
the field. That made the whole Handle method a bit redundant, but i
left it nevertheless, as i find it slightly easier to read the
uploadMedia function now.
2023-09-21 23:40:22 +00:00
msgctxt "input"
msgid "File"
msgstr "Fitxer"
Manage all media uploads in a single place
It made no sense to have a file upload in each form that needs a media,
because to reuse an existing media users would need to upload the exact
same file again; this is very unusual and unfriendly.
A better option is to have a “centralized” media section, where people
can upload files there, and then have a picker to select from there.
Ideally, there would be an upload option in the picker, but i did not
add it yet.
I’ve split the content from the media because i want users to have the
option to update a media, for instance when they need to upload a
reduced or cropped version of the same photo, without an edit they would
need to upload the file as a new media and then update all places where
the old version was used. And i did not want to trouble people that
uploads the same photo twice: without the separate relation, doing so
would throw a constraint error.
I do not believe there is any security problem to have all companies
link their media to the same file, as they were already readable by
everyone and could upload the data from a different company to their
own; in other words, it is not worse than it was now.
2023-09-20 23:56:44 +00:00
#: web/templates/admin/media/picker.gohtml:26
2024-01-21 21:44:04 +00:00
#: web/templates/admin/media/form.gohtml:26
#: web/templates/admin/media/upload.gohtml:25
Add the upload form to the media picker
It makes easier to upload new images from the place where we need it,
instead of having to go to the media section each time.
It was a little messy, this one.
First of all, I realized that POSTint to /admin/media/picker to get the
new media field was wrong: i was not asking the server to “accept an
entity”, but only requesting a new HTML value, just like a GET to
/admin/media/upload requests the form to upload a new media, thus here
i should do the same, except i needed the query parameters to change the
field, which is fine—it is actually a different resource, thus a
different URL.
Then, i thought that i could not POST the upload to /admin/media,
because i returned a different HTML —the media field—, so i reused the
recently unused POST to /admin/media/picker to upload that file and
return the HTML for the field. It was wrong, because i was not
requesting the server to put the file as a subordinate of
/admin/media/picker, only /admin/media, but i did not come up with any
other solution.
Since i had two different upload functions now, i created uploadForm’s
Handle method to refactorize the duplicated logic to a single place.
Unfortunately, i did not work as i expected because uploadForm’s and
mediaPicker’s MustRender methods are different, and mediaPicker has to
embed uploadForm to render the form in the picker. That made me change
Handle’s output to a boolean and error in order for the HTTP handler
function know when to render the form with the error messages with the
proper MustRender handler.
However, I saw the opportunity of reusing that Handler method for
editMedia, that was doing mostly the same job, but had to call a
different Validate than uploadForm’s, because editMedia does not require
the uploaded file. That’s when i realized that i could use an interface
and that this interface could be reused not only within media but
throughout the application, and added HandleMultipart in form.
Had to create a different interface for multipart forms because they
need different parameters in Parse that non-multipart form, when i add
that interface, hence had to also change Parse to ParseForm to account
for the difference in signature; not a big deal.
After all that, i realized that i **could** POST to /admin/media in both
cases, because i always return “an HTML entity”, it just happens that
for the media section it is empty with a redirect, and for the picker is
the field. That made the whole Handle method a bit redundant, but i
left it nevertheless, as i find it slightly easier to read the
uploadMedia function now.
2023-09-21 23:40:22 +00:00
msgid "Maximum upload file size: %s"
msgstr "Mida màxima del fitxer a pujar: %s"
#: web/templates/admin/media/picker.gohtml:31
2024-01-21 21:44:04 +00:00
#: web/templates/admin/media/upload.gohtml:30
Add the upload form to the media picker
It makes easier to upload new images from the place where we need it,
instead of having to go to the media section each time.
It was a little messy, this one.
First of all, I realized that POSTint to /admin/media/picker to get the
new media field was wrong: i was not asking the server to “accept an
entity”, but only requesting a new HTML value, just like a GET to
/admin/media/upload requests the form to upload a new media, thus here
i should do the same, except i needed the query parameters to change the
field, which is fine—it is actually a different resource, thus a
different URL.
Then, i thought that i could not POST the upload to /admin/media,
because i returned a different HTML —the media field—, so i reused the
recently unused POST to /admin/media/picker to upload that file and
return the HTML for the field. It was wrong, because i was not
requesting the server to put the file as a subordinate of
/admin/media/picker, only /admin/media, but i did not come up with any
other solution.
Since i had two different upload functions now, i created uploadForm’s
Handle method to refactorize the duplicated logic to a single place.
Unfortunately, i did not work as i expected because uploadForm’s and
mediaPicker’s MustRender methods are different, and mediaPicker has to
embed uploadForm to render the form in the picker. That made me change
Handle’s output to a boolean and error in order for the HTTP handler
function know when to render the form with the error messages with the
proper MustRender handler.
However, I saw the opportunity of reusing that Handler method for
editMedia, that was doing mostly the same job, but had to call a
different Validate than uploadForm’s, because editMedia does not require
the uploaded file. That’s when i realized that i could use an interface
and that this interface could be reused not only within media but
throughout the application, and added HandleMultipart in form.
Had to create a different interface for multipart forms because they
need different parameters in Parse that non-multipart form, when i add
that interface, hence had to also change Parse to ParseForm to account
for the difference in signature; not a big deal.
After all that, i realized that i **could** POST to /admin/media in both
cases, because i always return “an HTML entity”, it just happens that
for the media section it is empty with a redirect, and for the picker is
the field. That made the whole Handle method a bit redundant, but i
left it nevertheless, as i find it slightly easier to read the
uploadMedia function now.
2023-09-21 23:40:22 +00:00
msgctxt "action"
msgid "Upload"
msgstr "Puja"
Add campsite map in SVG
I intend to use the same SVG file for customers and employees, so i had
to change Oriol’s design to add a class to layers that are supposed to
be only for customers, like trees. These are hidden in the admin area.
I understood that customers and employees have to click on a campsite to
select it, and then they can book or whatever they need to do to them.
Since customers and employees most certainly will need to have different
listeners on campsites, i decided to add the link with JavaScript. To
do so, i need a custom XML attribute with the campsite’s identifier.
Since i have seen that all campsites have a label, i changed the
“identifier” to the unique combination (company_id, label). The
company_id is there because different companies could have the same
label; i left the campsite_id primary key for foreign constraints.
In this case, as a test, i add an <a> element to the campsite with a
link to edit it; we’ll discuss with Oriol what exactly it needs to do.
However, the original design had the labels in a different layer, that
interfered with the link, as the numbers must be above the path and
the link must wrap the path in order to “inherit” its shape. I had no
other recourse than to move the labels in the same layer as the paths’.
2023-09-24 01:17:13 +00:00
#: web/templates/admin/media/picker.gohtml:47
Add the upload form to the media picker
It makes easier to upload new images from the place where we need it,
instead of having to go to the media section each time.
It was a little messy, this one.
First of all, I realized that POSTint to /admin/media/picker to get the
new media field was wrong: i was not asking the server to “accept an
entity”, but only requesting a new HTML value, just like a GET to
/admin/media/upload requests the form to upload a new media, thus here
i should do the same, except i needed the query parameters to change the
field, which is fine—it is actually a different resource, thus a
different URL.
Then, i thought that i could not POST the upload to /admin/media,
because i returned a different HTML —the media field—, so i reused the
recently unused POST to /admin/media/picker to upload that file and
return the HTML for the field. It was wrong, because i was not
requesting the server to put the file as a subordinate of
/admin/media/picker, only /admin/media, but i did not come up with any
other solution.
Since i had two different upload functions now, i created uploadForm’s
Handle method to refactorize the duplicated logic to a single place.
Unfortunately, i did not work as i expected because uploadForm’s and
mediaPicker’s MustRender methods are different, and mediaPicker has to
embed uploadForm to render the form in the picker. That made me change
Handle’s output to a boolean and error in order for the HTTP handler
function know when to render the form with the error messages with the
proper MustRender handler.
However, I saw the opportunity of reusing that Handler method for
editMedia, that was doing mostly the same job, but had to call a
different Validate than uploadForm’s, because editMedia does not require
the uploaded file. That’s when i realized that i could use an interface
and that this interface could be reused not only within media but
throughout the application, and added HandleMultipart in form.
Had to create a different interface for multipart forms because they
need different parameters in Parse that non-multipart form, when i add
that interface, hence had to also change Parse to ParseForm to account
for the difference in signature; not a big deal.
After all that, i realized that i **could** POST to /admin/media in both
cases, because i always return “an HTML entity”, it just happens that
for the media section it is empty with a redirect, and for the picker is
the field. That made the whole Handle method a bit redundant, but i
left it nevertheless, as i find it slightly easier to read the
uploadMedia function now.
2023-09-21 23:40:22 +00:00
msgctxt "title"
msgid "Choose Existing Media"
msgstr "Elecció d’ un mèdia existent"
Add campsite map in SVG
I intend to use the same SVG file for customers and employees, so i had
to change Oriol’s design to add a class to layers that are supposed to
be only for customers, like trees. These are hidden in the admin area.
I understood that customers and employees have to click on a campsite to
select it, and then they can book or whatever they need to do to them.
Since customers and employees most certainly will need to have different
listeners on campsites, i decided to add the link with JavaScript. To
do so, i need a custom XML attribute with the campsite’s identifier.
Since i have seen that all campsites have a label, i changed the
“identifier” to the unique combination (company_id, label). The
company_id is there because different companies could have the same
label; i left the campsite_id primary key for foreign constraints.
In this case, as a test, i add an <a> element to the campsite with a
link to edit it; we’ll discuss with Oriol what exactly it needs to do.
However, the original design had the labels in a different layer, that
interfered with the link, as the numbers must be above the path and
the link must wrap the path in order to “inherit” its shape. I had no
other recourse than to move the labels in the same layer as the paths’.
2023-09-24 01:17:13 +00:00
#: web/templates/admin/media/picker.gohtml:58
2024-01-21 21:44:04 +00:00
#: web/templates/admin/media/index.gohtml:23
Add the surroundings static page
This page is “highly stylized”, with a masonry-like grid, that i did not
know how to generate automatically from data defined in PostgreSQL,
therefore with Oriol we agreed to have this one as a static page and
we will see what we can do if the customer asks to be able to change
it.
I was a bit undecided on whether the icons in the bottom part of the
page should be defined in the CSS or with style="" and CSS variables,
like i do for the campsite type in the home page.
At first i thought that it should use CSS variables, mostly for
coherence: if another section of the web does it for its background
image, why no this one. The difference is that the home page is
dynamically created from the database, while this page is static and we
know what icons we need, thus it makes more sense to move it to the
stylesheet file, because then it will be downloaded by user agents that
actually want to use it (e.g., browsers, but not Braille terminals).
2023-09-16 22:11:39 +00:00
msgid "No media uploaded yet."
msgstr "No s’ ha pujat cap mèdia encara."
Manage all media uploads in a single place
It made no sense to have a file upload in each form that needs a media,
because to reuse an existing media users would need to upload the exact
same file again; this is very unusual and unfriendly.
A better option is to have a “centralized” media section, where people
can upload files there, and then have a picker to select from there.
Ideally, there would be an upload option in the picker, but i did not
add it yet.
I’ve split the content from the media because i want users to have the
option to update a media, for instance when they need to upload a
reduced or cropped version of the same photo, without an edit they would
need to upload the file as a new media and then update all places where
the old version was used. And i did not want to trouble people that
uploads the same photo twice: without the separate relation, doing so
would throw a constraint error.
I do not believe there is any security problem to have all companies
link their media to the same file, as they were already readable by
everyone and could upload the data from a different company to their
own; in other words, it is not worse than it was now.
2023-09-20 23:56:44 +00:00
#: web/templates/admin/media/form.gohtml:6
2024-01-21 21:44:04 +00:00
#: web/templates/admin/media/form.gohtml:16
Manage all media uploads in a single place
It made no sense to have a file upload in each form that needs a media,
because to reuse an existing media users would need to upload the exact
same file again; this is very unusual and unfriendly.
A better option is to have a “centralized” media section, where people
can upload files there, and then have a picker to select from there.
Ideally, there would be an upload option in the picker, but i did not
add it yet.
I’ve split the content from the media because i want users to have the
option to update a media, for instance when they need to upload a
reduced or cropped version of the same photo, without an edit they would
need to upload the file as a new media and then update all places where
the old version was used. And i did not want to trouble people that
uploads the same photo twice: without the separate relation, doing so
would throw a constraint error.
I do not believe there is any security problem to have all companies
link their media to the same file, as they were already readable by
everyone and could upload the data from a different company to their
own; in other words, it is not worse than it was now.
2023-09-20 23:56:44 +00:00
msgctxt "title"
msgid "Edit Media"
msgstr "Edició de mèdia"
2024-01-21 21:44:04 +00:00
#: web/templates/admin/media/form.gohtml:22
Manage all media uploads in a single place
It made no sense to have a file upload in each form that needs a media,
because to reuse an existing media users would need to upload the exact
same file again; this is very unusual and unfriendly.
A better option is to have a “centralized” media section, where people
can upload files there, and then have a picker to select from there.
Ideally, there would be an upload option in the picker, but i did not
add it yet.
I’ve split the content from the media because i want users to have the
option to update a media, for instance when they need to upload a
reduced or cropped version of the same photo, without an edit they would
need to upload the file as a new media and then update all places where
the old version was used. And i did not want to trouble people that
uploads the same photo twice: without the separate relation, doing so
would throw a constraint error.
I do not believe there is any security problem to have all companies
link their media to the same file, as they were already readable by
everyone and could upload the data from a different company to their
own; in other words, it is not worse than it was now.
2023-09-20 23:56:44 +00:00
msgctxt "input"
msgid "Updated file"
msgstr "Fitxer actualitzat"
2024-01-21 21:44:04 +00:00
#: web/templates/admin/media/form.gohtml:31
Manage all media uploads in a single place
It made no sense to have a file upload in each form that needs a media,
because to reuse an existing media users would need to upload the exact
same file again; this is very unusual and unfriendly.
A better option is to have a “centralized” media section, where people
can upload files there, and then have a picker to select from there.
Ideally, there would be an upload option in the picker, but i did not
add it yet.
I’ve split the content from the media because i want users to have the
option to update a media, for instance when they need to upload a
reduced or cropped version of the same photo, without an edit they would
need to upload the file as a new media and then update all places where
the old version was used. And i did not want to trouble people that
uploads the same photo twice: without the separate relation, doing so
would throw a constraint error.
I do not believe there is any security problem to have all companies
link their media to the same file, as they were already readable by
everyone and could upload the data from a different company to their
own; in other words, it is not worse than it was now.
2023-09-20 23:56:44 +00:00
msgctxt "input"
msgid "Filename"
msgstr "Nom del fitxer"
2024-01-21 21:44:04 +00:00
#: web/templates/admin/media/index.gohtml:15
Manage all media uploads in a single place
It made no sense to have a file upload in each form that needs a media,
because to reuse an existing media users would need to upload the exact
same file again; this is very unusual and unfriendly.
A better option is to have a “centralized” media section, where people
can upload files there, and then have a picker to select from there.
Ideally, there would be an upload option in the picker, but i did not
add it yet.
I’ve split the content from the media because i want users to have the
option to update a media, for instance when they need to upload a
reduced or cropped version of the same photo, without an edit they would
need to upload the file as a new media and then update all places where
the old version was used. And i did not want to trouble people that
uploads the same photo twice: without the separate relation, doing so
would throw a constraint error.
I do not believe there is any security problem to have all companies
link their media to the same file, as they were already readable by
everyone and could upload the data from a different company to their
own; in other words, it is not worse than it was now.
2023-09-20 23:56:44 +00:00
msgctxt "action"
msgid "Upload media"
msgstr "Puja mèdia"
Add the surroundings static page
This page is “highly stylized”, with a masonry-like grid, that i did not
know how to generate automatically from data defined in PostgreSQL,
therefore with Oriol we agreed to have this one as a static page and
we will see what we can do if the customer asks to be able to change
it.
I was a bit undecided on whether the icons in the bottom part of the
page should be defined in the CSS or with style="" and CSS variables,
like i do for the campsite type in the home page.
At first i thought that it should use CSS variables, mostly for
coherence: if another section of the web does it for its background
image, why no this one. The difference is that the home page is
dynamically created from the database, while this page is static and we
know what icons we need, thus it makes more sense to move it to the
stylesheet file, because then it will be downloaded by user agents that
actually want to use it (e.g., browsers, but not Braille terminals).
2023-09-16 22:11:39 +00:00
#: web/templates/admin/media/upload.gohtml:6
2024-01-21 21:44:04 +00:00
#: web/templates/admin/media/upload.gohtml:16
Add the surroundings static page
This page is “highly stylized”, with a masonry-like grid, that i did not
know how to generate automatically from data defined in PostgreSQL,
therefore with Oriol we agreed to have this one as a static page and
we will see what we can do if the customer asks to be able to change
it.
I was a bit undecided on whether the icons in the bottom part of the
page should be defined in the CSS or with style="" and CSS variables,
like i do for the campsite type in the home page.
At first i thought that it should use CSS variables, mostly for
coherence: if another section of the web does it for its background
image, why no this one. The difference is that the home page is
dynamically created from the database, while this page is static and we
know what icons we need, thus it makes more sense to move it to the
stylesheet file, because then it will be downloaded by user agents that
actually want to use it (e.g., browsers, but not Braille terminals).
2023-09-16 22:11:39 +00:00
msgctxt "title"
msgid "Upload Media"
msgstr "Pujada de mèdia"
2024-04-26 15:09:36 +00:00
#: web/templates/admin/booking/fields.gohtml:19
“Finish” the new booking form
Had to bring the same fields that i have for a payment to booking,
except that some of those should be nullable, because it is unreasonable
to ask front desk to gather all customer data when they have a booking
via phone, for instance.
Therefore, i can not take advantage of the validation for customer data
that i use in the public-facing form, but, fortunately, most of the
validations where in separated functions, thus only had to rewrite that
one for this case.
I already have to create a booking from a payment, when receiving a
payment from the public instance, thus i made that function and reused
it here. Then i “overwrite” the newly created pre-booking with the
customer data from the form, and set is as confirmed, as we do not see
any point of allowing pre-bookings from employees.
2024-04-24 18:12:29 +00:00
msgid "Choose an accommodation"
msgstr "Esculliu un allotjament"
2024-04-26 15:09:36 +00:00
#: web/templates/admin/booking/fields.gohtml:73
“Finish” the new booking form
Had to bring the same fields that i have for a payment to booking,
except that some of those should be nullable, because it is unreasonable
to ask front desk to gather all customer data when they have a booking
via phone, for instance.
Therefore, i can not take advantage of the validation for customer data
that i use in the public-facing form, but, fortunately, most of the
validations where in separated functions, thus only had to rewrite that
one for this case.
I already have to create a booking from a payment, when receiving a
payment from the public instance, thus i made that function and reused
it here. Then i “overwrite” the newly created pre-booking with the
customer data from the form, and set is as confirmed, as we do not see
any point of allowing pre-bookings from employees.
2024-04-24 18:12:29 +00:00
msgctxt "header"
msgid "Units"
msgstr "Unitats"
2024-04-26 15:09:36 +00:00
#: web/templates/admin/booking/fields.gohtml:74
“Finish” the new booking form
Had to bring the same fields that i have for a payment to booking,
except that some of those should be nullable, because it is unreasonable
to ask front desk to gather all customer data when they have a booking
via phone, for instance.
Therefore, i can not take advantage of the validation for customer data
that i use in the public-facing form, but, fortunately, most of the
validations where in separated functions, thus only had to rewrite that
one for this case.
I already have to create a booking from a payment, when receiving a
payment from the public instance, thus i made that function and reused
it here. Then i “overwrite” the newly created pre-booking with the
customer data from the form, and set is as confirmed, as we do not see
any point of allowing pre-bookings from employees.
2024-04-24 18:12:29 +00:00
msgctxt "header"
msgid "Decription"
msgstr "Descripció"
2024-05-03 17:13:49 +00:00
#: web/templates/admin/booking/fields.gohtml:81 pkg/invoice/admin.go:963
2024-04-28 20:36:21 +00:00
#: pkg/booking/cart.go:232
“Finish” the new booking form
Had to bring the same fields that i have for a payment to booking,
except that some of those should be nullable, because it is unreasonable
to ask front desk to gather all customer data when they have a booking
via phone, for instance.
Therefore, i can not take advantage of the validation for customer data
that i use in the public-facing form, but, fortunately, most of the
validations where in separated functions, thus only had to rewrite that
one for this case.
I already have to create a booking from a payment, when receiving a
payment from the public instance, thus i made that function and reused
it here. Then i “overwrite” the newly created pre-booking with the
customer data from the form, and set is as confirmed, as we do not see
any point of allowing pre-bookings from employees.
2024-04-24 18:12:29 +00:00
msgctxt "cart"
msgid "Night"
msgstr "Nit"
2024-04-26 15:09:36 +00:00
#: web/templates/admin/booking/fields.gohtml:200
“Finish” the new booking form
Had to bring the same fields that i have for a payment to booking,
except that some of those should be nullable, because it is unreasonable
to ask front desk to gather all customer data when they have a booking
via phone, for instance.
Therefore, i can not take advantage of the validation for customer data
that i use in the public-facing form, but, fortunately, most of the
validations where in separated functions, thus only had to rewrite that
one for this case.
I already have to create a booking from a payment, when receiving a
payment from the public instance, thus i made that function and reused
it here. Then i “overwrite” the newly created pre-booking with the
customer data from the form, and set is as confirmed, as we do not see
any point of allowing pre-bookings from employees.
2024-04-24 18:12:29 +00:00
msgctxt "input"
msgid "Country (optional)"
msgstr "País (opcional)"
2024-04-26 15:09:36 +00:00
#: web/templates/admin/booking/fields.gohtml:212
2024-04-28 18:28:45 +00:00
#: web/templates/admin/booking/guest.gohtml:130
“Finish” the new booking form
Had to bring the same fields that i have for a payment to booking,
except that some of those should be nullable, because it is unreasonable
to ask front desk to gather all customer data when they have a booking
via phone, for instance.
Therefore, i can not take advantage of the validation for customer data
that i use in the public-facing form, but, fortunately, most of the
validations where in separated functions, thus only had to rewrite that
one for this case.
I already have to create a booking from a payment, when receiving a
payment from the public instance, thus i made that function and reused
it here. Then i “overwrite” the newly created pre-booking with the
customer data from the form, and set is as confirmed, as we do not see
any point of allowing pre-bookings from employees.
2024-04-24 18:12:29 +00:00
msgctxt "input"
msgid "Address (optional)"
msgstr "Adreça (opcional)"
2024-04-26 15:09:36 +00:00
#: web/templates/admin/booking/fields.gohtml:221
“Finish” the new booking form
Had to bring the same fields that i have for a payment to booking,
except that some of those should be nullable, because it is unreasonable
to ask front desk to gather all customer data when they have a booking
via phone, for instance.
Therefore, i can not take advantage of the validation for customer data
that i use in the public-facing form, but, fortunately, most of the
validations where in separated functions, thus only had to rewrite that
one for this case.
I already have to create a booking from a payment, when receiving a
payment from the public instance, thus i made that function and reused
it here. Then i “overwrite” the newly created pre-booking with the
customer data from the form, and set is as confirmed, as we do not see
any point of allowing pre-bookings from employees.
2024-04-24 18:12:29 +00:00
msgctxt "input"
msgid "Postcode (optional)"
msgstr "Codi postal (opcional)"
2024-04-26 15:09:36 +00:00
#: web/templates/admin/booking/fields.gohtml:230
“Finish” the new booking form
Had to bring the same fields that i have for a payment to booking,
except that some of those should be nullable, because it is unreasonable
to ask front desk to gather all customer data when they have a booking
via phone, for instance.
Therefore, i can not take advantage of the validation for customer data
that i use in the public-facing form, but, fortunately, most of the
validations where in separated functions, thus only had to rewrite that
one for this case.
I already have to create a booking from a payment, when receiving a
payment from the public instance, thus i made that function and reused
it here. Then i “overwrite” the newly created pre-booking with the
customer data from the form, and set is as confirmed, as we do not see
any point of allowing pre-bookings from employees.
2024-04-24 18:12:29 +00:00
msgctxt "input"
msgid "Town or village (optional)"
msgstr "Població (opcional)"
#: web/templates/admin/booking/form.gohtml:8
msgctxt "title"
msgid "Edit Booking"
msgstr "Edició de la reserva"
#: web/templates/admin/booking/form.gohtml:10
msgctxt "title"
msgid "New Booking"
msgstr "Nova reserva"
2024-05-02 23:01:01 +00:00
#: web/templates/admin/booking/form.gohtml:30
2024-04-26 15:09:36 +00:00
msgctxt "action"
msgid "Check-in Booking"
msgstr "Registra la reserva"
2024-05-02 23:01:01 +00:00
#: web/templates/admin/booking/form.gohtml:31
2024-04-28 20:36:21 +00:00
msgctxt "action"
msgid "Invoice Booking"
msgstr "Factura la reserva"
2024-05-03 15:21:20 +00:00
#: web/templates/admin/booking/form.gohtml:58
msgid "Are you sure you wish to cancel this booking?"
msgstr "Esteu segur de voler cancel·lar aquesta reserva?"
#: web/templates/admin/booking/form.gohtml:59
msgctxt "action"
msgid "Cancel booking"
msgstr "Cancel·la la reserva"
2024-04-26 15:09:36 +00:00
#: web/templates/admin/booking/checkin.gohtml:6
msgctxt "title"
msgid "Check-in Booking"
msgstr "Registre de la reserva"
#: web/templates/admin/booking/checkin.gohtml:15
msgctxt "action"
msgid "Edit Booking"
msgstr "Edita la reserva"
#: web/templates/admin/booking/checkin.gohtml:26
msgctxt "action"
msgid "Check-in"
msgstr "Registra"
#: web/templates/admin/booking/checkin.gohtml:31
msgctxt "action"
msgid "Add another guest"
msgstr "Afegeix un altre hoste"
2024-01-21 21:44:04 +00:00
#: web/templates/admin/booking/index.gohtml:14
2024-01-18 20:05:30 +00:00
msgctxt "action"
msgid "Add Booking"
msgstr "Afegeix reserva"
2024-01-21 21:44:04 +00:00
#: web/templates/admin/booking/index.gohtml:15
2024-01-18 20:05:30 +00:00
msgctxt "action"
msgid "Export Bookings"
msgstr "Exporta reserves"
2024-05-02 23:01:01 +00:00
#: web/templates/admin/booking/index.gohtml:34
msgctxt "input"
msgid "Booking status"
msgstr "Estat de la reserva"
2024-01-18 20:05:30 +00:00
2024-05-02 23:01:01 +00:00
#: web/templates/admin/booking/index.gohtml:85
2024-01-18 20:05:30 +00:00
msgid "No booking found."
msgstr "No s’ ha trobat cap reserva."
2024-04-26 15:09:36 +00:00
#: web/templates/admin/booking/guest.gohtml:33
msgctxt "input"
msgid "ID document issue date (if any)"
msgstr "Data d’ expedició (si hi consta)"
2024-04-28 18:28:45 +00:00
#: web/templates/admin/booking/guest.gohtml:45
2024-04-26 15:09:36 +00:00
msgctxt "input"
msgid "First surname"
msgstr "Primer cognom"
2024-04-28 18:28:45 +00:00
#: web/templates/admin/booking/guest.gohtml:57
2024-04-26 15:09:36 +00:00
msgctxt "input"
msgid "Second surname (if has one)"
msgstr "Segon cognom (si en té)"
2024-04-28 18:28:45 +00:00
#: web/templates/admin/booking/guest.gohtml:68
2024-04-26 15:09:36 +00:00
msgctxt "input"
msgid "Given name"
msgstr "Nom"
2024-04-28 18:28:45 +00:00
#: web/templates/admin/booking/guest.gohtml:80
2024-04-26 15:09:36 +00:00
msgctxt "input"
msgid "Sex"
msgstr "Sexe"
2024-04-28 18:28:45 +00:00
#: web/templates/admin/booking/guest.gohtml:85
2024-04-26 15:09:36 +00:00
msgid "Choose a sex"
msgstr "Esculli un sexe"
2024-04-28 18:28:45 +00:00
#: web/templates/admin/booking/guest.gohtml:93
2024-04-26 15:09:36 +00:00
msgctxt "input"
msgid "Birthdate"
msgstr "Data de naixement"
2024-04-28 18:28:45 +00:00
#: web/templates/admin/booking/guest.gohtml:106
2024-04-26 15:09:36 +00:00
msgctxt "input"
msgid "Nationality"
msgstr "Nacionalitat"
2024-02-14 03:54:42 +00:00
#: pkg/payment/settings.go:37
msgctxt "redsys environment"
msgid "Test"
msgstr "Proves"
#: pkg/payment/settings.go:41
msgctxt "redsys environment"
msgid "Live"
msgstr "Real"
#: pkg/payment/settings.go:50
msgctxt "redsys integration"
msgid "InSite"
msgstr "InSite"
#: pkg/payment/settings.go:54
msgctxt "redsys integration"
msgid "Redirect"
msgstr "Redirecció"
#: pkg/payment/settings.go:98
msgid "Merchant code can not be empty."
msgstr "No podeu deixar el codi del comerç en blanc."
#: pkg/payment/settings.go:99
msgid "Merchant code must be exactly nine digits long."
msgstr "El codi del comerç ha de ser de nou dígits."
#: pkg/payment/settings.go:100
msgid "Merchant code must be a number."
msgstr "El codi del comerç."
#: pkg/payment/settings.go:104
msgid "Terminal number can not be empty."
msgstr "No podeu deixar el número del terminal en blanc."
#: pkg/payment/settings.go:105
msgid "Terminal number must be a number between 1 and 999."
msgstr "El número del terminal ha de ser entre 1 i 999"
#: pkg/payment/settings.go:113
msgid "Selected environment is not valid."
msgstr "L’ entorn escollit no és vàlid."
#: pkg/payment/settings.go:114
msgid "Selected integration is not valid."
msgstr "La integració escollida no és vàlida."
#: pkg/payment/settings.go:117
msgid "The merchant key is not valid."
msgstr "Aquesta clau del comerç no és vàlid."
2024-03-24 21:06:59 +00:00
#: pkg/payment/public.go:110
2024-02-12 17:06:17 +00:00
msgctxt "order product name"
msgid "Campsite Booking"
msgstr "Reserva de càmping"
2024-05-02 23:01:01 +00:00
#: pkg/payment/public.go:378
2024-02-13 04:20:35 +00:00
msgctxt "subject"
msgid "Booking payment successfully received"
msgstr "Rebut amb èxit el pagament de la reserva"
2024-02-11 20:45:00 +00:00
#: pkg/legal/admin.go:258 pkg/app/user.go:249 pkg/campsite/types/option.go:365
Add campsite_type_pet_cost relation to hold price of dogs in campsites
It is a separate relation, instead of having a field in campsite_type,
because not all campsite types allow dogs. I could have added a new
field to campsite_type, but then its values it would be meaningless for
campsites that do not allow dogs, and a nullable field is not a valid
solution because NULL means “unknown”, but we **do** know the price —
none.
A separate relation encodes the same information without ambiguities nor
null values, and, in fact, removed the dogs_allowed field from
campsite_type to prevent erroneous status, such as a campsite type that
allows dogs without having a cost — even if the cost is zero, it has to
be added to the new relation.
2024-02-10 05:18:30 +00:00
#: pkg/campsite/types/feature.go:272 pkg/campsite/types/admin.go:577
2024-02-29 15:59:30 +00:00
#: pkg/campsite/feature.go:269 pkg/season/admin.go:411
2024-05-03 17:13:49 +00:00
#: pkg/invoice/admin.go:1060 pkg/services/admin.go:316
2024-04-28 18:28:45 +00:00
#: pkg/surroundings/admin.go:340 pkg/amenity/feature.go:269
#: pkg/amenity/admin.go:283
2023-12-22 01:23:18 +00:00
msgid "Name can not be empty."
msgstr "No podeu deixar el nom en blanc."
2024-02-11 20:45:00 +00:00
#: pkg/legal/admin.go:259 pkg/campsite/types/option.go:366
Add campsite_type_pet_cost relation to hold price of dogs in campsites
It is a separate relation, instead of having a field in campsite_type,
because not all campsite types allow dogs. I could have added a new
field to campsite_type, but then its values it would be meaningless for
campsites that do not allow dogs, and a nullable field is not a valid
solution because NULL means “unknown”, but we **do** know the price —
none.
A separate relation encodes the same information without ambiguities nor
null values, and, in fact, removed the dogs_allowed field from
campsite_type to prevent erroneous status, such as a campsite type that
allows dogs without having a cost — even if the cost is zero, it has to
be added to the new relation.
2024-02-10 05:18:30 +00:00
#: pkg/campsite/types/feature.go:273 pkg/campsite/types/admin.go:578
2024-01-27 21:51:41 +00:00
#: pkg/campsite/feature.go:270 pkg/amenity/feature.go:270
2023-12-22 01:23:18 +00:00
msgid "Name must have at least one letter."
msgstr "El nom ha de tenir com a mínim una lletra."
2024-01-23 10:52:39 +00:00
#: pkg/carousel/admin.go:276 pkg/campsite/types/carousel.go:225
2024-01-27 21:51:41 +00:00
#: pkg/campsite/carousel.go:227 pkg/amenity/carousel.go:227
Manage all media uploads in a single place
It made no sense to have a file upload in each form that needs a media,
because to reuse an existing media users would need to upload the exact
same file again; this is very unusual and unfriendly.
A better option is to have a “centralized” media section, where people
can upload files there, and then have a picker to select from there.
Ideally, there would be an upload option in the picker, but i did not
add it yet.
I’ve split the content from the media because i want users to have the
option to update a media, for instance when they need to upload a
reduced or cropped version of the same photo, without an edit they would
need to upload the file as a new media and then update all places where
the old version was used. And i did not want to trouble people that
uploads the same photo twice: without the separate relation, doing so
would throw a constraint error.
I do not believe there is any security problem to have all companies
link their media to the same file, as they were already readable by
everyone and could upload the data from a different company to their
own; in other words, it is not worse than it was now.
2023-09-20 23:56:44 +00:00
msgctxt "input"
2023-09-22 00:17:56 +00:00
msgid "Slide image"
msgstr "Imatge de la diapositiva"
Manage all media uploads in a single place
It made no sense to have a file upload in each form that needs a media,
because to reuse an existing media users would need to upload the exact
same file again; this is very unusual and unfriendly.
A better option is to have a “centralized” media section, where people
can upload files there, and then have a picker to select from there.
Ideally, there would be an upload option in the picker, but i did not
add it yet.
I’ve split the content from the media because i want users to have the
option to update a media, for instance when they need to upload a
reduced or cropped version of the same photo, without an edit they would
need to upload the file as a new media and then update all places where
the old version was used. And i did not want to trouble people that
uploads the same photo twice: without the separate relation, doing so
would throw a constraint error.
I do not believe there is any security problem to have all companies
link their media to the same file, as they were already readable by
everyone and could upload the data from a different company to their
own; in other words, it is not worse than it was now.
2023-09-20 23:56:44 +00:00
2024-01-23 10:52:39 +00:00
#: pkg/carousel/admin.go:277 pkg/campsite/types/carousel.go:226
2024-01-27 21:51:41 +00:00
#: pkg/campsite/carousel.go:228 pkg/amenity/carousel.go:228
Manage all media uploads in a single place
It made no sense to have a file upload in each form that needs a media,
because to reuse an existing media users would need to upload the exact
same file again; this is very unusual and unfriendly.
A better option is to have a “centralized” media section, where people
can upload files there, and then have a picker to select from there.
Ideally, there would be an upload option in the picker, but i did not
add it yet.
I’ve split the content from the media because i want users to have the
option to update a media, for instance when they need to upload a
reduced or cropped version of the same photo, without an edit they would
need to upload the file as a new media and then update all places where
the old version was used. And i did not want to trouble people that
uploads the same photo twice: without the separate relation, doing so
would throw a constraint error.
I do not believe there is any security problem to have all companies
link their media to the same file, as they were already readable by
everyone and could upload the data from a different company to their
own; in other words, it is not worse than it was now.
2023-09-20 23:56:44 +00:00
msgctxt "action"
2023-09-22 00:17:56 +00:00
msgid "Set slide image"
msgstr "Estableix la imatge de la diapositiva"
Manage all media uploads in a single place
It made no sense to have a file upload in each form that needs a media,
because to reuse an existing media users would need to upload the exact
same file again; this is very unusual and unfriendly.
A better option is to have a “centralized” media section, where people
can upload files there, and then have a picker to select from there.
Ideally, there would be an upload option in the picker, but i did not
add it yet.
I’ve split the content from the media because i want users to have the
option to update a media, for instance when they need to upload a
reduced or cropped version of the same photo, without an edit they would
need to upload the file as a new media and then update all places where
the old version was used. And i did not want to trouble people that
uploads the same photo twice: without the separate relation, doing so
would throw a constraint error.
I do not believe there is any security problem to have all companies
link their media to the same file, as they were already readable by
everyone and could upload the data from a different company to their
own; in other words, it is not worse than it was now.
2023-09-20 23:56:44 +00:00
2024-01-23 10:52:39 +00:00
#: pkg/carousel/admin.go:346 pkg/campsite/types/carousel.go:299
2024-01-26 21:27:54 +00:00
#: pkg/campsite/carousel.go:302 pkg/surroundings/admin.go:335
2024-01-27 21:51:41 +00:00
#: pkg/amenity/carousel.go:302
Manage all media uploads in a single place
It made no sense to have a file upload in each form that needs a media,
because to reuse an existing media users would need to upload the exact
same file again; this is very unusual and unfriendly.
A better option is to have a “centralized” media section, where people
can upload files there, and then have a picker to select from there.
Ideally, there would be an upload option in the picker, but i did not
add it yet.
I’ve split the content from the media because i want users to have the
option to update a media, for instance when they need to upload a
reduced or cropped version of the same photo, without an edit they would
need to upload the file as a new media and then update all places where
the old version was used. And i did not want to trouble people that
uploads the same photo twice: without the separate relation, doing so
would throw a constraint error.
I do not believe there is any security problem to have all companies
link their media to the same file, as they were already readable by
everyone and could upload the data from a different company to their
own; in other words, it is not worse than it was now.
2023-09-20 23:56:44 +00:00
msgid "Slide image can not be empty."
msgstr "No podeu deixar la imatge de la diapositiva en blanc."
2024-01-23 10:52:39 +00:00
#: pkg/carousel/admin.go:347 pkg/campsite/types/carousel.go:300
2024-01-26 21:27:54 +00:00
#: pkg/campsite/carousel.go:303 pkg/surroundings/admin.go:336
2024-01-27 21:51:41 +00:00
#: pkg/amenity/carousel.go:303
2023-09-22 00:17:56 +00:00
msgid "Slide image must be an image media type."
msgstr "La imatge de la diapositiva ha de ser un mèdia de tipus imatge."
Manage all media uploads in a single place
It made no sense to have a file upload in each form that needs a media,
because to reuse an existing media users would need to upload the exact
same file again; this is very unusual and unfriendly.
A better option is to have a “centralized” media section, where people
can upload files there, and then have a picker to select from there.
Ideally, there would be an upload option in the picker, but i did not
add it yet.
I’ve split the content from the media because i want users to have the
option to update a media, for instance when they need to upload a
reduced or cropped version of the same photo, without an edit they would
need to upload the file as a new media and then update all places where
the old version was used. And i did not want to trouble people that
uploads the same photo twice: without the separate relation, doing so
would throw a constraint error.
I do not believe there is any security problem to have all companies
link their media to the same file, as they were already readable by
everyone and could upload the data from a different company to their
own; in other words, it is not worse than it was now.
2023-09-20 23:56:44 +00:00
2024-02-27 18:45:47 +00:00
#: pkg/app/login.go:56 pkg/app/user.go:246 pkg/company/admin.go:224
2024-04-28 18:28:45 +00:00
#: pkg/booking/public.go:592
2023-07-24 15:17:15 +00:00
msgid "Email can not be empty."
2023-08-08 18:09:57 +00:00
msgstr "No podeu deixar el correu-e en blanc."
2023-07-24 15:17:15 +00:00
2024-05-03 17:13:49 +00:00
#: pkg/app/login.go:57 pkg/app/user.go:247 pkg/customer/admin.go:361
#: pkg/company/admin.go:225 pkg/booking/admin.go:479 pkg/booking/public.go:593
2023-07-24 15:17:15 +00:00
msgid "This email is not valid. It should be like name@domain.com."
msgstr "Aquest correu-e no és vàlid. Hauria de ser similar a nom@domini.com."
Add the logout button
Conceptually, to logout we have to “delete the session”, thus the best
HTTP verb would be `DELETE`. However, there is no way to send a
`DELETE` request with a regular HTML form, and it seems that never will
be[0].
I could use a POST, optionally with a “method override” technique, but
i was planing to use HTMx anyway, so this was as good an opportunity to
include it as any.
In this application i am not concerned with people not having JavaScript
enabled, because it is for a customer that has a known environment, and
we do not have much time anyway. Therefore, i opted to forgo
progressive enhancement in cases like this: if `DELETE` is needed, use
`hx-delete`.
Unfortunately, i can not use a <form> with a hidden <input> for the
CSRF token, because `DELETE` requests do not have body and the value
should be added as query parameters, like a form with GET method, but
HTMx does the incorrect thing here: sends the values in the request’s
body. That’s why i have to use a custom header and the `hx-header`
directive to include the CSRF token.
Then, by default HTMx targets the triggered element for swap with the
response from the server, but after a logout i want to redirect the
user to the login form again. I could set the hx-target to button to
replace the whole body, or tell the client to redirect to the new
location. I actually do not know which one is “better”. Maybe the
hx-target is best because then everything is handled by the client, but
in the case of logout, since it is possible that i might want to load
scripts only for logged-in users in the future, i opted for the full
page reload.
However, HTMx does not want to reload a page that return HTTP 401,
hence i had to include the GET method to /login in order to return the
login form with a response of HTTP 200, which also helps when
reloading in the browser after a failed login attempt. I am not worried
with the HTTP 401 when attempting to load a page as guest, because
this request most probably comes from the browser, not HTMx, and it will
show the login form as intended—even though it is not compliant, since
it does not return the WWW-Authenticate header, but this is the best i
can do given that no cookie-based authentication method has been
accepted[1].
[0]: https://www.w3.org/Bugs/Public/show_bug.cgi?id=10671#c16
[1]: https://datatracker.ietf.org/doc/id/draft-broyer-http-cookie-auth-00.html
2023-07-26 11:49:47 +00:00
#: pkg/app/login.go:59
2023-07-24 15:17:15 +00:00
msgid "Password can not be empty."
msgstr "No podeu deixar la contrasenya en blanc."
2023-07-26 18:46:09 +00:00
#: pkg/app/login.go:86
2023-07-24 15:17:15 +00:00
msgid "Invalid user or password."
msgstr "Nom d’ usuari o contrasenya incorrectes."
Add the logout button
Conceptually, to logout we have to “delete the session”, thus the best
HTTP verb would be `DELETE`. However, there is no way to send a
`DELETE` request with a regular HTML form, and it seems that never will
be[0].
I could use a POST, optionally with a “method override” technique, but
i was planing to use HTMx anyway, so this was as good an opportunity to
include it as any.
In this application i am not concerned with people not having JavaScript
enabled, because it is for a customer that has a known environment, and
we do not have much time anyway. Therefore, i opted to forgo
progressive enhancement in cases like this: if `DELETE` is needed, use
`hx-delete`.
Unfortunately, i can not use a <form> with a hidden <input> for the
CSRF token, because `DELETE` requests do not have body and the value
should be added as query parameters, like a form with GET method, but
HTMx does the incorrect thing here: sends the values in the request’s
body. That’s why i have to use a custom header and the `hx-header`
directive to include the CSRF token.
Then, by default HTMx targets the triggered element for swap with the
response from the server, but after a logout i want to redirect the
user to the login form again. I could set the hx-target to button to
replace the whole body, or tell the client to redirect to the new
location. I actually do not know which one is “better”. Maybe the
hx-target is best because then everything is handled by the client, but
in the case of logout, since it is possible that i might want to load
scripts only for logged-in users in the future, i opted for the full
page reload.
However, HTMx does not want to reload a page that return HTTP 401,
hence i had to include the GET method to /login in order to return the
login form with a response of HTTP 200, which also helps when
reloading in the browser after a failed login attempt. I am not worried
with the HTTP 401 when attempting to load a page as guest, because
this request most probably comes from the browser, not HTMx, and it will
show the login form as intended—even though it is not compliant, since
it does not return the WWW-Authenticate header, but this is the best i
can do given that no cookie-based authentication method has been
accepted[1].
[0]: https://www.w3.org/Bugs/Public/show_bug.cgi?id=10671#c16
[1]: https://datatracker.ietf.org/doc/id/draft-broyer-http-cookie-auth-00.html
2023-07-26 11:49:47 +00:00
2023-08-08 00:29:14 +00:00
#: pkg/app/user.go:197
2023-07-26 18:46:09 +00:00
msgctxt "language option"
msgid "Automatic"
msgstr "Automàtic"
2023-08-08 00:29:14 +00:00
#: pkg/app/user.go:250
2023-07-26 18:46:09 +00:00
msgid "Confirmation does not match password."
msgstr "La confirmació no es correspon amb la contrasenya."
2024-02-27 18:45:47 +00:00
#: pkg/app/user.go:251 pkg/company/admin.go:250
2023-07-26 18:46:09 +00:00
msgid "Selected language is not valid."
msgstr "L’ idioma escollit no és vàlid."
Manage all media uploads in a single place
It made no sense to have a file upload in each form that needs a media,
because to reuse an existing media users would need to upload the exact
same file again; this is very unusual and unfriendly.
A better option is to have a “centralized” media section, where people
can upload files there, and then have a picker to select from there.
Ideally, there would be an upload option in the picker, but i did not
add it yet.
I’ve split the content from the media because i want users to have the
option to update a media, for instance when they need to upload a
reduced or cropped version of the same photo, without an edit they would
need to upload the file as a new media and then update all places where
the old version was used. And i did not want to trouble people that
uploads the same photo twice: without the separate relation, doing so
would throw a constraint error.
I do not believe there is any security problem to have all companies
link their media to the same file, as they were already readable by
everyone and could upload the data from a different company to their
own; in other words, it is not worse than it was now.
2023-09-20 23:56:44 +00:00
#: pkg/app/user.go:253
Allow users to update their profile images
I do not see the profile image as an “integral part” of the user (i.e.,
no need for constraints), hence i do not want to store it in the
database, as would do for the identification image during check-in.
By default, i store the avatars in /var/lib/camper/avatars, but it is a
variable to allow packagers change this value using the linker.
This is also served as a test bed for uploading files to the server,
that now has a better interface and uses less resources that what i did
to Numerus.
Now the profile handler needs to keep a variable to know the path to the
avatars’ directory, thus i had to change it to a struct nested in app,
much like the fileHandler does. It still has to return the HandlerFunc,
however, as this function needs to close over the user and connection
variables.
Part of #7.
2023-07-28 18:15:09 +00:00
msgid "File must be a valid PNG or JPEG image."
msgstr "El fitxer has de ser una imatge PNG o JPEG vàlida."
2024-05-02 23:01:01 +00:00
#: pkg/app/admin.go:81
Split templates and handlers into admin and public
I need to check that the user is an employee (or admin) in
administration handlers, but i do not want to do it for each handler,
because i am bound to forget it. Thus, i added the /admin sub-path for
these resources.
The public-facing web is the rest of the resources outside /admin, but
for now there is only home, to test whether it works as expected or not.
The public-facing web can not relay on the user’s language settings, as
the guest user has no way to set that. I would be happy to just use the
Accept-Language header for that, but apparently Google does not use that
header[0], and they give four alternatives: a country-specific domain,
a subdomain with a generic top-level domain (gTLD), subdirectories with
a gTLD, or URL parameters (e.g., site.com?loc=de).
Of the four, Google does not recommend URL parameters, and the customer
is already using subdirectories with the current site, therefor that’s
what i have chosen.
Google also tells me that it is a very good idea to have links between
localized version of the same resources, either with <link> elements,
Link HTTP response headers, or a sitemap file[1]; they are all
equivalent in the eyes of Google.
I have choosen the Link response headers way, because for that i can
simply “augment” ResponseHeader to automatically add these headers when
the response status is 2xx, otherwise i would need to pass down the
original URL path until it reaches the template.
Even though Camper is supposed to be a “generic”, multi-company
application, i think i will stick to the easiest route and write the
templates for just the “first” customer.
[0]: https://developers.google.com/search/docs/specialty/international/managing-multi-regional-sites
[1]: https://developers.google.com/search/docs/specialty/international/localized-versions
2023-08-05 01:42:37 +00:00
msgid "Access forbidden"
msgstr "Accés prohibit"
2024-02-11 20:45:00 +00:00
#: pkg/campsite/types/option.go:369
2023-10-06 11:26:01 +00:00
msgid "Minimum can not be empty."
msgstr "No podeu deixar el mínim en blanc."
2024-02-11 20:45:00 +00:00
#: pkg/campsite/types/option.go:370
2023-10-06 11:26:01 +00:00
msgid "Minimum must be an integer number."
msgstr "El valor del mínim ha de ser un número enter."
2024-02-11 20:45:00 +00:00
#: pkg/campsite/types/option.go:372
2023-10-06 11:26:01 +00:00
msgid "Minimum must be zero or greater."
msgstr "El valor del mínim ha de ser com a mínim zero."
2024-02-11 20:45:00 +00:00
#: pkg/campsite/types/option.go:375
2023-10-06 11:26:01 +00:00
msgid "Maximum can not be empty."
msgstr "No podeu deixar el màxim en blanc."
2024-02-11 20:45:00 +00:00
#: pkg/campsite/types/option.go:376
2023-10-06 11:26:01 +00:00
msgid "Maximum must be an integer number."
msgstr "El valor del màxim ha de ser un número enter."
2024-02-11 20:45:00 +00:00
#: pkg/campsite/types/option.go:378
2023-10-06 11:26:01 +00:00
msgid "Maximum must be equal or greater than minimum."
msgstr "El valor del màxim ha de ser igual o superir al del mínim."
2024-05-03 17:13:49 +00:00
#: pkg/campsite/types/option.go:382 pkg/invoice/admin.go:1061
2024-02-11 20:45:00 +00:00
msgid "Price can not be empty."
msgstr "No podeu deixar el preu en blanc."
2023-10-06 11:26:01 +00:00
2024-05-03 17:13:49 +00:00
#: pkg/campsite/types/option.go:383 pkg/invoice/admin.go:1062
2024-02-11 20:45:00 +00:00
msgid "Price must be a decimal number."
msgstr "El preu ha de ser un número decimal."
2023-10-06 11:26:01 +00:00
2024-05-03 17:13:49 +00:00
#: pkg/campsite/types/option.go:384 pkg/invoice/admin.go:1063
2024-02-11 20:45:00 +00:00
msgid "Price must be zero or greater."
msgstr "El preu ha de ser com a mínim zero."
2023-10-06 11:26:01 +00:00
2024-01-26 21:54:19 +00:00
#: pkg/campsite/types/feature.go:271 pkg/campsite/feature.go:268
2024-01-27 21:51:41 +00:00
#: pkg/services/admin.go:315 pkg/amenity/feature.go:268
2023-10-13 18:30:31 +00:00
msgid "Selected icon is not valid."
msgstr "La icona escollida no és vàlida."
Add campsite_type_pet_cost relation to hold price of dogs in campsites
It is a separate relation, instead of having a field in campsite_type,
because not all campsite types allow dogs. I could have added a new
field to campsite_type, but then its values it would be meaningless for
campsites that do not allow dogs, and a nullable field is not a valid
solution because NULL means “unknown”, but we **do** know the price —
none.
A separate relation encodes the same information without ambiguities nor
null values, and, in fact, removed the dogs_allowed field from
campsite_type to prevent erroneous status, such as a campsite type that
allows dogs without having a cost — even if the cost is zero, it has to
be added to the new relation.
2024-02-10 05:18:30 +00:00
#: pkg/campsite/types/admin.go:328
2023-09-22 00:17:56 +00:00
msgctxt "input"
msgid "Cover image"
msgstr "Imatge de portada"
Add campsite_type_pet_cost relation to hold price of dogs in campsites
It is a separate relation, instead of having a field in campsite_type,
because not all campsite types allow dogs. I could have added a new
field to campsite_type, but then its values it would be meaningless for
campsites that do not allow dogs, and a nullable field is not a valid
solution because NULL means “unknown”, but we **do** know the price —
none.
A separate relation encodes the same information without ambiguities nor
null values, and, in fact, removed the dogs_allowed field from
campsite_type to prevent erroneous status, such as a campsite type that
allows dogs without having a cost — even if the cost is zero, it has to
be added to the new relation.
2024-02-10 05:18:30 +00:00
#: pkg/campsite/types/admin.go:329
Manage all media uploads in a single place
It made no sense to have a file upload in each form that needs a media,
because to reuse an existing media users would need to upload the exact
same file again; this is very unusual and unfriendly.
A better option is to have a “centralized” media section, where people
can upload files there, and then have a picker to select from there.
Ideally, there would be an upload option in the picker, but i did not
add it yet.
I’ve split the content from the media because i want users to have the
option to update a media, for instance when they need to upload a
reduced or cropped version of the same photo, without an edit they would
need to upload the file as a new media and then update all places where
the old version was used. And i did not want to trouble people that
uploads the same photo twice: without the separate relation, doing so
would throw a constraint error.
I do not believe there is any security problem to have all companies
link their media to the same file, as they were already readable by
everyone and could upload the data from a different company to their
own; in other words, it is not worse than it was now.
2023-09-20 23:56:44 +00:00
msgctxt "action"
msgid "Set campsite type cover"
msgstr "Estableix la portada del tipus d’ allotjament"
Add campsite_type_pet_cost relation to hold price of dogs in campsites
It is a separate relation, instead of having a field in campsite_type,
because not all campsite types allow dogs. I could have added a new
field to campsite_type, but then its values it would be meaningless for
campsites that do not allow dogs, and a nullable field is not a valid
solution because NULL means “unknown”, but we **do** know the price —
none.
A separate relation encodes the same information without ambiguities nor
null values, and, in fact, removed the dogs_allowed field from
campsite_type to prevent erroneous status, such as a campsite type that
allows dogs without having a cost — even if the cost is zero, it has to
be added to the new relation.
2024-02-10 05:18:30 +00:00
#: pkg/campsite/types/admin.go:580
2024-01-22 19:19:19 +00:00
msgid "Check-in can not be empty."
msgstr "No podeu deixar l’ entrada en blanc."
Add campsite_type_pet_cost relation to hold price of dogs in campsites
It is a separate relation, instead of having a field in campsite_type,
because not all campsite types allow dogs. I could have added a new
field to campsite_type, but then its values it would be meaningless for
campsites that do not allow dogs, and a nullable field is not a valid
solution because NULL means “unknown”, but we **do** know the price —
none.
A separate relation encodes the same information without ambiguities nor
null values, and, in fact, removed the dogs_allowed field from
campsite_type to prevent erroneous status, such as a campsite type that
allows dogs without having a cost — even if the cost is zero, it has to
be added to the new relation.
2024-02-10 05:18:30 +00:00
#: pkg/campsite/types/admin.go:581
2024-01-22 19:19:19 +00:00
msgid "Check-out can not be empty."
msgstr "No podeu deixar la sortida en blanc."
Add campsite_type_pet_cost relation to hold price of dogs in campsites
It is a separate relation, instead of having a field in campsite_type,
because not all campsite types allow dogs. I could have added a new
field to campsite_type, but then its values it would be meaningless for
campsites that do not allow dogs, and a nullable field is not a valid
solution because NULL means “unknown”, but we **do** know the price —
none.
A separate relation encodes the same information without ambiguities nor
null values, and, in fact, removed the dogs_allowed field from
campsite_type to prevent erroneous status, such as a campsite type that
allows dogs without having a cost — even if the cost is zero, it has to
be added to the new relation.
2024-02-10 05:18:30 +00:00
#: pkg/campsite/types/admin.go:582
Add the sample campsite types to the demo file
Since campsite types need a media, i have to insert also images to the
media relation. The best would be to use PostgreSQL’s
pg_read_binary_file to read the media content from actual files when
inserting the new rows, but the files need to be within the database
cluster directory, or have to use an absolute path when running as a
superuser to read from files outside the cluster directory, which means
that it would depend on the path where i leave the files, that is
different in development that in staging.
To avoid that problem i can simply insert the rows using their base64
strings, with PostgreSQL’s decode. The images are kind of small, but
i was worried that each change in demo.sql would duplicate that data in
git, even if the change is not related to the images, because git stores
the whole file; even if small, soon everything adds up.
I do not care if the _final_ demo.sql is big, as this file is packaged
in a different deb and is only installed in staging, so i’ve chosen to
use m4 to build a single “amalgamated” SQL file from the base .sql
file and the individual image files converted to base64 strings. That
way, each image is individually managed by git and the base .sql file
does not balloon up for each little change.
Changed m4’s quotes to [[ ]] because the default ` ' was interfering
with Intellij’s syntax highlighting.
2023-09-10 01:57:46 +00:00
msgid "Cover image can not be empty."
msgstr "No podeu deixar la imatge de portada en blanc."
Add campsite_type_pet_cost relation to hold price of dogs in campsites
It is a separate relation, instead of having a field in campsite_type,
because not all campsite types allow dogs. I could have added a new
field to campsite_type, but then its values it would be meaningless for
campsites that do not allow dogs, and a nullable field is not a valid
solution because NULL means “unknown”, but we **do** know the price —
none.
A separate relation encodes the same information without ambiguities nor
null values, and, in fact, removed the dogs_allowed field from
campsite_type to prevent erroneous status, such as a campsite type that
allows dogs without having a cost — even if the cost is zero, it has to
be added to the new relation.
2024-02-10 05:18:30 +00:00
#: pkg/campsite/types/admin.go:583
2023-09-22 00:17:56 +00:00
msgid "Cover image must be an image media type."
msgstr "La imatge de portada ha de ser un mèdia de tipus imatge."
Add campsite_type_pet_cost relation to hold price of dogs in campsites
It is a separate relation, instead of having a field in campsite_type,
because not all campsite types allow dogs. I could have added a new
field to campsite_type, but then its values it would be meaningless for
campsites that do not allow dogs, and a nullable field is not a valid
solution because NULL means “unknown”, but we **do** know the price —
none.
A separate relation encodes the same information without ambiguities nor
null values, and, in fact, removed the dogs_allowed field from
campsite_type to prevent erroneous status, such as a campsite type that
allows dogs without having a cost — even if the cost is zero, it has to
be added to the new relation.
2024-02-10 05:18:30 +00:00
#: pkg/campsite/types/admin.go:587
2023-09-29 18:17:39 +00:00
msgid "Maximum number of campers can not be empty."
msgstr "No podeu deixar el número màxim de persones en blanc."
Add campsite_type_pet_cost relation to hold price of dogs in campsites
It is a separate relation, instead of having a field in campsite_type,
because not all campsite types allow dogs. I could have added a new
field to campsite_type, but then its values it would be meaningless for
campsites that do not allow dogs, and a nullable field is not a valid
solution because NULL means “unknown”, but we **do** know the price —
none.
A separate relation encodes the same information without ambiguities nor
null values, and, in fact, removed the dogs_allowed field from
campsite_type to prevent erroneous status, such as a campsite type that
allows dogs without having a cost — even if the cost is zero, it has to
be added to the new relation.
2024-02-10 05:18:30 +00:00
#: pkg/campsite/types/admin.go:588
2023-09-29 18:17:39 +00:00
msgid "Maximum number of campers must be an integer number."
msgstr "El número màxim de persones ha de ser enter."
Add campsite_type_pet_cost relation to hold price of dogs in campsites
It is a separate relation, instead of having a field in campsite_type,
because not all campsite types allow dogs. I could have added a new
field to campsite_type, but then its values it would be meaningless for
campsites that do not allow dogs, and a nullable field is not a valid
solution because NULL means “unknown”, but we **do** know the price —
none.
A separate relation encodes the same information without ambiguities nor
null values, and, in fact, removed the dogs_allowed field from
campsite_type to prevent erroneous status, such as a campsite type that
allows dogs without having a cost — even if the cost is zero, it has to
be added to the new relation.
2024-02-10 05:18:30 +00:00
#: pkg/campsite/types/admin.go:589
2023-09-29 18:17:39 +00:00
msgid "Maximum number of campers must be one or greater."
msgstr "El número màxim de persones no pot ser zero."
Add campsite_type_pet_cost relation to hold price of dogs in campsites
It is a separate relation, instead of having a field in campsite_type,
because not all campsite types allow dogs. I could have added a new
field to campsite_type, but then its values it would be meaningless for
campsites that do not allow dogs, and a nullable field is not a valid
solution because NULL means “unknown”, but we **do** know the price —
none.
A separate relation encodes the same information without ambiguities nor
null values, and, in fact, removed the dogs_allowed field from
campsite_type to prevent erroneous status, such as a campsite type that
allows dogs without having a cost — even if the cost is zero, it has to
be added to the new relation.
2024-02-10 05:18:30 +00:00
#: pkg/campsite/types/admin.go:592
2023-10-01 19:14:39 +00:00
msgid "Minimum number of nights can not be empty."
msgstr "No podeu deixar el número mínim de nits en blanc."
Add campsite_type_pet_cost relation to hold price of dogs in campsites
It is a separate relation, instead of having a field in campsite_type,
because not all campsite types allow dogs. I could have added a new
field to campsite_type, but then its values it would be meaningless for
campsites that do not allow dogs, and a nullable field is not a valid
solution because NULL means “unknown”, but we **do** know the price —
none.
A separate relation encodes the same information without ambiguities nor
null values, and, in fact, removed the dogs_allowed field from
campsite_type to prevent erroneous status, such as a campsite type that
allows dogs without having a cost — even if the cost is zero, it has to
be added to the new relation.
2024-02-10 05:18:30 +00:00
#: pkg/campsite/types/admin.go:593
2023-10-01 19:14:39 +00:00
msgid "Minimum number of nights must be an integer."
msgstr "El número mínim de nits ha de ser enter."
Add campsite_type_pet_cost relation to hold price of dogs in campsites
It is a separate relation, instead of having a field in campsite_type,
because not all campsite types allow dogs. I could have added a new
field to campsite_type, but then its values it would be meaningless for
campsites that do not allow dogs, and a nullable field is not a valid
solution because NULL means “unknown”, but we **do** know the price —
none.
A separate relation encodes the same information without ambiguities nor
null values, and, in fact, removed the dogs_allowed field from
campsite_type to prevent erroneous status, such as a campsite type that
allows dogs without having a cost — even if the cost is zero, it has to
be added to the new relation.
2024-02-10 05:18:30 +00:00
#: pkg/campsite/types/admin.go:594
2023-10-01 19:14:39 +00:00
msgid "Minimum number of nights must be one or greater."
msgstr "El número mínim de nits no pot ser zero."
Add campsite_type_pet_cost relation to hold price of dogs in campsites
It is a separate relation, instead of having a field in campsite_type,
because not all campsite types allow dogs. I could have added a new
field to campsite_type, but then its values it would be meaningless for
campsites that do not allow dogs, and a nullable field is not a valid
solution because NULL means “unknown”, but we **do** know the price —
none.
A separate relation encodes the same information without ambiguities nor
null values, and, in fact, removed the dogs_allowed field from
campsite_type to prevent erroneous status, such as a campsite type that
allows dogs without having a cost — even if the cost is zero, it has to
be added to the new relation.
2024-02-10 05:18:30 +00:00
#: pkg/campsite/types/admin.go:597
2024-01-31 22:06:45 +00:00
msgid "Maximum number of nights can not be empty."
msgstr "No podeu deixar el número màxim de nits en blanc."
Add campsite_type_pet_cost relation to hold price of dogs in campsites
It is a separate relation, instead of having a field in campsite_type,
because not all campsite types allow dogs. I could have added a new
field to campsite_type, but then its values it would be meaningless for
campsites that do not allow dogs, and a nullable field is not a valid
solution because NULL means “unknown”, but we **do** know the price —
none.
A separate relation encodes the same information without ambiguities nor
null values, and, in fact, removed the dogs_allowed field from
campsite_type to prevent erroneous status, such as a campsite type that
allows dogs without having a cost — even if the cost is zero, it has to
be added to the new relation.
2024-02-10 05:18:30 +00:00
#: pkg/campsite/types/admin.go:598
2024-01-31 22:06:45 +00:00
msgid "Maximum number of nights must be an integer."
msgstr "El número màxim de nits ha de ser enter."
Add campsite_type_pet_cost relation to hold price of dogs in campsites
It is a separate relation, instead of having a field in campsite_type,
because not all campsite types allow dogs. I could have added a new
field to campsite_type, but then its values it would be meaningless for
campsites that do not allow dogs, and a nullable field is not a valid
solution because NULL means “unknown”, but we **do** know the price —
none.
A separate relation encodes the same information without ambiguities nor
null values, and, in fact, removed the dogs_allowed field from
campsite_type to prevent erroneous status, such as a campsite type that
allows dogs without having a cost — even if the cost is zero, it has to
be added to the new relation.
2024-02-10 05:18:30 +00:00
#: pkg/campsite/types/admin.go:599
2024-01-31 22:06:45 +00:00
msgid "Maximum number of nights must be equal or greater than the minimum."
msgstr "El valor del número màxim de nits ha de ser igual o superir al del mínim."
Add campsite_type_pet_cost relation to hold price of dogs in campsites
It is a separate relation, instead of having a field in campsite_type,
because not all campsite types allow dogs. I could have added a new
field to campsite_type, but then its values it would be meaningless for
campsites that do not allow dogs, and a nullable field is not a valid
solution because NULL means “unknown”, but we **do** know the price —
none.
A separate relation encodes the same information without ambiguities nor
null values, and, in fact, removed the dogs_allowed field from
campsite_type to prevent erroneous status, such as a campsite type that
allows dogs without having a cost — even if the cost is zero, it has to
be added to the new relation.
2024-02-10 05:18:30 +00:00
#: pkg/campsite/types/admin.go:603
msgid "Dogs price can not be empty when dogs are allowed."
msgstr "El preu dels gossos no pot ser buit quan són permesos."
#: pkg/campsite/types/admin.go:604
msgid "Dogs price must be a decimal number."
msgstr "El preu dels gossos ha de ser un número decimal."
#: pkg/campsite/types/admin.go:605
msgid "Dogs price must be zero or greater."
msgstr "El preu dels gossos ha de ser com a mínim zero."
2024-02-11 20:45:00 +00:00
#: pkg/campsite/types/admin.go:610
msgid "Price per night can not be empty."
msgstr "No podeu deixar el preu per nit en blanc."
#: pkg/campsite/types/admin.go:611
msgid "Price per night must be a decimal number."
msgstr "El preu per nit ha de ser un número decimal."
#: pkg/campsite/types/admin.go:612
msgid "Price per night must be zero or greater."
msgstr "El preu per nit ha de ser com a mínim zero."
Add campsite_type_pet_cost relation to hold price of dogs in campsites
It is a separate relation, instead of having a field in campsite_type,
because not all campsite types allow dogs. I could have added a new
field to campsite_type, but then its values it would be meaningless for
campsites that do not allow dogs, and a nullable field is not a valid
solution because NULL means “unknown”, but we **do** know the price —
none.
A separate relation encodes the same information without ambiguities nor
null values, and, in fact, removed the dogs_allowed field from
campsite_type to prevent erroneous status, such as a campsite type that
allows dogs without having a cost — even if the cost is zero, it has to
be added to the new relation.
2024-02-10 05:18:30 +00:00
#: pkg/campsite/types/admin.go:615
Compute and show the “cart” for the booking form
I have to ask number and age ranges of hosts of guests for all campsite
types, not only those that have price options for adults, children, etc.
because i must compute the tourist tax for adults. These numbers will
be used to generate de rows for guests when actually creating the
booking, which is not done already.
To satisfy the campsite types that do have a price per guest, not only
per night, i had to add the prices for each range in the
campsite_type_cost relation. If a campsite type does not have price
per person, then that should be zero; the website then does not display
the price.
The minimal price for any campsite type is one adult for one night,
thus to compute the price i need at least the campsite type, the dates,
and the number of adults, that has a minimum of one. I changed the
order of the form to ask for these values first, so i can compute the
initial price as soon as possible. To help further, i show the
<fieldset>s progressively when visitors select options.
2024-02-04 05:37:25 +00:00
msgid "Price per adult can not be empty."
msgstr "No podeu deixar el preu per adult en blanc."
Add campsite_type_pet_cost relation to hold price of dogs in campsites
It is a separate relation, instead of having a field in campsite_type,
because not all campsite types allow dogs. I could have added a new
field to campsite_type, but then its values it would be meaningless for
campsites that do not allow dogs, and a nullable field is not a valid
solution because NULL means “unknown”, but we **do** know the price —
none.
A separate relation encodes the same information without ambiguities nor
null values, and, in fact, removed the dogs_allowed field from
campsite_type to prevent erroneous status, such as a campsite type that
allows dogs without having a cost — even if the cost is zero, it has to
be added to the new relation.
2024-02-10 05:18:30 +00:00
#: pkg/campsite/types/admin.go:616
Compute and show the “cart” for the booking form
I have to ask number and age ranges of hosts of guests for all campsite
types, not only those that have price options for adults, children, etc.
because i must compute the tourist tax for adults. These numbers will
be used to generate de rows for guests when actually creating the
booking, which is not done already.
To satisfy the campsite types that do have a price per guest, not only
per night, i had to add the prices for each range in the
campsite_type_cost relation. If a campsite type does not have price
per person, then that should be zero; the website then does not display
the price.
The minimal price for any campsite type is one adult for one night,
thus to compute the price i need at least the campsite type, the dates,
and the number of adults, that has a minimum of one. I changed the
order of the form to ask for these values first, so i can compute the
initial price as soon as possible. To help further, i show the
<fieldset>s progressively when visitors select options.
2024-02-04 05:37:25 +00:00
msgid "Price per adult must be a decimal number."
msgstr "El preu per adult ha de ser un número decimal."
Add campsite_type_pet_cost relation to hold price of dogs in campsites
It is a separate relation, instead of having a field in campsite_type,
because not all campsite types allow dogs. I could have added a new
field to campsite_type, but then its values it would be meaningless for
campsites that do not allow dogs, and a nullable field is not a valid
solution because NULL means “unknown”, but we **do** know the price —
none.
A separate relation encodes the same information without ambiguities nor
null values, and, in fact, removed the dogs_allowed field from
campsite_type to prevent erroneous status, such as a campsite type that
allows dogs without having a cost — even if the cost is zero, it has to
be added to the new relation.
2024-02-10 05:18:30 +00:00
#: pkg/campsite/types/admin.go:617
Compute and show the “cart” for the booking form
I have to ask number and age ranges of hosts of guests for all campsite
types, not only those that have price options for adults, children, etc.
because i must compute the tourist tax for adults. These numbers will
be used to generate de rows for guests when actually creating the
booking, which is not done already.
To satisfy the campsite types that do have a price per guest, not only
per night, i had to add the prices for each range in the
campsite_type_cost relation. If a campsite type does not have price
per person, then that should be zero; the website then does not display
the price.
The minimal price for any campsite type is one adult for one night,
thus to compute the price i need at least the campsite type, the dates,
and the number of adults, that has a minimum of one. I changed the
order of the form to ask for these values first, so i can compute the
initial price as soon as possible. To help further, i show the
<fieldset>s progressively when visitors select options.
2024-02-04 05:37:25 +00:00
msgid "Price per adult must be zero or greater."
msgstr "El preu per adult ha de ser com a mínim zero."
Add campsite_type_pet_cost relation to hold price of dogs in campsites
It is a separate relation, instead of having a field in campsite_type,
because not all campsite types allow dogs. I could have added a new
field to campsite_type, but then its values it would be meaningless for
campsites that do not allow dogs, and a nullable field is not a valid
solution because NULL means “unknown”, but we **do** know the price —
none.
A separate relation encodes the same information without ambiguities nor
null values, and, in fact, removed the dogs_allowed field from
campsite_type to prevent erroneous status, such as a campsite type that
allows dogs without having a cost — even if the cost is zero, it has to
be added to the new relation.
2024-02-10 05:18:30 +00:00
#: pkg/campsite/types/admin.go:620
Compute and show the “cart” for the booking form
I have to ask number and age ranges of hosts of guests for all campsite
types, not only those that have price options for adults, children, etc.
because i must compute the tourist tax for adults. These numbers will
be used to generate de rows for guests when actually creating the
booking, which is not done already.
To satisfy the campsite types that do have a price per guest, not only
per night, i had to add the prices for each range in the
campsite_type_cost relation. If a campsite type does not have price
per person, then that should be zero; the website then does not display
the price.
The minimal price for any campsite type is one adult for one night,
thus to compute the price i need at least the campsite type, the dates,
and the number of adults, that has a minimum of one. I changed the
order of the form to ask for these values first, so i can compute the
initial price as soon as possible. To help further, i show the
<fieldset>s progressively when visitors select options.
2024-02-04 05:37:25 +00:00
msgid "Price per teenager can not be empty."
msgstr "No podeu deixar el preu per adolescent en blanc."
Add campsite_type_pet_cost relation to hold price of dogs in campsites
It is a separate relation, instead of having a field in campsite_type,
because not all campsite types allow dogs. I could have added a new
field to campsite_type, but then its values it would be meaningless for
campsites that do not allow dogs, and a nullable field is not a valid
solution because NULL means “unknown”, but we **do** know the price —
none.
A separate relation encodes the same information without ambiguities nor
null values, and, in fact, removed the dogs_allowed field from
campsite_type to prevent erroneous status, such as a campsite type that
allows dogs without having a cost — even if the cost is zero, it has to
be added to the new relation.
2024-02-10 05:18:30 +00:00
#: pkg/campsite/types/admin.go:621
Compute and show the “cart” for the booking form
I have to ask number and age ranges of hosts of guests for all campsite
types, not only those that have price options for adults, children, etc.
because i must compute the tourist tax for adults. These numbers will
be used to generate de rows for guests when actually creating the
booking, which is not done already.
To satisfy the campsite types that do have a price per guest, not only
per night, i had to add the prices for each range in the
campsite_type_cost relation. If a campsite type does not have price
per person, then that should be zero; the website then does not display
the price.
The minimal price for any campsite type is one adult for one night,
thus to compute the price i need at least the campsite type, the dates,
and the number of adults, that has a minimum of one. I changed the
order of the form to ask for these values first, so i can compute the
initial price as soon as possible. To help further, i show the
<fieldset>s progressively when visitors select options.
2024-02-04 05:37:25 +00:00
msgid "Price per teenager must be a decimal number."
msgstr "El preu per adolescent ha de ser un número decimal."
Add campsite_type_pet_cost relation to hold price of dogs in campsites
It is a separate relation, instead of having a field in campsite_type,
because not all campsite types allow dogs. I could have added a new
field to campsite_type, but then its values it would be meaningless for
campsites that do not allow dogs, and a nullable field is not a valid
solution because NULL means “unknown”, but we **do** know the price —
none.
A separate relation encodes the same information without ambiguities nor
null values, and, in fact, removed the dogs_allowed field from
campsite_type to prevent erroneous status, such as a campsite type that
allows dogs without having a cost — even if the cost is zero, it has to
be added to the new relation.
2024-02-10 05:18:30 +00:00
#: pkg/campsite/types/admin.go:622
Compute and show the “cart” for the booking form
I have to ask number and age ranges of hosts of guests for all campsite
types, not only those that have price options for adults, children, etc.
because i must compute the tourist tax for adults. These numbers will
be used to generate de rows for guests when actually creating the
booking, which is not done already.
To satisfy the campsite types that do have a price per guest, not only
per night, i had to add the prices for each range in the
campsite_type_cost relation. If a campsite type does not have price
per person, then that should be zero; the website then does not display
the price.
The minimal price for any campsite type is one adult for one night,
thus to compute the price i need at least the campsite type, the dates,
and the number of adults, that has a minimum of one. I changed the
order of the form to ask for these values first, so i can compute the
initial price as soon as possible. To help further, i show the
<fieldset>s progressively when visitors select options.
2024-02-04 05:37:25 +00:00
msgid "Price per teenager must be zero or greater."
msgstr "El preu per adolescent ha de ser com a mínim zero."
Add campsite_type_pet_cost relation to hold price of dogs in campsites
It is a separate relation, instead of having a field in campsite_type,
because not all campsite types allow dogs. I could have added a new
field to campsite_type, but then its values it would be meaningless for
campsites that do not allow dogs, and a nullable field is not a valid
solution because NULL means “unknown”, but we **do** know the price —
none.
A separate relation encodes the same information without ambiguities nor
null values, and, in fact, removed the dogs_allowed field from
campsite_type to prevent erroneous status, such as a campsite type that
allows dogs without having a cost — even if the cost is zero, it has to
be added to the new relation.
2024-02-10 05:18:30 +00:00
#: pkg/campsite/types/admin.go:625
Compute and show the “cart” for the booking form
I have to ask number and age ranges of hosts of guests for all campsite
types, not only those that have price options for adults, children, etc.
because i must compute the tourist tax for adults. These numbers will
be used to generate de rows for guests when actually creating the
booking, which is not done already.
To satisfy the campsite types that do have a price per guest, not only
per night, i had to add the prices for each range in the
campsite_type_cost relation. If a campsite type does not have price
per person, then that should be zero; the website then does not display
the price.
The minimal price for any campsite type is one adult for one night,
thus to compute the price i need at least the campsite type, the dates,
and the number of adults, that has a minimum of one. I changed the
order of the form to ask for these values first, so i can compute the
initial price as soon as possible. To help further, i show the
<fieldset>s progressively when visitors select options.
2024-02-04 05:37:25 +00:00
msgid "Price per child can not be empty."
msgstr "No podeu deixar el preu per nen en blanc."
Add campsite_type_pet_cost relation to hold price of dogs in campsites
It is a separate relation, instead of having a field in campsite_type,
because not all campsite types allow dogs. I could have added a new
field to campsite_type, but then its values it would be meaningless for
campsites that do not allow dogs, and a nullable field is not a valid
solution because NULL means “unknown”, but we **do** know the price —
none.
A separate relation encodes the same information without ambiguities nor
null values, and, in fact, removed the dogs_allowed field from
campsite_type to prevent erroneous status, such as a campsite type that
allows dogs without having a cost — even if the cost is zero, it has to
be added to the new relation.
2024-02-10 05:18:30 +00:00
#: pkg/campsite/types/admin.go:626
Compute and show the “cart” for the booking form
I have to ask number and age ranges of hosts of guests for all campsite
types, not only those that have price options for adults, children, etc.
because i must compute the tourist tax for adults. These numbers will
be used to generate de rows for guests when actually creating the
booking, which is not done already.
To satisfy the campsite types that do have a price per guest, not only
per night, i had to add the prices for each range in the
campsite_type_cost relation. If a campsite type does not have price
per person, then that should be zero; the website then does not display
the price.
The minimal price for any campsite type is one adult for one night,
thus to compute the price i need at least the campsite type, the dates,
and the number of adults, that has a minimum of one. I changed the
order of the form to ask for these values first, so i can compute the
initial price as soon as possible. To help further, i show the
<fieldset>s progressively when visitors select options.
2024-02-04 05:37:25 +00:00
msgid "Price per child must be a decimal number."
msgstr "El preu per nen ha de ser un número decimal."
Add campsite_type_pet_cost relation to hold price of dogs in campsites
It is a separate relation, instead of having a field in campsite_type,
because not all campsite types allow dogs. I could have added a new
field to campsite_type, but then its values it would be meaningless for
campsites that do not allow dogs, and a nullable field is not a valid
solution because NULL means “unknown”, but we **do** know the price —
none.
A separate relation encodes the same information without ambiguities nor
null values, and, in fact, removed the dogs_allowed field from
campsite_type to prevent erroneous status, such as a campsite type that
allows dogs without having a cost — even if the cost is zero, it has to
be added to the new relation.
2024-02-10 05:18:30 +00:00
#: pkg/campsite/types/admin.go:627
Compute and show the “cart” for the booking form
I have to ask number and age ranges of hosts of guests for all campsite
types, not only those that have price options for adults, children, etc.
because i must compute the tourist tax for adults. These numbers will
be used to generate de rows for guests when actually creating the
booking, which is not done already.
To satisfy the campsite types that do have a price per guest, not only
per night, i had to add the prices for each range in the
campsite_type_cost relation. If a campsite type does not have price
per person, then that should be zero; the website then does not display
the price.
The minimal price for any campsite type is one adult for one night,
thus to compute the price i need at least the campsite type, the dates,
and the number of adults, that has a minimum of one. I changed the
order of the form to ask for these values first, so i can compute the
initial price as soon as possible. To help further, i show the
<fieldset>s progressively when visitors select options.
2024-02-04 05:37:25 +00:00
msgid "Price per child must be zero or greater."
msgstr "El preu per nen ha de ser com a mínim zero."
2024-02-27 18:45:47 +00:00
#: pkg/campsite/types/public.go:248
Compute and show the “cart” for the booking form
I have to ask number and age ranges of hosts of guests for all campsite
types, not only those that have price options for adults, children, etc.
because i must compute the tourist tax for adults. These numbers will
be used to generate de rows for guests when actually creating the
booking, which is not done already.
To satisfy the campsite types that do have a price per guest, not only
per night, i had to add the prices for each range in the
campsite_type_cost relation. If a campsite type does not have price
per person, then that should be zero; the website then does not display
the price.
The minimal price for any campsite type is one adult for one night,
thus to compute the price i need at least the campsite type, the dates,
and the number of adults, that has a minimum of one. I changed the
order of the form to ask for these values first, so i can compute the
initial price as soon as possible. To help further, i show the
<fieldset>s progressively when visitors select options.
2024-02-04 05:37:25 +00:00
msgctxt "header"
msgid "Adults"
msgstr "Adults"
2024-02-27 18:45:47 +00:00
#: pkg/campsite/types/public.go:255
Compute and show the “cart” for the booking form
I have to ask number and age ranges of hosts of guests for all campsite
types, not only those that have price options for adults, children, etc.
because i must compute the tourist tax for adults. These numbers will
be used to generate de rows for guests when actually creating the
booking, which is not done already.
To satisfy the campsite types that do have a price per guest, not only
per night, i had to add the prices for each range in the
campsite_type_cost relation. If a campsite type does not have price
per person, then that should be zero; the website then does not display
the price.
The minimal price for any campsite type is one adult for one night,
thus to compute the price i need at least the campsite type, the dates,
and the number of adults, that has a minimum of one. I changed the
order of the form to ask for these values first, so i can compute the
initial price as soon as possible. To help further, i show the
<fieldset>s progressively when visitors select options.
2024-02-04 05:37:25 +00:00
msgctxt "header"
msgid "Teenagers (aged 11 to 16)"
msgstr "Adolescents (entre 11 i 16 anys)"
2024-02-27 18:45:47 +00:00
#: pkg/campsite/types/public.go:262
Compute and show the “cart” for the booking form
I have to ask number and age ranges of hosts of guests for all campsite
types, not only those that have price options for adults, children, etc.
because i must compute the tourist tax for adults. These numbers will
be used to generate de rows for guests when actually creating the
booking, which is not done already.
To satisfy the campsite types that do have a price per guest, not only
per night, i had to add the prices for each range in the
campsite_type_cost relation. If a campsite type does not have price
per person, then that should be zero; the website then does not display
the price.
The minimal price for any campsite type is one adult for one night,
thus to compute the price i need at least the campsite type, the dates,
and the number of adults, that has a minimum of one. I changed the
order of the form to ask for these values first, so i can compute the
initial price as soon as possible. To help further, i show the
<fieldset>s progressively when visitors select options.
2024-02-04 05:37:25 +00:00
msgctxt "header"
msgid "Children (aged 2 to 10)"
msgstr "Mainada (entre 2 i 10 anys)"
2024-05-03 17:13:49 +00:00
#: pkg/campsite/admin.go:280 pkg/booking/admin.go:455 pkg/booking/public.go:177
2024-04-26 15:09:36 +00:00
#: pkg/booking/public.go:232
2023-08-14 18:18:26 +00:00
msgid "Selected campsite type is not valid."
msgstr "El tipus d’ allotjament escollit no és vàlid."
“Finish” the new booking form
Had to bring the same fields that i have for a payment to booking,
except that some of those should be nullable, because it is unreasonable
to ask front desk to gather all customer data when they have a booking
via phone, for instance.
Therefore, i can not take advantage of the validation for customer data
that i use in the public-facing form, but, fortunately, most of the
validations where in separated functions, thus only had to rewrite that
one for this case.
I already have to create a booking from a payment, when receiving a
payment from the public instance, thus i made that function and reused
it here. Then i “overwrite” the newly created pre-booking with the
customer data from the form, and set is as confirmed, as we do not see
any point of allowing pre-bookings from employees.
2024-04-24 18:12:29 +00:00
#: pkg/campsite/admin.go:281 pkg/amenity/admin.go:282
2023-08-14 18:18:26 +00:00
msgid "Label can not be empty."
msgstr "No podeu deixar l’ etiqueta en blanc."
2024-02-29 15:59:30 +00:00
#: pkg/season/admin.go:412
Add seasons’ relation, functions, and admin section
Seasons have a color to show on the calendar. I need them in HTML format
(e.g., #123abc) in order to set as value to `<input type="color">`, but
i did not want to save them as text in the database, as integers are
better representations of colors—in fact, that’s what the HTML syntax
also is: an integer.
I think the best would be to create an extension that adds an HTML color
type, with functions to convert from many representations (e.g., CSS’
rgb or even color names) to integer and back. However, that’s a lot of
work and i can satisfy Camper’s needs with just a couple of functions
and a domain.
To show the color on the index, at first tried to use a read-only
`<input type="color">`, but seems that this type of input can not be
read-only and must be disabled instead. However, i do not know whether
it makes sense to have a disabled input outside a form “just” to show
a color; i suspect it does not. Thus, at the end i use SVG with a
single circle, which is better that a 50%-rounded div with a background
color, even if the result is the same—SVG **is** intended for showing
pictures, which is this case.
2023-08-16 18:15:57 +00:00
msgid "Color can not be empty."
msgstr "No podeu deixar el color en blanc."
2024-02-29 15:59:30 +00:00
#: pkg/season/admin.go:413
Add seasons’ relation, functions, and admin section
Seasons have a color to show on the calendar. I need them in HTML format
(e.g., #123abc) in order to set as value to `<input type="color">`, but
i did not want to save them as text in the database, as integers are
better representations of colors—in fact, that’s what the HTML syntax
also is: an integer.
I think the best would be to create an extension that adds an HTML color
type, with functions to convert from many representations (e.g., CSS’
rgb or even color names) to integer and back. However, that’s a lot of
work and i can satisfy Camper’s needs with just a couple of functions
and a domain.
To show the color on the index, at first tried to use a read-only
`<input type="color">`, but seems that this type of input can not be
read-only and must be disabled instead. However, i do not know whether
it makes sense to have a disabled input outside a form “just” to show
a color; i suspect it does not. Thus, at the end i use SVG with a
single circle, which is better that a 50%-rounded div with a background
color, even if the result is the same—SVG **is** intended for showing
pictures, which is this case.
2023-08-16 18:15:57 +00:00
msgid "This color is not valid. It must be like #123abc."
msgstr "Aquest color no és vàlid. Hauria de ser similar a #123abc."
2024-02-29 15:59:30 +00:00
#: pkg/season/admin.go:513
2023-09-29 18:17:39 +00:00
msgctxt "action"
msgid "Unset"
msgstr "Desassigna"
2024-02-29 15:59:30 +00:00
#: pkg/season/admin.go:544
2023-09-29 18:17:39 +00:00
msgid "Start date can not be empty."
msgstr "No podeu deixar la data d’ inici en blanc."
2024-02-29 15:59:30 +00:00
#: pkg/season/admin.go:545
2023-09-29 18:17:39 +00:00
msgid "Start date must be a valid date."
msgstr "La data d’ inici ha de ser una data vàlida."
2024-02-29 15:59:30 +00:00
#: pkg/season/admin.go:547
2023-09-29 18:17:39 +00:00
msgid "End date can not be empty."
msgstr "No podeu deixar la data de fi en blanc."
2024-02-29 15:59:30 +00:00
#: pkg/season/admin.go:548
2023-09-29 18:17:39 +00:00
msgid "End date must be a valid date."
msgstr "La data de fi ha de ser una data vàlida."
2024-05-03 17:13:49 +00:00
#: pkg/customer/admin.go:342 pkg/company/admin.go:207
2024-05-02 23:01:01 +00:00
#: pkg/booking/checkin.go:300 pkg/booking/public.go:577
2024-04-28 18:28:45 +00:00
msgid "Selected country is not valid."
msgstr "El país escollit no és vàlid."
2024-05-03 17:13:49 +00:00
#: pkg/customer/admin.go:346 pkg/booking/checkin.go:284
2024-04-28 18:28:45 +00:00
msgid "Selected ID document type is not valid."
msgstr "El tipus de document d’ identitat escollit no és vàlid."
2024-05-03 17:13:49 +00:00
#: pkg/customer/admin.go:347 pkg/booking/checkin.go:285
2024-04-28 18:28:45 +00:00
msgid "ID document number can not be empty."
msgstr "No podeu deixar el número document d’ identitat en blanc."
2024-05-03 17:13:49 +00:00
#: pkg/customer/admin.go:349 pkg/booking/checkin.go:291
#: pkg/booking/checkin.go:292 pkg/booking/admin.go:467
2024-04-28 18:28:45 +00:00
#: pkg/booking/public.go:581
msgid "Full name can not be empty."
msgstr "No podeu deixar el nom i els cognoms en blanc."
2024-05-03 17:13:49 +00:00
#: pkg/customer/admin.go:350 pkg/booking/admin.go:468 pkg/booking/public.go:582
2024-04-28 18:28:45 +00:00
msgid "Full name must have at least one letter."
msgstr "El nom i els cognoms han de tenir com a mínim una lletra."
2024-05-03 17:13:49 +00:00
#: pkg/customer/admin.go:353 pkg/company/admin.go:230 pkg/booking/public.go:585
2024-04-28 18:28:45 +00:00
msgid "Address can not be empty."
msgstr "No podeu deixar l’ adreça en blanc."
2024-05-03 17:13:49 +00:00
#: pkg/customer/admin.go:354 pkg/booking/public.go:586
2024-04-28 18:28:45 +00:00
msgid "Town or village can not be empty."
msgstr "No podeu deixar la població en blanc."
2024-05-03 17:13:49 +00:00
#: pkg/customer/admin.go:355 pkg/company/admin.go:233 pkg/booking/public.go:587
2024-04-28 18:28:45 +00:00
msgid "Postcode can not be empty."
msgstr "No podeu deixar el codi postal en blanc."
2024-05-03 17:13:49 +00:00
#: pkg/customer/admin.go:356 pkg/company/admin.go:234 pkg/booking/admin.go:474
2024-04-28 18:28:45 +00:00
#: pkg/booking/public.go:588
msgid "This postcode is not valid."
msgstr "Aquest codi postal no és vàlid."
2024-05-03 17:13:49 +00:00
#: pkg/customer/admin.go:364 pkg/company/admin.go:220
#: pkg/booking/checkin.go:304 pkg/booking/admin.go:484
2024-04-28 18:28:45 +00:00
#: pkg/booking/public.go:596
msgid "This phone number is not valid."
msgstr "Aquest número de telèfon no és vàlid."
2024-05-03 17:13:49 +00:00
#: pkg/invoice/admin.go:581
2024-04-28 18:28:45 +00:00
msgctxt "filename"
msgid "invoices.zip"
msgstr "factures.zip"
2024-05-03 17:13:49 +00:00
#: pkg/invoice/admin.go:596
2024-04-28 18:28:45 +00:00
msgctxt "filename"
msgid "invoices.ods"
msgstr "factures.ods"
2024-05-03 17:13:49 +00:00
#: pkg/invoice/admin.go:598 pkg/invoice/admin.go:1260 pkg/invoice/admin.go:1267
2024-04-28 18:28:45 +00:00
msgid "Invalid action"
msgstr "Acció invàlida"
2024-05-03 17:13:49 +00:00
#: pkg/invoice/admin.go:763
2024-04-28 18:28:45 +00:00
msgid "Selected invoice status is not valid."
msgstr "L’ estat de factura escollit no és vàlid."
2024-05-03 17:13:49 +00:00
#: pkg/invoice/admin.go:764
2024-04-28 18:28:45 +00:00
msgid "Invoice date can not be empty."
msgstr "No podeu deixar la data de factura en blanc."
2024-05-03 17:13:49 +00:00
#: pkg/invoice/admin.go:765
2024-04-28 18:28:45 +00:00
msgid "Invoice date must be a valid date."
msgstr "La data de factura ha de ser una data vàlida."
2024-05-03 17:13:49 +00:00
#: pkg/invoice/admin.go:923
2024-04-28 18:28:45 +00:00
#, c-format
2024-04-28 20:36:21 +00:00
msgid "Re: booking #%s of %s– %s"
msgstr "Ref: reserva núm. %s del %s-%s"
2024-04-28 18:28:45 +00:00
2024-05-03 17:13:49 +00:00
#: pkg/invoice/admin.go:924
2024-04-28 18:28:45 +00:00
msgctxt "to_char"
msgid "MM/DD/YYYY"
msgstr "DD/MM/YYYY"
2024-05-03 17:13:49 +00:00
#: pkg/invoice/admin.go:1051
2024-04-28 18:28:45 +00:00
msgid "Invoice product ID must be an integer."
msgstr "L’ ID de producte de factura ha de ser enter."
2024-05-03 17:13:49 +00:00
#: pkg/invoice/admin.go:1052
2024-04-28 18:28:45 +00:00
msgid "Invoice product ID one or greater."
msgstr "L’ ID de producte de factura ha de ser com a mínim u."
2024-05-03 17:13:49 +00:00
#: pkg/invoice/admin.go:1056
2024-04-28 18:28:45 +00:00
msgid "Product ID must be an integer."
msgstr "L’ ID de producte ha de ser un número enter."
2024-05-03 17:13:49 +00:00
#: pkg/invoice/admin.go:1057
2024-04-28 18:28:45 +00:00
msgid "Product ID must zero or greater."
msgstr "L’ ID de producte ha de ser com a mínim zero."
2024-05-03 17:13:49 +00:00
#: pkg/invoice/admin.go:1066
2024-04-28 18:28:45 +00:00
msgid "Quantity can not be empty."
msgstr "No podeu deixar la quantitat en blanc."
2024-05-03 17:13:49 +00:00
#: pkg/invoice/admin.go:1067
2024-04-28 18:28:45 +00:00
msgid "Quantity must be an integer."
msgstr "La quantitat ha de ser un número enter."
2024-05-03 17:13:49 +00:00
#: pkg/invoice/admin.go:1068
2024-04-28 18:28:45 +00:00
msgid "Quantity must one or greater."
msgstr "La quantitat ha de ser com a mínim u."
2024-05-03 17:13:49 +00:00
#: pkg/invoice/admin.go:1071
2024-04-28 18:28:45 +00:00
msgid "Discount can not be empty."
msgstr "No podeu deixar el descompte en blanc."
2024-05-03 17:13:49 +00:00
#: pkg/invoice/admin.go:1072
2024-04-28 18:28:45 +00:00
msgid "Discount must be an integer."
msgstr "El descompte ha de ser un número enter."
2024-05-03 17:13:49 +00:00
#: pkg/invoice/admin.go:1073 pkg/invoice/admin.go:1074
2024-04-28 18:28:45 +00:00
msgid "Discount must be a percentage between 0 and 100."
msgstr "El descompte ha de ser un percentatge entre 0 i 100"
2024-05-03 17:13:49 +00:00
#: pkg/invoice/admin.go:1078
2024-04-28 18:28:45 +00:00
msgid "Selected tax is not valid."
msgstr "L’ impost escollit no és vàlid."
Add admin page to list the users
There is no way, for now, to add, edit or remove users, because
currently we only need to list users.
I can not give admins access to the user table, for security
permissions, so i had to create a new view. I could name it also ‘user’
in ‘camper’ scheme, but then i was afraid i would have problems with
unit tests and their search_path, so instead i called it
‘company_user_profile’, which is like ‘user_profile’ but for all users
in ‘company_user’.
I created a new Go package for it, rather than add the admin handler in
‘auth’, because ‘template’ depends on ‘auth’, and rendering from ‘auth’
would cause a dependency loop.
I needed to have the roles in gettext to translate them, but there is
no obvious place where to put the call to PgettextNoop. For now, there
are in ‘NewAdminHandler’ because it is called once in the application’s
lifetime and they actually do not matter much.
2024-01-17 18:42:47 +00:00
#: pkg/user/admin.go:18
msgctxt "role"
msgid "guest"
msgstr "convidat"
#: pkg/user/admin.go:19
msgctxt "role"
msgid "employee"
msgstr "treballador"
#: pkg/user/admin.go:20
msgctxt "role"
msgid "admin"
msgstr "administrador"
2024-01-23 13:53:15 +00:00
#: pkg/surroundings/admin.go:286
2024-01-16 00:25:25 +00:00
msgctxt "input"
msgid "Highlight image"
msgstr "Imatge del punt d’ interès"
2024-01-23 13:53:15 +00:00
#: pkg/surroundings/admin.go:287
2024-01-16 00:25:25 +00:00
msgctxt "action"
msgid "Set highlight image"
msgstr "Estableix la imatge del punt d’ interès"
2024-01-23 13:53:15 +00:00
#: pkg/surroundings/admin.go:407
msgctxt "input"
msgid "Ad image"
msgstr "Imatge de l’ anunci"
#: pkg/surroundings/admin.go:408
msgctxt "action"
msgid "Set ad image"
msgstr "Estableix la imatge de l’ anunci"
#: pkg/surroundings/admin.go:459
msgid "Ad image can not be empty."
msgstr "No podeu deixar la imatge de l’ anunci en blanc."
#: pkg/surroundings/admin.go:460
msgid "Ad image must be an image media type."
msgstr "La imatge de l’ anunci ha de ser un mèdia de tipus imatge."
#: pkg/surroundings/admin.go:464
msgid "The title can not be empty."
msgstr "No podeu deixar el títol en blanc."
#: pkg/surroundings/admin.go:465
msgid "The link text can not be empty."
msgstr "No podeu deixar el text de l’ enllaç en blanc."
#: pkg/surroundings/admin.go:466
msgid "The ad URL can not be empty"
msgstr "No podeu deixar l’ adreça de l’ enllaç en blanc."
2024-02-27 18:45:47 +00:00
#: pkg/surroundings/admin.go:467 pkg/company/admin.go:228
2024-01-23 13:53:15 +00:00
msgid "This web address is not valid. It should be like https://domain.com/."
msgstr "Aquesta adreça web no és vàlida. Hauria de ser similar a https://domini.com/."
2024-02-27 18:45:47 +00:00
#: pkg/company/admin.go:211
2023-08-15 20:35:21 +00:00
msgid "Business name can not be empty."
msgstr "No podeu deixar el nom d’ empresa en blanc."
2024-02-27 18:45:47 +00:00
#: pkg/company/admin.go:212
2023-08-15 20:35:21 +00:00
msgid "Business name must have at least two letters."
msgstr "El nom d’ empresa ha de tenir com a mínim dues lletres."
2024-02-27 18:45:47 +00:00
#: pkg/company/admin.go:214
2023-08-15 20:35:21 +00:00
msgid "VAT number can not be empty."
msgstr "No podeu deixar el NIF en blanc."
2024-02-27 18:45:47 +00:00
#: pkg/company/admin.go:215
2023-08-15 20:35:21 +00:00
msgid "This VAT number is not valid."
msgstr "Aquest NIF no és vàlid."
2024-04-28 18:28:45 +00:00
#: pkg/company/admin.go:219 pkg/booking/public.go:595
2023-08-15 20:35:21 +00:00
msgid "Phone can not be empty."
msgstr "No podeu deixar el telèfon en blanc."
2024-02-27 18:45:47 +00:00
#: pkg/company/admin.go:231
2023-08-15 20:35:21 +00:00
msgid "City can not be empty."
msgstr "No podeu deixar la població en blanc."
2024-02-27 18:45:47 +00:00
#: pkg/company/admin.go:232
2023-08-15 20:35:21 +00:00
msgid "Province can not be empty."
msgstr "No podeu deixar la província en blanc."
2024-02-27 18:45:47 +00:00
#: pkg/company/admin.go:238
2023-10-14 19:59:36 +00:00
msgid "RTC number can not be empty."
msgstr "No podeu deixar el número d’ RTC en blanc."
2024-02-27 18:45:47 +00:00
#: pkg/company/admin.go:239
2024-01-14 01:09:17 +00:00
msgid "Tourist tax can not be empty."
msgstr "No podeu deixar l’ impost turístic en blanc."
2024-02-27 18:45:47 +00:00
#: pkg/company/admin.go:240
2024-01-14 01:09:17 +00:00
msgid "Tourist tax must be a decimal number."
msgstr "L’ impost turístic ha de ser un número decimal."
2024-02-27 18:45:47 +00:00
#: pkg/company/admin.go:241
2024-01-14 01:09:17 +00:00
msgid "Tourist tax must be zero or greater."
msgstr "L’ impost turístic ha de ser com a mínim zero."
2024-02-27 18:45:47 +00:00
#: pkg/company/admin.go:244
msgid "Tourist tax days can not be empty."
msgstr "No podeu deixar els dies de l’ impost turístic en blanc."
#: pkg/company/admin.go:245
msgid "Tourist tax days must be an integer number."
msgstr "Els dies de l’ impost turístic ha de ser un número enter."
#: pkg/company/admin.go:246
msgid "Tourist tax days must be one or greater."
msgstr "Els dies de l’ impost turístic ha de ser com a mínim u."
#: pkg/company/admin.go:249
2023-08-15 20:35:21 +00:00
msgid "Selected currency is not valid."
msgstr "La moneda escollida no és vàlida."
2024-02-27 18:45:47 +00:00
#: pkg/company/admin.go:251
2023-08-15 20:35:21 +00:00
msgid "Invoice number format can not be empty."
msgstr "No podeu deixar el format del número de factura en blanc."
Allow users to update their profile images
I do not see the profile image as an “integral part” of the user (i.e.,
no need for constraints), hence i do not want to store it in the
database, as would do for the identification image during check-in.
By default, i store the avatars in /var/lib/camper/avatars, but it is a
variable to allow packagers change this value using the linker.
This is also served as a test bed for uploading files to the server,
that now has a better interface and uses less resources that what i did
to Numerus.
Now the profile handler needs to keep a variable to know the path to the
avatars’ directory, thus i had to change it to a struct nested in app,
much like the fileHandler does. It still has to return the HandlerFunc,
however, as this function needs to close over the user and connection
variables.
Part of #7.
2023-07-28 18:15:09 +00:00
#: pkg/auth/user.go:40
Add the logout button
Conceptually, to logout we have to “delete the session”, thus the best
HTTP verb would be `DELETE`. However, there is no way to send a
`DELETE` request with a regular HTML form, and it seems that never will
be[0].
I could use a POST, optionally with a “method override” technique, but
i was planing to use HTMx anyway, so this was as good an opportunity to
include it as any.
In this application i am not concerned with people not having JavaScript
enabled, because it is for a customer that has a known environment, and
we do not have much time anyway. Therefore, i opted to forgo
progressive enhancement in cases like this: if `DELETE` is needed, use
`hx-delete`.
Unfortunately, i can not use a <form> with a hidden <input> for the
CSRF token, because `DELETE` requests do not have body and the value
should be added as query parameters, like a form with GET method, but
HTMx does the incorrect thing here: sends the values in the request’s
body. That’s why i have to use a custom header and the `hx-header`
directive to include the CSRF token.
Then, by default HTMx targets the triggered element for swap with the
response from the server, but after a logout i want to redirect the
user to the login form again. I could set the hx-target to button to
replace the whole body, or tell the client to redirect to the new
location. I actually do not know which one is “better”. Maybe the
hx-target is best because then everything is handled by the client, but
in the case of logout, since it is possible that i might want to load
scripts only for logged-in users in the future, i opted for the full
page reload.
However, HTMx does not want to reload a page that return HTTP 401,
hence i had to include the GET method to /login in order to return the
login form with a response of HTTP 200, which also helps when
reloading in the browser after a failed login attempt. I am not worried
with the HTTP 401 when attempting to load a page as guest, because
this request most probably comes from the browser, not HTMx, and it will
show the login form as intended—even though it is not compliant, since
it does not return the WWW-Authenticate header, but this is the best i
can do given that no cookie-based authentication method has been
accepted[1].
[0]: https://www.w3.org/Bugs/Public/show_bug.cgi?id=10671#c16
[1]: https://datatracker.ietf.org/doc/id/draft-broyer-http-cookie-auth-00.html
2023-07-26 11:49:47 +00:00
msgid "Cross-site request forgery detected."
msgstr "S’ ha detectat un intent de falsificació de petició a llocs creuats."
2023-08-14 09:43:58 +00:00
2024-01-16 00:25:25 +00:00
#: pkg/media/admin.go:312
Add the surroundings static page
This page is “highly stylized”, with a masonry-like grid, that i did not
know how to generate automatically from data defined in PostgreSQL,
therefore with Oriol we agreed to have this one as a static page and
we will see what we can do if the customer asks to be able to change
it.
I was a bit undecided on whether the icons in the bottom part of the
page should be defined in the CSS or with style="" and CSS variables,
like i do for the campsite type in the home page.
At first i thought that it should use CSS variables, mostly for
coherence: if another section of the web does it for its background
image, why no this one. The difference is that the home page is
dynamically created from the database, while this page is static and we
know what icons we need, thus it makes more sense to move it to the
stylesheet file, because then it will be downloaded by user agents that
actually want to use it (e.g., browsers, but not Braille terminals).
2023-09-16 22:11:39 +00:00
msgid "Uploaded file can not be empty."
msgstr "No podeu deixar el fitxer del mèdia en blanc."
2024-01-16 00:25:25 +00:00
#: pkg/media/admin.go:371
Manage all media uploads in a single place
It made no sense to have a file upload in each form that needs a media,
because to reuse an existing media users would need to upload the exact
same file again; this is very unusual and unfriendly.
A better option is to have a “centralized” media section, where people
can upload files there, and then have a picker to select from there.
Ideally, there would be an upload option in the picker, but i did not
add it yet.
I’ve split the content from the media because i want users to have the
option to update a media, for instance when they need to upload a
reduced or cropped version of the same photo, without an edit they would
need to upload the file as a new media and then update all places where
the old version was used. And i did not want to trouble people that
uploads the same photo twice: without the separate relation, doing so
would throw a constraint error.
I do not believe there is any security problem to have all companies
link their media to the same file, as they were already readable by
everyone and could upload the data from a different company to their
own; in other words, it is not worse than it was now.
2023-09-20 23:56:44 +00:00
msgid "Filename can not be empty."
2023-10-06 11:26:01 +00:00
msgstr "No podeu deixar el nom del fitxer en blanc."
2024-05-02 23:01:01 +00:00
#: pkg/booking/checkin.go:287
2024-04-26 15:09:36 +00:00
msgid "ID document issue date must be a valid date."
msgstr "La data d’ expedició del document d’ identitat ha de ser una data vàlida."
2024-05-02 23:01:01 +00:00
#: pkg/booking/checkin.go:288
2024-04-26 15:09:36 +00:00
msgid "ID document issue date must be in the past."
msgstr "La data d’ expedició del document d’ identitat ha de ser al passat."
2024-05-02 23:01:01 +00:00
#: pkg/booking/checkin.go:293
2024-04-26 15:09:36 +00:00
msgid "Selected sex is not valid."
msgstr "El sexe escollit no és vàlid."
2024-05-02 23:01:01 +00:00
#: pkg/booking/checkin.go:294
2024-04-26 15:09:36 +00:00
msgid "Birthdate can not be empty"
msgstr "No podeu deixar la data de naixement en blanc."
2024-05-02 23:01:01 +00:00
#: pkg/booking/checkin.go:295
2024-04-26 15:09:36 +00:00
msgid "Birthdate must be a valid date."
msgstr "La data de naixement ha de ser una data vàlida."
2024-05-02 23:01:01 +00:00
#: pkg/booking/checkin.go:296
2024-04-26 15:09:36 +00:00
msgid "Birthdate must be in the past."
msgstr "La data de naixement ha de ser al passat."
#: pkg/booking/cart.go:233
Compute and show the “cart” for the booking form
I have to ask number and age ranges of hosts of guests for all campsite
types, not only those that have price options for adults, children, etc.
because i must compute the tourist tax for adults. These numbers will
be used to generate de rows for guests when actually creating the
booking, which is not done already.
To satisfy the campsite types that do have a price per guest, not only
per night, i had to add the prices for each range in the
campsite_type_cost relation. If a campsite type does not have price
per person, then that should be zero; the website then does not display
the price.
The minimal price for any campsite type is one adult for one night,
thus to compute the price i need at least the campsite type, the dates,
and the number of adults, that has a minimum of one. I changed the
order of the form to ask for these values first, so i can compute the
initial price as soon as possible. To help further, i show the
<fieldset>s progressively when visitors select options.
2024-02-04 05:37:25 +00:00
msgctxt "cart"
msgid "Adult"
msgstr "Adult"
2024-04-26 15:09:36 +00:00
#: pkg/booking/cart.go:234
Compute and show the “cart” for the booking form
I have to ask number and age ranges of hosts of guests for all campsite
types, not only those that have price options for adults, children, etc.
because i must compute the tourist tax for adults. These numbers will
be used to generate de rows for guests when actually creating the
booking, which is not done already.
To satisfy the campsite types that do have a price per guest, not only
per night, i had to add the prices for each range in the
campsite_type_cost relation. If a campsite type does not have price
per person, then that should be zero; the website then does not display
the price.
The minimal price for any campsite type is one adult for one night,
thus to compute the price i need at least the campsite type, the dates,
and the number of adults, that has a minimum of one. I changed the
order of the form to ask for these values first, so i can compute the
initial price as soon as possible. To help further, i show the
<fieldset>s progressively when visitors select options.
2024-02-04 05:37:25 +00:00
msgctxt "cart"
msgid "Teenager"
msgstr "Adolescent"
2024-04-26 15:09:36 +00:00
#: pkg/booking/cart.go:235
Compute and show the “cart” for the booking form
I have to ask number and age ranges of hosts of guests for all campsite
types, not only those that have price options for adults, children, etc.
because i must compute the tourist tax for adults. These numbers will
be used to generate de rows for guests when actually creating the
booking, which is not done already.
To satisfy the campsite types that do have a price per guest, not only
per night, i had to add the prices for each range in the
campsite_type_cost relation. If a campsite type does not have price
per person, then that should be zero; the website then does not display
the price.
The minimal price for any campsite type is one adult for one night,
thus to compute the price i need at least the campsite type, the dates,
and the number of adults, that has a minimum of one. I changed the
order of the form to ask for these values first, so i can compute the
initial price as soon as possible. To help further, i show the
<fieldset>s progressively when visitors select options.
2024-02-04 05:37:25 +00:00
msgctxt "cart"
msgid "Child"
msgstr "Nen"
2024-04-26 15:09:36 +00:00
#: pkg/booking/cart.go:236
Add campsite_type_pet_cost relation to hold price of dogs in campsites
It is a separate relation, instead of having a field in campsite_type,
because not all campsite types allow dogs. I could have added a new
field to campsite_type, but then its values it would be meaningless for
campsites that do not allow dogs, and a nullable field is not a valid
solution because NULL means “unknown”, but we **do** know the price —
none.
A separate relation encodes the same information without ambiguities nor
null values, and, in fact, removed the dogs_allowed field from
campsite_type to prevent erroneous status, such as a campsite type that
allows dogs without having a cost — even if the cost is zero, it has to
be added to the new relation.
2024-02-10 05:18:30 +00:00
msgctxt "cart"
msgid "Dog"
msgstr "Gos"
2024-05-02 23:01:01 +00:00
#: pkg/booking/admin.go:236
2024-01-18 20:05:30 +00:00
msgctxt "filename"
msgid "bookings.ods"
msgstr "reserves.ods"
2024-05-03 17:13:49 +00:00
#: pkg/booking/admin.go:473
“Finish” the new booking form
Had to bring the same fields that i have for a payment to booking,
except that some of those should be nullable, because it is unreasonable
to ask front desk to gather all customer data when they have a booking
via phone, for instance.
Therefore, i can not take advantage of the validation for customer data
that i use in the public-facing form, but, fortunately, most of the
validations where in separated functions, thus only had to rewrite that
one for this case.
I already have to create a booking from a payment, when receiving a
payment from the public instance, thus i made that function and reused
it here. Then i “overwrite” the newly created pre-booking with the
customer data from the form, and set is as confirmed, as we do not see
any point of allowing pre-bookings from employees.
2024-04-24 18:12:29 +00:00
msgid "Country can not be empty to validate the postcode."
msgstr "No podeu deixar el país en blanc per validar el codi postal."
2024-05-03 17:13:49 +00:00
#: pkg/booking/admin.go:483
“Finish” the new booking form
Had to bring the same fields that i have for a payment to booking,
except that some of those should be nullable, because it is unreasonable
to ask front desk to gather all customer data when they have a booking
via phone, for instance.
Therefore, i can not take advantage of the validation for customer data
that i use in the public-facing form, but, fortunately, most of the
validations where in separated functions, thus only had to rewrite that
one for this case.
I already have to create a booking from a payment, when receiving a
payment from the public instance, thus i made that function and reused
it here. Then i “overwrite” the newly created pre-booking with the
customer data from the form, and set is as confirmed, as we do not see
any point of allowing pre-bookings from employees.
2024-04-24 18:12:29 +00:00
msgid "Country can not be empty to validate the phone."
msgstr "No podeu deixar el país en blanc per validar el telèfon."
2024-05-03 17:13:49 +00:00
#: pkg/booking/admin.go:490
“Finish” the new booking form
Had to bring the same fields that i have for a payment to booking,
except that some of those should be nullable, because it is unreasonable
to ask front desk to gather all customer data when they have a booking
via phone, for instance.
Therefore, i can not take advantage of the validation for customer data
that i use in the public-facing form, but, fortunately, most of the
validations where in separated functions, thus only had to rewrite that
one for this case.
I already have to create a booking from a payment, when receiving a
payment from the public instance, thus i made that function and reused
it here. Then i “overwrite” the newly created pre-booking with the
customer data from the form, and set is as confirmed, as we do not see
any point of allowing pre-bookings from employees.
2024-04-24 18:12:29 +00:00
msgid "You must select at least one accommodation."
msgstr "Heu d’ escollir com a mínim un allotjament."
2024-05-03 17:13:49 +00:00
#: pkg/booking/admin.go:496
“Finish” the new booking form
Had to bring the same fields that i have for a payment to booking,
except that some of those should be nullable, because it is unreasonable
to ask front desk to gather all customer data when they have a booking
via phone, for instance.
Therefore, i can not take advantage of the validation for customer data
that i use in the public-facing form, but, fortunately, most of the
validations where in separated functions, thus only had to rewrite that
one for this case.
I already have to create a booking from a payment, when receiving a
payment from the public instance, thus i made that function and reused
it here. Then i “overwrite” the newly created pre-booking with the
customer data from the form, and set is as confirmed, as we do not see
any point of allowing pre-bookings from employees.
2024-04-24 18:12:29 +00:00
msgid "The selected accommodations have no available openings in the requested dates."
msgstr "Els allotjaments escollits no estan disponibles a les dates demanades."
2024-04-26 15:09:36 +00:00
#: pkg/booking/public.go:284 pkg/booking/public.go:313
Handle the booking cart entirely with HTMx
Besides the dynamic final cart, that was already handled by HTMx, i had
to check the maximum number of guests, whether the accommodation allows
“overflow”, whether dogs are allowed, and that the booking dates were
within the campground’s opening and closing dates.
I could do all of this with AlpineJS, but then i would have to add the
same validation to the backend, prior to accept the payment. Would not
make more sense to have them in a single place, namely the backend? With
HTMx i can do that.
However, i now have to create the form “piecemeal”, because i may not
have the whole information when the visitor arrives to the booking page,
and i still had the same problem as in commit d2858302efa—parsing the
whole form as is would leave guests and options field empty, rather than
at their minimum values.
One of the fieldsets in that booking form are the arrival and departure
dates, that are the sames we use in the campsite type’s page to
“preselect” these values. Since now are in a separate struct, i can
reuse the same type and validation logic for both pages, making my
JavaScript code useless, but requiring HTMx. I think this is a good
tradeoff, in fact.
2024-02-10 02:49:44 +00:00
msgid "Arrival date must be a valid date."
msgstr "La data d’ arribada ha de ser una data vàlida."
Add the first draft of the booking and payment forms
The form is based on the one in the current website, but in a single
page instead of split into many pages; possibly each <fieldset> should
be in a separate page/view. The idea is for Oriol to check the design
and decide how it would be presented to the user, so i needed something
to show him first.
I hardcoded the **test** data for the customer’s Redsys account. Is
this bad? I hope not, but i am not really, really sure.
The data sent to Redsys is just a placeholder because there are booking
details that i do not know, like what i have to do with the “teenagers”
field or the area preferences, thus i can not yet have a booking
relation. Nevertheless, had to generate a random order number up to
12-chars in length or Redsys would refuse the payment, claiming that
the order is duplicated.
The Redsys package is based on the PHP code provided by Redsys
themselves, plus some hints at the implementations from various Go
packages that did not know why they were so complicated.
Had to grant select on table country to guest in order to show the
select with the country options.
I have changed the “Postal code” input in taxDetails for “Postcode”
because this is the spell that it is used in the current web, i did not
see a reason to change it—it is an accepted form—, and i did not want to
have inconsistencies between forms.
2023-10-19 19:37:34 +00:00
2024-04-26 15:09:36 +00:00
#: pkg/booking/public.go:298 pkg/booking/public.go:320
Handle the booking cart entirely with HTMx
Besides the dynamic final cart, that was already handled by HTMx, i had
to check the maximum number of guests, whether the accommodation allows
“overflow”, whether dogs are allowed, and that the booking dates were
within the campground’s opening and closing dates.
I could do all of this with AlpineJS, but then i would have to add the
same validation to the backend, prior to accept the payment. Would not
make more sense to have them in a single place, namely the backend? With
HTMx i can do that.
However, i now have to create the form “piecemeal”, because i may not
have the whole information when the visitor arrives to the booking page,
and i still had the same problem as in commit d2858302efa—parsing the
whole form as is would leave guests and options field empty, rather than
at their minimum values.
One of the fieldsets in that booking form are the arrival and departure
dates, that are the sames we use in the campsite type’s page to
“preselect” these values. Since now are in a separate struct, i can
reuse the same type and validation logic for both pages, making my
JavaScript code useless, but requiring HTMx. I think this is a good
tradeoff, in fact.
2024-02-10 02:49:44 +00:00
msgid "Departure date must be a valid date."
msgstr "La data de sortida ha de ser una data vàlida."
Add the first draft of the booking and payment forms
The form is based on the one in the current website, but in a single
page instead of split into many pages; possibly each <fieldset> should
be in a separate page/view. The idea is for Oriol to check the design
and decide how it would be presented to the user, so i needed something
to show him first.
I hardcoded the **test** data for the customer’s Redsys account. Is
this bad? I hope not, but i am not really, really sure.
The data sent to Redsys is just a placeholder because there are booking
details that i do not know, like what i have to do with the “teenagers”
field or the area preferences, thus i can not yet have a booking
relation. Nevertheless, had to generate a random order number up to
12-chars in length or Redsys would refuse the payment, claiming that
the order is duplicated.
The Redsys package is based on the PHP code provided by Redsys
themselves, plus some hints at the implementations from various Go
packages that did not know why they were so complicated.
Had to grant select on table country to guest in order to show the
select with the country options.
I have changed the “Postal code” input in taxDetails for “Postcode”
because this is the spell that it is used in the current web, i did not
see a reason to change it—it is an accepted form—, and i did not want to
have inconsistencies between forms.
2023-10-19 19:37:34 +00:00
2024-04-26 15:09:36 +00:00
#: pkg/booking/public.go:312
Add the first draft of the booking and payment forms
The form is based on the one in the current website, but in a single
page instead of split into many pages; possibly each <fieldset> should
be in a separate page/view. The idea is for Oriol to check the design
and decide how it would be presented to the user, so i needed something
to show him first.
I hardcoded the **test** data for the customer’s Redsys account. Is
this bad? I hope not, but i am not really, really sure.
The data sent to Redsys is just a placeholder because there are booking
details that i do not know, like what i have to do with the “teenagers”
field or the area preferences, thus i can not yet have a booking
relation. Nevertheless, had to generate a random order number up to
12-chars in length or Redsys would refuse the payment, claiming that
the order is duplicated.
The Redsys package is based on the PHP code provided by Redsys
themselves, plus some hints at the implementations from various Go
packages that did not know why they were so complicated.
Had to grant select on table country to guest in order to show the
select with the country options.
I have changed the “Postal code” input in taxDetails for “Postcode”
because this is the spell that it is used in the current web, i did not
see a reason to change it—it is an accepted form—, and i did not want to
have inconsistencies between forms.
2023-10-19 19:37:34 +00:00
msgid "Arrival date can not be empty"
msgstr "No podeu deixar la data d’ arribada en blanc."
2024-04-26 15:09:36 +00:00
#: pkg/booking/public.go:314
Handle the booking cart entirely with HTMx
Besides the dynamic final cart, that was already handled by HTMx, i had
to check the maximum number of guests, whether the accommodation allows
“overflow”, whether dogs are allowed, and that the booking dates were
within the campground’s opening and closing dates.
I could do all of this with AlpineJS, but then i would have to add the
same validation to the backend, prior to accept the payment. Would not
make more sense to have them in a single place, namely the backend? With
HTMx i can do that.
However, i now have to create the form “piecemeal”, because i may not
have the whole information when the visitor arrives to the booking page,
and i still had the same problem as in commit d2858302efa—parsing the
whole form as is would leave guests and options field empty, rather than
at their minimum values.
One of the fieldsets in that booking form are the arrival and departure
dates, that are the sames we use in the campsite type’s page to
“preselect” these values. Since now are in a separate struct, i can
reuse the same type and validation logic for both pages, making my
JavaScript code useless, but requiring HTMx. I think this is a good
tradeoff, in fact.
2024-02-10 02:49:44 +00:00
#, c-format
msgid "Arrival date must be %s or after."
msgstr "La data d’ arribada ha de ser igual o posterior a %s."
Add the first draft of the booking and payment forms
The form is based on the one in the current website, but in a single
page instead of split into many pages; possibly each <fieldset> should
be in a separate page/view. The idea is for Oriol to check the design
and decide how it would be presented to the user, so i needed something
to show him first.
I hardcoded the **test** data for the customer’s Redsys account. Is
this bad? I hope not, but i am not really, really sure.
The data sent to Redsys is just a placeholder because there are booking
details that i do not know, like what i have to do with the “teenagers”
field or the area preferences, thus i can not yet have a booking
relation. Nevertheless, had to generate a random order number up to
12-chars in length or Redsys would refuse the payment, claiming that
the order is duplicated.
The Redsys package is based on the PHP code provided by Redsys
themselves, plus some hints at the implementations from various Go
packages that did not know why they were so complicated.
Had to grant select on table country to guest in order to show the
select with the country options.
I have changed the “Postal code” input in taxDetails for “Postcode”
because this is the spell that it is used in the current web, i did not
see a reason to change it—it is an accepted form—, and i did not want to
have inconsistencies between forms.
2023-10-19 19:37:34 +00:00
2024-04-26 15:09:36 +00:00
#: pkg/booking/public.go:315
Handle the booking cart entirely with HTMx
Besides the dynamic final cart, that was already handled by HTMx, i had
to check the maximum number of guests, whether the accommodation allows
“overflow”, whether dogs are allowed, and that the booking dates were
within the campground’s opening and closing dates.
I could do all of this with AlpineJS, but then i would have to add the
same validation to the backend, prior to accept the payment. Would not
make more sense to have them in a single place, namely the backend? With
HTMx i can do that.
However, i now have to create the form “piecemeal”, because i may not
have the whole information when the visitor arrives to the booking page,
and i still had the same problem as in commit d2858302efa—parsing the
whole form as is would leave guests and options field empty, rather than
at their minimum values.
One of the fieldsets in that booking form are the arrival and departure
dates, that are the sames we use in the campsite type’s page to
“preselect” these values. Since now are in a separate struct, i can
reuse the same type and validation logic for both pages, making my
JavaScript code useless, but requiring HTMx. I think this is a good
tradeoff, in fact.
2024-02-10 02:49:44 +00:00
#, c-format
msgid "Arrival date must be %s or before."
msgstr "La data d’ arribada ha de ser anterior o igual a %s."
2024-04-26 15:09:36 +00:00
#: pkg/booking/public.go:319
Add the first draft of the booking and payment forms
The form is based on the one in the current website, but in a single
page instead of split into many pages; possibly each <fieldset> should
be in a separate page/view. The idea is for Oriol to check the design
and decide how it would be presented to the user, so i needed something
to show him first.
I hardcoded the **test** data for the customer’s Redsys account. Is
this bad? I hope not, but i am not really, really sure.
The data sent to Redsys is just a placeholder because there are booking
details that i do not know, like what i have to do with the “teenagers”
field or the area preferences, thus i can not yet have a booking
relation. Nevertheless, had to generate a random order number up to
12-chars in length or Redsys would refuse the payment, claiming that
the order is duplicated.
The Redsys package is based on the PHP code provided by Redsys
themselves, plus some hints at the implementations from various Go
packages that did not know why they were so complicated.
Had to grant select on table country to guest in order to show the
select with the country options.
I have changed the “Postal code” input in taxDetails for “Postcode”
because this is the spell that it is used in the current web, i did not
see a reason to change it—it is an accepted form—, and i did not want to
have inconsistencies between forms.
2023-10-19 19:37:34 +00:00
msgid "Departure date can not be empty"
msgstr "No podeu deixar la data de sortida en blanc."
2024-04-26 15:09:36 +00:00
#: pkg/booking/public.go:321
Handle the booking cart entirely with HTMx
Besides the dynamic final cart, that was already handled by HTMx, i had
to check the maximum number of guests, whether the accommodation allows
“overflow”, whether dogs are allowed, and that the booking dates were
within the campground’s opening and closing dates.
I could do all of this with AlpineJS, but then i would have to add the
same validation to the backend, prior to accept the payment. Would not
make more sense to have them in a single place, namely the backend? With
HTMx i can do that.
However, i now have to create the form “piecemeal”, because i may not
have the whole information when the visitor arrives to the booking page,
and i still had the same problem as in commit d2858302efa—parsing the
whole form as is would leave guests and options field empty, rather than
at their minimum values.
One of the fieldsets in that booking form are the arrival and departure
dates, that are the sames we use in the campsite type’s page to
“preselect” these values. Since now are in a separate struct, i can
reuse the same type and validation logic for both pages, making my
JavaScript code useless, but requiring HTMx. I think this is a good
tradeoff, in fact.
2024-02-10 02:49:44 +00:00
#, c-format
msgid "Departure date must be %s or after."
msgstr "La data de sortida ha de ser igual o posterior a %s."
2024-04-26 15:09:36 +00:00
#: pkg/booking/public.go:322
Handle the booking cart entirely with HTMx
Besides the dynamic final cart, that was already handled by HTMx, i had
to check the maximum number of guests, whether the accommodation allows
“overflow”, whether dogs are allowed, and that the booking dates were
within the campground’s opening and closing dates.
I could do all of this with AlpineJS, but then i would have to add the
same validation to the backend, prior to accept the payment. Would not
make more sense to have them in a single place, namely the backend? With
HTMx i can do that.
However, i now have to create the form “piecemeal”, because i may not
have the whole information when the visitor arrives to the booking page,
and i still had the same problem as in commit d2858302efa—parsing the
whole form as is would leave guests and options field empty, rather than
at their minimum values.
One of the fieldsets in that booking form are the arrival and departure
dates, that are the sames we use in the campsite type’s page to
“preselect” these values. Since now are in a separate struct, i can
reuse the same type and validation logic for both pages, making my
JavaScript code useless, but requiring HTMx. I think this is a good
tradeoff, in fact.
2024-02-10 02:49:44 +00:00
#, c-format
msgid "Departure date must be %s or before."
msgstr "La data de sortida ha de ser anterior o igual a %s."
Add the first draft of the booking and payment forms
The form is based on the one in the current website, but in a single
page instead of split into many pages; possibly each <fieldset> should
be in a separate page/view. The idea is for Oriol to check the design
and decide how it would be presented to the user, so i needed something
to show him first.
I hardcoded the **test** data for the customer’s Redsys account. Is
this bad? I hope not, but i am not really, really sure.
The data sent to Redsys is just a placeholder because there are booking
details that i do not know, like what i have to do with the “teenagers”
field or the area preferences, thus i can not yet have a booking
relation. Nevertheless, had to generate a random order number up to
12-chars in length or Redsys would refuse the payment, claiming that
the order is duplicated.
The Redsys package is based on the PHP code provided by Redsys
themselves, plus some hints at the implementations from various Go
packages that did not know why they were so complicated.
Had to grant select on table country to guest in order to show the
select with the country options.
I have changed the “Postal code” input in taxDetails for “Postcode”
because this is the spell that it is used in the current web, i did not
see a reason to change it—it is an accepted form—, and i did not want to
have inconsistencies between forms.
2023-10-19 19:37:34 +00:00
2024-04-26 15:09:36 +00:00
#: pkg/booking/public.go:380
Handle the booking cart entirely with HTMx
Besides the dynamic final cart, that was already handled by HTMx, i had
to check the maximum number of guests, whether the accommodation allows
“overflow”, whether dogs are allowed, and that the booking dates were
within the campground’s opening and closing dates.
I could do all of this with AlpineJS, but then i would have to add the
same validation to the backend, prior to accept the payment. Would not
make more sense to have them in a single place, namely the backend? With
HTMx i can do that.
However, i now have to create the form “piecemeal”, because i may not
have the whole information when the visitor arrives to the booking page,
and i still had the same problem as in commit d2858302efa—parsing the
whole form as is would leave guests and options field empty, rather than
at their minimum values.
One of the fieldsets in that booking form are the arrival and departure
dates, that are the sames we use in the campsite type’s page to
“preselect” these values. Since now are in a separate struct, i can
reuse the same type and validation logic for both pages, making my
JavaScript code useless, but requiring HTMx. I think this is a good
tradeoff, in fact.
2024-02-10 02:49:44 +00:00
#, c-format
msgid "There can be at most %d guests in this accommodation."
msgstr "Hi poden haver com a màxim %d convidats a aquest allotjament."
Add the first draft of the booking and payment forms
The form is based on the one in the current website, but in a single
page instead of split into many pages; possibly each <fieldset> should
be in a separate page/view. The idea is for Oriol to check the design
and decide how it would be presented to the user, so i needed something
to show him first.
I hardcoded the **test** data for the customer’s Redsys account. Is
this bad? I hope not, but i am not really, really sure.
The data sent to Redsys is just a placeholder because there are booking
details that i do not know, like what i have to do with the “teenagers”
field or the area preferences, thus i can not yet have a booking
relation. Nevertheless, had to generate a random order number up to
12-chars in length or Redsys would refuse the payment, claiming that
the order is duplicated.
The Redsys package is based on the PHP code provided by Redsys
themselves, plus some hints at the implementations from various Go
packages that did not know why they were so complicated.
Had to grant select on table country to guest in order to show the
select with the country options.
I have changed the “Postal code” input in taxDetails for “Postcode”
because this is the spell that it is used in the current web, i did not
see a reason to change it—it is an accepted form—, and i did not want to
have inconsistencies between forms.
2023-10-19 19:37:34 +00:00
2024-04-26 15:09:36 +00:00
#: pkg/booking/public.go:400
Compute and show the “cart” for the booking form
I have to ask number and age ranges of hosts of guests for all campsite
types, not only those that have price options for adults, children, etc.
because i must compute the tourist tax for adults. These numbers will
be used to generate de rows for guests when actually creating the
booking, which is not done already.
To satisfy the campsite types that do have a price per guest, not only
per night, i had to add the prices for each range in the
campsite_type_cost relation. If a campsite type does not have price
per person, then that should be zero; the website then does not display
the price.
The minimal price for any campsite type is one adult for one night,
thus to compute the price i need at least the campsite type, the dates,
and the number of adults, that has a minimum of one. I changed the
order of the form to ask for these values first, so i can compute the
initial price as soon as possible. To help further, i show the
<fieldset>s progressively when visitors select options.
2024-02-04 05:37:25 +00:00
msgid "Number of adults can not be empty"
msgstr "No podeu deixar el número d’ adults en blanc."
2024-04-26 15:09:36 +00:00
#: pkg/booking/public.go:401
Compute and show the “cart” for the booking form
I have to ask number and age ranges of hosts of guests for all campsite
types, not only those that have price options for adults, children, etc.
because i must compute the tourist tax for adults. These numbers will
be used to generate de rows for guests when actually creating the
booking, which is not done already.
To satisfy the campsite types that do have a price per guest, not only
per night, i had to add the prices for each range in the
campsite_type_cost relation. If a campsite type does not have price
per person, then that should be zero; the website then does not display
the price.
The minimal price for any campsite type is one adult for one night,
thus to compute the price i need at least the campsite type, the dates,
and the number of adults, that has a minimum of one. I changed the
order of the form to ask for these values first, so i can compute the
initial price as soon as possible. To help further, i show the
<fieldset>s progressively when visitors select options.
2024-02-04 05:37:25 +00:00
msgid "Number of adults must be an integer."
msgstr "El número d’ adults ha de ser enter."
2024-04-26 15:09:36 +00:00
#: pkg/booking/public.go:402
Compute and show the “cart” for the booking form
I have to ask number and age ranges of hosts of guests for all campsite
types, not only those that have price options for adults, children, etc.
because i must compute the tourist tax for adults. These numbers will
be used to generate de rows for guests when actually creating the
booking, which is not done already.
To satisfy the campsite types that do have a price per guest, not only
per night, i had to add the prices for each range in the
campsite_type_cost relation. If a campsite type does not have price
per person, then that should be zero; the website then does not display
the price.
The minimal price for any campsite type is one adult for one night,
thus to compute the price i need at least the campsite type, the dates,
and the number of adults, that has a minimum of one. I changed the
order of the form to ask for these values first, so i can compute the
initial price as soon as possible. To help further, i show the
<fieldset>s progressively when visitors select options.
2024-02-04 05:37:25 +00:00
msgid "There must be at least one adult."
msgstr "Hi ha d’ haver com a mínim un adult."
2024-04-26 15:09:36 +00:00
#: pkg/booking/public.go:405
Compute and show the “cart” for the booking form
I have to ask number and age ranges of hosts of guests for all campsite
types, not only those that have price options for adults, children, etc.
because i must compute the tourist tax for adults. These numbers will
be used to generate de rows for guests when actually creating the
booking, which is not done already.
To satisfy the campsite types that do have a price per guest, not only
per night, i had to add the prices for each range in the
campsite_type_cost relation. If a campsite type does not have price
per person, then that should be zero; the website then does not display
the price.
The minimal price for any campsite type is one adult for one night,
thus to compute the price i need at least the campsite type, the dates,
and the number of adults, that has a minimum of one. I changed the
order of the form to ask for these values first, so i can compute the
initial price as soon as possible. To help further, i show the
<fieldset>s progressively when visitors select options.
2024-02-04 05:37:25 +00:00
msgid "Number of teenagers can not be empty"
msgstr "No podeu deixar el número d’ adolescents en blanc."
2024-04-26 15:09:36 +00:00
#: pkg/booking/public.go:406
Compute and show the “cart” for the booking form
I have to ask number and age ranges of hosts of guests for all campsite
types, not only those that have price options for adults, children, etc.
because i must compute the tourist tax for adults. These numbers will
be used to generate de rows for guests when actually creating the
booking, which is not done already.
To satisfy the campsite types that do have a price per guest, not only
per night, i had to add the prices for each range in the
campsite_type_cost relation. If a campsite type does not have price
per person, then that should be zero; the website then does not display
the price.
The minimal price for any campsite type is one adult for one night,
thus to compute the price i need at least the campsite type, the dates,
and the number of adults, that has a minimum of one. I changed the
order of the form to ask for these values first, so i can compute the
initial price as soon as possible. To help further, i show the
<fieldset>s progressively when visitors select options.
2024-02-04 05:37:25 +00:00
msgid "Number of teenagers must be an integer."
msgstr "El número d’ adolescents ha de ser enter."
2024-04-26 15:09:36 +00:00
#: pkg/booking/public.go:407
Compute and show the “cart” for the booking form
I have to ask number and age ranges of hosts of guests for all campsite
types, not only those that have price options for adults, children, etc.
because i must compute the tourist tax for adults. These numbers will
be used to generate de rows for guests when actually creating the
booking, which is not done already.
To satisfy the campsite types that do have a price per guest, not only
per night, i had to add the prices for each range in the
campsite_type_cost relation. If a campsite type does not have price
per person, then that should be zero; the website then does not display
the price.
The minimal price for any campsite type is one adult for one night,
thus to compute the price i need at least the campsite type, the dates,
and the number of adults, that has a minimum of one. I changed the
order of the form to ask for these values first, so i can compute the
initial price as soon as possible. To help further, i show the
<fieldset>s progressively when visitors select options.
2024-02-04 05:37:25 +00:00
msgid "Number of teenagers can not be negative."
msgstr "El número d’ adolescents no pot ser negatiu."
2024-04-26 15:09:36 +00:00
#: pkg/booking/public.go:410
Compute and show the “cart” for the booking form
I have to ask number and age ranges of hosts of guests for all campsite
types, not only those that have price options for adults, children, etc.
because i must compute the tourist tax for adults. These numbers will
be used to generate de rows for guests when actually creating the
booking, which is not done already.
To satisfy the campsite types that do have a price per guest, not only
per night, i had to add the prices for each range in the
campsite_type_cost relation. If a campsite type does not have price
per person, then that should be zero; the website then does not display
the price.
The minimal price for any campsite type is one adult for one night,
thus to compute the price i need at least the campsite type, the dates,
and the number of adults, that has a minimum of one. I changed the
order of the form to ask for these values first, so i can compute the
initial price as soon as possible. To help further, i show the
<fieldset>s progressively when visitors select options.
2024-02-04 05:37:25 +00:00
msgid "Number of children can not be empty"
msgstr "No podeu deixar el número de nens en blanc."
2024-04-26 15:09:36 +00:00
#: pkg/booking/public.go:411
Compute and show the “cart” for the booking form
I have to ask number and age ranges of hosts of guests for all campsite
types, not only those that have price options for adults, children, etc.
because i must compute the tourist tax for adults. These numbers will
be used to generate de rows for guests when actually creating the
booking, which is not done already.
To satisfy the campsite types that do have a price per guest, not only
per night, i had to add the prices for each range in the
campsite_type_cost relation. If a campsite type does not have price
per person, then that should be zero; the website then does not display
the price.
The minimal price for any campsite type is one adult for one night,
thus to compute the price i need at least the campsite type, the dates,
and the number of adults, that has a minimum of one. I changed the
order of the form to ask for these values first, so i can compute the
initial price as soon as possible. To help further, i show the
<fieldset>s progressively when visitors select options.
2024-02-04 05:37:25 +00:00
msgid "Number of children must be an integer."
msgstr "El número de nens ha de ser enter."
2024-04-26 15:09:36 +00:00
#: pkg/booking/public.go:412
Compute and show the “cart” for the booking form
I have to ask number and age ranges of hosts of guests for all campsite
types, not only those that have price options for adults, children, etc.
because i must compute the tourist tax for adults. These numbers will
be used to generate de rows for guests when actually creating the
booking, which is not done already.
To satisfy the campsite types that do have a price per guest, not only
per night, i had to add the prices for each range in the
campsite_type_cost relation. If a campsite type does not have price
per person, then that should be zero; the website then does not display
the price.
The minimal price for any campsite type is one adult for one night,
thus to compute the price i need at least the campsite type, the dates,
and the number of adults, that has a minimum of one. I changed the
order of the form to ask for these values first, so i can compute the
initial price as soon as possible. To help further, i show the
<fieldset>s progressively when visitors select options.
2024-02-04 05:37:25 +00:00
msgid "Number of children can not be negative."
msgstr "El número de nens no pot ser negatiu."
2024-04-26 15:09:36 +00:00
#: pkg/booking/public.go:415
Compute and show the “cart” for the booking form
I have to ask number and age ranges of hosts of guests for all campsite
types, not only those that have price options for adults, children, etc.
because i must compute the tourist tax for adults. These numbers will
be used to generate de rows for guests when actually creating the
booking, which is not done already.
To satisfy the campsite types that do have a price per guest, not only
per night, i had to add the prices for each range in the
campsite_type_cost relation. If a campsite type does not have price
per person, then that should be zero; the website then does not display
the price.
The minimal price for any campsite type is one adult for one night,
thus to compute the price i need at least the campsite type, the dates,
and the number of adults, that has a minimum of one. I changed the
order of the form to ask for these values first, so i can compute the
initial price as soon as possible. To help further, i show the
<fieldset>s progressively when visitors select options.
2024-02-04 05:37:25 +00:00
msgid "Number of dogs can not be empty"
msgstr "No podeu deixar el número de gossos en blanc."
2024-04-26 15:09:36 +00:00
#: pkg/booking/public.go:416
Compute and show the “cart” for the booking form
I have to ask number and age ranges of hosts of guests for all campsite
types, not only those that have price options for adults, children, etc.
because i must compute the tourist tax for adults. These numbers will
be used to generate de rows for guests when actually creating the
booking, which is not done already.
To satisfy the campsite types that do have a price per guest, not only
per night, i had to add the prices for each range in the
campsite_type_cost relation. If a campsite type does not have price
per person, then that should be zero; the website then does not display
the price.
The minimal price for any campsite type is one adult for one night,
thus to compute the price i need at least the campsite type, the dates,
and the number of adults, that has a minimum of one. I changed the
order of the form to ask for these values first, so i can compute the
initial price as soon as possible. To help further, i show the
<fieldset>s progressively when visitors select options.
2024-02-04 05:37:25 +00:00
msgid "Number of dogs must be an integer."
msgstr "El número de gossos ha de ser enter."
2024-04-26 15:09:36 +00:00
#: pkg/booking/public.go:417
Compute and show the “cart” for the booking form
I have to ask number and age ranges of hosts of guests for all campsite
types, not only those that have price options for adults, children, etc.
because i must compute the tourist tax for adults. These numbers will
be used to generate de rows for guests when actually creating the
booking, which is not done already.
To satisfy the campsite types that do have a price per guest, not only
per night, i had to add the prices for each range in the
campsite_type_cost relation. If a campsite type does not have price
per person, then that should be zero; the website then does not display
the price.
The minimal price for any campsite type is one adult for one night,
thus to compute the price i need at least the campsite type, the dates,
and the number of adults, that has a minimum of one. I changed the
order of the form to ask for these values first, so i can compute the
initial price as soon as possible. To help further, i show the
<fieldset>s progressively when visitors select options.
2024-02-04 05:37:25 +00:00
msgid "Number of dogs can not be negative."
msgstr "El número de gossos no pot ser negatiu."
2024-04-26 15:09:36 +00:00
#: pkg/booking/public.go:524
Add the first draft of the booking and payment forms
The form is based on the one in the current website, but in a single
page instead of split into many pages; possibly each <fieldset> should
be in a separate page/view. The idea is for Oriol to check the design
and decide how it would be presented to the user, so i needed something
to show him first.
I hardcoded the **test** data for the customer’s Redsys account. Is
this bad? I hope not, but i am not really, really sure.
The data sent to Redsys is just a placeholder because there are booking
details that i do not know, like what i have to do with the “teenagers”
field or the area preferences, thus i can not yet have a booking
relation. Nevertheless, had to generate a random order number up to
12-chars in length or Redsys would refuse the payment, claiming that
the order is duplicated.
The Redsys package is based on the PHP code provided by Redsys
themselves, plus some hints at the implementations from various Go
packages that did not know why they were so complicated.
Had to grant select on table country to guest in order to show the
select with the country options.
I have changed the “Postal code” input in taxDetails for “Postcode”
because this is the spell that it is used in the current web, i did not
see a reason to change it—it is an accepted form—, and i did not want to
have inconsistencies between forms.
2023-10-19 19:37:34 +00:00
#, c-format
msgid "%s can not be empty"
msgstr "No podeu deixar %s en blanc."
2024-04-26 15:09:36 +00:00
#: pkg/booking/public.go:525
Add the first draft of the booking and payment forms
The form is based on the one in the current website, but in a single
page instead of split into many pages; possibly each <fieldset> should
be in a separate page/view. The idea is for Oriol to check the design
and decide how it would be presented to the user, so i needed something
to show him first.
I hardcoded the **test** data for the customer’s Redsys account. Is
this bad? I hope not, but i am not really, really sure.
The data sent to Redsys is just a placeholder because there are booking
details that i do not know, like what i have to do with the “teenagers”
field or the area preferences, thus i can not yet have a booking
relation. Nevertheless, had to generate a random order number up to
12-chars in length or Redsys would refuse the payment, claiming that
the order is duplicated.
The Redsys package is based on the PHP code provided by Redsys
themselves, plus some hints at the implementations from various Go
packages that did not know why they were so complicated.
Had to grant select on table country to guest in order to show the
select with the country options.
I have changed the “Postal code” input in taxDetails for “Postcode”
because this is the spell that it is used in the current web, i did not
see a reason to change it—it is an accepted form—, and i did not want to
have inconsistencies between forms.
2023-10-19 19:37:34 +00:00
#, c-format
msgid "%s must be an integer."
msgstr "%s ha de ser un número enter."
2024-04-26 15:09:36 +00:00
#: pkg/booking/public.go:526
Add the first draft of the booking and payment forms
The form is based on the one in the current website, but in a single
page instead of split into many pages; possibly each <fieldset> should
be in a separate page/view. The idea is for Oriol to check the design
and decide how it would be presented to the user, so i needed something
to show him first.
I hardcoded the **test** data for the customer’s Redsys account. Is
this bad? I hope not, but i am not really, really sure.
The data sent to Redsys is just a placeholder because there are booking
details that i do not know, like what i have to do with the “teenagers”
field or the area preferences, thus i can not yet have a booking
relation. Nevertheless, had to generate a random order number up to
12-chars in length or Redsys would refuse the payment, claiming that
the order is duplicated.
The Redsys package is based on the PHP code provided by Redsys
themselves, plus some hints at the implementations from various Go
packages that did not know why they were so complicated.
Had to grant select on table country to guest in order to show the
select with the country options.
I have changed the “Postal code” input in taxDetails for “Postcode”
because this is the spell that it is used in the current web, i did not
see a reason to change it—it is an accepted form—, and i did not want to
have inconsistencies between forms.
2023-10-19 19:37:34 +00:00
#, c-format
msgid "%s must be %d or greater."
msgstr "El valor de %s ha de ser com a mínim %d."
2024-04-26 15:09:36 +00:00
#: pkg/booking/public.go:527
Add the first draft of the booking and payment forms
The form is based on the one in the current website, but in a single
page instead of split into many pages; possibly each <fieldset> should
be in a separate page/view. The idea is for Oriol to check the design
and decide how it would be presented to the user, so i needed something
to show him first.
I hardcoded the **test** data for the customer’s Redsys account. Is
this bad? I hope not, but i am not really, really sure.
The data sent to Redsys is just a placeholder because there are booking
details that i do not know, like what i have to do with the “teenagers”
field or the area preferences, thus i can not yet have a booking
relation. Nevertheless, had to generate a random order number up to
12-chars in length or Redsys would refuse the payment, claiming that
the order is duplicated.
The Redsys package is based on the PHP code provided by Redsys
themselves, plus some hints at the implementations from various Go
packages that did not know why they were so complicated.
Had to grant select on table country to guest in order to show the
select with the country options.
I have changed the “Postal code” input in taxDetails for “Postcode”
because this is the spell that it is used in the current web, i did not
see a reason to change it—it is an accepted form—, and i did not want to
have inconsistencies between forms.
2023-10-19 19:37:34 +00:00
#, c-format
msgid "%s must be at most %d."
msgstr "El valor de %s ha de ser com a màxim %d."
2024-04-28 18:28:45 +00:00
#: pkg/booking/public.go:601
Handle the booking cart entirely with HTMx
Besides the dynamic final cart, that was already handled by HTMx, i had
to check the maximum number of guests, whether the accommodation allows
“overflow”, whether dogs are allowed, and that the booking dates were
within the campground’s opening and closing dates.
I could do all of this with AlpineJS, but then i would have to add the
same validation to the backend, prior to accept the payment. Would not
make more sense to have them in a single place, namely the backend? With
HTMx i can do that.
However, i now have to create the form “piecemeal”, because i may not
have the whole information when the visitor arrives to the booking page,
and i still had the same problem as in commit d2858302efa—parsing the
whole form as is would leave guests and options field empty, rather than
at their minimum values.
One of the fieldsets in that booking form are the arrival and departure
dates, that are the sames we use in the campsite type’s page to
“preselect” these values. Since now are in a separate struct, i can
reuse the same type and validation logic for both pages, making my
JavaScript code useless, but requiring HTMx. I think this is a good
tradeoff, in fact.
2024-02-10 02:49:44 +00:00
msgid "It is mandatory to agree to the reservation conditions."
msgstr "És obligatori acceptar les condicions de reserves."
2024-05-03 17:13:49 +00:00
#~ msgid "Total"
#~ msgstr "Total"
2024-04-28 20:36:21 +00:00
#~ msgid "Select a customer"
#~ msgstr "Esculliu un client"
#~ msgid "Selected customer is not valid."
#~ msgstr "El client escollit no és vàlid."
“Finish” the new booking form
Had to bring the same fields that i have for a payment to booking,
except that some of those should be nullable, because it is unreasonable
to ask front desk to gather all customer data when they have a booking
via phone, for instance.
Therefore, i can not take advantage of the validation for customer data
that i use in the public-facing form, but, fortunately, most of the
validations where in separated functions, thus only had to rewrite that
one for this case.
I already have to create a booking from a payment, when receiving a
payment from the public instance, thus i made that function and reused
it here. Then i “overwrite” the newly created pre-booking with the
customer data from the form, and set is as confirmed, as we do not see
any point of allowing pre-bookings from employees.
2024-04-24 18:12:29 +00:00
#~ msgctxt "title"
#~ msgid "Accomodations"
#~ msgstr "Allotjaments"
2024-04-19 09:29:43 +00:00
#~ msgctxt "header"
#~ msgid "Type"
#~ msgstr "Tipus"
2024-02-24 19:03:11 +00:00
#~ msgid "Postal code can not be empty."
#~ msgstr "No podeu deixar el codi postal en blanc."
#~ msgid "This postal code is not valid."
#~ msgstr "Aquest codi postal no és vàlid."
2024-02-12 17:06:17 +00:00
#~ msgctxt "action"
#~ msgid "Pay"
#~ msgstr "Paga"
Handle the booking cart entirely with HTMx
Besides the dynamic final cart, that was already handled by HTMx, i had
to check the maximum number of guests, whether the accommodation allows
“overflow”, whether dogs are allowed, and that the booking dates were
within the campground’s opening and closing dates.
I could do all of this with AlpineJS, but then i would have to add the
same validation to the backend, prior to accept the payment. Would not
make more sense to have them in a single place, namely the backend? With
HTMx i can do that.
However, i now have to create the form “piecemeal”, because i may not
have the whole information when the visitor arrives to the booking page,
and i still had the same problem as in commit d2858302efa—parsing the
whole form as is would leave guests and options field empty, rather than
at their minimum values.
One of the fieldsets in that booking form are the arrival and departure
dates, that are the sames we use in the campsite type’s page to
“preselect” these values. Since now are in a separate struct, i can
reuse the same type and validation logic for both pages, making my
JavaScript code useless, but requiring HTMx. I think this is a good
tradeoff, in fact.
2024-02-10 02:49:44 +00:00
#~ msgctxt "input"
#~ msgid "Check-in Date"
#~ msgstr "Data d’ entrada"
#~ msgctxt "input"
#~ msgid "Check-out Date"
#~ msgstr "Data de sortida"
#~ msgid "The departure date must be after the arrival date."
#~ msgstr "La data de sortida ha de ser posterior a la d’ arribada."
2024-01-16 00:25:25 +00:00
#~ msgid "Campsite Montagut is an ideal starting point for quiet outings, climbing, swimming in the river and gorges, volcanoes, the Fageda d’ en Jordà, cycle tours for all ages…."
#~ msgstr "El Càmping Montagut és ideal com a punt de partida d’ excursions tranquil·les, escalada, banyar-se en el riu i gorgues, volcans, la Fageda d’ en Jordà, sortides amb bicicleta per a tots els nivells…."
#~ msgid "Get to the Costa Brava and enjoy the beaches, the gastronomy or go kayaking…."
#~ msgstr "Arribar fins a la costa brava i gaudir de les platges, la gastronomia o anar amb caiac…."
#~ msgid "You will also find museums in Olot, Figures, Girona."
#~ msgstr "També trobareu museus a Olot, Figueres, Girona."
#~ msgid "As well as music festivals, dance, theater…."
#~ msgstr "Com festivals de música, dansa, teatre…."
2024-01-13 00:15:24 +00:00
#~ msgctxt "header"
#~ msgid "Translations"
#~ msgstr "Traduccions"
#~ msgctxt "title"
#~ msgid "Translate Season to %s"
#~ msgstr "Traducció de la temporada a %s"
#~ msgid "Source:"
#~ msgstr "Origen:"
#~ msgctxt "input"
#~ msgid "Translation:"
#~ msgstr "Traducció:"
#~ msgctxt "action"
#~ msgid "Translate"
#~ msgstr "Tradueix"
#~ msgctxt "title"
#~ msgid "Translate Service to %s"
#~ msgstr "Traducció del servei a %s"
2024-01-12 18:33:44 +00:00
#~ msgctxt "title"
#~ msgid "Translate Carousel Slide to %s"
#~ msgstr "Traducció de la diapositiva del carrusel a %s"
2024-01-10 20:52:49 +00:00
#~ msgctxt "title"
#~ msgid "Translate Campsite Type Feature to %s"
#~ msgstr "Traducció de la característica del tipus d’ allotjament a %s"
#~ msgctxt "title"
#~ msgid "Translate Campsite Type Carousel Slide to %s"
#~ msgstr "Traducció de la diapositiva del carrusel del tipus d’ allotjament a %s"
#~ msgctxt "title"
#~ msgid "Translate Campsite Type Option to %s"
#~ msgstr "Traducció de la opció del tipus d’ allotjament a %s"
#~ msgctxt "title"
#~ msgid "Translate Campsite Type to %s"
#~ msgstr "Traducció del tipus d’ allotjament a %s"
2023-12-22 02:32:40 +00:00
#~ msgid "Starting from %s €/night"
#~ msgstr "A partir de %s €/nit"
#~ msgctxt "season"
#~ msgid "Closed"
#~ msgstr "Tancat"
2023-12-12 22:16:04 +00:00
#~ msgctxt "title"
#~ msgid "Party Details"
#~ msgstr "Dades dels visitants"
#~ msgid "Number of adults must be one or greater."
#~ msgstr "El número d’ adults no pot ser zero."
#~ msgid "Number of teenagers must be zero or greater."
#~ msgstr "El número d’ adolescents ha de ser com a mínim zero."
#~ msgid "Number of children must be zero or greater."
#~ msgstr "El número de nens ha de ser com a mínim zero."
#~ msgid "Number of dogs must be zero or greater."
#~ msgstr "El número de gossos ha de ser com a mínim zero."
2023-10-13 11:40:48 +00:00
#~ msgctxt "input"
#~ msgid "Pricing"
#~ msgstr "Preus"
#~ msgctxt "input"
#~ msgid "Features"
#~ msgstr "Característiques"
2023-10-06 16:58:24 +00:00
#~ msgid "Singular Lodges"
#~ msgstr "Allotjaments singulars"
2023-10-06 11:26:01 +00:00
#~ msgctxt "campsite type"
#~ msgid "Translations"
#~ msgstr "Traduccions"
Manage all media uploads in a single place
It made no sense to have a file upload in each form that needs a media,
because to reuse an existing media users would need to upload the exact
same file again; this is very unusual and unfriendly.
A better option is to have a “centralized” media section, where people
can upload files there, and then have a picker to select from there.
Ideally, there would be an upload option in the picker, but i did not
add it yet.
I’ve split the content from the media because i want users to have the
option to update a media, for instance when they need to upload a
reduced or cropped version of the same photo, without an edit they would
need to upload the file as a new media and then update all places where
the old version was used. And i did not want to trouble people that
uploads the same photo twice: without the separate relation, doing so
would throw a constraint error.
I do not believe there is any security problem to have all companies
link their media to the same file, as they were already readable by
everyone and could upload the data from a different company to their
own; in other words, it is not worse than it was now.
2023-09-20 23:56:44 +00:00
Add the services page
This page is more or less similar to home, in terms of database: it
has a carousel and a list of items; in this case, the definition of
campsite services.
As i said early, when adding the home carousel, this carousel has its
own relation and set of functions to manage slides. They are also
duplicated in Go code, but i think i will need to refactor it later to
a carousel package or something like that, because both relations have
the exact same fields and types, so it makes no sense to have twice the
same code.
I already did it with the CSS and JavaScript code, mostly because it was
easier to replace the `.surroundings div` selector with `.carousel`, and
because that way i can have a single template that loads and initializes
Slick.
There is no UI to create or edit service definitions, although there are
the SQL functions, because i have no more time now, and Oriol needs to
check that the style is correct for that page.
2023-09-17 01:42:16 +00:00
#~ msgid "Surroundings"
#~ msgstr "Entorn"
2023-08-14 09:43:58 +00:00
#~ msgctxt "title"
#~ msgid "Pages"
#~ msgstr "Pàgines"
#~ msgctxt "action"
#~ msgid "Add Page"
#~ msgstr "Afegeix pàgina"
#~ msgctxt "header"
#~ msgid "Title"
#~ msgstr "Títol"