Open mildred opened 5 years ago
Agreed! Thanks for the issue. We need someone to research and/or build a small prototype, eg localising just the title of the balancesheet report. Also, to think about hledger as a whole and clarify which parts can/should be localised. Could you help ?
Let's focus this issue on just:
and maybe (because they seem to fit well together based on the discussion at related PR #1219):
How to define custom reports ? It could be done with command line options and/or new directives in the journal. Some quick ideas:
# the balance-report directive would define custom compound balance reports like bs/is:
balance-report Balance Sheet
command balancesheet bs
help
This is a balance sheet report, showing historical asset and liability balances.
subsection Assets
query acct:assets
balance-type historical
subsection Liabilities
query acct:liabilities
balance-type historical
# more general: the command directive would define custom commands, as aliases for
# other hledger commands (only; we probably could not allow general commands to be called
# via directives in a journal file). The balancereport command would generate custom compound
# balance reports based on its arguments.
command balancesheet bs
help
This is a balance sheet report, showing historical asset and liability balances.
balancereport 'Balance Sheet' 'Assets' 'acct:assets' historical 'Liabilities' 'acct:liabilities' historical
Perhaps implementing the flexible balancereport
command would be a good start. Help welcome, including a better name for it.
Open questions:
Also things like month names should follow the output locale:
$ LANG=tr_TR.UTF-8 hledger -f=maliye.ledger bal Daire --transpose --no-total --empty -M
|| Daire 1 Daire 2 Daire 3 Daire 4 Daire 5
=====++==================================================
Jan || ₺-250,00 0 0 ₺-250,00 0
Feb || ₺-250,00 0 0 ₺-250,00 0
Mar || ₺-250,00 0 0 ₺-250,00 0
Apr || ₺-250,00 ₺-250,00 ₺-250,00 ₺-250,00 ₺-250,00
Should be:
|| Daire 1 Daire 2 Daire 3 Daire 4 Daire 5
=====++==================================================
Oca || ₺-250,00 0 0 ₺-250,00 0
Şub || ₺-250,00 0 0 ₺-250,00 0
Mar || ₺-250,00 0 0 ₺-250,00 0
Nis || ₺-250,00 ₺-250,00 ₺-250,00 ₺-250,00 ₺-250,00
Also a CLI flag to turn off the month name substitutions and include dates (as seen in -O csv
for the same query) might be in order no matter the state of languages.
So is there a Project Fluent library for Haskell?
Reports (such as balance sheet or income statement) should be able to be customized so they can be localized and translated.
Some simple words like Assets or Liabilities must be customized (in French, it corresponds to Actif and Passif)
Split from #1006