Hello...
I'm trying to make polish translation of Pathauto module but I found that some strings could not be translated due to lack of t() function.
function pathauto_menu() {
...
'title' => 'Automated alias settings', // here we should use t()
...
'title' => 'Delete aliases', // here we should use t()
}
I have also found some problems in files:
- pathauto.admin.inc, function function pathauto_admin_settings()
- pathauto.admin.inc, function pathauto_cleanstring()
We use $ignore_words list in form:
$ignore_words = array(
'a', 'an', 'as', 'at', 'before', 'but', 'by', 'for', 'from', 'is', 'in',
'into', 'like', 'of', 'off', 'on', 'onto', 'per', 'since', 'than', 'the',
'this', 'that', 'to', 'up', 'via', 'with',
I think that it will be better if this list could be translated. My suggestion of code is as follows:
$ignore_words_string = t('a,an,as,at,before,but,by,for,from,is,in,into,like,of,off,on,onto,per,since,than,the,this,that,to,up,via,with');
$ignore_words = explode(',', $ignore_words_string);
Comments
Comment #1
gregglesThe documentation on hook_menu says not to use t for titles - http://drupal.org/node/300997
I'm not sure about the words to ignore. @freso - do you have any ideas on best practices here?
Comment #2
Freso commentedMenu item titles declared in
hook_menu()should not be run throught()- Drupal makes sure to do that on its own.As for the ignore words, I don't feel they should be translatable (it just opens up for too much messiness in multi-lingual setups). You can use the site variable translation module in the I18n module suite if you need to have the list localised on a multi-language setup.