diff options
author | Michal Čihař <mcihar@novell.com> | 2010-05-24 14:04:20 +0400 |
---|---|---|
committer | Michal Čihař <mcihar@novell.com> | 2010-05-24 14:04:20 +0400 |
commit | e0b32c7aaad348635044a2bda2e9d5712b198e6b (patch) | |
tree | cb720a50ffd5bcf587195730512911e2c94a65b4 /transformation_overview.php | |
parent | 31010806f75222e2c6a70429d1f3003eaf323f40 (diff) |
Convert transformation descriptions to gettext.
Diffstat (limited to 'transformation_overview.php')
-rw-r--r-- | transformation_overview.php | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/transformation_overview.php b/transformation_overview.php index fa7a0b0b28..12ca395131 100644 --- a/transformation_overview.php +++ b/transformation_overview.php @@ -53,11 +53,19 @@ foreach ($types['mimetype'] as $key => $mimetype) { $odd_row = true; foreach ($types['transformation'] as $key => $transform) { $func = strtolower(str_ireplace('.inc.php', '', $types['transformation_file'][$key])); - $desc = 'strTransformation_' . $func; + require './libraries/transformations/' . $types['transformation_file'][$key]; + $funcname = 'PMA_transformation_' . $func . '_info'; + $desc = '<i>' . sprintf(__('No description is available for this transformation.<br />Please ask the author what %s does.'), 'PMA_transformation_' . $func . '()') . '</i>'; + if (function_exists($funcname)) { + $desc_arr = $funcname(); + if (isset($desc_arr['info'])) { + $desc = $desc_arr['info']; + } + } ?> <tr class="<?php echo $odd_row ? 'odd' : 'even'; ?>"> <td><?php echo $transform; ?></td> - <td><?php echo (isset($$desc) ? $$desc : '<i>' . sprintf(__('No description is available for this transformation.<br />Please ask the author what %s does.'), 'PMA_transformation_' . $func . '()') . '</i>'); ?></td> + <td><?php echo $desc; ?></td> </tr> <?php $odd_row = !$odd_row; |