Projet

Général

Profil

Paste
Télécharger (893 octets) Statistiques
| Branche: | Révision:

root / drupal7 / sites / all / modules / views / tests / views_plugin_localization_test.inc @ 7547bb19

1
<?php
2

    
3
/**
4
 * @file
5
 * Definition of views_plugin_localization_test.
6
 */
7

    
8
/**
9
 * A stump localisation plugin which has static variables to cache the input.
10
 */
11
class views_plugin_localization_test extends views_plugin_localization {
12
  /**
13
   * Store the strings which was translated.
14
   */
15
  var $translated_strings;
16
  /**
17
   * Return the string and take sure that the test can find out whether the
18
   * string got translated.
19
   */
20
  function translate_string($string, $keys = array(), $format = '') {
21
    $this->translated_strings[] = $string;
22
    return $string . "-translated";
23
  }
24

    
25
  /**
26
   * Store the export strings.
27
   */
28
  function export($source) {
29
    if (!empty($source['value'])) {
30
      $this->export_strings[] = $source['value'];
31
    }
32
  }
33

    
34
  /**
35
   * Return the stored strings for the simpletest.
36
   */
37
  function get_export_strings() {
38
    return $this->export_strings;
39
  }
40
}