Go to file
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
cmd/numerus Implement login cookie, its verification, and logout 2023-01-17 20:58:13 +01:00
debian Replace default router with github.com/julienschmidt/httprouter 2023-02-03 12:30:56 +01:00
demo Fix product taxes in demo SQL 2023-02-08 14:12:45 +01:00
deploy Add currency_pattern to language relation 2023-02-23 12:12:33 +01:00
pkg Add currency_pattern to language relation 2023-02-23 12:12:33 +01:00
po Add views to compute taxes and total amount of invoices 2023-02-22 14:39:38 +01:00
revert Add views to compute taxes and total amount of invoices 2023-02-22 14:39:38 +01:00
test Add currency_pattern to language relation 2023-02-23 12:12:33 +01:00
verify Add currency_pattern to language relation 2023-02-23 12:12:33 +01:00
web Add currency_pattern to language relation 2023-02-23 12:12:33 +01:00
.gitignore Ignore IntelliJ’s project files 2023-01-30 16:42:15 +01:00
COPYING Rename LICENSE to COPYING 2023-01-15 04:08:35 +01:00
Makefile Rename extension of templates to .gohtml 2023-01-30 16:48:21 +01:00
go.mod Properly register array and composite PostgreSQL types with pgtype 2023-02-20 11:42:21 +01:00
go.sum Fix use of API methods not available in Go 1.16 2023-02-13 10:32:26 +01:00
sqitch.conf Setup authentication schema and user relation 2023-01-13 20:30:21 +01:00
sqitch.plan Add views to compute taxes and total amount of invoices 2023-02-22 14:39:38 +01:00