/[drupal]/contributions/modules/l10n_server/l10n_community/export.inc
ViewVC logotype

Diff of /contributions/modules/l10n_server/l10n_community/export.inc

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.1.2.15.2.18 by goba, Thu Nov 19 23:06:01 2009 UTC revision 1.1.2.15.2.19 by goba, Fri Nov 20 14:44:05 2009 UTC
# Line 1  Line 1 
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
# Line 123  function l10n_community_export_form(&$fo Line 123  function l10n_community_export_form(&$fo
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,
# Line 391  function l10n_community_export($uri, $re Line 391  function l10n_community_export($uri, $re
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    

Legend:
Removed from v.1.1.2.15.2.18  
changed lines
  Added in v.1.1.2.15.2.19

  ViewVC Help
Powered by ViewVC 1.1.3