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"
|
2023-01-30 15:48:21 +00:00
|
|
|
"POT-Creation-Date: 2023-01-30 16:46+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-01-30 15:48:21 +00:00
|
|
|
#: web/template/web.gohtml:6 web/template/login.gohtml:9
|
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"
|
|
|
|
msgid "Login"
|
|
|
|
msgstr "Entrada"
|
|
|
|
|
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"
|
|
|
|
|
|
|
|
#: web/template/app.gohtml:33
|
|
|
|
msgctxt "action"
|
|
|
|
msgid "Logout"
|
|
|
|
msgstr "Salir"
|
|
|
|
|
|
|
|
#: web/template/app.gohtml:42
|
|
|
|
msgctxt "nav"
|
|
|
|
msgid "Customers"
|
|
|
|
msgstr "Clientes"
|
|
|
|
|
|
|
|
#: web/template/login.gohtml:5
|
|
|
|
msgid "Invalid user or password"
|
|
|
|
msgstr "Nombre de usuario o contraseña inválido"
|
|
|
|
|
|
|
|
#: web/template/login.gohtml:13 web/template/profile.gohtml:15
|
|
|
|
#: web/template/tax-details.gohtml:23 web/template/contacts-new.gohtml:23
|
|
|
|
msgctxt "input"
|
|
|
|
msgid "Email"
|
|
|
|
msgstr "Correo-e"
|
|
|
|
|
|
|
|
#: web/template/login.gohtml:18 web/template/profile.gohtml:23
|
|
|
|
msgctxt "input"
|
|
|
|
msgid "Password"
|
|
|
|
msgstr "Contraseña"
|
|
|
|
|
|
|
|
#: web/template/login.gohtml:21
|
|
|
|
msgctxt "action"
|
|
|
|
msgid "Login"
|
|
|
|
msgstr "Entrar"
|
|
|
|
|
|
|
|
#: web/template/profile.gohtml:3 pkg/profile.go:29
|
|
|
|
msgctxt "title"
|
|
|
|
msgid "User Settings"
|
|
|
|
msgstr "Configuración usuario"
|
|
|
|
|
|
|
|
#: web/template/profile.gohtml:6
|
|
|
|
msgctxt "title"
|
|
|
|
msgid "User Access Data"
|
|
|
|
msgstr "Datos acceso usuario"
|
|
|
|
|
|
|
|
#: web/template/profile.gohtml:10
|
|
|
|
msgctxt "input"
|
|
|
|
msgid "User name"
|
|
|
|
msgstr "Nombre de usuario"
|
|
|
|
|
|
|
|
#: web/template/profile.gohtml:19
|
|
|
|
msgctxt "title"
|
|
|
|
msgid "Password Change"
|
|
|
|
msgstr "Cambio de contraseña"
|
|
|
|
|
|
|
|
#: web/template/profile.gohtml:28
|
|
|
|
msgctxt "input"
|
|
|
|
msgid "Password Confirmation"
|
|
|
|
msgstr "Confirmación contrasenya"
|
|
|
|
|
|
|
|
#: web/template/profile.gohtml:33
|
|
|
|
msgctxt "input"
|
|
|
|
msgid "Language"
|
|
|
|
msgstr "Idioma"
|
|
|
|
|
|
|
|
#: web/template/profile.gohtml:36
|
|
|
|
msgctxt "language option"
|
|
|
|
msgid "Automatic"
|
|
|
|
msgstr "Automático"
|
|
|
|
|
|
|
|
#: web/template/profile.gohtml:42 web/template/tax-details.gohtml:127
|
|
|
|
msgctxt "action"
|
|
|
|
msgid "Save changes"
|
|
|
|
msgstr "Guardar cambios"
|
|
|
|
|
|
|
|
#: web/template/contacts-index.gohtml:2 web/template/contacts-new.gohtml:56
|
2023-01-30 09:52:22 +00:00
|
|
|
msgctxt "action"
|
|
|
|
msgid "New contact"
|
|
|
|
msgstr "Nuevo contacto"
|
|
|
|
|
2023-01-30 15:48:21 +00:00
|
|
|
#: web/template/contacts-index.gohtml:7
|
2023-01-30 09:52:22 +00:00
|
|
|
msgctxt "contact"
|
|
|
|
msgid "All"
|
|
|
|
msgstr "Todos"
|
|
|
|
|
2023-01-30 15:48:21 +00:00
|
|
|
#: web/template/contacts-index.gohtml:8
|
2023-01-30 09:52:22 +00:00
|
|
|
msgctxt "title"
|
|
|
|
msgid "Customer"
|
|
|
|
msgstr "Cliente"
|
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/contacts-index.gohtml:9
|
2023-01-30 09:52:22 +00:00
|
|
|
msgctxt "title"
|
|
|
|
msgid "Email"
|
|
|
|
msgstr "Correo-e"
|
|
|
|
|
2023-01-30 15:48:21 +00:00
|
|
|
#: web/template/contacts-index.gohtml:10
|
2023-01-30 09:52:22 +00:00
|
|
|
msgctxt "title"
|
|
|
|
msgid "Phone"
|
|
|
|
msgstr "Teléfono"
|
|
|
|
|
2023-01-30 15:48:21 +00:00
|
|
|
#: web/template/contacts-index.gohtml:25
|
2023-01-30 09:52:22 +00:00
|
|
|
msgid "No customers added yet."
|
|
|
|
msgstr "No hay clientes."
|
|
|
|
|
2023-01-30 15:48:21 +00:00
|
|
|
#: web/template/tax-details.gohtml:3 pkg/company.go:108
|
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-01-30 15:48:21 +00:00
|
|
|
#: web/template/tax-details.gohtml:7 web/template/contacts-new.gohtml:7
|
2023-01-30 09:52:22 +00:00
|
|
|
msgctxt "input"
|
|
|
|
msgid "Business name"
|
|
|
|
msgstr "Nombre y apellidos"
|
|
|
|
|
2023-01-30 15:48:21 +00:00
|
|
|
#: web/template/tax-details.gohtml:11 web/template/contacts-new.gohtml:11
|
2023-01-30 09:52:22 +00:00
|
|
|
msgctxt "input"
|
|
|
|
msgid "VAT number"
|
|
|
|
msgstr "DNI / NIF"
|
|
|
|
|
2023-01-30 15:48:21 +00:00
|
|
|
#: web/template/tax-details.gohtml:15 web/template/contacts-new.gohtml:15
|
2023-01-30 09:52:22 +00:00
|
|
|
msgctxt "input"
|
|
|
|
msgid "Trade name"
|
|
|
|
msgstr "Nombre comercial"
|
|
|
|
|
2023-01-30 15:48:21 +00:00
|
|
|
#: web/template/tax-details.gohtml:19 web/template/contacts-new.gohtml:19
|
2023-01-30 09:52:22 +00:00
|
|
|
msgctxt "input"
|
|
|
|
msgid "Phone"
|
|
|
|
msgstr "Teléfono"
|
|
|
|
|
2023-01-30 15:48:21 +00:00
|
|
|
#: web/template/tax-details.gohtml:27 web/template/contacts-new.gohtml:27
|
2023-01-30 09:52:22 +00:00
|
|
|
msgctxt "input"
|
|
|
|
msgid "Web"
|
|
|
|
msgstr "Web"
|
|
|
|
|
2023-01-30 15:48:21 +00:00
|
|
|
#: web/template/tax-details.gohtml:31 web/template/contacts-new.gohtml:31
|
2023-01-30 09:52:22 +00:00
|
|
|
msgctxt "input"
|
|
|
|
msgid "Address"
|
|
|
|
msgstr "Dirección"
|
|
|
|
|
2023-01-30 15:48:21 +00:00
|
|
|
#: web/template/tax-details.gohtml:35 web/template/contacts-new.gohtml:35
|
2023-01-30 09:52:22 +00:00
|
|
|
msgctxt "input"
|
|
|
|
msgid "City"
|
|
|
|
msgstr "Población"
|
|
|
|
|
2023-01-30 15:48:21 +00:00
|
|
|
#: web/template/tax-details.gohtml:39 web/template/contacts-new.gohtml:39
|
2023-01-30 09:52:22 +00:00
|
|
|
msgctxt "input"
|
|
|
|
msgid "Province"
|
|
|
|
msgstr "Provincia"
|
|
|
|
|
2023-01-30 15:48:21 +00:00
|
|
|
#: web/template/tax-details.gohtml:43 web/template/contacts-new.gohtml:43
|
2023-01-30 09:52:22 +00:00
|
|
|
msgctxt "input"
|
|
|
|
msgid "Postal code"
|
|
|
|
msgstr "Código postal"
|
|
|
|
|
2023-01-30 15:48:21 +00:00
|
|
|
#: web/template/tax-details.gohtml:52 web/template/contacts-new.gohtml:52
|
2023-01-30 09:52:22 +00:00
|
|
|
msgctxt "input"
|
|
|
|
msgid "Country"
|
|
|
|
msgstr "País"
|
|
|
|
|
2023-01-30 15:48:21 +00:00
|
|
|
#: web/template/tax-details.gohtml:56
|
2023-01-28 11:24:52 +00:00
|
|
|
msgctxt "input"
|
|
|
|
msgid "Currency"
|
|
|
|
msgstr "Moneda"
|
|
|
|
|
2023-01-30 15:48:21 +00:00
|
|
|
#: web/template/tax-details.gohtml:74
|
2023-01-28 13:18:58 +00:00
|
|
|
msgctxt "title"
|
|
|
|
msgid "Tax Name"
|
|
|
|
msgstr "Nombre impuesto"
|
|
|
|
|
2023-01-30 15:48:21 +00:00
|
|
|
#: web/template/tax-details.gohtml:75
|
2023-01-28 13:18:58 +00:00
|
|
|
msgctxt "title"
|
|
|
|
msgid "Rate (%)"
|
|
|
|
msgstr "Porcentage"
|
|
|
|
|
2023-01-30 15:48:21 +00:00
|
|
|
#: web/template/tax-details.gohtml:96
|
2023-01-28 13:18:58 +00:00
|
|
|
msgid "No taxes added yet."
|
|
|
|
msgstr "No hay impuestos."
|
|
|
|
|
2023-01-30 15:48:21 +00:00
|
|
|
#: web/template/tax-details.gohtml:102
|
2023-01-28 13:18:58 +00:00
|
|
|
msgctxt "title"
|
|
|
|
msgid "New Line"
|
|
|
|
msgstr "Nueva línea"
|
|
|
|
|
2023-01-30 15:48:21 +00:00
|
|
|
#: web/template/tax-details.gohtml:106
|
2023-01-28 13:18:58 +00:00
|
|
|
msgctxt "input"
|
|
|
|
msgid "Tax name"
|
|
|
|
msgstr "Nombre impuesto"
|
|
|
|
|
2023-01-30 15:48:21 +00:00
|
|
|
#: web/template/tax-details.gohtml:112
|
2023-01-28 13:18:58 +00:00
|
|
|
msgctxt "input"
|
|
|
|
msgid "Rate (%)"
|
|
|
|
msgstr "Porcentage"
|
|
|
|
|
2023-01-30 15:48:21 +00:00
|
|
|
#: web/template/tax-details.gohtml:119
|
2023-01-28 13:18:58 +00:00
|
|
|
msgctxt "action"
|
|
|
|
msgid "Add new tax"
|
|
|
|
msgstr "Añadir nuevo impuesto"
|
|
|
|
|
2023-01-30 15:48:21 +00:00
|
|
|
#: web/template/contacts-new.gohtml:3 pkg/contacts.go:95
|
|
|
|
msgctxt "title"
|
|
|
|
msgid "New Contact"
|
|
|
|
msgstr "Nuevo contacto"
|
2023-01-30 09:52:22 +00:00
|
|
|
|
|
|
|
#: pkg/contacts.go:43
|
|
|
|
msgctxt "title"
|
|
|
|
msgid "Customers"
|
|
|
|
msgstr "Clientes"
|