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.

CommentFileSizeAuthor
#1 2097587.patch22.26 KBjhodgdon
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

jhodgdon’s picture

Status: Active » Needs review
FileSize
22.26 KB

Here 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?

jhodgdon’s picture

I 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.

amateescu’s picture

Status: Needs review » Reviewed & tested by the community

I 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.

webchick’s picture

Status: Reviewed & tested by the community » Fixed

It'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!

jhodgdon’s picture

The 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. :)

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

klonos’s picture