| 1 |
<?php |
<?php |
| 2 |
// $Id: export.inc,v 1.1.2.15.2.17 2009/11/19 22:57:43 goba Exp $ |
// $Id: export.inc,v 1.1.2.15.2.18 2009/11/19 23:06:01 goba Exp $ |
| 3 |
|
|
| 4 |
/** |
/** |
| 5 |
* @file |
* @file |
| 123 |
'#default_value' => 'drupal-6', |
'#default_value' => 'drupal-6', |
| 124 |
); |
); |
| 125 |
$form['format']['compact'] = array( |
$form['format']['compact'] = array( |
| 126 |
'#title' => t('Verbosity'), |
'#title' => t('Verbosity'), |
| 127 |
'#type' => 'radios', |
'#type' => 'radios', |
| 128 |
'#options' => array(0 => t('Verbose files useful for desktop translation'), 1 => t('Compact files optimized for size, not desktop editing')), |
'#options' => array(0 => t('Verbose files useful for desktop translation'), 1 => t('Compact files optimized for size, not desktop editing')), |
| 129 |
'#default_value' => 0, |
'#default_value' => 0, |
| 391 |
// Join differently based on compact method, so we can skip strings without |
// Join differently based on compact method, so we can skip strings without |
| 392 |
// translation for compact method export. |
// translation for compact method export. |
| 393 |
$translation_join = ($compact) ? 'INNER JOIN' : 'LEFT JOIN'; |
$translation_join = ($compact) ? 'INNER JOIN' : 'LEFT JOIN'; |
| 394 |
|
$translation_filter = ($compact) ? "AND t.translation != ''" : ''; |
| 395 |
// We only export active translations, not suggestions. |
// We only export active translations, not suggestions. |
| 396 |
$sql = "SELECT s.sid, s.value, s.context, f.location, f.revision, l.lineno, l.type, t.translation, t.uid_approved, t.time_approved FROM {l10n_community_file} f INNER JOIN {l10n_community_line} l ON f.fid = l.fid INNER JOIN {l10n_community_string} s ON l.sid = s.sid $translation_join {l10n_community_translation} t ON s.sid = t.sid AND t.language = '%s' AND is_active = 1 AND is_suggestion = 0 WHERE f.pid = %d"; |
$sql = "SELECT s.sid, s.value, s.context, f.location, f.revision, l.lineno, l.type, t.translation, t.uid_approved, t.time_approved FROM {l10n_community_file} f INNER JOIN {l10n_community_line} l ON f.fid = l.fid INNER JOIN {l10n_community_string} s ON l.sid = s.sid $translation_join {l10n_community_translation} t ON s.sid = t.sid AND t.language = '%s' AND is_active = 1 AND is_suggestion = 0 $translation_filter WHERE f.pid = %d"; |
| 397 |
$sql_args = array($language->language, $project->pid); |
$sql_args = array($language->language, $project->pid); |
| 398 |
} |
} |
| 399 |
|
|