Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F4109797
ReadableTtmServer.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
ReadableTtmServer.php
View Options
<?php
declare
(
strict_types
=
1
);
namespace
MediaWiki\Extension\Translate\TtmServer
;
/**
* Interface for TtmServer that can be queried (=all of them).
* @ingroup TTMServer
*/
interface
ReadableTtmServer
{
/**
* Fetches all relevant suggestions for given text.
*
* @param string $sourceLanguage language code for the provide text
* @param string $targetLanguage language code for the suggestions
* @param string $text the text for which to search suggestions
* @return array List: unordered suggestions, which each has fields:
* - source: String: the original text of the suggestion
* - target: String: the suggestion
* - context: String: title of the page where the suggestion comes from
* - quality: Float: the quality of suggestion, 1 is perfect match
*/
public
function
query
(
string
$sourceLanguage
,
string
$targetLanguage
,
string
$text
):
array
;
/**
* Determines if the suggestion returned by this TtmServer comes
* from this wiki or any other wiki.
*/
public
function
isLocalSuggestion
(
array
$suggestion
):
bool
;
/**
* Given suggestion returned by this TtmServer, constructs fully
* qualified URL to the location of the translation.
* @return string URL
*/
public
function
expandLocation
(
array
$suggestion
):
string
;
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Tue, Aug 18, 21:15 (5 d, 12 h ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
a4/87/495c4651bf376c98dcf174c587f2
Default Alt Text
ReadableTtmServer.php (1 KB)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment