Index: INSTALL.txt
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/pathauto/INSTALL.txt,v
retrieving revision 1.2
diff -u -p -r1.2 INSTALL.txt
--- INSTALL.txt 28 Oct 2007 22:46:58 -0000 1.2
+++ INSTALL.txt 10 May 2008 20:04:46 -0000
@@ -14,14 +14,12 @@ sure "administer pathauto" is enabled th
**Transliteration support:
If you desire transliteration support in the creation of URLs (e.g. the
-replacement of À with A) then you will need to rename the file
-i18n-ascii.example.txt to i18n-ascii.txt
+replacement of Á with A) then you will need to install the Transliteration
+module, which can be found at http://drupal.org/project/transliteration
-You can then freely edit the i18n-ascii.txt without worrying that your changes
-will be over-written by upgrades of Pathauto.
-
-For details on how to transliterate any UTF8 character, please see the full
-i18n-ascii-fill.txt file information at http://drupal.org/node/185664
+Once you've installed and enabled the module, simply go to
+admin/build/path/pathauto and check the "Transliterate prior to creating alias"
+box and path aliases should now be transliterated automagically.
**Upgrading from previous versions:
If you are upgrading from Pathauto 5.x-1.x to 5.x-2.x (or 6.x-2.x) then you will
Index: pathauto.admin.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/pathauto/pathauto.admin.inc,v
retrieving revision 1.2
diff -u -p -r1.2 pathauto.admin.inc
--- pathauto.admin.inc 8 May 2008 19:08:52 -0000 1.2
+++ pathauto.admin.inc 10 May 2008 20:04:46 -0000
@@ -111,10 +111,10 @@ function pathauto_admin_settings() {
$disable_transliteration = TRUE;
$disable_text = '';
$path = drupal_get_path('module', 'pathauto');
- $transliteration_help = t('When a pattern includes certain characters (such as those with accents) should Pathauto attempt to transliterate them into the ASCII-96 alphabet? Transliteration is determined by the i18n-ascii.txt file in the Pathauto directory. This option is disabled on your site because you do not have an i18n-ascii.txt file in the Pathauto directory.');
- if (is_file($path .'/i18n-ascii.txt')) {
+ $transliteration_help = t("When a pattern includes certain characters (such as those with accents) should Pathauto attempt to transliterate them into the ASCII-96 alphabet? Transliteration is handled by the Transliteration module. This option is disabled on your site because the Translation module either isn't installed, or isn't installed properly.");
+ if (module_exists('transliteration')) {
$disable_transliteration = FALSE;
- $transliteration_help = t('When a pattern includes certain characters (such as those with accents) should Pathauto attempt to transliterate them into the ASCII-96 alphabet? Transliteration is determined by the i18n-ascii.txt file in the Pathauto directory.');
+ $transliteration_help = t('When a pattern includes certain characters (such as those with accents) should Pathauto attempt to transliterate them into the ASCII-96 alphabet? Transliteration is handled by the Transliteration module.');
}
else {
// Perhaps they've removed the file, set the transliterate option to FALSE
Index: pathauto.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/pathauto/pathauto.inc,v
retrieving revision 1.32
diff -u -p -r1.32 pathauto.inc
--- pathauto.inc 8 May 2008 20:42:03 -0000 1.32
+++ pathauto.inc 10 May 2008 20:04:46 -0000
@@ -136,20 +136,14 @@ function pathauto_cleanstring($string, $
$output = str_replace('/', '', $output);
}
- // Optionally remove accents and transliterate
+ // Optionally transliterate (by running through the Transliteration module)
if (variable_get('pathauto_transliterate', FALSE)) {
-
- static $i18n_loaded = false;
- static $translations = array();
- if (!$i18n_loaded) {
- $path = drupal_get_path('module', 'pathauto');
- if (is_file($path .'/i18n-ascii.txt')) {
- $translations = parse_ini_file($path. '/i18n-ascii.txt');
- }
- $i18n_loaded = true;
+ if (module_exists('transliteration')) {
+ $output = transliteration_get($output);
+ }
+ else {
+ drupal_set_message(t('Pathauto could not transliterate the path, as the Transliteration module has been disabled.'), 'error');
}
-
- $output = strtr($output, $translations);
}
// Reduce to the subset of ASCII96 letters and numbers