Projet

Général

Profil

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

root / drupal7 / sites / all / modules / views / tests / views_plugin_localization_test.inc @ 4003efde

1 85ad3d82 Assos Assos
<?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 5d12d676 Assos Assos
13 85ad3d82 Assos Assos
  /**
14
   * Store the strings which was translated.
15
   */
16 5d12d676 Assos Assos
  public $translated_strings;
17
18 85ad3d82 Assos Assos
  /**
19
   * Return the string and take sure that the test can find out whether the
20
   * string got translated.
21
   */
22 5d12d676 Assos Assos
  public function translate_string($string, $keys = array(), $format = '') {
23 85ad3d82 Assos Assos
    $this->translated_strings[] = $string;
24
    return $string . "-translated";
25
  }
26
27
  /**
28
   * Store the export strings.
29
   */
30 5d12d676 Assos Assos
  public function export($source) {
31 85ad3d82 Assos Assos
    if (!empty($source['value'])) {
32
      $this->export_strings[] = $source['value'];
33
    }
34
  }
35
36
  /**
37
   * Return the stored strings for the simpletest.
38
   */
39 5d12d676 Assos Assos
  public function get_export_strings() {
40 85ad3d82 Assos Assos
    return $this->export_strings;
41
  }
42 5d12d676 Assos Assos
43 85ad3d82 Assos Assos
}