-
Notifications
You must be signed in to change notification settings - Fork 5
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
[ENH] Added translations #8
Conversation
[BRCH] Breaking Change in ZugferdVisualizerMarkupRendererContract
Hi @mokraemer, Please review this PR... Thank you very much. Documentation is following Kind regards |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks quite wired to me.
- The defult template now has many things missing, e.g. formating the numbers, as I already included.
- The default template formats numbers in d.m.Y which should be handled by the translator, as this is only common in some spaces. even in Germany I format all dates in DIN format as Y-m-d
- Using <?= should be used in mixed content parts, as it is more readable and always enabled since PHP 5.4
- Unitcodes are missing in the "new" translation
- the "new" template misses many fields that are required in invoices! Please review some common available invoices and try to read it - comments, packing information, seller (in case of incomming invoices), payment terms (sepa) is missing.
- I don't see why array's should work better in translations, than decicated methods, which don't give any structure.
- still default template contains php code and should be named accordingly
I guess you like to use this class for generating a pdf, which then can be merged with the xml file (zugferd). |
Hi @mokraemer, Okay. Then unfortunately the work was for nothing....
Okay. I'll take another look at your template.
Why not using different template files... This is already possible...
I find such hard-coded things as you have suggested simply awful - that's how software was developed 30 years ago... :-) This always means additional effort to update these things. You must also not forget that a new release would be due every time |
|
another thing is, having functions and backed-enums (in a later release) prevents you looking up the key in the wrong context, e.g. invoice types in units. |
Hi @mokraemer, Okay. How do we stay now? Would it be better for you to implement your own template that contains the logic you need? Or can you be satisfied with that? |
[ENH] Added translations
[BRCH] Breaking Change in ZugferdVisualizerMarkupRendererContract
Description
An option has been added that allows texts, codes to be translated into readable text
Type of change
New feature (non-breaking change which adds functionality)
Breaking change (fix or feature that would cause existing functionality to not work as expected)
ZugferdVisualizerMarkupRendererContract
got a new parametertranslator
How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration
Checklist: