Fix Drupal 6 for translations

Events happening in the community are now at Drupal community events on www.drupal.org.
You are viewing a wiki page. You are welcome to join the group and then edit it. Be bold!

Update: new errors uncovered.

When running the pot file extractor, we get the following messages. They generally mean that the parser could not extract the string for the t() function because it was stored in a variable or constructed dynamically in any other way. For some strings, this is not a problem, because we have taken care of them (like date/time strings), but others won't be translateable if we don't fix them. We have to review each message and decide if there is a way the actual string lands in the translation template files, otherwise it's a bug.

  • Invalid marker content in includes/common.inc:1143
    t(gmdate($c,$timestamp),array(),$langcode)

    (patch for AM/PM) committed

  • Invalid marker content in includes/common.inc:1074
    format_plural(floor($timestamp/$value),$key[0],$key[1],array(),$langcode)

    (doesn't need fix: the used strings do have a special treatment in potx.inc)

  • Invalid marker content in includes/locale.inc:313
    t($form_state['values']['name'])

    (used as name of predefined language and that list is already translatable)

  • Invalid marker content in includes/locale.inc:319
    t($predefined[$langcode][0])

    (used as name of predefined language and that list is already translatable)

  • Invalid marker content in includes/locale.inc:401
    t($languages[$langcode]->name)

    (most sites only use built-in language names, which are already translatable)

  • Invalid marker content in includes/locale.inc:494
    t($language->name)

    (most sites only use built-in language names, which are already translatable)

  • Invalid marker content in includes/locale.inc:642
    t($predefined[$langcode][0])

    (used as name of predefined language and that list is already translatable)

  • Invalid marker content in includes/locale.inc:798
    t($language->name)

    (most sites only use built-in language names, which are already translatable)

  • Invalid marker content in includes/locale.inc:2142
    t($language->name)

    (most sites only use built-in language names, which are already translatable)

  • Invalid marker content in includes/locale.inc:2145
    t($language->name)

    (most sites only use built-in language names, which are already translatable)

  • Invalid marker content in includes/locale.inc:2149
    t($language->name)

    (most sites only use built-in language names, which are already translatable)

  • Invalid marker content in includes/locale.inc:2160
    t($language->name)

    (most sites only use built-in language names, which are already translatable)

  • Invalid marker content in includes/locale.inc:2204
    t($value[0])

    (used as name of predefined language and that list is already translatable)

  • Invalid marker content in includes/locale.inc:2208
    t($value[0])

    (used as name of predefined language and that list is already translatable)

  • Invalid marker content in includes/locale.inc:1151
    $t($message,$vars)

    (used in _locale_import_message() which is already parsed as t() in potx)

  • Invalid marker content in includes/menu.inc:396
    t($item['title'])

    (doesn't need fix: variable contains menu title which is already folded into the template)

  • Invalid marker content in includes/menu.inc:399
    t($item['title'],menu_unserialize($item['title_arguments'],$map))

    (doesn't need fix: variable contains menu title which is already folded into the template)

  • Invalid marker content in includes/menu.inc:413
    t($item['description'])

    (doesn't need fix: variable contains menu description which is already folded into the template)

  • Invalid marker content in modules/dblog/dblog.admin.inc:69
    t($dblog->type)

    (watchdog type names are collected by potx)

  • Invalid marker content in modules/dblog/dblog.admin.inc:129
    t($dblog->type)

    (watchdog type names are collected by potx)

  • Invalid marker content in modules/dblog/dblog.admin.inc:241
    t($dblog->message,unserialize($dblog->variables))

    (watchdog type names are collected by potx)

  • Invalid marker content in modules/locale/locale.module:206
    t($language->name)

    (most sites only use built-in language names, which are already translatable)

  • Invalid marker content in modules/locale/locale.module:450
    t($language->name)

    (most sites only use built-in language names, which are already translatable)

  • Invalid marker content in modules/menu/menu.admin.inc:361
    t('Menu name can not be longer than '.MENU_MAX_MENU_NAME_LENGTH_UI.' characters.')

    (patch) committed

  • Invalid marker content in modules/system/system.admin.inc:569
    t($file->info['description'])

    (doesn't need fix: the module description is already folded into the template files)

  • Invalid marker content in modules/system/system.admin.inc:917
    t($info['description'])

    (doesn't need fix: the module description is already folded into the template files)

  • Invalid marker content in modules/system/system.admin.inc:1792
    t($description)

    (doesn't need fix: the module description is already folded into the template files)

  • Invalid marker content in modules/system/system.admin.inc:1914
    t($package)

    (doesn't need fix: the package name is already folded into the template files)

  • Invalid marker content in modules/user/user.admin.inc:525
    t($perm)

    (doesn't need fix: variable contains permission name which gets special handling)

  • Invalid marker content in modules/user/user.admin.inc:587
    t($key)

    (doesn't need fix: variable contains permission name which gets special handling)

  • Invalid marker content in modules/user/user.module:1758
    t($permission)

    (doesn't need fix: variable contains permission name which gets special handling, but the array index is wrong)
    (patch for issue in the same line) committed

  • Invalid marker content in modules/user/user.module:3126
    t($string,array('%a'=>$filters[$type]['title'],'%b'=>$options[$value]))

    (patch) committed

Update by Gábor Hojtsy: here is the actual list of errors. Most are harmless, but I did not yet have the time to look through them properly.

Invalid marker content in includes/actions.inc:304
* watchdog('actions',format_plural($count,'One orphaned action (%orphans) exists in the actions table. !link','@count orphaned actions (%orphans) exist in the actions table. !link',array('@count'=>$count,'%orphans'=>$orphans,'!link'=>$link),'warning'))

Invalid marker content in includes/bootstrap.inc:716
* watchdog($type,$message,$variables=array(),$severity=WATCHDOG_NOTICE,$link=NULL)

Invalid marker content in includes/common.inc:732
* t($string,$args=array(),$langcode=NULL)

Invalid marker content in includes/common.inc:1001
* t($singular,$args,$langcode)

Invalid marker content in includes/common.inc:1008
* t($plural,$args,$langcode)

Invalid marker content in includes/common.inc:1013
* t($singular,$args,$langcode)

Invalid marker content in includes/common.inc:1015
* t($plural,$args,$langcode)

Invalid marker content in includes/common.inc:1019
* t(strtr($plural,array('@count'=>'@count['.$index.']')),$args,$langcode)

Invalid marker content in includes/common.inc:1159
* t(gmdate($c,$timestamp),array(),$langcode)

Invalid marker content in includes/common.inc:1165
* t('!long-month-name '.gmdate($c,$timestamp),array('!long-month-name'=>''),$langcode)

Invalid marker content in includes/common.inc:340
* watchdog('page not found',check_plain($_GET['q']),NULL,WATCHDOG_WARNING)

Invalid marker content in includes/common.inc:369
* watchdog('access denied',check_plain($_GET['q']),NULL,WATCHDOG_WARNING)

Invalid marker content in includes/common.inc:998
* format_plural($count,$singular,$plural,$args=array(),$langcode=NULL)

Invalid marker content in includes/common.inc:1090
* format_plural(floor($timestamp/$value),$key[0],$key[1],array(),$langcode)

Invalid marker content in includes/install.inc:601
* st($string,$args=array())

Invalid marker content in includes/locale.inc:313
* t($form_state['values']['name'])

Invalid marker content in includes/locale.inc:319
* t($predefined[$langcode][0])

Invalid marker content in includes/locale.inc:401
* t($languages[$langcode]->name)

Invalid marker content in includes/locale.inc:494
* t($language->name)

Invalid marker content in includes/locale.inc:642
* t($predefined[$langcode][0])

Invalid marker content in includes/locale.inc:798
* t($language->name)

Invalid marker content in includes/locale.inc:2142
* t($language->name)

Invalid marker content in includes/locale.inc:2145
* t($language->name)

Invalid marker content in includes/locale.inc:2149
* t($language->name)

Invalid marker content in includes/locale.inc:2160
* t($language->name)

Invalid marker content in includes/locale.inc:2204
* t($value[0])

Invalid marker content in includes/locale.inc:2208
* t($value[0])

Invalid marker content in includes/locale.inc:1145
* _locale_import_message($message,$file,$lineno=NULL)

Invalid marker content in includes/locale.inc:1151
* $t($message,$vars)

Invalid marker content in includes/menu.inc:423
* t($item['title'])

Invalid marker content in includes/menu.inc:426
* t($item['title'],menu_unserialize($item['title_arguments'],$map))

Invalid marker content in includes/menu.inc:440
* t($item['description'])

Invalid marker content in misc/drupal.js
* Drupal.t(singular, args)

Invalid marker content in misc/drupal.js
* Drupal.t(plural, args)

Invalid marker content in misc/drupal.js
* Drupal.t(plural.replace('@count', '@count['+ index +']')

Invalid menu 'title' definition found in block_menu() in modules/block/block.module on line 166

Invalid marker content in modules/dblog/dblog.admin.inc:69
* t($dblog->type)

Invalid marker content in modules/dblog/dblog.admin.inc:129
* t($dblog->type)

Invalid marker content in modules/dblog/dblog.admin.inc:241
* t($dblog->message,unserialize($dblog->variables))

Invalid menu 'title' definition found in help_menu() in modules/help/help.module on line 23

Invalid marker content in modules/locale/locale.module:206
* t($language->name)

Invalid marker content in modules/locale/locale.module:436
* t($language->name)

Invalid menu 'title' definition found in node_menu() in modules/node/node.module on line 1323

Invalid menu 'description' definition found in node_menu() in modules/node/node.module on line 1328

Invalid menu 'title' definition found in node_menu() in modules/node/node.module on line 1332

Invalid marker content in modules/system/system.admin.inc:598
* t($file->info['description'])

Invalid marker content in modules/system/system.admin.inc:938
* t($info['description'])

Invalid marker content in modules/system/system.admin.inc:1813
* t($description)

Invalid marker content in modules/system/system.admin.inc:1935
* t($package)

Invalid marker content in modules/system/system.module:1103
* watchdog('file system',t('Could not delete temporary file "%path" during garbage collection',array('%path'=>$file->filepath)),'error')

Invalid menu 'title' definition found in system_menu() in modules/system/system.module on line 261

Invalid menu 'title' definition found in system_menu() in modules/system/system.module on line 385

Invalid marker content in modules/system/system.install:2435
* watchdog('php',$msg,array(),WATCHDOG_WARNING)

Invalid marker content in modules/system/system.install:2651
* watchdog('legacy',$admin_setting)

Invalid menu 'title' definition found in trigger_menu() in modules/trigger/trigger.module on line 104

Invalid marker content in modules/user/user.admin.inc:532
* t($perm)

Invalid marker content in modules/user/user.admin.inc:594
* t($key)

Invalid marker content in modules/user/user.module:1756
* t($permission)

Translations

Group organizers

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: