Add Catalan and Spanish translation with gotext[3]
I had to choose between [1], [2], and [3].
As far as i could find, [1] is not easy to work with templates[4] and at
the moment is not maintained[5].
Both [2] and [3] use the same approach to be used from within templates:
you have to define a FuncMap with template functions that call the
message catalog. Also, both libraries seems to be reasonably
maintained, and have packages in Debian’s repository.
However, [2] repeats the same mistakes that POSIX did with its
catalogs—using identifiers that are not the strings in the source
language—, however this time the catalogs are written in JSON or YAML!
This, somehow, makes things worse….
[3], the one i settled with, is fine and decently maintained. There are
some surprising things, such as to be able to use directly the PO file,
and that it has higher priority over the corresponding MO, or that the
order of parameters is reversed in respect to gettext. However, it uses
a saner format, and is a lot easier to work with than [3].
The problem, of course, is that xgettext does not know how to find
translatable strings inside the template. [3] includes a CLI tool
similar to xgettext, but is not a drop-in replacement[6] and does not
process templates.
The proper way to handle this would be to add a parser to xgettext, but
for now i found out that if i surround the call to the translation
functions from within the template with parentheses, i can trick
xgettext into believing it is parsing Scheme code, and extracts the
strings successfully—at least, for what i have tried. Had to add the
keyword for pgettext, because Schemed does not have it, but at least i
can do that with command line parameters.
For now i left only Spanish and Catalan as the two available languages,
even though the source text is written in English, because that way i
can make sure i do not leave strings untranslated.
[1]: https://golang.org/x/text
[2]: https://github.com/nicksnyder/go-i18n
[3]: https://github.com/leonelquinteros/gotext
[4]: https://github.com/golang/go/issues/39954
[5]: https://github.com/golang/go/issues/12750
[6]: https://github.com/leonelquinteros/gotext/issues/38
2023-01-18 18:07:42 +00:00
|
|
|
|
# Spanish translations for numerus package.
|
|
|
|
|
# Copyright (C) 2023 jordi fita mas
|
|
|
|
|
# This file is distributed under the same license as the numerus package.
|
|
|
|
|
# jordi fita mas <jordi@tandem.blog>, 2023.
|
|
|
|
|
#
|
|
|
|
|
msgid ""
|
|
|
|
|
msgstr ""
|
|
|
|
|
"Project-Id-Version: numerus\n"
|
|
|
|
|
"Report-Msgid-Bugs-To: jordi@tandem.blog\n"
|
Convert invoices to PDF with WeasyPrint
Although it is possible to just print the invoice from the browser, many
people will not even try an assume that they can not create a PDF for
the invoice.
I thought of using Groff or TeX to create the PDF, but it would mean
maintaining two templates in two different systems (HTML and whatever i
would use), and would probably look very different, because i do not
know Groff or TeX that well.
I wish there was a way to tell the browser to print to PDF, and it can
be done, but only with the Chrome Protocol to a server-side running
Chrome instance. This works, but i would need a Chrome running as a
daemon.
I also wrote a Qt application that uses QWebEngine to print the PDF,
much like wkhtmltopdf, but with support for more recent HTML and CSS
standards. Unfortunately, Qt 6.4’s embedded Chromium does not follow
break-page-inside as well as WeasyPrint does.
To use WeasyPrint, at first i wanted to reach the same URL as the user,
passing the cookie to WeasyPrint so that i can access the same invoice
as the user, something that can be done with wkhtmltopdf, but WeasyPrint
does not have such option. I did it with a custom Python script, but
then i need to package and install that script, that is not that much
work, but using the Debian-provided script is even less work, and less
likely to drift when WeasyPrint changes API.
Also, it is unnecessary to do a network round-trip from Go to Python
back to Go, because i can already write the invoice HTML as is to
WeasyPrint’s stdin.
2023-02-26 16:26:09 +00:00
|
|
|
|
"POT-Creation-Date: 2023-02-26 17:11+0100\n"
|
Add Catalan and Spanish translation with gotext[3]
I had to choose between [1], [2], and [3].
As far as i could find, [1] is not easy to work with templates[4] and at
the moment is not maintained[5].
Both [2] and [3] use the same approach to be used from within templates:
you have to define a FuncMap with template functions that call the
message catalog. Also, both libraries seems to be reasonably
maintained, and have packages in Debian’s repository.
However, [2] repeats the same mistakes that POSIX did with its
catalogs—using identifiers that are not the strings in the source
language—, however this time the catalogs are written in JSON or YAML!
This, somehow, makes things worse….
[3], the one i settled with, is fine and decently maintained. There are
some surprising things, such as to be able to use directly the PO file,
and that it has higher priority over the corresponding MO, or that the
order of parameters is reversed in respect to gettext. However, it uses
a saner format, and is a lot easier to work with than [3].
The problem, of course, is that xgettext does not know how to find
translatable strings inside the template. [3] includes a CLI tool
similar to xgettext, but is not a drop-in replacement[6] and does not
process templates.
The proper way to handle this would be to add a parser to xgettext, but
for now i found out that if i surround the call to the translation
functions from within the template with parentheses, i can trick
xgettext into believing it is parsing Scheme code, and extracts the
strings successfully—at least, for what i have tried. Had to add the
keyword for pgettext, because Schemed does not have it, but at least i
can do that with command line parameters.
For now i left only Spanish and Catalan as the two available languages,
even though the source text is written in English, because that way i
can make sure i do not leave strings untranslated.
[1]: https://golang.org/x/text
[2]: https://github.com/nicksnyder/go-i18n
[3]: https://github.com/leonelquinteros/gotext
[4]: https://github.com/golang/go/issues/39954
[5]: https://github.com/golang/go/issues/12750
[6]: https://github.com/leonelquinteros/gotext/issues/38
2023-01-18 18:07:42 +00:00
|
|
|
|
"PO-Revision-Date: 2023-01-18 17:45+0100\n"
|
|
|
|
|
"Last-Translator: jordi fita mas <jordi@tandem.blog>\n"
|
|
|
|
|
"Language-Team: Spanish <es@tp.org.es>\n"
|
|
|
|
|
"Language: es\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"
|
|
|
|
|
|
2023-02-12 20:06:48 +00:00
|
|
|
|
#: web/template/invoices/products.gohtml:2
|
|
|
|
|
#: web/template/invoices/products.gohtml:15
|
|
|
|
|
msgctxt "title"
|
|
|
|
|
msgid "Add Products to Invoice"
|
|
|
|
|
msgstr "Añadir productos a la factura"
|
|
|
|
|
|
|
|
|
|
#: web/template/invoices/products.gohtml:9 web/template/invoices/new.gohtml:9
|
2023-02-24 11:22:15 +00:00
|
|
|
|
#: web/template/invoices/index.gohtml:8 web/template/invoices/view.gohtml:9
|
|
|
|
|
#: web/template/contacts/new.gohtml:9 web/template/contacts/index.gohtml:8
|
|
|
|
|
#: web/template/contacts/edit.gohtml:9 web/template/profile.gohtml:9
|
|
|
|
|
#: web/template/tax-details.gohtml:8 web/template/products/new.gohtml:9
|
|
|
|
|
#: web/template/products/index.gohtml:8 web/template/products/edit.gohtml:9
|
2023-02-12 20:06:48 +00:00
|
|
|
|
msgctxt "title"
|
|
|
|
|
msgid "Home"
|
|
|
|
|
msgstr "Inicio"
|
|
|
|
|
|
|
|
|
|
#: web/template/invoices/products.gohtml:10 web/template/invoices/new.gohtml:10
|
|
|
|
|
#: web/template/invoices/index.gohtml:2 web/template/invoices/index.gohtml:9
|
2023-02-24 11:22:15 +00:00
|
|
|
|
#: web/template/invoices/view.gohtml:10
|
2023-02-12 20:06:48 +00:00
|
|
|
|
msgctxt "title"
|
|
|
|
|
msgid "Invoices"
|
|
|
|
|
msgstr "Facturas"
|
|
|
|
|
|
|
|
|
|
#: web/template/invoices/products.gohtml:11 web/template/invoices/new.gohtml:2
|
|
|
|
|
#: web/template/invoices/new.gohtml:11 web/template/invoices/new.gohtml:15
|
|
|
|
|
msgctxt "title"
|
|
|
|
|
msgid "New Invoice"
|
|
|
|
|
msgstr "Nueva factura"
|
|
|
|
|
|
|
|
|
|
#: web/template/invoices/products.gohtml:41
|
|
|
|
|
#: web/template/products/index.gohtml:21
|
|
|
|
|
msgctxt "product"
|
|
|
|
|
msgid "All"
|
|
|
|
|
msgstr "Todos"
|
|
|
|
|
|
|
|
|
|
#: web/template/invoices/products.gohtml:42
|
|
|
|
|
#: web/template/products/index.gohtml:22
|
|
|
|
|
msgctxt "title"
|
|
|
|
|
msgid "Name"
|
|
|
|
|
msgstr "Nombre"
|
|
|
|
|
|
|
|
|
|
#: web/template/invoices/products.gohtml:43
|
Convert invoices to PDF with WeasyPrint
Although it is possible to just print the invoice from the browser, many
people will not even try an assume that they can not create a PDF for
the invoice.
I thought of using Groff or TeX to create the PDF, but it would mean
maintaining two templates in two different systems (HTML and whatever i
would use), and would probably look very different, because i do not
know Groff or TeX that well.
I wish there was a way to tell the browser to print to PDF, and it can
be done, but only with the Chrome Protocol to a server-side running
Chrome instance. This works, but i would need a Chrome running as a
daemon.
I also wrote a Qt application that uses QWebEngine to print the PDF,
much like wkhtmltopdf, but with support for more recent HTML and CSS
standards. Unfortunately, Qt 6.4’s embedded Chromium does not follow
break-page-inside as well as WeasyPrint does.
To use WeasyPrint, at first i wanted to reach the same URL as the user,
passing the cookie to WeasyPrint so that i can access the same invoice
as the user, something that can be done with wkhtmltopdf, but WeasyPrint
does not have such option. I did it with a custom Python script, but
then i need to package and install that script, that is not that much
work, but using the Debian-provided script is even less work, and less
likely to drift when WeasyPrint changes API.
Also, it is unnecessary to do a network round-trip from Go to Python
back to Go, because i can already write the invoice HTML as is to
WeasyPrint’s stdin.
2023-02-26 16:26:09 +00:00
|
|
|
|
#: web/template/invoices/view.gohtml:59 web/template/products/index.gohtml:23
|
2023-02-12 20:06:48 +00:00
|
|
|
|
msgctxt "title"
|
|
|
|
|
msgid "Price"
|
|
|
|
|
msgstr "Precio"
|
|
|
|
|
|
|
|
|
|
#: web/template/invoices/products.gohtml:57
|
|
|
|
|
#: web/template/products/index.gohtml:37
|
|
|
|
|
msgid "No products added yet."
|
|
|
|
|
msgstr "No hay productos."
|
|
|
|
|
|
2023-02-24 11:22:15 +00:00
|
|
|
|
#: web/template/invoices/products.gohtml:64 web/template/invoices/new.gohtml:59
|
2023-02-12 20:06:48 +00:00
|
|
|
|
msgctxt "action"
|
|
|
|
|
msgid "Add products"
|
|
|
|
|
msgstr "Añadir productos"
|
|
|
|
|
|
Convert invoices to PDF with WeasyPrint
Although it is possible to just print the invoice from the browser, many
people will not even try an assume that they can not create a PDF for
the invoice.
I thought of using Groff or TeX to create the PDF, but it would mean
maintaining two templates in two different systems (HTML and whatever i
would use), and would probably look very different, because i do not
know Groff or TeX that well.
I wish there was a way to tell the browser to print to PDF, and it can
be done, but only with the Chrome Protocol to a server-side running
Chrome instance. This works, but i would need a Chrome running as a
daemon.
I also wrote a Qt application that uses QWebEngine to print the PDF,
much like wkhtmltopdf, but with support for more recent HTML and CSS
standards. Unfortunately, Qt 6.4’s embedded Chromium does not follow
break-page-inside as well as WeasyPrint does.
To use WeasyPrint, at first i wanted to reach the same URL as the user,
passing the cookie to WeasyPrint so that i can access the same invoice
as the user, something that can be done with wkhtmltopdf, but WeasyPrint
does not have such option. I did it with a custom Python script, but
then i need to package and install that script, that is not that much
work, but using the Debian-provided script is even less work, and less
likely to drift when WeasyPrint changes API.
Also, it is unnecessary to do a network round-trip from Go to Python
back to Go, because i can already write the invoice HTML as is to
WeasyPrint’s stdin.
2023-02-26 16:26:09 +00:00
|
|
|
|
#: web/template/invoices/new.gohtml:41 web/template/invoices/view.gohtml:61
|
|
|
|
|
#: web/template/invoices/view.gohtml:87
|
2023-02-24 11:22:15 +00:00
|
|
|
|
msgctxt "title"
|
|
|
|
|
msgid "Subtotal"
|
|
|
|
|
msgstr "Subtotal"
|
|
|
|
|
|
Convert invoices to PDF with WeasyPrint
Although it is possible to just print the invoice from the browser, many
people will not even try an assume that they can not create a PDF for
the invoice.
I thought of using Groff or TeX to create the PDF, but it would mean
maintaining two templates in two different systems (HTML and whatever i
would use), and would probably look very different, because i do not
know Groff or TeX that well.
I wish there was a way to tell the browser to print to PDF, and it can
be done, but only with the Chrome Protocol to a server-side running
Chrome instance. This works, but i would need a Chrome running as a
daemon.
I also wrote a Qt application that uses QWebEngine to print the PDF,
much like wkhtmltopdf, but with support for more recent HTML and CSS
standards. Unfortunately, Qt 6.4’s embedded Chromium does not follow
break-page-inside as well as WeasyPrint does.
To use WeasyPrint, at first i wanted to reach the same URL as the user,
passing the cookie to WeasyPrint so that i can access the same invoice
as the user, something that can be done with wkhtmltopdf, but WeasyPrint
does not have such option. I did it with a custom Python script, but
then i need to package and install that script, that is not that much
work, but using the Debian-provided script is even less work, and less
likely to drift when WeasyPrint changes API.
Also, it is unnecessary to do a network round-trip from Go to Python
back to Go, because i can already write the invoice HTML as is to
WeasyPrint’s stdin.
2023-02-26 16:26:09 +00:00
|
|
|
|
#: web/template/invoices/new.gohtml:51 web/template/invoices/view.gohtml:97
|
2023-02-24 11:22:15 +00:00
|
|
|
|
msgctxt "title"
|
|
|
|
|
msgid "Total"
|
|
|
|
|
msgstr "Total"
|
|
|
|
|
|
|
|
|
|
#: web/template/invoices/new.gohtml:61
|
2023-02-12 20:06:48 +00:00
|
|
|
|
msgctxt "action"
|
|
|
|
|
msgid "Update"
|
|
|
|
|
msgstr "Actualizar"
|
|
|
|
|
|
2023-02-24 11:22:15 +00:00
|
|
|
|
#: web/template/invoices/new.gohtml:63 web/template/invoices/index.gohtml:13
|
2023-02-12 20:06:48 +00:00
|
|
|
|
msgctxt "action"
|
|
|
|
|
msgid "New invoice"
|
|
|
|
|
msgstr "Nueva factura"
|
|
|
|
|
|
|
|
|
|
#: web/template/invoices/index.gohtml:21
|
|
|
|
|
msgctxt "invoice"
|
|
|
|
|
msgid "All"
|
|
|
|
|
msgstr "Todas"
|
|
|
|
|
|
Convert invoices to PDF with WeasyPrint
Although it is possible to just print the invoice from the browser, many
people will not even try an assume that they can not create a PDF for
the invoice.
I thought of using Groff or TeX to create the PDF, but it would mean
maintaining two templates in two different systems (HTML and whatever i
would use), and would probably look very different, because i do not
know Groff or TeX that well.
I wish there was a way to tell the browser to print to PDF, and it can
be done, but only with the Chrome Protocol to a server-side running
Chrome instance. This works, but i would need a Chrome running as a
daemon.
I also wrote a Qt application that uses QWebEngine to print the PDF,
much like wkhtmltopdf, but with support for more recent HTML and CSS
standards. Unfortunately, Qt 6.4’s embedded Chromium does not follow
break-page-inside as well as WeasyPrint does.
To use WeasyPrint, at first i wanted to reach the same URL as the user,
passing the cookie to WeasyPrint so that i can access the same invoice
as the user, something that can be done with wkhtmltopdf, but WeasyPrint
does not have such option. I did it with a custom Python script, but
then i need to package and install that script, that is not that much
work, but using the Debian-provided script is even less work, and less
likely to drift when WeasyPrint changes API.
Also, it is unnecessary to do a network round-trip from Go to Python
back to Go, because i can already write the invoice HTML as is to
WeasyPrint’s stdin.
2023-02-26 16:26:09 +00:00
|
|
|
|
#: web/template/invoices/index.gohtml:22 web/template/invoices/view.gohtml:25
|
2023-02-12 20:06:48 +00:00
|
|
|
|
msgctxt "title"
|
|
|
|
|
msgid "Date"
|
|
|
|
|
msgstr "Fecha"
|
|
|
|
|
|
|
|
|
|
#: web/template/invoices/index.gohtml:23
|
|
|
|
|
msgctxt "title"
|
|
|
|
|
msgid "Invoice Num."
|
|
|
|
|
msgstr "Nº factura"
|
|
|
|
|
|
|
|
|
|
#: web/template/invoices/index.gohtml:24 web/template/contacts/index.gohtml:22
|
|
|
|
|
msgctxt "title"
|
|
|
|
|
msgid "Customer"
|
|
|
|
|
msgstr "Cliente"
|
|
|
|
|
|
|
|
|
|
#: web/template/invoices/index.gohtml:25
|
|
|
|
|
msgctxt "title"
|
|
|
|
|
msgid "Status"
|
|
|
|
|
msgstr "Estado"
|
|
|
|
|
|
|
|
|
|
#: web/template/invoices/index.gohtml:26
|
|
|
|
|
msgctxt "title"
|
|
|
|
|
msgid "Label"
|
|
|
|
|
msgstr "Etiqueta"
|
|
|
|
|
|
|
|
|
|
#: web/template/invoices/index.gohtml:27
|
|
|
|
|
msgctxt "title"
|
2023-02-22 13:39:38 +00:00
|
|
|
|
msgid "Amount"
|
|
|
|
|
msgstr "Importe"
|
|
|
|
|
|
|
|
|
|
#: web/template/invoices/index.gohtml:28
|
|
|
|
|
msgctxt "title"
|
2023-02-12 20:06:48 +00:00
|
|
|
|
msgid "Download"
|
|
|
|
|
msgstr "Descargar"
|
|
|
|
|
|
Convert invoices to PDF with WeasyPrint
Although it is possible to just print the invoice from the browser, many
people will not even try an assume that they can not create a PDF for
the invoice.
I thought of using Groff or TeX to create the PDF, but it would mean
maintaining two templates in two different systems (HTML and whatever i
would use), and would probably look very different, because i do not
know Groff or TeX that well.
I wish there was a way to tell the browser to print to PDF, and it can
be done, but only with the Chrome Protocol to a server-side running
Chrome instance. This works, but i would need a Chrome running as a
daemon.
I also wrote a Qt application that uses QWebEngine to print the PDF,
much like wkhtmltopdf, but with support for more recent HTML and CSS
standards. Unfortunately, Qt 6.4’s embedded Chromium does not follow
break-page-inside as well as WeasyPrint does.
To use WeasyPrint, at first i wanted to reach the same URL as the user,
passing the cookie to WeasyPrint so that i can access the same invoice
as the user, something that can be done with wkhtmltopdf, but WeasyPrint
does not have such option. I did it with a custom Python script, but
then i need to package and install that script, that is not that much
work, but using the Debian-provided script is even less work, and less
likely to drift when WeasyPrint changes API.
Also, it is unnecessary to do a network round-trip from Go to Python
back to Go, because i can already write the invoice HTML as is to
WeasyPrint’s stdin.
2023-02-26 16:26:09 +00:00
|
|
|
|
#: web/template/invoices/index.gohtml:50
|
2023-02-12 20:06:48 +00:00
|
|
|
|
msgid "No invoices added yet."
|
|
|
|
|
msgstr "No hay facturas."
|
|
|
|
|
|
Convert invoices to PDF with WeasyPrint
Although it is possible to just print the invoice from the browser, many
people will not even try an assume that they can not create a PDF for
the invoice.
I thought of using Groff or TeX to create the PDF, but it would mean
maintaining two templates in two different systems (HTML and whatever i
would use), and would probably look very different, because i do not
know Groff or TeX that well.
I wish there was a way to tell the browser to print to PDF, and it can
be done, but only with the Chrome Protocol to a server-side running
Chrome instance. This works, but i would need a Chrome running as a
daemon.
I also wrote a Qt application that uses QWebEngine to print the PDF,
much like wkhtmltopdf, but with support for more recent HTML and CSS
standards. Unfortunately, Qt 6.4’s embedded Chromium does not follow
break-page-inside as well as WeasyPrint does.
To use WeasyPrint, at first i wanted to reach the same URL as the user,
passing the cookie to WeasyPrint so that i can access the same invoice
as the user, something that can be done with wkhtmltopdf, but WeasyPrint
does not have such option. I did it with a custom Python script, but
then i need to package and install that script, that is not that much
work, but using the Debian-provided script is even less work, and less
likely to drift when WeasyPrint changes API.
Also, it is unnecessary to do a network round-trip from Go to Python
back to Go, because i can already write the invoice HTML as is to
WeasyPrint’s stdin.
2023-02-26 16:26:09 +00:00
|
|
|
|
#: web/template/invoices/view.gohtml:2 web/template/invoices/view.gohtml:24
|
2023-02-24 11:22:15 +00:00
|
|
|
|
msgctxt "title"
|
|
|
|
|
msgid "Invoice %s"
|
|
|
|
|
msgstr "Factura %s"
|
|
|
|
|
|
Convert invoices to PDF with WeasyPrint
Although it is possible to just print the invoice from the browser, many
people will not even try an assume that they can not create a PDF for
the invoice.
I thought of using Groff or TeX to create the PDF, but it would mean
maintaining two templates in two different systems (HTML and whatever i
would use), and would probably look very different, because i do not
know Groff or TeX that well.
I wish there was a way to tell the browser to print to PDF, and it can
be done, but only with the Chrome Protocol to a server-side running
Chrome instance. This works, but i would need a Chrome running as a
daemon.
I also wrote a Qt application that uses QWebEngine to print the PDF,
much like wkhtmltopdf, but with support for more recent HTML and CSS
standards. Unfortunately, Qt 6.4’s embedded Chromium does not follow
break-page-inside as well as WeasyPrint does.
To use WeasyPrint, at first i wanted to reach the same URL as the user,
passing the cookie to WeasyPrint so that i can access the same invoice
as the user, something that can be done with wkhtmltopdf, but WeasyPrint
does not have such option. I did it with a custom Python script, but
then i need to package and install that script, that is not that much
work, but using the Debian-provided script is even less work, and less
likely to drift when WeasyPrint changes API.
Also, it is unnecessary to do a network round-trip from Go to Python
back to Go, because i can already write the invoice HTML as is to
WeasyPrint’s stdin.
2023-02-26 16:26:09 +00:00
|
|
|
|
#: web/template/invoices/view.gohtml:16
|
|
|
|
|
msgctxt "action"
|
|
|
|
|
msgid "Download invoice"
|
|
|
|
|
msgstr "Descargar factura"
|
|
|
|
|
|
|
|
|
|
#: web/template/invoices/view.gohtml:58
|
2023-02-24 11:22:15 +00:00
|
|
|
|
msgctxt "title"
|
|
|
|
|
msgid "Concept"
|
|
|
|
|
msgstr "Concepto"
|
|
|
|
|
|
Convert invoices to PDF with WeasyPrint
Although it is possible to just print the invoice from the browser, many
people will not even try an assume that they can not create a PDF for
the invoice.
I thought of using Groff or TeX to create the PDF, but it would mean
maintaining two templates in two different systems (HTML and whatever i
would use), and would probably look very different, because i do not
know Groff or TeX that well.
I wish there was a way to tell the browser to print to PDF, and it can
be done, but only with the Chrome Protocol to a server-side running
Chrome instance. This works, but i would need a Chrome running as a
daemon.
I also wrote a Qt application that uses QWebEngine to print the PDF,
much like wkhtmltopdf, but with support for more recent HTML and CSS
standards. Unfortunately, Qt 6.4’s embedded Chromium does not follow
break-page-inside as well as WeasyPrint does.
To use WeasyPrint, at first i wanted to reach the same URL as the user,
passing the cookie to WeasyPrint so that i can access the same invoice
as the user, something that can be done with wkhtmltopdf, but WeasyPrint
does not have such option. I did it with a custom Python script, but
then i need to package and install that script, that is not that much
work, but using the Debian-provided script is even less work, and less
likely to drift when WeasyPrint changes API.
Also, it is unnecessary to do a network round-trip from Go to Python
back to Go, because i can already write the invoice HTML as is to
WeasyPrint’s stdin.
2023-02-26 16:26:09 +00:00
|
|
|
|
#: web/template/invoices/view.gohtml:60
|
2023-02-24 11:22:15 +00:00
|
|
|
|
msgctxt "title"
|
|
|
|
|
msgid "Units"
|
|
|
|
|
msgstr "Unidades"
|
|
|
|
|
|
2023-01-31 12:07:17 +00:00
|
|
|
|
#: web/template/dashboard.gohtml:2
|
Add Catalan and Spanish translation with gotext[3]
I had to choose between [1], [2], and [3].
As far as i could find, [1] is not easy to work with templates[4] and at
the moment is not maintained[5].
Both [2] and [3] use the same approach to be used from within templates:
you have to define a FuncMap with template functions that call the
message catalog. Also, both libraries seems to be reasonably
maintained, and have packages in Debian’s repository.
However, [2] repeats the same mistakes that POSIX did with its
catalogs—using identifiers that are not the strings in the source
language—, however this time the catalogs are written in JSON or YAML!
This, somehow, makes things worse….
[3], the one i settled with, is fine and decently maintained. There are
some surprising things, such as to be able to use directly the PO file,
and that it has higher priority over the corresponding MO, or that the
order of parameters is reversed in respect to gettext. However, it uses
a saner format, and is a lot easier to work with than [3].
The problem, of course, is that xgettext does not know how to find
translatable strings inside the template. [3] includes a CLI tool
similar to xgettext, but is not a drop-in replacement[6] and does not
process templates.
The proper way to handle this would be to add a parser to xgettext, but
for now i found out that if i surround the call to the translation
functions from within the template with parentheses, i can trick
xgettext into believing it is parsing Scheme code, and extracts the
strings successfully—at least, for what i have tried. Had to add the
keyword for pgettext, because Schemed does not have it, but at least i
can do that with command line parameters.
For now i left only Spanish and Catalan as the two available languages,
even though the source text is written in English, because that way i
can make sure i do not leave strings untranslated.
[1]: https://golang.org/x/text
[2]: https://github.com/nicksnyder/go-i18n
[3]: https://github.com/leonelquinteros/gotext
[4]: https://github.com/golang/go/issues/39954
[5]: https://github.com/golang/go/issues/12750
[6]: https://github.com/leonelquinteros/gotext/issues/38
2023-01-18 18:07:42 +00:00
|
|
|
|
msgctxt "title"
|
2023-01-31 12:07:17 +00:00
|
|
|
|
msgid "Dashboard"
|
|
|
|
|
msgstr "Panel"
|
Add Catalan and Spanish translation with gotext[3]
I had to choose between [1], [2], and [3].
As far as i could find, [1] is not easy to work with templates[4] and at
the moment is not maintained[5].
Both [2] and [3] use the same approach to be used from within templates:
you have to define a FuncMap with template functions that call the
message catalog. Also, both libraries seems to be reasonably
maintained, and have packages in Debian’s repository.
However, [2] repeats the same mistakes that POSIX did with its
catalogs—using identifiers that are not the strings in the source
language—, however this time the catalogs are written in JSON or YAML!
This, somehow, makes things worse….
[3], the one i settled with, is fine and decently maintained. There are
some surprising things, such as to be able to use directly the PO file,
and that it has higher priority over the corresponding MO, or that the
order of parameters is reversed in respect to gettext. However, it uses
a saner format, and is a lot easier to work with than [3].
The problem, of course, is that xgettext does not know how to find
translatable strings inside the template. [3] includes a CLI tool
similar to xgettext, but is not a drop-in replacement[6] and does not
process templates.
The proper way to handle this would be to add a parser to xgettext, but
for now i found out that if i surround the call to the translation
functions from within the template with parentheses, i can trick
xgettext into believing it is parsing Scheme code, and extracts the
strings successfully—at least, for what i have tried. Had to add the
keyword for pgettext, because Schemed does not have it, but at least i
can do that with command line parameters.
For now i left only Spanish and Catalan as the two available languages,
even though the source text is written in English, because that way i
can make sure i do not leave strings untranslated.
[1]: https://golang.org/x/text
[2]: https://github.com/nicksnyder/go-i18n
[3]: https://github.com/leonelquinteros/gotext
[4]: https://github.com/golang/go/issues/39954
[5]: https://github.com/golang/go/issues/12750
[6]: https://github.com/leonelquinteros/gotext/issues/38
2023-01-18 18:07:42 +00:00
|
|
|
|
|
2023-01-30 15:48:21 +00:00
|
|
|
|
#: web/template/app.gohtml:20
|
|
|
|
|
msgctxt "menu"
|
|
|
|
|
msgid "Account"
|
|
|
|
|
msgstr "Cuenta"
|
|
|
|
|
|
|
|
|
|
#: web/template/app.gohtml:26
|
|
|
|
|
msgctxt "menu"
|
|
|
|
|
msgid "Tax Details"
|
|
|
|
|
msgstr "Configuración fiscal"
|
|
|
|
|
|
2023-02-03 12:29:10 +00:00
|
|
|
|
#: web/template/app.gohtml:34
|
2023-01-30 15:48:21 +00:00
|
|
|
|
msgctxt "action"
|
|
|
|
|
msgid "Logout"
|
|
|
|
|
msgstr "Salir"
|
|
|
|
|
|
2023-02-03 12:29:10 +00:00
|
|
|
|
#: web/template/app.gohtml:43
|
2023-01-30 15:48:21 +00:00
|
|
|
|
msgctxt "nav"
|
2023-01-31 12:29:56 +00:00
|
|
|
|
msgid "Dashboard"
|
|
|
|
|
msgstr "Panel"
|
|
|
|
|
|
2023-02-03 12:29:10 +00:00
|
|
|
|
#: web/template/app.gohtml:44
|
2023-01-31 12:29:56 +00:00
|
|
|
|
msgctxt "nav"
|
2023-02-12 20:06:48 +00:00
|
|
|
|
msgid "Invoices"
|
|
|
|
|
msgstr "Facturas"
|
|
|
|
|
|
|
|
|
|
#: web/template/app.gohtml:45
|
|
|
|
|
msgctxt "nav"
|
2023-02-04 10:32:39 +00:00
|
|
|
|
msgid "Products"
|
|
|
|
|
msgstr "Productos"
|
|
|
|
|
|
2023-02-12 20:06:48 +00:00
|
|
|
|
#: web/template/app.gohtml:46
|
2023-02-04 10:32:39 +00:00
|
|
|
|
msgctxt "nav"
|
2023-02-01 09:14:26 +00:00
|
|
|
|
msgid "Contacts"
|
|
|
|
|
msgstr "Contactos"
|
2023-01-30 15:48:21 +00:00
|
|
|
|
|
2023-02-04 10:32:39 +00:00
|
|
|
|
#: web/template/contacts/new.gohtml:2 web/template/contacts/new.gohtml:11
|
|
|
|
|
#: web/template/contacts/new.gohtml:15
|
|
|
|
|
msgctxt "title"
|
|
|
|
|
msgid "New Contact"
|
|
|
|
|
msgstr "Nuevo contacto"
|
|
|
|
|
|
|
|
|
|
#: web/template/contacts/new.gohtml:10 web/template/contacts/index.gohtml:2
|
|
|
|
|
#: web/template/contacts/index.gohtml:9 web/template/contacts/edit.gohtml:10
|
|
|
|
|
msgctxt "title"
|
|
|
|
|
msgid "Contacts"
|
|
|
|
|
msgstr "Contactos"
|
|
|
|
|
|
|
|
|
|
#: web/template/contacts/new.gohtml:31 web/template/contacts/index.gohtml:13
|
|
|
|
|
msgctxt "action"
|
|
|
|
|
msgid "New contact"
|
|
|
|
|
msgstr "Nuevo contacto"
|
|
|
|
|
|
|
|
|
|
#: web/template/contacts/index.gohtml:21
|
|
|
|
|
msgctxt "contact"
|
|
|
|
|
msgid "All"
|
|
|
|
|
msgstr "Todos"
|
|
|
|
|
|
|
|
|
|
#: web/template/contacts/index.gohtml:23
|
|
|
|
|
msgctxt "title"
|
|
|
|
|
msgid "Email"
|
|
|
|
|
msgstr "Correo-e"
|
|
|
|
|
|
|
|
|
|
#: web/template/contacts/index.gohtml:24
|
|
|
|
|
msgctxt "title"
|
|
|
|
|
msgid "Phone"
|
|
|
|
|
msgstr "Teléfono"
|
|
|
|
|
|
|
|
|
|
#: web/template/contacts/index.gohtml:39
|
|
|
|
|
msgid "No contacts added yet."
|
|
|
|
|
msgstr "No hay contactos."
|
|
|
|
|
|
|
|
|
|
#: web/template/contacts/edit.gohtml:2 web/template/contacts/edit.gohtml:15
|
|
|
|
|
msgctxt "title"
|
|
|
|
|
msgid "Edit Contact “%s”"
|
|
|
|
|
msgstr "Edición del contacto «%s»"
|
|
|
|
|
|
|
|
|
|
#: web/template/contacts/edit.gohtml:33
|
|
|
|
|
msgctxt "action"
|
|
|
|
|
msgid "Update contact"
|
|
|
|
|
msgstr "Actualizar contacto"
|
|
|
|
|
|
2023-02-01 10:02:32 +00:00
|
|
|
|
#: web/template/login.gohtml:2 web/template/login.gohtml:15
|
2023-01-31 12:07:17 +00:00
|
|
|
|
msgctxt "title"
|
|
|
|
|
msgid "Login"
|
|
|
|
|
msgstr "Entrada"
|
|
|
|
|
|
2023-02-01 10:02:32 +00:00
|
|
|
|
#: web/template/login.gohtml:19
|
2023-01-30 15:48:21 +00:00
|
|
|
|
msgctxt "action"
|
|
|
|
|
msgid "Login"
|
|
|
|
|
msgstr "Entrar"
|
|
|
|
|
|
2023-02-03 12:58:10 +00:00
|
|
|
|
#: web/template/profile.gohtml:2 web/template/profile.gohtml:10
|
|
|
|
|
#: web/template/profile.gohtml:14
|
2023-01-30 15:48:21 +00:00
|
|
|
|
msgctxt "title"
|
|
|
|
|
msgid "User Settings"
|
|
|
|
|
msgstr "Configuración usuario"
|
|
|
|
|
|
2023-02-03 12:58:10 +00:00
|
|
|
|
#: web/template/profile.gohtml:18
|
2023-01-30 15:48:21 +00:00
|
|
|
|
msgctxt "title"
|
|
|
|
|
msgid "User Access Data"
|
|
|
|
|
msgstr "Datos acceso usuario"
|
|
|
|
|
|
2023-02-03 12:58:10 +00:00
|
|
|
|
#: web/template/profile.gohtml:24
|
2023-01-30 15:48:21 +00:00
|
|
|
|
msgctxt "title"
|
|
|
|
|
msgid "Password Change"
|
|
|
|
|
msgstr "Cambio de contraseña"
|
|
|
|
|
|
2023-02-03 12:58:10 +00:00
|
|
|
|
#: web/template/profile.gohtml:31
|
2023-01-31 14:40:12 +00:00
|
|
|
|
msgctxt "title"
|
2023-01-30 15:48:21 +00:00
|
|
|
|
msgid "Language"
|
|
|
|
|
msgstr "Idioma"
|
|
|
|
|
|
2023-02-03 12:58:10 +00:00
|
|
|
|
#: web/template/profile.gohtml:35 web/template/tax-details.gohtml:96
|
2023-01-30 15:48:21 +00:00
|
|
|
|
msgctxt "action"
|
|
|
|
|
msgid "Save changes"
|
|
|
|
|
msgstr "Guardar cambios"
|
|
|
|
|
|
2023-02-03 12:58:10 +00:00
|
|
|
|
#: web/template/tax-details.gohtml:2 web/template/tax-details.gohtml:9
|
|
|
|
|
#: web/template/tax-details.gohtml:13
|
2023-01-30 09:52:22 +00:00
|
|
|
|
msgctxt "title"
|
2023-01-30 15:48:21 +00:00
|
|
|
|
msgid "Tax Details"
|
|
|
|
|
msgstr "Configuración fiscal"
|
2023-01-30 09:52:22 +00:00
|
|
|
|
|
2023-02-03 12:58:10 +00:00
|
|
|
|
#: web/template/tax-details.gohtml:31
|
2023-02-03 12:29:10 +00:00
|
|
|
|
msgctxt "title"
|
2023-01-28 11:24:52 +00:00
|
|
|
|
msgid "Currency"
|
|
|
|
|
msgstr "Moneda"
|
|
|
|
|
|
2023-02-03 12:58:10 +00:00
|
|
|
|
#: web/template/tax-details.gohtml:47
|
2023-01-28 13:18:58 +00:00
|
|
|
|
msgctxt "title"
|
|
|
|
|
msgid "Tax Name"
|
|
|
|
|
msgstr "Nombre impuesto"
|
|
|
|
|
|
2023-02-03 12:58:10 +00:00
|
|
|
|
#: web/template/tax-details.gohtml:48
|
2023-01-28 13:18:58 +00:00
|
|
|
|
msgctxt "title"
|
|
|
|
|
msgid "Rate (%)"
|
2023-02-03 12:29:10 +00:00
|
|
|
|
msgstr "Porcentaje"
|
2023-01-28 13:18:58 +00:00
|
|
|
|
|
2023-02-03 12:58:10 +00:00
|
|
|
|
#: web/template/tax-details.gohtml:71
|
2023-01-28 13:18:58 +00:00
|
|
|
|
msgid "No taxes added yet."
|
|
|
|
|
msgstr "No hay impuestos."
|
|
|
|
|
|
2023-02-03 12:58:10 +00:00
|
|
|
|
#: web/template/tax-details.gohtml:77
|
2023-01-28 13:18:58 +00:00
|
|
|
|
msgctxt "title"
|
|
|
|
|
msgid "New Line"
|
|
|
|
|
msgstr "Nueva línea"
|
|
|
|
|
|
2023-02-03 12:58:10 +00:00
|
|
|
|
#: web/template/tax-details.gohtml:88
|
2023-01-28 13:18:58 +00:00
|
|
|
|
msgctxt "action"
|
|
|
|
|
msgid "Add new tax"
|
|
|
|
|
msgstr "Añadir nuevo impuesto"
|
|
|
|
|
|
2023-02-04 10:32:39 +00:00
|
|
|
|
#: web/template/products/new.gohtml:2 web/template/products/new.gohtml:11
|
|
|
|
|
#: web/template/products/new.gohtml:15
|
2023-01-30 15:48:21 +00:00
|
|
|
|
msgctxt "title"
|
2023-02-04 10:32:39 +00:00
|
|
|
|
msgid "New Product"
|
|
|
|
|
msgstr "Nuevo producto"
|
|
|
|
|
|
|
|
|
|
#: web/template/products/new.gohtml:10 web/template/products/index.gohtml:2
|
|
|
|
|
#: web/template/products/index.gohtml:9 web/template/products/edit.gohtml:10
|
|
|
|
|
msgctxt "title"
|
|
|
|
|
msgid "Products"
|
|
|
|
|
msgstr "Productos"
|
|
|
|
|
|
|
|
|
|
#: web/template/products/new.gohtml:25 web/template/products/index.gohtml:13
|
|
|
|
|
msgctxt "action"
|
|
|
|
|
msgid "New product"
|
|
|
|
|
msgstr "Nuevo producto"
|
|
|
|
|
|
|
|
|
|
#: web/template/products/edit.gohtml:2 web/template/products/edit.gohtml:15
|
|
|
|
|
msgctxt "title"
|
|
|
|
|
msgid "Edit Product “%s”"
|
|
|
|
|
msgstr "Edición del producto «%s»"
|
|
|
|
|
|
|
|
|
|
#: web/template/products/edit.gohtml:26
|
|
|
|
|
msgctxt "action"
|
|
|
|
|
msgid "Update product"
|
|
|
|
|
msgstr "Actualizar producto"
|
2023-01-31 14:40:12 +00:00
|
|
|
|
|
2023-02-22 13:39:38 +00:00
|
|
|
|
#: pkg/login.go:36 pkg/profile.go:40 pkg/contacts.go:172
|
2023-02-03 12:29:10 +00:00
|
|
|
|
msgctxt "input"
|
|
|
|
|
msgid "Email"
|
|
|
|
|
msgstr "Correo-e"
|
|
|
|
|
|
|
|
|
|
#: pkg/login.go:47 pkg/profile.go:49
|
2023-02-01 10:02:32 +00:00
|
|
|
|
msgctxt "input"
|
|
|
|
|
msgid "Password"
|
|
|
|
|
msgstr "Contraseña"
|
|
|
|
|
|
2023-02-22 13:39:38 +00:00
|
|
|
|
#: pkg/login.go:69 pkg/profile.go:89 pkg/contacts.go:263
|
2023-02-01 10:02:32 +00:00
|
|
|
|
msgid "Email can not be empty."
|
|
|
|
|
msgstr "No podéis dejar el correo-e en blanco."
|
|
|
|
|
|
2023-02-22 13:39:38 +00:00
|
|
|
|
#: pkg/login.go:70 pkg/profile.go:90 pkg/contacts.go:264
|
2023-02-01 10:02:32 +00:00
|
|
|
|
msgid "This value is not a valid email. It should be like name@domain.com."
|
|
|
|
|
msgstr "Este valor no es un correo-e válido. Tiene que ser parecido a nombre@dominio.es."
|
|
|
|
|
|
2023-02-03 12:29:10 +00:00
|
|
|
|
#: pkg/login.go:72
|
2023-02-01 10:02:32 +00:00
|
|
|
|
msgid "Password can not be empty."
|
2023-02-03 12:29:10 +00:00
|
|
|
|
msgstr "No podéis dejar la contraseña en blanco."
|
2023-02-01 10:02:32 +00:00
|
|
|
|
|
2023-02-03 12:29:10 +00:00
|
|
|
|
#: pkg/login.go:108
|
2023-02-01 10:02:32 +00:00
|
|
|
|
msgid "Invalid user or password."
|
|
|
|
|
msgstr "Nombre de usuario o contraseña inválido."
|
|
|
|
|
|
Convert invoices to PDF with WeasyPrint
Although it is possible to just print the invoice from the browser, many
people will not even try an assume that they can not create a PDF for
the invoice.
I thought of using Groff or TeX to create the PDF, but it would mean
maintaining two templates in two different systems (HTML and whatever i
would use), and would probably look very different, because i do not
know Groff or TeX that well.
I wish there was a way to tell the browser to print to PDF, and it can
be done, but only with the Chrome Protocol to a server-side running
Chrome instance. This works, but i would need a Chrome running as a
daemon.
I also wrote a Qt application that uses QWebEngine to print the PDF,
much like wkhtmltopdf, but with support for more recent HTML and CSS
standards. Unfortunately, Qt 6.4’s embedded Chromium does not follow
break-page-inside as well as WeasyPrint does.
To use WeasyPrint, at first i wanted to reach the same URL as the user,
passing the cookie to WeasyPrint so that i can access the same invoice
as the user, something that can be done with wkhtmltopdf, but WeasyPrint
does not have such option. I did it with a custom Python script, but
then i need to package and install that script, that is not that much
work, but using the Debian-provided script is even less work, and less
likely to drift when WeasyPrint changes API.
Also, it is unnecessary to do a network round-trip from Go to Python
back to Go, because i can already write the invoice HTML as is to
WeasyPrint’s stdin.
2023-02-26 16:26:09 +00:00
|
|
|
|
#: pkg/products.go:165 pkg/invoices.go:435
|
2023-02-04 10:32:39 +00:00
|
|
|
|
msgctxt "input"
|
|
|
|
|
msgid "Name"
|
|
|
|
|
msgstr "Nombre"
|
|
|
|
|
|
Convert invoices to PDF with WeasyPrint
Although it is possible to just print the invoice from the browser, many
people will not even try an assume that they can not create a PDF for
the invoice.
I thought of using Groff or TeX to create the PDF, but it would mean
maintaining two templates in two different systems (HTML and whatever i
would use), and would probably look very different, because i do not
know Groff or TeX that well.
I wish there was a way to tell the browser to print to PDF, and it can
be done, but only with the Chrome Protocol to a server-side running
Chrome instance. This works, but i would need a Chrome running as a
daemon.
I also wrote a Qt application that uses QWebEngine to print the PDF,
much like wkhtmltopdf, but with support for more recent HTML and CSS
standards. Unfortunately, Qt 6.4’s embedded Chromium does not follow
break-page-inside as well as WeasyPrint does.
To use WeasyPrint, at first i wanted to reach the same URL as the user,
passing the cookie to WeasyPrint so that i can access the same invoice
as the user, something that can be done with wkhtmltopdf, but WeasyPrint
does not have such option. I did it with a custom Python script, but
then i need to package and install that script, that is not that much
work, but using the Debian-provided script is even less work, and less
likely to drift when WeasyPrint changes API.
Also, it is unnecessary to do a network round-trip from Go to Python
back to Go, because i can already write the invoice HTML as is to
WeasyPrint’s stdin.
2023-02-26 16:26:09 +00:00
|
|
|
|
#: pkg/products.go:171 pkg/invoices.go:440
|
2023-02-04 10:32:39 +00:00
|
|
|
|
msgctxt "input"
|
|
|
|
|
msgid "Description"
|
|
|
|
|
msgstr "Descripción"
|
|
|
|
|
|
Convert invoices to PDF with WeasyPrint
Although it is possible to just print the invoice from the browser, many
people will not even try an assume that they can not create a PDF for
the invoice.
I thought of using Groff or TeX to create the PDF, but it would mean
maintaining two templates in two different systems (HTML and whatever i
would use), and would probably look very different, because i do not
know Groff or TeX that well.
I wish there was a way to tell the browser to print to PDF, and it can
be done, but only with the Chrome Protocol to a server-side running
Chrome instance. This works, but i would need a Chrome running as a
daemon.
I also wrote a Qt application that uses QWebEngine to print the PDF,
much like wkhtmltopdf, but with support for more recent HTML and CSS
standards. Unfortunately, Qt 6.4’s embedded Chromium does not follow
break-page-inside as well as WeasyPrint does.
To use WeasyPrint, at first i wanted to reach the same URL as the user,
passing the cookie to WeasyPrint so that i can access the same invoice
as the user, something that can be done with wkhtmltopdf, but WeasyPrint
does not have such option. I did it with a custom Python script, but
then i need to package and install that script, that is not that much
work, but using the Debian-provided script is even less work, and less
likely to drift when WeasyPrint changes API.
Also, it is unnecessary to do a network round-trip from Go to Python
back to Go, because i can already write the invoice HTML as is to
WeasyPrint’s stdin.
2023-02-26 16:26:09 +00:00
|
|
|
|
#: pkg/products.go:176 pkg/invoices.go:444
|
2023-02-04 10:32:39 +00:00
|
|
|
|
msgctxt "input"
|
|
|
|
|
msgid "Price"
|
|
|
|
|
msgstr "Precio"
|
|
|
|
|
|
Convert invoices to PDF with WeasyPrint
Although it is possible to just print the invoice from the browser, many
people will not even try an assume that they can not create a PDF for
the invoice.
I thought of using Groff or TeX to create the PDF, but it would mean
maintaining two templates in two different systems (HTML and whatever i
would use), and would probably look very different, because i do not
know Groff or TeX that well.
I wish there was a way to tell the browser to print to PDF, and it can
be done, but only with the Chrome Protocol to a server-side running
Chrome instance. This works, but i would need a Chrome running as a
daemon.
I also wrote a Qt application that uses QWebEngine to print the PDF,
much like wkhtmltopdf, but with support for more recent HTML and CSS
standards. Unfortunately, Qt 6.4’s embedded Chromium does not follow
break-page-inside as well as WeasyPrint does.
To use WeasyPrint, at first i wanted to reach the same URL as the user,
passing the cookie to WeasyPrint so that i can access the same invoice
as the user, something that can be done with wkhtmltopdf, but WeasyPrint
does not have such option. I did it with a custom Python script, but
then i need to package and install that script, that is not that much
work, but using the Debian-provided script is even less work, and less
likely to drift when WeasyPrint changes API.
Also, it is unnecessary to do a network round-trip from Go to Python
back to Go, because i can already write the invoice HTML as is to
WeasyPrint’s stdin.
2023-02-26 16:26:09 +00:00
|
|
|
|
#: pkg/products.go:186 pkg/invoices.go:350 pkg/invoices.go:470
|
2023-02-04 10:32:39 +00:00
|
|
|
|
msgctxt "input"
|
2023-02-08 12:47:36 +00:00
|
|
|
|
msgid "Taxes"
|
|
|
|
|
msgstr "Impuestos"
|
2023-02-04 10:32:39 +00:00
|
|
|
|
|
Convert invoices to PDF with WeasyPrint
Although it is possible to just print the invoice from the browser, many
people will not even try an assume that they can not create a PDF for
the invoice.
I thought of using Groff or TeX to create the PDF, but it would mean
maintaining two templates in two different systems (HTML and whatever i
would use), and would probably look very different, because i do not
know Groff or TeX that well.
I wish there was a way to tell the browser to print to PDF, and it can
be done, but only with the Chrome Protocol to a server-side running
Chrome instance. This works, but i would need a Chrome running as a
daemon.
I also wrote a Qt application that uses QWebEngine to print the PDF,
much like wkhtmltopdf, but with support for more recent HTML and CSS
standards. Unfortunately, Qt 6.4’s embedded Chromium does not follow
break-page-inside as well as WeasyPrint does.
To use WeasyPrint, at first i wanted to reach the same URL as the user,
passing the cookie to WeasyPrint so that i can access the same invoice
as the user, something that can be done with wkhtmltopdf, but WeasyPrint
does not have such option. I did it with a custom Python script, but
then i need to package and install that script, that is not that much
work, but using the Debian-provided script is even less work, and less
likely to drift when WeasyPrint changes API.
Also, it is unnecessary to do a network round-trip from Go to Python
back to Go, because i can already write the invoice HTML as is to
WeasyPrint’s stdin.
2023-02-26 16:26:09 +00:00
|
|
|
|
#: pkg/products.go:206 pkg/profile.go:92 pkg/invoices.go:383
|
|
|
|
|
#: pkg/invoices.go:506
|
2023-02-04 10:32:39 +00:00
|
|
|
|
msgid "Name can not be empty."
|
|
|
|
|
msgstr "No podéis dejar el nombre en blanco."
|
|
|
|
|
|
Convert invoices to PDF with WeasyPrint
Although it is possible to just print the invoice from the browser, many
people will not even try an assume that they can not create a PDF for
the invoice.
I thought of using Groff or TeX to create the PDF, but it would mean
maintaining two templates in two different systems (HTML and whatever i
would use), and would probably look very different, because i do not
know Groff or TeX that well.
I wish there was a way to tell the browser to print to PDF, and it can
be done, but only with the Chrome Protocol to a server-side running
Chrome instance. This works, but i would need a Chrome running as a
daemon.
I also wrote a Qt application that uses QWebEngine to print the PDF,
much like wkhtmltopdf, but with support for more recent HTML and CSS
standards. Unfortunately, Qt 6.4’s embedded Chromium does not follow
break-page-inside as well as WeasyPrint does.
To use WeasyPrint, at first i wanted to reach the same URL as the user,
passing the cookie to WeasyPrint so that i can access the same invoice
as the user, something that can be done with wkhtmltopdf, but WeasyPrint
does not have such option. I did it with a custom Python script, but
then i need to package and install that script, that is not that much
work, but using the Debian-provided script is even less work, and less
likely to drift when WeasyPrint changes API.
Also, it is unnecessary to do a network round-trip from Go to Python
back to Go, because i can already write the invoice HTML as is to
WeasyPrint’s stdin.
2023-02-26 16:26:09 +00:00
|
|
|
|
#: pkg/products.go:207 pkg/invoices.go:507
|
2023-02-04 10:32:39 +00:00
|
|
|
|
msgid "Price can not be empty."
|
|
|
|
|
msgstr "No podéis dejar el precio en blanco."
|
|
|
|
|
|
Convert invoices to PDF with WeasyPrint
Although it is possible to just print the invoice from the browser, many
people will not even try an assume that they can not create a PDF for
the invoice.
I thought of using Groff or TeX to create the PDF, but it would mean
maintaining two templates in two different systems (HTML and whatever i
would use), and would probably look very different, because i do not
know Groff or TeX that well.
I wish there was a way to tell the browser to print to PDF, and it can
be done, but only with the Chrome Protocol to a server-side running
Chrome instance. This works, but i would need a Chrome running as a
daemon.
I also wrote a Qt application that uses QWebEngine to print the PDF,
much like wkhtmltopdf, but with support for more recent HTML and CSS
standards. Unfortunately, Qt 6.4’s embedded Chromium does not follow
break-page-inside as well as WeasyPrint does.
To use WeasyPrint, at first i wanted to reach the same URL as the user,
passing the cookie to WeasyPrint so that i can access the same invoice
as the user, something that can be done with wkhtmltopdf, but WeasyPrint
does not have such option. I did it with a custom Python script, but
then i need to package and install that script, that is not that much
work, but using the Debian-provided script is even less work, and less
likely to drift when WeasyPrint changes API.
Also, it is unnecessary to do a network round-trip from Go to Python
back to Go, because i can already write the invoice HTML as is to
WeasyPrint’s stdin.
2023-02-26 16:26:09 +00:00
|
|
|
|
#: pkg/products.go:208 pkg/invoices.go:508
|
2023-02-04 10:32:39 +00:00
|
|
|
|
msgid "Price must be a number greater than zero."
|
|
|
|
|
msgstr "El precio tiene que ser un número mayor a cero."
|
|
|
|
|
|
Convert invoices to PDF with WeasyPrint
Although it is possible to just print the invoice from the browser, many
people will not even try an assume that they can not create a PDF for
the invoice.
I thought of using Groff or TeX to create the PDF, but it would mean
maintaining two templates in two different systems (HTML and whatever i
would use), and would probably look very different, because i do not
know Groff or TeX that well.
I wish there was a way to tell the browser to print to PDF, and it can
be done, but only with the Chrome Protocol to a server-side running
Chrome instance. This works, but i would need a Chrome running as a
daemon.
I also wrote a Qt application that uses QWebEngine to print the PDF,
much like wkhtmltopdf, but with support for more recent HTML and CSS
standards. Unfortunately, Qt 6.4’s embedded Chromium does not follow
break-page-inside as well as WeasyPrint does.
To use WeasyPrint, at first i wanted to reach the same URL as the user,
passing the cookie to WeasyPrint so that i can access the same invoice
as the user, something that can be done with wkhtmltopdf, but WeasyPrint
does not have such option. I did it with a custom Python script, but
then i need to package and install that script, that is not that much
work, but using the Debian-provided script is even less work, and less
likely to drift when WeasyPrint changes API.
Also, it is unnecessary to do a network round-trip from Go to Python
back to Go, because i can already write the invoice HTML as is to
WeasyPrint’s stdin.
2023-02-26 16:26:09 +00:00
|
|
|
|
#: pkg/products.go:210 pkg/invoices.go:387 pkg/invoices.go:516
|
2023-02-04 10:32:39 +00:00
|
|
|
|
msgid "Selected tax is not valid."
|
|
|
|
|
msgstr "Habéis escogido un impuesto que no es válido."
|
|
|
|
|
|
2023-02-05 13:06:33 +00:00
|
|
|
|
#: pkg/company.go:89
|
2023-02-03 12:29:10 +00:00
|
|
|
|
msgctxt "input"
|
|
|
|
|
msgid "Currency"
|
|
|
|
|
msgstr "Moneda"
|
|
|
|
|
|
2023-02-05 13:06:33 +00:00
|
|
|
|
#: pkg/company.go:107
|
2023-02-03 12:29:10 +00:00
|
|
|
|
msgid "Selected currency is not valid."
|
|
|
|
|
msgstr "Habéis escogido una moneda que no es válida."
|
|
|
|
|
|
2023-02-05 13:06:33 +00:00
|
|
|
|
#: pkg/company.go:229
|
2023-02-03 12:29:10 +00:00
|
|
|
|
msgctxt "input"
|
|
|
|
|
msgid "Tax name"
|
|
|
|
|
msgstr "Nombre impuesto"
|
|
|
|
|
|
2023-02-05 13:06:33 +00:00
|
|
|
|
#: pkg/company.go:235
|
2023-02-03 12:29:10 +00:00
|
|
|
|
msgctxt "input"
|
|
|
|
|
msgid "Rate (%)"
|
|
|
|
|
msgstr "Porcentaje"
|
|
|
|
|
|
2023-02-05 13:06:33 +00:00
|
|
|
|
#: pkg/company.go:257
|
2023-02-03 12:29:10 +00:00
|
|
|
|
msgid "Tax name can not be empty."
|
|
|
|
|
msgstr "No podéis dejar el nombre del impuesto en blanco."
|
|
|
|
|
|
2023-02-05 13:06:33 +00:00
|
|
|
|
#: pkg/company.go:258
|
2023-02-03 12:29:10 +00:00
|
|
|
|
msgid "Tax rate can not be empty."
|
|
|
|
|
msgstr "No podéis dejar el porcentaje en blanco."
|
|
|
|
|
|
2023-02-05 13:06:33 +00:00
|
|
|
|
#: pkg/company.go:259
|
2023-02-03 12:29:10 +00:00
|
|
|
|
msgid "Tax rate must be an integer between -99 and 99."
|
|
|
|
|
msgstr "El porcentaje tiene que estar entre -99 y 99."
|
|
|
|
|
|
|
|
|
|
#: pkg/profile.go:25
|
2023-01-31 14:40:12 +00:00
|
|
|
|
msgctxt "language option"
|
|
|
|
|
msgid "Automatic"
|
|
|
|
|
msgstr "Automático"
|
|
|
|
|
|
2023-02-03 12:29:10 +00:00
|
|
|
|
#: pkg/profile.go:31
|
2023-01-31 14:40:12 +00:00
|
|
|
|
msgctxt "input"
|
|
|
|
|
msgid "User name"
|
|
|
|
|
msgstr "Nombre de usuario"
|
|
|
|
|
|
2023-02-03 12:29:10 +00:00
|
|
|
|
#: pkg/profile.go:57
|
2023-01-31 14:40:12 +00:00
|
|
|
|
msgctxt "input"
|
|
|
|
|
msgid "Password Confirmation"
|
2023-02-03 12:29:10 +00:00
|
|
|
|
msgstr "Confirmación contraseña"
|
2023-01-31 14:40:12 +00:00
|
|
|
|
|
2023-02-03 12:29:10 +00:00
|
|
|
|
#: pkg/profile.go:65
|
2023-01-31 14:40:12 +00:00
|
|
|
|
msgctxt "input"
|
|
|
|
|
msgid "Language"
|
|
|
|
|
msgstr "Idioma"
|
|
|
|
|
|
2023-02-05 13:06:33 +00:00
|
|
|
|
#: pkg/profile.go:93
|
2023-01-31 14:40:12 +00:00
|
|
|
|
msgid "Confirmation does not match password."
|
|
|
|
|
msgstr "La confirmación no corresponde con la contraseña."
|
|
|
|
|
|
2023-02-05 13:06:33 +00:00
|
|
|
|
#: pkg/profile.go:94
|
2023-01-31 14:40:12 +00:00
|
|
|
|
msgid "Selected language is not valid."
|
|
|
|
|
msgstr "Habéis escogido un idioma que no es válido."
|
2023-02-01 09:14:26 +00:00
|
|
|
|
|
Convert invoices to PDF with WeasyPrint
Although it is possible to just print the invoice from the browser, many
people will not even try an assume that they can not create a PDF for
the invoice.
I thought of using Groff or TeX to create the PDF, but it would mean
maintaining two templates in two different systems (HTML and whatever i
would use), and would probably look very different, because i do not
know Groff or TeX that well.
I wish there was a way to tell the browser to print to PDF, and it can
be done, but only with the Chrome Protocol to a server-side running
Chrome instance. This works, but i would need a Chrome running as a
daemon.
I also wrote a Qt application that uses QWebEngine to print the PDF,
much like wkhtmltopdf, but with support for more recent HTML and CSS
standards. Unfortunately, Qt 6.4’s embedded Chromium does not follow
break-page-inside as well as WeasyPrint does.
To use WeasyPrint, at first i wanted to reach the same URL as the user,
passing the cookie to WeasyPrint so that i can access the same invoice
as the user, something that can be done with wkhtmltopdf, but WeasyPrint
does not have such option. I did it with a custom Python script, but
then i need to package and install that script, that is not that much
work, but using the Debian-provided script is even less work, and less
likely to drift when WeasyPrint changes API.
Also, it is unnecessary to do a network round-trip from Go to Python
back to Go, because i can already write the invoice HTML as is to
WeasyPrint’s stdin.
2023-02-26 16:26:09 +00:00
|
|
|
|
#: pkg/invoices.go:201
|
2023-02-12 20:06:48 +00:00
|
|
|
|
msgid "Select a customer to bill."
|
|
|
|
|
msgstr "Escoged un cliente a facturar."
|
|
|
|
|
|
Convert invoices to PDF with WeasyPrint
Although it is possible to just print the invoice from the browser, many
people will not even try an assume that they can not create a PDF for
the invoice.
I thought of using Groff or TeX to create the PDF, but it would mean
maintaining two templates in two different systems (HTML and whatever i
would use), and would probably look very different, because i do not
know Groff or TeX that well.
I wish there was a way to tell the browser to print to PDF, and it can
be done, but only with the Chrome Protocol to a server-side running
Chrome instance. This works, but i would need a Chrome running as a
daemon.
I also wrote a Qt application that uses QWebEngine to print the PDF,
much like wkhtmltopdf, but with support for more recent HTML and CSS
standards. Unfortunately, Qt 6.4’s embedded Chromium does not follow
break-page-inside as well as WeasyPrint does.
To use WeasyPrint, at first i wanted to reach the same URL as the user,
passing the cookie to WeasyPrint so that i can access the same invoice
as the user, something that can be done with wkhtmltopdf, but WeasyPrint
does not have such option. I did it with a custom Python script, but
then i need to package and install that script, that is not that much
work, but using the Debian-provided script is even less work, and less
likely to drift when WeasyPrint changes API.
Also, it is unnecessary to do a network round-trip from Go to Python
back to Go, because i can already write the invoice HTML as is to
WeasyPrint’s stdin.
2023-02-26 16:26:09 +00:00
|
|
|
|
#: pkg/invoices.go:276
|
2023-02-12 20:06:48 +00:00
|
|
|
|
msgid "Invalid action"
|
|
|
|
|
msgstr "Acción inválida."
|
|
|
|
|
|
Convert invoices to PDF with WeasyPrint
Although it is possible to just print the invoice from the browser, many
people will not even try an assume that they can not create a PDF for
the invoice.
I thought of using Groff or TeX to create the PDF, but it would mean
maintaining two templates in two different systems (HTML and whatever i
would use), and would probably look very different, because i do not
know Groff or TeX that well.
I wish there was a way to tell the browser to print to PDF, and it can
be done, but only with the Chrome Protocol to a server-side running
Chrome instance. This works, but i would need a Chrome running as a
daemon.
I also wrote a Qt application that uses QWebEngine to print the PDF,
much like wkhtmltopdf, but with support for more recent HTML and CSS
standards. Unfortunately, Qt 6.4’s embedded Chromium does not follow
break-page-inside as well as WeasyPrint does.
To use WeasyPrint, at first i wanted to reach the same URL as the user,
passing the cookie to WeasyPrint so that i can access the same invoice
as the user, something that can be done with wkhtmltopdf, but WeasyPrint
does not have such option. I did it with a custom Python script, but
then i need to package and install that script, that is not that much
work, but using the Debian-provided script is even less work, and less
likely to drift when WeasyPrint changes API.
Also, it is unnecessary to do a network round-trip from Go to Python
back to Go, because i can already write the invoice HTML as is to
WeasyPrint’s stdin.
2023-02-26 16:26:09 +00:00
|
|
|
|
#: pkg/invoices.go:327
|
2023-02-12 20:06:48 +00:00
|
|
|
|
msgctxt "input"
|
|
|
|
|
msgid "Customer"
|
|
|
|
|
msgstr "Cliente"
|
|
|
|
|
|
Convert invoices to PDF with WeasyPrint
Although it is possible to just print the invoice from the browser, many
people will not even try an assume that they can not create a PDF for
the invoice.
I thought of using Groff or TeX to create the PDF, but it would mean
maintaining two templates in two different systems (HTML and whatever i
would use), and would probably look very different, because i do not
know Groff or TeX that well.
I wish there was a way to tell the browser to print to PDF, and it can
be done, but only with the Chrome Protocol to a server-side running
Chrome instance. This works, but i would need a Chrome running as a
daemon.
I also wrote a Qt application that uses QWebEngine to print the PDF,
much like wkhtmltopdf, but with support for more recent HTML and CSS
standards. Unfortunately, Qt 6.4’s embedded Chromium does not follow
break-page-inside as well as WeasyPrint does.
To use WeasyPrint, at first i wanted to reach the same URL as the user,
passing the cookie to WeasyPrint so that i can access the same invoice
as the user, something that can be done with wkhtmltopdf, but WeasyPrint
does not have such option. I did it with a custom Python script, but
then i need to package and install that script, that is not that much
work, but using the Debian-provided script is even less work, and less
likely to drift when WeasyPrint changes API.
Also, it is unnecessary to do a network round-trip from Go to Python
back to Go, because i can already write the invoice HTML as is to
WeasyPrint’s stdin.
2023-02-26 16:26:09 +00:00
|
|
|
|
#: pkg/invoices.go:333
|
2023-02-12 20:06:48 +00:00
|
|
|
|
msgctxt "input"
|
|
|
|
|
msgid "Number"
|
|
|
|
|
msgstr "Número"
|
|
|
|
|
|
Convert invoices to PDF with WeasyPrint
Although it is possible to just print the invoice from the browser, many
people will not even try an assume that they can not create a PDF for
the invoice.
I thought of using Groff or TeX to create the PDF, but it would mean
maintaining two templates in two different systems (HTML and whatever i
would use), and would probably look very different, because i do not
know Groff or TeX that well.
I wish there was a way to tell the browser to print to PDF, and it can
be done, but only with the Chrome Protocol to a server-side running
Chrome instance. This works, but i would need a Chrome running as a
daemon.
I also wrote a Qt application that uses QWebEngine to print the PDF,
much like wkhtmltopdf, but with support for more recent HTML and CSS
standards. Unfortunately, Qt 6.4’s embedded Chromium does not follow
break-page-inside as well as WeasyPrint does.
To use WeasyPrint, at first i wanted to reach the same URL as the user,
passing the cookie to WeasyPrint so that i can access the same invoice
as the user, something that can be done with wkhtmltopdf, but WeasyPrint
does not have such option. I did it with a custom Python script, but
then i need to package and install that script, that is not that much
work, but using the Debian-provided script is even less work, and less
likely to drift when WeasyPrint changes API.
Also, it is unnecessary to do a network round-trip from Go to Python
back to Go, because i can already write the invoice HTML as is to
WeasyPrint’s stdin.
2023-02-26 16:26:09 +00:00
|
|
|
|
#: pkg/invoices.go:339
|
2023-02-12 20:06:48 +00:00
|
|
|
|
msgctxt "input"
|
|
|
|
|
msgid "Invoice Date"
|
|
|
|
|
msgstr "Fecha de factura"
|
|
|
|
|
|
Convert invoices to PDF with WeasyPrint
Although it is possible to just print the invoice from the browser, many
people will not even try an assume that they can not create a PDF for
the invoice.
I thought of using Groff or TeX to create the PDF, but it would mean
maintaining two templates in two different systems (HTML and whatever i
would use), and would probably look very different, because i do not
know Groff or TeX that well.
I wish there was a way to tell the browser to print to PDF, and it can
be done, but only with the Chrome Protocol to a server-side running
Chrome instance. This works, but i would need a Chrome running as a
daemon.
I also wrote a Qt application that uses QWebEngine to print the PDF,
much like wkhtmltopdf, but with support for more recent HTML and CSS
standards. Unfortunately, Qt 6.4’s embedded Chromium does not follow
break-page-inside as well as WeasyPrint does.
To use WeasyPrint, at first i wanted to reach the same URL as the user,
passing the cookie to WeasyPrint so that i can access the same invoice
as the user, something that can be done with wkhtmltopdf, but WeasyPrint
does not have such option. I did it with a custom Python script, but
then i need to package and install that script, that is not that much
work, but using the Debian-provided script is even less work, and less
likely to drift when WeasyPrint changes API.
Also, it is unnecessary to do a network round-trip from Go to Python
back to Go, because i can already write the invoice HTML as is to
WeasyPrint’s stdin.
2023-02-26 16:26:09 +00:00
|
|
|
|
#: pkg/invoices.go:345
|
2023-02-12 20:06:48 +00:00
|
|
|
|
msgctxt "input"
|
|
|
|
|
msgid "Notes"
|
|
|
|
|
msgstr "Notas"
|
|
|
|
|
|
Convert invoices to PDF with WeasyPrint
Although it is possible to just print the invoice from the browser, many
people will not even try an assume that they can not create a PDF for
the invoice.
I thought of using Groff or TeX to create the PDF, but it would mean
maintaining two templates in two different systems (HTML and whatever i
would use), and would probably look very different, because i do not
know Groff or TeX that well.
I wish there was a way to tell the browser to print to PDF, and it can
be done, but only with the Chrome Protocol to a server-side running
Chrome instance. This works, but i would need a Chrome running as a
daemon.
I also wrote a Qt application that uses QWebEngine to print the PDF,
much like wkhtmltopdf, but with support for more recent HTML and CSS
standards. Unfortunately, Qt 6.4’s embedded Chromium does not follow
break-page-inside as well as WeasyPrint does.
To use WeasyPrint, at first i wanted to reach the same URL as the user,
passing the cookie to WeasyPrint so that i can access the same invoice
as the user, something that can be done with wkhtmltopdf, but WeasyPrint
does not have such option. I did it with a custom Python script, but
then i need to package and install that script, that is not that much
work, but using the Debian-provided script is even less work, and less
likely to drift when WeasyPrint changes API.
Also, it is unnecessary to do a network round-trip from Go to Python
back to Go, because i can already write the invoice HTML as is to
WeasyPrint’s stdin.
2023-02-26 16:26:09 +00:00
|
|
|
|
#: pkg/invoices.go:384
|
2023-02-12 20:06:48 +00:00
|
|
|
|
msgid "Invoice date can not be empty."
|
|
|
|
|
msgstr "No podéis dejar la fecha de la factura en blanco."
|
|
|
|
|
|
Convert invoices to PDF with WeasyPrint
Although it is possible to just print the invoice from the browser, many
people will not even try an assume that they can not create a PDF for
the invoice.
I thought of using Groff or TeX to create the PDF, but it would mean
maintaining two templates in two different systems (HTML and whatever i
would use), and would probably look very different, because i do not
know Groff or TeX that well.
I wish there was a way to tell the browser to print to PDF, and it can
be done, but only with the Chrome Protocol to a server-side running
Chrome instance. This works, but i would need a Chrome running as a
daemon.
I also wrote a Qt application that uses QWebEngine to print the PDF,
much like wkhtmltopdf, but with support for more recent HTML and CSS
standards. Unfortunately, Qt 6.4’s embedded Chromium does not follow
break-page-inside as well as WeasyPrint does.
To use WeasyPrint, at first i wanted to reach the same URL as the user,
passing the cookie to WeasyPrint so that i can access the same invoice
as the user, something that can be done with wkhtmltopdf, but WeasyPrint
does not have such option. I did it with a custom Python script, but
then i need to package and install that script, that is not that much
work, but using the Debian-provided script is even less work, and less
likely to drift when WeasyPrint changes API.
Also, it is unnecessary to do a network round-trip from Go to Python
back to Go, because i can already write the invoice HTML as is to
WeasyPrint’s stdin.
2023-02-26 16:26:09 +00:00
|
|
|
|
#: pkg/invoices.go:385
|
2023-02-12 20:06:48 +00:00
|
|
|
|
msgid "Invoice date must be a valid date."
|
|
|
|
|
msgstr "La fecha de factura debe ser válida."
|
|
|
|
|
|
Convert invoices to PDF with WeasyPrint
Although it is possible to just print the invoice from the browser, many
people will not even try an assume that they can not create a PDF for
the invoice.
I thought of using Groff or TeX to create the PDF, but it would mean
maintaining two templates in two different systems (HTML and whatever i
would use), and would probably look very different, because i do not
know Groff or TeX that well.
I wish there was a way to tell the browser to print to PDF, and it can
be done, but only with the Chrome Protocol to a server-side running
Chrome instance. This works, but i would need a Chrome running as a
daemon.
I also wrote a Qt application that uses QWebEngine to print the PDF,
much like wkhtmltopdf, but with support for more recent HTML and CSS
standards. Unfortunately, Qt 6.4’s embedded Chromium does not follow
break-page-inside as well as WeasyPrint does.
To use WeasyPrint, at first i wanted to reach the same URL as the user,
passing the cookie to WeasyPrint so that i can access the same invoice
as the user, something that can be done with wkhtmltopdf, but WeasyPrint
does not have such option. I did it with a custom Python script, but
then i need to package and install that script, that is not that much
work, but using the Debian-provided script is even less work, and less
likely to drift when WeasyPrint changes API.
Also, it is unnecessary to do a network round-trip from Go to Python
back to Go, because i can already write the invoice HTML as is to
WeasyPrint’s stdin.
2023-02-26 16:26:09 +00:00
|
|
|
|
#: pkg/invoices.go:430
|
2023-02-12 20:06:48 +00:00
|
|
|
|
msgctxt "input"
|
|
|
|
|
msgid "Id"
|
|
|
|
|
msgstr "Identificador"
|
|
|
|
|
|
Convert invoices to PDF with WeasyPrint
Although it is possible to just print the invoice from the browser, many
people will not even try an assume that they can not create a PDF for
the invoice.
I thought of using Groff or TeX to create the PDF, but it would mean
maintaining two templates in two different systems (HTML and whatever i
would use), and would probably look very different, because i do not
know Groff or TeX that well.
I wish there was a way to tell the browser to print to PDF, and it can
be done, but only with the Chrome Protocol to a server-side running
Chrome instance. This works, but i would need a Chrome running as a
daemon.
I also wrote a Qt application that uses QWebEngine to print the PDF,
much like wkhtmltopdf, but with support for more recent HTML and CSS
standards. Unfortunately, Qt 6.4’s embedded Chromium does not follow
break-page-inside as well as WeasyPrint does.
To use WeasyPrint, at first i wanted to reach the same URL as the user,
passing the cookie to WeasyPrint so that i can access the same invoice
as the user, something that can be done with wkhtmltopdf, but WeasyPrint
does not have such option. I did it with a custom Python script, but
then i need to package and install that script, that is not that much
work, but using the Debian-provided script is even less work, and less
likely to drift when WeasyPrint changes API.
Also, it is unnecessary to do a network round-trip from Go to Python
back to Go, because i can already write the invoice HTML as is to
WeasyPrint’s stdin.
2023-02-26 16:26:09 +00:00
|
|
|
|
#: pkg/invoices.go:453
|
2023-02-12 20:06:48 +00:00
|
|
|
|
msgctxt "input"
|
|
|
|
|
msgid "Quantity"
|
|
|
|
|
msgstr "Cantidad"
|
|
|
|
|
|
Convert invoices to PDF with WeasyPrint
Although it is possible to just print the invoice from the browser, many
people will not even try an assume that they can not create a PDF for
the invoice.
I thought of using Groff or TeX to create the PDF, but it would mean
maintaining two templates in two different systems (HTML and whatever i
would use), and would probably look very different, because i do not
know Groff or TeX that well.
I wish there was a way to tell the browser to print to PDF, and it can
be done, but only with the Chrome Protocol to a server-side running
Chrome instance. This works, but i would need a Chrome running as a
daemon.
I also wrote a Qt application that uses QWebEngine to print the PDF,
much like wkhtmltopdf, but with support for more recent HTML and CSS
standards. Unfortunately, Qt 6.4’s embedded Chromium does not follow
break-page-inside as well as WeasyPrint does.
To use WeasyPrint, at first i wanted to reach the same URL as the user,
passing the cookie to WeasyPrint so that i can access the same invoice
as the user, something that can be done with wkhtmltopdf, but WeasyPrint
does not have such option. I did it with a custom Python script, but
then i need to package and install that script, that is not that much
work, but using the Debian-provided script is even less work, and less
likely to drift when WeasyPrint changes API.
Also, it is unnecessary to do a network round-trip from Go to Python
back to Go, because i can already write the invoice HTML as is to
WeasyPrint’s stdin.
2023-02-26 16:26:09 +00:00
|
|
|
|
#: pkg/invoices.go:461
|
2023-02-12 20:06:48 +00:00
|
|
|
|
msgctxt "input"
|
|
|
|
|
msgid "Discount (%)"
|
|
|
|
|
msgstr "Descuento (%)"
|
|
|
|
|
|
Convert invoices to PDF with WeasyPrint
Although it is possible to just print the invoice from the browser, many
people will not even try an assume that they can not create a PDF for
the invoice.
I thought of using Groff or TeX to create the PDF, but it would mean
maintaining two templates in two different systems (HTML and whatever i
would use), and would probably look very different, because i do not
know Groff or TeX that well.
I wish there was a way to tell the browser to print to PDF, and it can
be done, but only with the Chrome Protocol to a server-side running
Chrome instance. This works, but i would need a Chrome running as a
daemon.
I also wrote a Qt application that uses QWebEngine to print the PDF,
much like wkhtmltopdf, but with support for more recent HTML and CSS
standards. Unfortunately, Qt 6.4’s embedded Chromium does not follow
break-page-inside as well as WeasyPrint does.
To use WeasyPrint, at first i wanted to reach the same URL as the user,
passing the cookie to WeasyPrint so that i can access the same invoice
as the user, something that can be done with wkhtmltopdf, but WeasyPrint
does not have such option. I did it with a custom Python script, but
then i need to package and install that script, that is not that much
work, but using the Debian-provided script is even less work, and less
likely to drift when WeasyPrint changes API.
Also, it is unnecessary to do a network round-trip from Go to Python
back to Go, because i can already write the invoice HTML as is to
WeasyPrint’s stdin.
2023-02-26 16:26:09 +00:00
|
|
|
|
#: pkg/invoices.go:510
|
2023-02-12 20:06:48 +00:00
|
|
|
|
msgid "Quantity can not be empty."
|
|
|
|
|
msgstr "No podéis dejar la cantidad en blanco."
|
|
|
|
|
|
Convert invoices to PDF with WeasyPrint
Although it is possible to just print the invoice from the browser, many
people will not even try an assume that they can not create a PDF for
the invoice.
I thought of using Groff or TeX to create the PDF, but it would mean
maintaining two templates in two different systems (HTML and whatever i
would use), and would probably look very different, because i do not
know Groff or TeX that well.
I wish there was a way to tell the browser to print to PDF, and it can
be done, but only with the Chrome Protocol to a server-side running
Chrome instance. This works, but i would need a Chrome running as a
daemon.
I also wrote a Qt application that uses QWebEngine to print the PDF,
much like wkhtmltopdf, but with support for more recent HTML and CSS
standards. Unfortunately, Qt 6.4’s embedded Chromium does not follow
break-page-inside as well as WeasyPrint does.
To use WeasyPrint, at first i wanted to reach the same URL as the user,
passing the cookie to WeasyPrint so that i can access the same invoice
as the user, something that can be done with wkhtmltopdf, but WeasyPrint
does not have such option. I did it with a custom Python script, but
then i need to package and install that script, that is not that much
work, but using the Debian-provided script is even less work, and less
likely to drift when WeasyPrint changes API.
Also, it is unnecessary to do a network round-trip from Go to Python
back to Go, because i can already write the invoice HTML as is to
WeasyPrint’s stdin.
2023-02-26 16:26:09 +00:00
|
|
|
|
#: pkg/invoices.go:511
|
2023-02-12 20:06:48 +00:00
|
|
|
|
msgid "Quantity must be a number greater than zero."
|
|
|
|
|
msgstr "La cantidad tiene que ser un número mayor a cero."
|
|
|
|
|
|
Convert invoices to PDF with WeasyPrint
Although it is possible to just print the invoice from the browser, many
people will not even try an assume that they can not create a PDF for
the invoice.
I thought of using Groff or TeX to create the PDF, but it would mean
maintaining two templates in two different systems (HTML and whatever i
would use), and would probably look very different, because i do not
know Groff or TeX that well.
I wish there was a way to tell the browser to print to PDF, and it can
be done, but only with the Chrome Protocol to a server-side running
Chrome instance. This works, but i would need a Chrome running as a
daemon.
I also wrote a Qt application that uses QWebEngine to print the PDF,
much like wkhtmltopdf, but with support for more recent HTML and CSS
standards. Unfortunately, Qt 6.4’s embedded Chromium does not follow
break-page-inside as well as WeasyPrint does.
To use WeasyPrint, at first i wanted to reach the same URL as the user,
passing the cookie to WeasyPrint so that i can access the same invoice
as the user, something that can be done with wkhtmltopdf, but WeasyPrint
does not have such option. I did it with a custom Python script, but
then i need to package and install that script, that is not that much
work, but using the Debian-provided script is even less work, and less
likely to drift when WeasyPrint changes API.
Also, it is unnecessary to do a network round-trip from Go to Python
back to Go, because i can already write the invoice HTML as is to
WeasyPrint’s stdin.
2023-02-26 16:26:09 +00:00
|
|
|
|
#: pkg/invoices.go:513
|
2023-02-12 20:06:48 +00:00
|
|
|
|
msgid "Discount can not be empty."
|
|
|
|
|
msgstr "No podéis dejar el descuento en blanco."
|
|
|
|
|
|
Convert invoices to PDF with WeasyPrint
Although it is possible to just print the invoice from the browser, many
people will not even try an assume that they can not create a PDF for
the invoice.
I thought of using Groff or TeX to create the PDF, but it would mean
maintaining two templates in two different systems (HTML and whatever i
would use), and would probably look very different, because i do not
know Groff or TeX that well.
I wish there was a way to tell the browser to print to PDF, and it can
be done, but only with the Chrome Protocol to a server-side running
Chrome instance. This works, but i would need a Chrome running as a
daemon.
I also wrote a Qt application that uses QWebEngine to print the PDF,
much like wkhtmltopdf, but with support for more recent HTML and CSS
standards. Unfortunately, Qt 6.4’s embedded Chromium does not follow
break-page-inside as well as WeasyPrint does.
To use WeasyPrint, at first i wanted to reach the same URL as the user,
passing the cookie to WeasyPrint so that i can access the same invoice
as the user, something that can be done with wkhtmltopdf, but WeasyPrint
does not have such option. I did it with a custom Python script, but
then i need to package and install that script, that is not that much
work, but using the Debian-provided script is even less work, and less
likely to drift when WeasyPrint changes API.
Also, it is unnecessary to do a network round-trip from Go to Python
back to Go, because i can already write the invoice HTML as is to
WeasyPrint’s stdin.
2023-02-26 16:26:09 +00:00
|
|
|
|
#: pkg/invoices.go:514
|
2023-02-12 20:06:48 +00:00
|
|
|
|
msgid "Discount must be a percentage between 0 and 100."
|
|
|
|
|
msgstr "El descuento tiene que ser un percentage entre 0 y 100."
|
|
|
|
|
|
2023-02-22 13:39:38 +00:00
|
|
|
|
#: pkg/contacts.go:143
|
2023-02-03 12:29:10 +00:00
|
|
|
|
msgctxt "input"
|
|
|
|
|
msgid "Business name"
|
|
|
|
|
msgstr "Nombre y apellidos"
|
|
|
|
|
|
2023-02-22 13:39:38 +00:00
|
|
|
|
#: pkg/contacts.go:152
|
2023-02-03 12:29:10 +00:00
|
|
|
|
msgctxt "input"
|
|
|
|
|
msgid "VAT number"
|
|
|
|
|
msgstr "DNI / NIF"
|
|
|
|
|
|
2023-02-22 13:39:38 +00:00
|
|
|
|
#: pkg/contacts.go:158
|
2023-02-03 12:29:10 +00:00
|
|
|
|
msgctxt "input"
|
|
|
|
|
msgid "Trade name"
|
|
|
|
|
msgstr "Nombre comercial"
|
|
|
|
|
|
2023-02-22 13:39:38 +00:00
|
|
|
|
#: pkg/contacts.go:163
|
2023-02-03 12:29:10 +00:00
|
|
|
|
msgctxt "input"
|
|
|
|
|
msgid "Phone"
|
|
|
|
|
msgstr "Teléfono"
|
|
|
|
|
|
2023-02-22 13:39:38 +00:00
|
|
|
|
#: pkg/contacts.go:181
|
2023-02-03 12:29:10 +00:00
|
|
|
|
msgctxt "input"
|
|
|
|
|
msgid "Web"
|
|
|
|
|
msgstr "Web"
|
|
|
|
|
|
2023-02-22 13:39:38 +00:00
|
|
|
|
#: pkg/contacts.go:189
|
2023-02-03 12:29:10 +00:00
|
|
|
|
msgctxt "input"
|
|
|
|
|
msgid "Address"
|
|
|
|
|
msgstr "Dirección"
|
|
|
|
|
|
2023-02-22 13:39:38 +00:00
|
|
|
|
#: pkg/contacts.go:198
|
2023-02-03 12:29:10 +00:00
|
|
|
|
msgctxt "input"
|
|
|
|
|
msgid "City"
|
|
|
|
|
msgstr "Población"
|
|
|
|
|
|
2023-02-22 13:39:38 +00:00
|
|
|
|
#: pkg/contacts.go:204
|
2023-02-03 12:29:10 +00:00
|
|
|
|
msgctxt "input"
|
|
|
|
|
msgid "Province"
|
|
|
|
|
msgstr "Provincia"
|
|
|
|
|
|
2023-02-22 13:39:38 +00:00
|
|
|
|
#: pkg/contacts.go:210
|
2023-02-03 12:29:10 +00:00
|
|
|
|
msgctxt "input"
|
|
|
|
|
msgid "Postal code"
|
|
|
|
|
msgstr "Código postal"
|
|
|
|
|
|
2023-02-22 13:39:38 +00:00
|
|
|
|
#: pkg/contacts.go:219
|
2023-02-08 12:47:36 +00:00
|
|
|
|
msgctxt "input"
|
|
|
|
|
msgid "Country"
|
|
|
|
|
msgstr "País"
|
|
|
|
|
|
2023-02-22 13:39:38 +00:00
|
|
|
|
#: pkg/contacts.go:252
|
2023-02-08 12:47:36 +00:00
|
|
|
|
msgid "Selected country is not valid."
|
|
|
|
|
msgstr "Habéis escogido un país que no es válido."
|
|
|
|
|
|
2023-02-22 13:39:38 +00:00
|
|
|
|
#: pkg/contacts.go:256
|
2023-02-03 12:29:10 +00:00
|
|
|
|
msgid "Business name can not be empty."
|
|
|
|
|
msgstr "No podéis dejar el nombre y los apellidos en blanco."
|
|
|
|
|
|
2023-02-22 13:39:38 +00:00
|
|
|
|
#: pkg/contacts.go:257
|
2023-02-03 12:29:10 +00:00
|
|
|
|
msgid "VAT number can not be empty."
|
|
|
|
|
msgstr "No podéis dejar el DNI o NIF en blanco."
|
|
|
|
|
|
2023-02-22 13:39:38 +00:00
|
|
|
|
#: pkg/contacts.go:258
|
2023-02-03 12:29:10 +00:00
|
|
|
|
msgid "This value is not a valid VAT number."
|
|
|
|
|
msgstr "Este valor no es un DNI o NIF válido."
|
|
|
|
|
|
2023-02-22 13:39:38 +00:00
|
|
|
|
#: pkg/contacts.go:260
|
2023-02-03 12:29:10 +00:00
|
|
|
|
msgid "Phone can not be empty."
|
|
|
|
|
msgstr "No podéis dejar el teléfono en blanco."
|
|
|
|
|
|
2023-02-22 13:39:38 +00:00
|
|
|
|
#: pkg/contacts.go:261
|
2023-02-03 12:29:10 +00:00
|
|
|
|
msgid "This value is not a valid phone number."
|
|
|
|
|
msgstr "Este valor no es un teléfono válido."
|
|
|
|
|
|
2023-02-22 13:39:38 +00:00
|
|
|
|
#: pkg/contacts.go:267
|
2023-02-03 12:29:10 +00:00
|
|
|
|
msgid "This value is not a valid web address. It should be like https://domain.com/."
|
|
|
|
|
msgstr "Este valor no es una dirección web válida. Tiene que ser parecida a https://dominio.es/."
|
|
|
|
|
|
2023-02-22 13:39:38 +00:00
|
|
|
|
#: pkg/contacts.go:269
|
2023-02-03 12:29:10 +00:00
|
|
|
|
msgid "Address can not be empty."
|
|
|
|
|
msgstr "No podéis dejar la dirección en blanco."
|
|
|
|
|
|
2023-02-22 13:39:38 +00:00
|
|
|
|
#: pkg/contacts.go:270
|
2023-02-03 12:29:10 +00:00
|
|
|
|
msgid "City can not be empty."
|
|
|
|
|
msgstr "No podéis dejar la población en blanco."
|
|
|
|
|
|
2023-02-22 13:39:38 +00:00
|
|
|
|
#: pkg/contacts.go:271
|
2023-02-03 12:29:10 +00:00
|
|
|
|
msgid "Province can not be empty."
|
|
|
|
|
msgstr "No podéis dejar la provincia en blanco."
|
|
|
|
|
|
2023-02-22 13:39:38 +00:00
|
|
|
|
#: pkg/contacts.go:272
|
2023-02-03 12:29:10 +00:00
|
|
|
|
msgid "Postal code can not be empty."
|
|
|
|
|
msgstr "No podéis dejar el código postal en blanco."
|
|
|
|
|
|
2023-02-22 13:39:38 +00:00
|
|
|
|
#: pkg/contacts.go:273
|
2023-02-03 12:29:10 +00:00
|
|
|
|
msgid "This value is not a valid postal code."
|
|
|
|
|
msgstr "Este valor no es un código postal válido válido."
|
|
|
|
|
|
2023-02-08 12:47:36 +00:00
|
|
|
|
#~ msgid "Select a tax for this product."
|
|
|
|
|
#~ msgstr "Escoged un impuesto para este producto."
|
2023-02-03 12:29:10 +00:00
|
|
|
|
|
2023-02-04 10:32:39 +00:00
|
|
|
|
#~ msgctxt "input"
|
2023-02-08 12:47:36 +00:00
|
|
|
|
#~ msgid "Tax"
|
|
|
|
|
#~ msgstr "Impuesto"
|
2023-02-04 10:32:39 +00:00
|
|
|
|
|
2023-02-01 09:14:26 +00:00
|
|
|
|
#~ msgctxt "nav"
|
|
|
|
|
#~ msgid "Customers"
|
|
|
|
|
#~ msgstr "Clientes"
|
|
|
|
|
|
|
|
|
|
#~ msgctxt "title"
|
|
|
|
|
#~ msgid "Customers"
|
|
|
|
|
#~ msgstr "Clientes"
|
|
|
|
|
|
|
|
|
|
#~ msgid "No customers added yet."
|
|
|
|
|
#~ msgstr "No hay clientes."
|