Updating pathauto with drush removes i18n-ascii.txt from the module folder. How about adding /sites/*/libraries/pathauto as an alternative location for that file?

Comments

greggles’s picture

Title: Make i18n-asciii.txt drush-friendly » Move i18n-ascii.txt to sites/*/libraries/pathauto to make i18n-asciii.txt drush-up-friendly

Makes sense to me. Care to write the patch?

henrrrik’s picture

Title: Move i18n-ascii.txt to sites/*/libraries/pathauto to make i18n-asciii.txt drush-up-friendly » Make i18n-asciii.txt drush-friendly
Status: Active » Needs review
StatusFileSize
new857 bytes

Here's a patch. After discussing this with zoo33 I made it look for the file in these locations and in this order:

  1. /sites/<site>/i18n-ascii.txt- Site-specific
  2. /sites/all/i18n-ascii.txt - Installation-wide
  3. <pathauto's module path>/i18n-ascii.txt - Legacy

I originally thought sites/*/libraries was a good path, but this isn't a library and it also appears to be intended for external packages, so we decided against it.

zoo33’s picture

Looks rock solid to me. Nice improvement!

henrrrik’s picture

Turns out pathauto.admin.inc needs a patch too, I'll post it later this evening.

dave reid’s picture

Status: Needs review » Needs work

Looking good. We should probably also include an update to the README.txt along with the patch.

henrrrik’s picture

Status: Needs work » Needs review
StatusFileSize
new2.41 KB

Here's an updated patch that takes care of pathauto.admin.inc and INSTALL.TXT.

henrrrik’s picture

StatusFileSize
new2.62 KB

tobiassjosten wisely suggested I refactor the "where's the file"-stuff into a separate function, so here goes.

tobiassjosten’s picture

Status: Needs review » Reviewed & tested by the community

Works like a charm! I hate to nitpick on typos but there's a case error at line 44, "THe" -> "The". Other than that it's perfect.

henrrrik’s picture

Title: Make i18n-asciii.txt drush-friendly » Move i18n-asciii.txt to make it drush-up-friendly
StatusFileSize
new2.62 KB

... and here's a patch with the typo fixed.

greggles: Sorry about changing the title back on you at #2, we must've been composing our comments simultaneously.

donquixote’s picture

Yes, please, get this in!

EDIT:
See also #357037: Include a default i18n-ascii.txt and fix some transliterations. Now would be a chance to ship that file by default, and use the external folder to override it permanently.

greggles’s picture

I like donquixote's idea a bit...

dave reid’s picture

StatusFileSize
new5.2 KB

Revised patch that rolls back a bug with #848250: parse_ini_file() problems with PHP 5.3 or disallowed and provides a little more help in the UI for where the files should be located, and which one is being used.

dave reid’s picture

StatusFileSize
new53.5 KB

Screenshot of what it looks like in the UI.

Selection_066.png

dave reid’s picture

Status: Reviewed & tested by the community » Fixed

Committed to 6.x-1.x and thanks everyone! http://drupal.org/cvs?commit=404618

dave reid’s picture

Title: Move i18n-asciii.txt to make it drush-up-friendly » Allow multiple locations for i18n-ascii.txt to make it drush-up-friendly
dave reid’s picture

As a follow-up I also added support for using $conf['pathauto_i18n_file'] in your settings.php to be used as the top-preferred file if defined.
http://drupal.org/cvs?commit=404650

Status: Fixed » Closed (fixed)

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