numerus/web/template
jordi fita mas 8dbf8ef2d0 Add currency_pattern to language relation
The design calls for rendering all amounts with their currency symbol,
but golang.org/x/text’s currency package always render the symbol in
front, which is wrong in Catalan and Spanish, and a lot of other
languages.

Consulting the Internet, the most popular package for that is
accounting[0], which is almost as useless because they confuse locale
with the currency’s country of origin’s “usual locale” (e.g., en-US for
USD), which is also wrong: in Catalan i need to write USD prices as
"1.234,56 $" regardless of what Americans do.

With accounting i have the recourse of initializing the struct that
holds all the “locale” information, which is also wrong because i have
to define the decimal and thousands separators, something that depends
only on the locale, next to the currency’s precision, that is
locale-independent.  But, since all CLDR data from golang.org/x/text
is inside an internal package, i can not access it and would need to
define all that information myself, which defeats the purpose of using
an external package.

Since for now i only need the format pattern for currency, i just saved
it into the database of available languages, that i do not expect to
grow too much.

[0]: https://github.com/leekchan/accounting
2023-02-23 12:12:33 +01:00
..
contacts Add products section 2023-02-04 11:32:39 +01:00
invoices Add currency_pattern to language relation 2023-02-23 12:12:33 +01:00
products Add currency_pattern to language relation 2023-02-23 12:12:33 +01:00
app.gohtml Add the bare-bones form for invoices 2023-02-11 22:16:48 +01:00
dashboard.gohtml Move page titles to their respective templates 2023-01-31 13:07:17 +01:00
form.gohtml Add the form to add products to an invoice and create invoices too 2023-02-12 21:06:48 +01:00
login.gohtml Use a “proper” struct for the login form 2023-02-01 11:02:32 +01:00
profile.gohtml Add breadcrumbs 2023-02-03 13:58:10 +01:00
tax-details.gohtml Add breadcrumbs 2023-02-03 13:58:10 +01:00
web.gohtml Add custom function to get the current locale from templates 2023-01-31 15:45:51 +01:00