-
Notifications
You must be signed in to change notification settings - Fork 107
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
Refactor Number into separate languages #46
Conversation
The old Number\Ordinal is no longer directly responsible for the ordinal string generation. Instead, it'll use a dynamically included closure for that. Closures for English and Dutch are included.
@doenietzomoeilijk that looks good, I would just suggest to replace callbacks with Strategy Pattern |
@norzechowicz I did start out thinking about doing the localized parts in objects, but decided against it, as it involved a whole lot more code and i couldn't think of a way to have it all work automatically. I might come up with an idea, later this weekend. |
👍 |
@norzechowicz How about this? I'll still need to refactor the actual call back to something involving (Real life happened for a week, sorry for the silence on my end). |
Refactor Number into separate languages
@doenietzomoeilijk thanks and orry for late response 🍻 |
The old Number\Ordinal is no longer directly responsible for the ordinal string
generation. Instead, it'll use a dynamically included closure for that. Closures
for English and Dutch are included.
Intended as Proof of Concept, but I can see this working.
Relates to #39