Move page titles to their respective templates
I have been thinking about that, and it does not make that much sense to have the titles in the Go source anymore: most of them are static text that i have to remember to set in the controller each time, and when the time come i have to face a dynamic title i am sure i will manage with only the template capabilities—worst comes worst, i can always define a function. On the other hand, there is no way i can define a template without its title and i know that everytime that template is used, no matter what controller rendered it, it will always have that title.
This commit is contained in:
parent
586db8d553
commit
9aee33511a
|
@ -83,7 +83,6 @@ type Tax struct {
|
||||||
}
|
}
|
||||||
|
|
||||||
type TaxDetailsPage struct {
|
type TaxDetailsPage struct {
|
||||||
Title string
|
|
||||||
BusinessName string
|
BusinessName string
|
||||||
VATIN string
|
VATIN string
|
||||||
TradeName string
|
TradeName string
|
||||||
|
@ -104,9 +103,7 @@ type TaxDetailsPage struct {
|
||||||
func CompanyTaxDetailsHandler() http.Handler {
|
func CompanyTaxDetailsHandler() http.Handler {
|
||||||
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
||||||
locale := getLocale(r)
|
locale := getLocale(r)
|
||||||
page := &TaxDetailsPage{
|
page := &TaxDetailsPage{}
|
||||||
Title: pgettext("title", "Tax Details", locale),
|
|
||||||
}
|
|
||||||
company := mustGetCompany(r)
|
company := mustGetCompany(r)
|
||||||
conn := getConn(r)
|
conn := getConn(r)
|
||||||
if r.Method == "POST" {
|
if r.Method == "POST" {
|
||||||
|
|
|
@ -12,7 +12,6 @@ type ContactEntry struct {
|
||||||
}
|
}
|
||||||
|
|
||||||
type ContactsIndexPage struct {
|
type ContactsIndexPage struct {
|
||||||
Title string
|
|
||||||
Contacts []*ContactEntry
|
Contacts []*ContactEntry
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -38,9 +37,7 @@ func ContactsHandler() http.Handler {
|
||||||
conn.MustExec(r.Context(), "insert into contact (company_id, business_name, vatin, trade_name, phone, email, web, address, province, city, postal_code, country_code) values ($1, $2, ($12 || $3)::vatin, $4, parse_packed_phone_number($5, $12), $6, $7, $8, $9, $10, $11, $12)", company.Id, page.BusinessName, page.VATIN, page.TradeName, page.Phone, page.Email, page.Web, page.Address, page.City, page.Province, page.PostalCode, page.CountryCode)
|
conn.MustExec(r.Context(), "insert into contact (company_id, business_name, vatin, trade_name, phone, email, web, address, province, city, postal_code, country_code) values ($1, $2, ($12 || $3)::vatin, $4, parse_packed_phone_number($5, $12), $6, $7, $8, $9, $10, $11, $12)", company.Id, page.BusinessName, page.VATIN, page.TradeName, page.Phone, page.Email, page.Web, page.Address, page.City, page.Province, page.PostalCode, page.CountryCode)
|
||||||
http.Redirect(w, r, "/company/"+company.Slug+"/contacts", http.StatusSeeOther)
|
http.Redirect(w, r, "/company/"+company.Slug+"/contacts", http.StatusSeeOther)
|
||||||
} else {
|
} else {
|
||||||
locale := getLocale(r)
|
|
||||||
page := &ContactsIndexPage{
|
page := &ContactsIndexPage{
|
||||||
Title: pgettext("title", "Customers", locale),
|
|
||||||
Contacts: mustGetContactEntries(r.Context(), conn, company),
|
Contacts: mustGetContactEntries(r.Context(), conn, company),
|
||||||
}
|
}
|
||||||
mustRenderAppTemplate(w, r, "contacts-index.gohtml", page)
|
mustRenderAppTemplate(w, r, "contacts-index.gohtml", page)
|
||||||
|
@ -72,7 +69,6 @@ func mustGetContactEntries(ctx context.Context, conn *Conn, company *Company) []
|
||||||
}
|
}
|
||||||
|
|
||||||
type NewContactPage struct {
|
type NewContactPage struct {
|
||||||
Title string
|
|
||||||
BusinessName string
|
BusinessName string
|
||||||
VATIN string
|
VATIN string
|
||||||
TradeName string
|
TradeName string
|
||||||
|
@ -92,7 +88,6 @@ func NewContactHandler() http.Handler {
|
||||||
locale := getLocale(r)
|
locale := getLocale(r)
|
||||||
conn := getConn(r)
|
conn := getConn(r)
|
||||||
page := &NewContactPage{
|
page := &NewContactPage{
|
||||||
Title: pgettext("title", "New Contact", locale),
|
|
||||||
CountryCode: "ES",
|
CountryCode: "ES",
|
||||||
Countries: mustGetCountryOptions(r.Context(), conn, locale),
|
Countries: mustGetCountryOptions(r.Context(), conn, locale),
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,7 +11,6 @@ type LanguageOption struct {
|
||||||
}
|
}
|
||||||
|
|
||||||
type ProfilePage struct {
|
type ProfilePage struct {
|
||||||
Title string
|
|
||||||
Name string
|
Name string
|
||||||
Email string
|
Email string
|
||||||
Password string
|
Password string
|
||||||
|
@ -24,9 +23,7 @@ func ProfileHandler() http.Handler {
|
||||||
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
||||||
user := getUser(r)
|
user := getUser(r)
|
||||||
conn := getConn(r)
|
conn := getConn(r)
|
||||||
locale := getLocale(r)
|
|
||||||
page := ProfilePage{
|
page := ProfilePage{
|
||||||
Title: pgettext("title", "User Settings", locale),
|
|
||||||
Email: user.Email,
|
Email: user.Email,
|
||||||
Language: user.Language.String(),
|
Language: user.Language.String(),
|
||||||
}
|
}
|
||||||
|
|
101
po/ca.po
101
po/ca.po
|
@ -8,7 +8,7 @@ msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: numerus\n"
|
"Project-Id-Version: numerus\n"
|
||||||
"Report-Msgid-Bugs-To: jordi@tandem.blog\n"
|
"Report-Msgid-Bugs-To: jordi@tandem.blog\n"
|
||||||
"POT-Creation-Date: 2023-01-30 16:46+0100\n"
|
"POT-Creation-Date: 2023-01-31 12:59+0100\n"
|
||||||
"PO-Revision-Date: 2023-01-18 17:08+0100\n"
|
"PO-Revision-Date: 2023-01-18 17:08+0100\n"
|
||||||
"Last-Translator: jordi fita mas <jordi@tandem.blog>\n"
|
"Last-Translator: jordi fita mas <jordi@tandem.blog>\n"
|
||||||
"Language-Team: Catalan <ca@dodds.net>\n"
|
"Language-Team: Catalan <ca@dodds.net>\n"
|
||||||
|
@ -17,10 +17,10 @@ msgstr ""
|
||||||
"Content-Type: text/plain; charset=UTF-8\n"
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
"Content-Transfer-Encoding: 8bit\n"
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
|
|
||||||
#: web/template/web.gohtml:6 web/template/login.gohtml:9
|
#: web/template/dashboard.gohtml:2
|
||||||
msgctxt "title"
|
msgctxt "title"
|
||||||
msgid "Login"
|
msgid "Dashboard"
|
||||||
msgstr "Entrada"
|
msgstr "Tauler"
|
||||||
|
|
||||||
#: web/template/app.gohtml:20
|
#: web/template/app.gohtml:20
|
||||||
msgctxt "menu"
|
msgctxt "menu"
|
||||||
|
@ -42,195 +42,200 @@ msgctxt "nav"
|
||||||
msgid "Customers"
|
msgid "Customers"
|
||||||
msgstr "Clients"
|
msgstr "Clients"
|
||||||
|
|
||||||
#: web/template/login.gohtml:5
|
#: web/template/login.gohtml:2 web/template/login.gohtml:13
|
||||||
|
msgctxt "title"
|
||||||
|
msgid "Login"
|
||||||
|
msgstr "Entrada"
|
||||||
|
|
||||||
|
#: web/template/login.gohtml:9
|
||||||
msgid "Invalid user or password"
|
msgid "Invalid user or password"
|
||||||
msgstr "Nom d’usuari o contrasenya incorrectes"
|
msgstr "Nom d’usuari o contrasenya incorrectes"
|
||||||
|
|
||||||
#: web/template/login.gohtml:13 web/template/profile.gohtml:15
|
#: web/template/login.gohtml:17 web/template/profile.gohtml:19
|
||||||
#: web/template/tax-details.gohtml:23 web/template/contacts-new.gohtml:23
|
#: web/template/tax-details.gohtml:27 web/template/contacts-new.gohtml:27
|
||||||
msgctxt "input"
|
msgctxt "input"
|
||||||
msgid "Email"
|
msgid "Email"
|
||||||
msgstr "Correu-e"
|
msgstr "Correu-e"
|
||||||
|
|
||||||
#: web/template/login.gohtml:18 web/template/profile.gohtml:23
|
#: web/template/login.gohtml:22 web/template/profile.gohtml:27
|
||||||
msgctxt "input"
|
msgctxt "input"
|
||||||
msgid "Password"
|
msgid "Password"
|
||||||
msgstr "Contrasenya"
|
msgstr "Contrasenya"
|
||||||
|
|
||||||
#: web/template/login.gohtml:21
|
#: web/template/login.gohtml:25
|
||||||
msgctxt "action"
|
msgctxt "action"
|
||||||
msgid "Login"
|
msgid "Login"
|
||||||
msgstr "Entra"
|
msgstr "Entra"
|
||||||
|
|
||||||
#: web/template/profile.gohtml:3 pkg/profile.go:29
|
#: web/template/profile.gohtml:2 web/template/profile.gohtml:7
|
||||||
msgctxt "title"
|
msgctxt "title"
|
||||||
msgid "User Settings"
|
msgid "User Settings"
|
||||||
msgstr "Configuració usuari"
|
msgstr "Configuració usuari"
|
||||||
|
|
||||||
#: web/template/profile.gohtml:6
|
#: web/template/profile.gohtml:10
|
||||||
msgctxt "title"
|
msgctxt "title"
|
||||||
msgid "User Access Data"
|
msgid "User Access Data"
|
||||||
msgstr "Dades accés usuari"
|
msgstr "Dades accés usuari"
|
||||||
|
|
||||||
#: web/template/profile.gohtml:10
|
#: web/template/profile.gohtml:14
|
||||||
msgctxt "input"
|
msgctxt "input"
|
||||||
msgid "User name"
|
msgid "User name"
|
||||||
msgstr "Nom d’usuari"
|
msgstr "Nom d’usuari"
|
||||||
|
|
||||||
#: web/template/profile.gohtml:19
|
#: web/template/profile.gohtml:23
|
||||||
msgctxt "title"
|
msgctxt "title"
|
||||||
msgid "Password Change"
|
msgid "Password Change"
|
||||||
msgstr "Canvi contrasenya"
|
msgstr "Canvi contrasenya"
|
||||||
|
|
||||||
#: web/template/profile.gohtml:28
|
#: web/template/profile.gohtml:32
|
||||||
msgctxt "input"
|
msgctxt "input"
|
||||||
msgid "Password Confirmation"
|
msgid "Password Confirmation"
|
||||||
msgstr "Confirmació contrasenya"
|
msgstr "Confirmació contrasenya"
|
||||||
|
|
||||||
#: web/template/profile.gohtml:33
|
#: web/template/profile.gohtml:37
|
||||||
msgctxt "input"
|
msgctxt "input"
|
||||||
msgid "Language"
|
msgid "Language"
|
||||||
msgstr "Idioma"
|
msgstr "Idioma"
|
||||||
|
|
||||||
#: web/template/profile.gohtml:36
|
#: web/template/profile.gohtml:40
|
||||||
msgctxt "language option"
|
msgctxt "language option"
|
||||||
msgid "Automatic"
|
msgid "Automatic"
|
||||||
msgstr "Automàtic"
|
msgstr "Automàtic"
|
||||||
|
|
||||||
#: web/template/profile.gohtml:42 web/template/tax-details.gohtml:127
|
#: web/template/profile.gohtml:46 web/template/tax-details.gohtml:133
|
||||||
msgctxt "action"
|
msgctxt "action"
|
||||||
msgid "Save changes"
|
msgid "Save changes"
|
||||||
msgstr "Desa canvis"
|
msgstr "Desa canvis"
|
||||||
|
|
||||||
#: web/template/contacts-index.gohtml:2 web/template/contacts-new.gohtml:56
|
#: web/template/contacts-index.gohtml:2
|
||||||
|
msgctxt "title"
|
||||||
|
msgid "Customers"
|
||||||
|
msgstr "Clients"
|
||||||
|
|
||||||
|
#: web/template/contacts-index.gohtml:6 web/template/contacts-new.gohtml:60
|
||||||
msgctxt "action"
|
msgctxt "action"
|
||||||
msgid "New contact"
|
msgid "New contact"
|
||||||
msgstr "Nou contacte"
|
msgstr "Nou contacte"
|
||||||
|
|
||||||
#: web/template/contacts-index.gohtml:7
|
#: web/template/contacts-index.gohtml:11
|
||||||
msgctxt "contact"
|
msgctxt "contact"
|
||||||
msgid "All"
|
msgid "All"
|
||||||
msgstr "Tots"
|
msgstr "Tots"
|
||||||
|
|
||||||
#: web/template/contacts-index.gohtml:8
|
#: web/template/contacts-index.gohtml:12
|
||||||
msgctxt "title"
|
msgctxt "title"
|
||||||
msgid "Customer"
|
msgid "Customer"
|
||||||
msgstr "Client"
|
msgstr "Client"
|
||||||
|
|
||||||
#: web/template/contacts-index.gohtml:9
|
#: web/template/contacts-index.gohtml:13
|
||||||
msgctxt "title"
|
msgctxt "title"
|
||||||
msgid "Email"
|
msgid "Email"
|
||||||
msgstr "Correu-e"
|
msgstr "Correu-e"
|
||||||
|
|
||||||
#: web/template/contacts-index.gohtml:10
|
#: web/template/contacts-index.gohtml:14
|
||||||
msgctxt "title"
|
msgctxt "title"
|
||||||
msgid "Phone"
|
msgid "Phone"
|
||||||
msgstr "Telèfon"
|
msgstr "Telèfon"
|
||||||
|
|
||||||
#: web/template/contacts-index.gohtml:25
|
#: web/template/contacts-index.gohtml:29
|
||||||
msgid "No customers added yet."
|
msgid "No customers added yet."
|
||||||
msgstr "No hi ha cap client."
|
msgstr "No hi ha cap client."
|
||||||
|
|
||||||
#: web/template/tax-details.gohtml:3 pkg/company.go:108
|
#: web/template/tax-details.gohtml:2 web/template/tax-details.gohtml:7
|
||||||
msgctxt "title"
|
msgctxt "title"
|
||||||
msgid "Tax Details"
|
msgid "Tax Details"
|
||||||
msgstr "Configuració fiscal"
|
msgstr "Configuració fiscal"
|
||||||
|
|
||||||
#: web/template/tax-details.gohtml:7 web/template/contacts-new.gohtml:7
|
#: web/template/tax-details.gohtml:11 web/template/contacts-new.gohtml:11
|
||||||
msgctxt "input"
|
msgctxt "input"
|
||||||
msgid "Business name"
|
msgid "Business name"
|
||||||
msgstr "Nom i cognom"
|
msgstr "Nom i cognom"
|
||||||
|
|
||||||
#: web/template/tax-details.gohtml:11 web/template/contacts-new.gohtml:11
|
#: web/template/tax-details.gohtml:15 web/template/contacts-new.gohtml:15
|
||||||
msgctxt "input"
|
msgctxt "input"
|
||||||
msgid "VAT number"
|
msgid "VAT number"
|
||||||
msgstr "DNI / NIF"
|
msgstr "DNI / NIF"
|
||||||
|
|
||||||
#: web/template/tax-details.gohtml:15 web/template/contacts-new.gohtml:15
|
#: web/template/tax-details.gohtml:19 web/template/contacts-new.gohtml:19
|
||||||
msgctxt "input"
|
msgctxt "input"
|
||||||
msgid "Trade name"
|
msgid "Trade name"
|
||||||
msgstr "Nom comercial"
|
msgstr "Nom comercial"
|
||||||
|
|
||||||
#: web/template/tax-details.gohtml:19 web/template/contacts-new.gohtml:19
|
#: web/template/tax-details.gohtml:23 web/template/contacts-new.gohtml:23
|
||||||
msgctxt "input"
|
msgctxt "input"
|
||||||
msgid "Phone"
|
msgid "Phone"
|
||||||
msgstr "Telèfon"
|
msgstr "Telèfon"
|
||||||
|
|
||||||
#: web/template/tax-details.gohtml:27 web/template/contacts-new.gohtml:27
|
#: web/template/tax-details.gohtml:31 web/template/contacts-new.gohtml:31
|
||||||
msgctxt "input"
|
msgctxt "input"
|
||||||
msgid "Web"
|
msgid "Web"
|
||||||
msgstr "Web"
|
msgstr "Web"
|
||||||
|
|
||||||
#: web/template/tax-details.gohtml:31 web/template/contacts-new.gohtml:31
|
#: web/template/tax-details.gohtml:35 web/template/contacts-new.gohtml:35
|
||||||
msgctxt "input"
|
msgctxt "input"
|
||||||
msgid "Address"
|
msgid "Address"
|
||||||
msgstr "Adreça"
|
msgstr "Adreça"
|
||||||
|
|
||||||
#: web/template/tax-details.gohtml:35 web/template/contacts-new.gohtml:35
|
#: web/template/tax-details.gohtml:39 web/template/contacts-new.gohtml:39
|
||||||
msgctxt "input"
|
msgctxt "input"
|
||||||
msgid "City"
|
msgid "City"
|
||||||
msgstr "Població"
|
msgstr "Població"
|
||||||
|
|
||||||
#: web/template/tax-details.gohtml:39 web/template/contacts-new.gohtml:39
|
#: web/template/tax-details.gohtml:43 web/template/contacts-new.gohtml:43
|
||||||
msgctxt "input"
|
msgctxt "input"
|
||||||
msgid "Province"
|
msgid "Province"
|
||||||
msgstr "Província"
|
msgstr "Província"
|
||||||
|
|
||||||
#: web/template/tax-details.gohtml:43 web/template/contacts-new.gohtml:43
|
#: web/template/tax-details.gohtml:47 web/template/contacts-new.gohtml:47
|
||||||
msgctxt "input"
|
msgctxt "input"
|
||||||
msgid "Postal code"
|
msgid "Postal code"
|
||||||
msgstr "Codi postal"
|
msgstr "Codi postal"
|
||||||
|
|
||||||
#: web/template/tax-details.gohtml:52 web/template/contacts-new.gohtml:52
|
#: web/template/tax-details.gohtml:56 web/template/contacts-new.gohtml:56
|
||||||
msgctxt "input"
|
msgctxt "input"
|
||||||
msgid "Country"
|
msgid "Country"
|
||||||
msgstr "País"
|
msgstr "País"
|
||||||
|
|
||||||
#: web/template/tax-details.gohtml:56
|
#: web/template/tax-details.gohtml:60
|
||||||
msgctxt "input"
|
msgctxt "input"
|
||||||
msgid "Currency"
|
msgid "Currency"
|
||||||
msgstr "Moneda"
|
msgstr "Moneda"
|
||||||
|
|
||||||
#: web/template/tax-details.gohtml:74
|
#: web/template/tax-details.gohtml:78
|
||||||
msgctxt "title"
|
msgctxt "title"
|
||||||
msgid "Tax Name"
|
msgid "Tax Name"
|
||||||
msgstr "Nom import"
|
msgstr "Nom import"
|
||||||
|
|
||||||
#: web/template/tax-details.gohtml:75
|
#: web/template/tax-details.gohtml:79
|
||||||
msgctxt "title"
|
msgctxt "title"
|
||||||
msgid "Rate (%)"
|
msgid "Rate (%)"
|
||||||
msgstr "Percentatge"
|
msgstr "Percentatge"
|
||||||
|
|
||||||
#: web/template/tax-details.gohtml:96
|
#: web/template/tax-details.gohtml:100
|
||||||
msgid "No taxes added yet."
|
msgid "No taxes added yet."
|
||||||
msgstr "No hi ha cap impost."
|
msgstr "No hi ha cap impost."
|
||||||
|
|
||||||
#: web/template/tax-details.gohtml:102
|
#: web/template/tax-details.gohtml:106
|
||||||
msgctxt "title"
|
msgctxt "title"
|
||||||
msgid "New Line"
|
msgid "New Line"
|
||||||
msgstr "Nova línia"
|
msgstr "Nova línia"
|
||||||
|
|
||||||
#: web/template/tax-details.gohtml:106
|
#: web/template/tax-details.gohtml:111
|
||||||
msgctxt "input"
|
msgctxt "input"
|
||||||
msgid "Tax name"
|
msgid "Tax name"
|
||||||
msgstr "Nom impost"
|
msgstr "Nom impost"
|
||||||
|
|
||||||
#: web/template/tax-details.gohtml:112
|
#: web/template/tax-details.gohtml:118
|
||||||
msgctxt "input"
|
msgctxt "input"
|
||||||
msgid "Rate (%)"
|
msgid "Rate (%)"
|
||||||
msgstr "Percentatge"
|
msgstr "Percentatge"
|
||||||
|
|
||||||
#: web/template/tax-details.gohtml:119
|
#: web/template/tax-details.gohtml:125
|
||||||
msgctxt "action"
|
msgctxt "action"
|
||||||
msgid "Add new tax"
|
msgid "Add new tax"
|
||||||
msgstr "Afegeix nou impost"
|
msgstr "Afegeix nou impost"
|
||||||
|
|
||||||
#: web/template/contacts-new.gohtml:3 pkg/contacts.go:95
|
#: web/template/contacts-new.gohtml:2 web/template/contacts-new.gohtml:7
|
||||||
msgctxt "title"
|
msgctxt "title"
|
||||||
msgid "New Contact"
|
msgid "New Contact"
|
||||||
msgstr "Nou contacte"
|
msgstr "Nou contacte"
|
||||||
|
|
||||||
#: pkg/contacts.go:43
|
|
||||||
msgctxt "title"
|
|
||||||
msgid "Customers"
|
|
||||||
msgstr "Clients"
|
|
||||||
|
|
101
po/es.po
101
po/es.po
|
@ -7,7 +7,7 @@ msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: numerus\n"
|
"Project-Id-Version: numerus\n"
|
||||||
"Report-Msgid-Bugs-To: jordi@tandem.blog\n"
|
"Report-Msgid-Bugs-To: jordi@tandem.blog\n"
|
||||||
"POT-Creation-Date: 2023-01-30 16:46+0100\n"
|
"POT-Creation-Date: 2023-01-31 12:59+0100\n"
|
||||||
"PO-Revision-Date: 2023-01-18 17:45+0100\n"
|
"PO-Revision-Date: 2023-01-18 17:45+0100\n"
|
||||||
"Last-Translator: jordi fita mas <jordi@tandem.blog>\n"
|
"Last-Translator: jordi fita mas <jordi@tandem.blog>\n"
|
||||||
"Language-Team: Spanish <es@tp.org.es>\n"
|
"Language-Team: Spanish <es@tp.org.es>\n"
|
||||||
|
@ -17,10 +17,10 @@ msgstr ""
|
||||||
"Content-Transfer-Encoding: 8bit\n"
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||||
|
|
||||||
#: web/template/web.gohtml:6 web/template/login.gohtml:9
|
#: web/template/dashboard.gohtml:2
|
||||||
msgctxt "title"
|
msgctxt "title"
|
||||||
msgid "Login"
|
msgid "Dashboard"
|
||||||
msgstr "Entrada"
|
msgstr "Panel"
|
||||||
|
|
||||||
#: web/template/app.gohtml:20
|
#: web/template/app.gohtml:20
|
||||||
msgctxt "menu"
|
msgctxt "menu"
|
||||||
|
@ -42,195 +42,200 @@ msgctxt "nav"
|
||||||
msgid "Customers"
|
msgid "Customers"
|
||||||
msgstr "Clientes"
|
msgstr "Clientes"
|
||||||
|
|
||||||
#: web/template/login.gohtml:5
|
#: web/template/login.gohtml:2 web/template/login.gohtml:13
|
||||||
|
msgctxt "title"
|
||||||
|
msgid "Login"
|
||||||
|
msgstr "Entrada"
|
||||||
|
|
||||||
|
#: web/template/login.gohtml:9
|
||||||
msgid "Invalid user or password"
|
msgid "Invalid user or password"
|
||||||
msgstr "Nombre de usuario o contraseña inválido"
|
msgstr "Nombre de usuario o contraseña inválido"
|
||||||
|
|
||||||
#: web/template/login.gohtml:13 web/template/profile.gohtml:15
|
#: web/template/login.gohtml:17 web/template/profile.gohtml:19
|
||||||
#: web/template/tax-details.gohtml:23 web/template/contacts-new.gohtml:23
|
#: web/template/tax-details.gohtml:27 web/template/contacts-new.gohtml:27
|
||||||
msgctxt "input"
|
msgctxt "input"
|
||||||
msgid "Email"
|
msgid "Email"
|
||||||
msgstr "Correo-e"
|
msgstr "Correo-e"
|
||||||
|
|
||||||
#: web/template/login.gohtml:18 web/template/profile.gohtml:23
|
#: web/template/login.gohtml:22 web/template/profile.gohtml:27
|
||||||
msgctxt "input"
|
msgctxt "input"
|
||||||
msgid "Password"
|
msgid "Password"
|
||||||
msgstr "Contraseña"
|
msgstr "Contraseña"
|
||||||
|
|
||||||
#: web/template/login.gohtml:21
|
#: web/template/login.gohtml:25
|
||||||
msgctxt "action"
|
msgctxt "action"
|
||||||
msgid "Login"
|
msgid "Login"
|
||||||
msgstr "Entrar"
|
msgstr "Entrar"
|
||||||
|
|
||||||
#: web/template/profile.gohtml:3 pkg/profile.go:29
|
#: web/template/profile.gohtml:2 web/template/profile.gohtml:7
|
||||||
msgctxt "title"
|
msgctxt "title"
|
||||||
msgid "User Settings"
|
msgid "User Settings"
|
||||||
msgstr "Configuración usuario"
|
msgstr "Configuración usuario"
|
||||||
|
|
||||||
#: web/template/profile.gohtml:6
|
#: web/template/profile.gohtml:10
|
||||||
msgctxt "title"
|
msgctxt "title"
|
||||||
msgid "User Access Data"
|
msgid "User Access Data"
|
||||||
msgstr "Datos acceso usuario"
|
msgstr "Datos acceso usuario"
|
||||||
|
|
||||||
#: web/template/profile.gohtml:10
|
#: web/template/profile.gohtml:14
|
||||||
msgctxt "input"
|
msgctxt "input"
|
||||||
msgid "User name"
|
msgid "User name"
|
||||||
msgstr "Nombre de usuario"
|
msgstr "Nombre de usuario"
|
||||||
|
|
||||||
#: web/template/profile.gohtml:19
|
#: web/template/profile.gohtml:23
|
||||||
msgctxt "title"
|
msgctxt "title"
|
||||||
msgid "Password Change"
|
msgid "Password Change"
|
||||||
msgstr "Cambio de contraseña"
|
msgstr "Cambio de contraseña"
|
||||||
|
|
||||||
#: web/template/profile.gohtml:28
|
#: web/template/profile.gohtml:32
|
||||||
msgctxt "input"
|
msgctxt "input"
|
||||||
msgid "Password Confirmation"
|
msgid "Password Confirmation"
|
||||||
msgstr "Confirmación contrasenya"
|
msgstr "Confirmación contrasenya"
|
||||||
|
|
||||||
#: web/template/profile.gohtml:33
|
#: web/template/profile.gohtml:37
|
||||||
msgctxt "input"
|
msgctxt "input"
|
||||||
msgid "Language"
|
msgid "Language"
|
||||||
msgstr "Idioma"
|
msgstr "Idioma"
|
||||||
|
|
||||||
#: web/template/profile.gohtml:36
|
#: web/template/profile.gohtml:40
|
||||||
msgctxt "language option"
|
msgctxt "language option"
|
||||||
msgid "Automatic"
|
msgid "Automatic"
|
||||||
msgstr "Automático"
|
msgstr "Automático"
|
||||||
|
|
||||||
#: web/template/profile.gohtml:42 web/template/tax-details.gohtml:127
|
#: web/template/profile.gohtml:46 web/template/tax-details.gohtml:133
|
||||||
msgctxt "action"
|
msgctxt "action"
|
||||||
msgid "Save changes"
|
msgid "Save changes"
|
||||||
msgstr "Guardar cambios"
|
msgstr "Guardar cambios"
|
||||||
|
|
||||||
#: web/template/contacts-index.gohtml:2 web/template/contacts-new.gohtml:56
|
#: web/template/contacts-index.gohtml:2
|
||||||
|
msgctxt "title"
|
||||||
|
msgid "Customers"
|
||||||
|
msgstr "Clientes"
|
||||||
|
|
||||||
|
#: web/template/contacts-index.gohtml:6 web/template/contacts-new.gohtml:60
|
||||||
msgctxt "action"
|
msgctxt "action"
|
||||||
msgid "New contact"
|
msgid "New contact"
|
||||||
msgstr "Nuevo contacto"
|
msgstr "Nuevo contacto"
|
||||||
|
|
||||||
#: web/template/contacts-index.gohtml:7
|
#: web/template/contacts-index.gohtml:11
|
||||||
msgctxt "contact"
|
msgctxt "contact"
|
||||||
msgid "All"
|
msgid "All"
|
||||||
msgstr "Todos"
|
msgstr "Todos"
|
||||||
|
|
||||||
#: web/template/contacts-index.gohtml:8
|
#: web/template/contacts-index.gohtml:12
|
||||||
msgctxt "title"
|
msgctxt "title"
|
||||||
msgid "Customer"
|
msgid "Customer"
|
||||||
msgstr "Cliente"
|
msgstr "Cliente"
|
||||||
|
|
||||||
#: web/template/contacts-index.gohtml:9
|
#: web/template/contacts-index.gohtml:13
|
||||||
msgctxt "title"
|
msgctxt "title"
|
||||||
msgid "Email"
|
msgid "Email"
|
||||||
msgstr "Correo-e"
|
msgstr "Correo-e"
|
||||||
|
|
||||||
#: web/template/contacts-index.gohtml:10
|
#: web/template/contacts-index.gohtml:14
|
||||||
msgctxt "title"
|
msgctxt "title"
|
||||||
msgid "Phone"
|
msgid "Phone"
|
||||||
msgstr "Teléfono"
|
msgstr "Teléfono"
|
||||||
|
|
||||||
#: web/template/contacts-index.gohtml:25
|
#: web/template/contacts-index.gohtml:29
|
||||||
msgid "No customers added yet."
|
msgid "No customers added yet."
|
||||||
msgstr "No hay clientes."
|
msgstr "No hay clientes."
|
||||||
|
|
||||||
#: web/template/tax-details.gohtml:3 pkg/company.go:108
|
#: web/template/tax-details.gohtml:2 web/template/tax-details.gohtml:7
|
||||||
msgctxt "title"
|
msgctxt "title"
|
||||||
msgid "Tax Details"
|
msgid "Tax Details"
|
||||||
msgstr "Configuración fiscal"
|
msgstr "Configuración fiscal"
|
||||||
|
|
||||||
#: web/template/tax-details.gohtml:7 web/template/contacts-new.gohtml:7
|
#: web/template/tax-details.gohtml:11 web/template/contacts-new.gohtml:11
|
||||||
msgctxt "input"
|
msgctxt "input"
|
||||||
msgid "Business name"
|
msgid "Business name"
|
||||||
msgstr "Nombre y apellidos"
|
msgstr "Nombre y apellidos"
|
||||||
|
|
||||||
#: web/template/tax-details.gohtml:11 web/template/contacts-new.gohtml:11
|
#: web/template/tax-details.gohtml:15 web/template/contacts-new.gohtml:15
|
||||||
msgctxt "input"
|
msgctxt "input"
|
||||||
msgid "VAT number"
|
msgid "VAT number"
|
||||||
msgstr "DNI / NIF"
|
msgstr "DNI / NIF"
|
||||||
|
|
||||||
#: web/template/tax-details.gohtml:15 web/template/contacts-new.gohtml:15
|
#: web/template/tax-details.gohtml:19 web/template/contacts-new.gohtml:19
|
||||||
msgctxt "input"
|
msgctxt "input"
|
||||||
msgid "Trade name"
|
msgid "Trade name"
|
||||||
msgstr "Nombre comercial"
|
msgstr "Nombre comercial"
|
||||||
|
|
||||||
#: web/template/tax-details.gohtml:19 web/template/contacts-new.gohtml:19
|
#: web/template/tax-details.gohtml:23 web/template/contacts-new.gohtml:23
|
||||||
msgctxt "input"
|
msgctxt "input"
|
||||||
msgid "Phone"
|
msgid "Phone"
|
||||||
msgstr "Teléfono"
|
msgstr "Teléfono"
|
||||||
|
|
||||||
#: web/template/tax-details.gohtml:27 web/template/contacts-new.gohtml:27
|
#: web/template/tax-details.gohtml:31 web/template/contacts-new.gohtml:31
|
||||||
msgctxt "input"
|
msgctxt "input"
|
||||||
msgid "Web"
|
msgid "Web"
|
||||||
msgstr "Web"
|
msgstr "Web"
|
||||||
|
|
||||||
#: web/template/tax-details.gohtml:31 web/template/contacts-new.gohtml:31
|
#: web/template/tax-details.gohtml:35 web/template/contacts-new.gohtml:35
|
||||||
msgctxt "input"
|
msgctxt "input"
|
||||||
msgid "Address"
|
msgid "Address"
|
||||||
msgstr "Dirección"
|
msgstr "Dirección"
|
||||||
|
|
||||||
#: web/template/tax-details.gohtml:35 web/template/contacts-new.gohtml:35
|
#: web/template/tax-details.gohtml:39 web/template/contacts-new.gohtml:39
|
||||||
msgctxt "input"
|
msgctxt "input"
|
||||||
msgid "City"
|
msgid "City"
|
||||||
msgstr "Población"
|
msgstr "Población"
|
||||||
|
|
||||||
#: web/template/tax-details.gohtml:39 web/template/contacts-new.gohtml:39
|
#: web/template/tax-details.gohtml:43 web/template/contacts-new.gohtml:43
|
||||||
msgctxt "input"
|
msgctxt "input"
|
||||||
msgid "Province"
|
msgid "Province"
|
||||||
msgstr "Provincia"
|
msgstr "Provincia"
|
||||||
|
|
||||||
#: web/template/tax-details.gohtml:43 web/template/contacts-new.gohtml:43
|
#: web/template/tax-details.gohtml:47 web/template/contacts-new.gohtml:47
|
||||||
msgctxt "input"
|
msgctxt "input"
|
||||||
msgid "Postal code"
|
msgid "Postal code"
|
||||||
msgstr "Código postal"
|
msgstr "Código postal"
|
||||||
|
|
||||||
#: web/template/tax-details.gohtml:52 web/template/contacts-new.gohtml:52
|
#: web/template/tax-details.gohtml:56 web/template/contacts-new.gohtml:56
|
||||||
msgctxt "input"
|
msgctxt "input"
|
||||||
msgid "Country"
|
msgid "Country"
|
||||||
msgstr "País"
|
msgstr "País"
|
||||||
|
|
||||||
#: web/template/tax-details.gohtml:56
|
#: web/template/tax-details.gohtml:60
|
||||||
msgctxt "input"
|
msgctxt "input"
|
||||||
msgid "Currency"
|
msgid "Currency"
|
||||||
msgstr "Moneda"
|
msgstr "Moneda"
|
||||||
|
|
||||||
#: web/template/tax-details.gohtml:74
|
#: web/template/tax-details.gohtml:78
|
||||||
msgctxt "title"
|
msgctxt "title"
|
||||||
msgid "Tax Name"
|
msgid "Tax Name"
|
||||||
msgstr "Nombre impuesto"
|
msgstr "Nombre impuesto"
|
||||||
|
|
||||||
#: web/template/tax-details.gohtml:75
|
#: web/template/tax-details.gohtml:79
|
||||||
msgctxt "title"
|
msgctxt "title"
|
||||||
msgid "Rate (%)"
|
msgid "Rate (%)"
|
||||||
msgstr "Porcentage"
|
msgstr "Porcentage"
|
||||||
|
|
||||||
#: web/template/tax-details.gohtml:96
|
#: web/template/tax-details.gohtml:100
|
||||||
msgid "No taxes added yet."
|
msgid "No taxes added yet."
|
||||||
msgstr "No hay impuestos."
|
msgstr "No hay impuestos."
|
||||||
|
|
||||||
#: web/template/tax-details.gohtml:102
|
#: web/template/tax-details.gohtml:106
|
||||||
msgctxt "title"
|
msgctxt "title"
|
||||||
msgid "New Line"
|
msgid "New Line"
|
||||||
msgstr "Nueva línea"
|
msgstr "Nueva línea"
|
||||||
|
|
||||||
#: web/template/tax-details.gohtml:106
|
#: web/template/tax-details.gohtml:111
|
||||||
msgctxt "input"
|
msgctxt "input"
|
||||||
msgid "Tax name"
|
msgid "Tax name"
|
||||||
msgstr "Nombre impuesto"
|
msgstr "Nombre impuesto"
|
||||||
|
|
||||||
#: web/template/tax-details.gohtml:112
|
#: web/template/tax-details.gohtml:118
|
||||||
msgctxt "input"
|
msgctxt "input"
|
||||||
msgid "Rate (%)"
|
msgid "Rate (%)"
|
||||||
msgstr "Porcentage"
|
msgstr "Porcentage"
|
||||||
|
|
||||||
#: web/template/tax-details.gohtml:119
|
#: web/template/tax-details.gohtml:125
|
||||||
msgctxt "action"
|
msgctxt "action"
|
||||||
msgid "Add new tax"
|
msgid "Add new tax"
|
||||||
msgstr "Añadir nuevo impuesto"
|
msgstr "Añadir nuevo impuesto"
|
||||||
|
|
||||||
#: web/template/contacts-new.gohtml:3 pkg/contacts.go:95
|
#: web/template/contacts-new.gohtml:2 web/template/contacts-new.gohtml:7
|
||||||
msgctxt "title"
|
msgctxt "title"
|
||||||
msgid "New Contact"
|
msgid "New Contact"
|
||||||
msgstr "Nuevo contacto"
|
msgstr "Nuevo contacto"
|
||||||
|
|
||||||
#: pkg/contacts.go:43
|
|
||||||
msgctxt "title"
|
|
||||||
msgid "Customers"
|
|
||||||
msgstr "Clientes"
|
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
<title>{{ .Title }} — Numerus</title>
|
<title>{{ template "title" . }} — Numerus</title>
|
||||||
<link rel="stylesheet" type="text/css" media="screen" href="/static/numerus.css">
|
<link rel="stylesheet" type="text/css" media="screen" href="/static/numerus.css">
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|
|
@ -1,3 +1,7 @@
|
||||||
|
{{ define "title" -}}
|
||||||
|
{{( pgettext "Customers" "title" )}}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
{{ define "content" }}
|
{{ define "content" }}
|
||||||
<a class="primary button" href="{{ companyURI "/contacts/new" }}">{{( pgettext "New contact" "action" )}}</a>
|
<a class="primary button" href="{{ companyURI "/contacts/new" }}">{{( pgettext "New contact" "action" )}}</a>
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,7 @@
|
||||||
|
{{ define "title" -}}
|
||||||
|
{{( pgettext "New Contact" "title" )}}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
{{ define "content" }}
|
{{ define "content" }}
|
||||||
<section class="dialog-content">
|
<section class="dialog-content">
|
||||||
<h2>{{(pgettext "New Contact" "title")}}</h2>
|
<h2>{{(pgettext "New Contact" "title")}}</h2>
|
||||||
|
|
|
@ -1,2 +1,6 @@
|
||||||
|
{{ define "title" -}}
|
||||||
|
{{( pgettext "Dashboard" "title" )}}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
{{ define "content" }}
|
{{ define "content" }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
|
@ -1,3 +1,7 @@
|
||||||
|
{{ define "title" -}}
|
||||||
|
{{( pgettext "Login" "title" )}}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
{{ define "content" }}
|
{{ define "content" }}
|
||||||
<h1><img src="/static/numerus.svg" alt="Numerus" width="620" height="77"></h1>
|
<h1><img src="/static/numerus.svg" alt="Numerus" width="620" height="77"></h1>
|
||||||
{{ if .LoginError -}}
|
{{ if .LoginError -}}
|
||||||
|
|
|
@ -1,3 +1,7 @@
|
||||||
|
{{ define "title" -}}
|
||||||
|
{{( pgettext "User Settings" "title" )}}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
{{ define "content" }}
|
{{ define "content" }}
|
||||||
<section class="dialog-content">
|
<section class="dialog-content">
|
||||||
<h2>{{(pgettext "User Settings" "title")}}</h2>
|
<h2>{{(pgettext "User Settings" "title")}}</h2>
|
||||||
|
|
|
@ -1,3 +1,7 @@
|
||||||
|
{{ define "title" -}}
|
||||||
|
{{( pgettext "Tax Details" "title" )}}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
{{ define "content" }}
|
{{ define "content" }}
|
||||||
<section class="dialog-content">
|
<section class="dialog-content">
|
||||||
<h2>{{(pgettext "Tax Details" "title")}}</h2>
|
<h2>{{(pgettext "Tax Details" "title")}}</h2>
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
<title>{{( pgettext "Login" "title" )}} — Numerus</title>
|
<title>{{ template "title" . }} — Numerus</title>
|
||||||
<link rel="stylesheet" type="text/css" media="screen" href="/static/numerus.css">
|
<link rel="stylesheet" type="text/css" media="screen" href="/static/numerus.css">
|
||||||
</head>
|
</head>
|
||||||
<body class="web">
|
<body class="web">
|
||||||
|
|
Loading…
Reference in New Issue