Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
On #1823454: Verify transliteration data sources and their quality, and potentially eliminate maintenance, we improved the transliteration character data tables, using a script.
This follow-up is to add the script to the scripts directory in the code repo.
#1823454-61: Verify transliteration data sources and their quality, and potentially eliminate maintenance has the latest version. It may need to have its documentation cleaned up a bit.
Comment | File | Size | Author |
---|---|---|---|
#1 | 2097587.patch | 22.26 KB | jhodgdon |
Comments
Comment #1
jhodgdonHere is a patch.
I took the script from comment #61 and cleaned it up.
It's a PHP script, but we don't want people to run it from the browser by mistake, so I thought it was probably best to give it a .txt extension. Thoughts?
Comment #2
jhodgdonI also just verified that on my machine (where I made the patches for the other issue), with the version of intl I had installed, if I run the patch_drupal command using this script, it runs and outputs nothing (no patched files, since that other issue got committed). I also verified that if I had only empty Drupal data to start with, it outputs all of our data files. So I think the script is OK (I didn't introduce any PHP syntax errors anyway, or change the functionality).
Whether we want to add this or not is open to question.
Comment #3
amateescu CreditAttribution: amateescu commentedI agree with adding this small helper script because it will help transliteration maintainers to update the data without hunting it down in whatever issue it was mentioned initially :)
Also, the .txt extension makes sense, we definitely don't want this to be runnable by default.
Comment #4
webchickIt's a bit unusual, but I think it's ok. The code's nicely documented and such so hopefully won't create too much of a maintenance burden going forward. And we could always rip it out later and stick it somewhere in contrib if that proves to be the case.
Committed and pushed to 8.x. Thanks!
Comment #5
jhodgdonThe script is stand-alone (doesn't call into Drupal), other than referring to the transliteration data files (which you have to copy into wherever you put the script anyway), so I don't think there is much chance it will need to be maintained heavily.
The only change I see in the future would be if the Unicode project comes up with some new transliteration methods, we would add a line or two to the script and re-run it to suck their data into our tables from the PHP intl project. But in that case, having the script around to use will be helpful, and having a patch for that script at the same time as we patch the data will be a Good Thing. :)
Comment #7
klonos