summaryrefslogtreecommitdiff
path: root/www/wiki/extensions/Translate/ttmserver/RemoteTTMServer.php
blob: 402ad5accba12e6b99b772e2d1726188482f91c8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
<?php
/**
 * TTMServer - The Translate extension translation memory interface
 *
 * @file
 * @author Niklas Laxström
 * @copyright Copyright © 2012-2013, Niklas Laxström
 * @license GPL-2.0-or-later
 * @ingroup TTMServer
 */

/**
 * Class for handling remote TTMServers over MediaWiki API.
 * Currently querying is done in TranslationHelpers, and
 * this class only handles location retrieval.
 * @since 2012-06-27
 * @ingroup TTMServer
 */
class RemoteTTMServer extends TTMServer implements ReadableTTMServer {
	public function query( $sourceLanguage, $targetLanguage, $text ) {
		// @todo Implement some day perhaps?
		return [];
	}

	public function isLocalSuggestion( array $suggestion ) {
		return false;
	}

	public function expandLocation( array $suggestion ) {
		return $suggestion['location'];
	}
}