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