Ticket #1543 (new task)

Opened 6 years ago

Last modified 9 months ago

implement ability for translation module to create new language files

Reported by: petert Assigned to: petert
Priority: normal Milestone:
Component: SGL - Translation Severity: open
Keywords: Cc:

Description

When creating a new language file the following notice occurs in the new translation manager:

MESSAGE: Undefined variable: words TYPE: Notice FILE: /var/www/html/www.sgltest.nl/lib/SGL/Translation.php LINE: 230 DEBUG INFO:

225 if (!empty($words)) { 226 $serialized = serialize($words); 227 $cache->save($serialized, $module, 'translation_'. $lang); 228 SGL::logMessage('translations from file', PEAR_LOG_DEBUG); 229 } 230 $ret = $words;

231 } elseif ($module == 'default') { 232 SGL::raiseError('could not locate the global language file', SGL_ERROR_NOFILE); 233 } 234 } 235

MESSAGE: Invalid argument supplied for foreach() TYPE: Warning FILE: /var/www/html/www.sgltest.nl/lib/SGL/Translation.php LINE: 488 DEBUG INFO:

483 * 484 * @static 485 */ 486 function removeMetaData($aConfigs) 487 { 488 foreach ($aConfigs as $k => $v) {

489 if (strpos($k, 'SGL_') === 0) { 490 unset($aConfigs[$k]); 491 } 492 } 493 return $aConfigs;

Change History

11/08/07 16:00:53 changed by demian

  • owner changed from demian to petert.
  • severity changed from open to need feedback.

Hi Peter - I believe this problem was fixed in recent weeks - can you confirm?

11/09/07 06:53:23 changed by petert

Hi Demian, Problem still exists. I think it is a generic problem. The framework cannot handle an empty language file. It should contain at least one string, otherwise you'll get this warning. If you start translation with a copy of the English file i.o. an empty one, there's no problem. -peter

11/09/07 08:39:45 changed by demian

  • summary changed from Error when creating new (empty) lang file to implement ability for translation module to create new language files.
  • type changed from defect to task.
  • severity changed from need feedback to open.
  • milestone changed from 0.6.3 to 0.9.0 - polishing.

Interesting - well this sounds like a good case for a feature request, ticket updated accordingly.

02/26/13 12:14:28 changed by demian

  • milestone deleted.