-
-
Notifications
You must be signed in to change notification settings - Fork 228
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
Add support for externalised sorting per language #748
Conversation
utils/sort-glossary.py
Outdated
('ve', 'Venda'), | ||
('vi', 'Vietnamese'), | ||
('vo', 'Volapük'), | ||
('cy', 'Welsh'), |
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.
@froggleston Welsh is already present above in line 47. Maybe sort items so that we can easier spot accidental duplicates?
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.
Great spot! I've removed the duplicates.
Sadly we can't add netlify builds as netlify doesn't allow system level dependencies (e.g. apt-get) at build time and we now require pyicu to be built which requires the libicu-dev package. I think this is good to go, save for the couple of small issues in the main PR message. |
This PR attempts to fix #724 and #254 by moving away from liquid's in-built
sort
function and to use a bespoke sorting provided bysort-glossary.py
.There are two important changes:
glossary.yml
file used to be copied into the_data
folder to act as the served content to liquid/jekyll. This has now changed in that the python script creates a_data/{lang}/glossary.yml
file for each language and the template loads the specific data file based on the selected language. It also dumps out non-Latin characters in Unicode to avoid ambiguity in rendering - humans are not meant to read this_data
version of the glossary!