-
Notifications
You must be signed in to change notification settings - Fork 72
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
feat: add fmt_flag()
method
#523
base: main
Are you sure you want to change the base?
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #523 +/- ##
==========================================
- Coverage 89.79% 89.78% -0.01%
==========================================
Files 45 45
Lines 5321 5376 +55
==========================================
+ Hits 4778 4827 +49
- Misses 543 549 +6 ☔ View full report in Codecov by Sentry. |
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 file is 1.74 MB, which is a bit large to carry around in a Python library. Is the purpose of this file so people can specify flag names in a variety of locales? I wonder if 1.74MB in order to support specification of flag names across locales is a bit heavy (could there be a separate library for translating country names in different locales?).
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.
Yeah, I think a separate library might be better for this extra feature. I'll slim this down.
This adds the
fmt_flag()
method, which allows for the rendering of flag icons based on 2- or 3-letter country codes in table cells. The flag SVG data has been added within CSV data so there are no new dependencies with this PR.Here's an example of the
fmt_flag()
method in use: