Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to change DIČ and IČ to VAT and TIN? #40

Open
mihalt opened this issue Sep 5, 2019 · 3 comments
Open

How to change DIČ and IČ to VAT and TIN? #40

mihalt opened this issue Sep 5, 2019 · 3 comments

Comments

@mihalt
Copy link

mihalt commented Sep 5, 2019

Hi! How to change DIČ and IČ to VAT and TIN? The os.environ["INVOICE_LANG"] = "en" doesn't help.

@LeeiFrankJaw
Copy link

LeeiFrankJaw commented May 12, 2020

I ran into the same problem. A quick look at the source code reveals that the right way to achieve this is to create a pull request to locale directory and add gettext localization there, since the PROJECT_ROOT resolves to the library directory.

The code is ugly and I prefer to use ReportLab directly though.

@LeeiFrankJaw
Copy link

Papersize is locked in this line of code, which is much worse. We are locked into US letter size paper if we use this library. No simple or easy way to work around this.

@dephekt
Copy link

dephekt commented Apr 17, 2023

@mihalt There's something wrong with the translation files causing this. All the strings in the source code are in English, but this particular line, for some reason, is getting translated into Czech:

>>> os.environ["INVOICE_LANG"]
'en'
>>> _(u"Vat in: %s")
'DIČ: %s'

If I delete the translation files, the line is correctly not translated and is returned as "Vat in: %s". So if you don't need localization, you can just delete those babel files in the locale directory.

(Mostly posting this in case someone tries to use this library in 2023+ as I did and has the same question)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants