/
ProviderInterface.php
81 lines (73 loc) · 2.94 KB
/
ProviderInterface.php
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
<?php
namespace Concrete\Core\Localization\Translation\Remote;
use Gettext\Translations;
interface ProviderInterface
{
/**
* List the available translations for a specific core version.
*
* @param string $coreVersion The version of the concrete5 core
* @param int|null $progressLimit A custom progress limit (from 0 - no translations at all - to 100 - all strings are translated)
*
* @return Stats[] Array keys are the locale IDs, values are Stats instances
*/
public function getAvailableCoreStats($coreVersion, $progressLimit = null);
/**
* Get core translations stats for a specific locale ID.
*
* @param string $coreVersion The version of the concrete5 core
* @param string $localeID
* @param int|null $progressLimit A custom progress limit (from 0 - no translations at all - to 100 - all strings are translated)
*
* @return Stats
*/
public function getCoreStats($coreVersion, $localeID, $progressLimit = null);
/**
* List the available translations for a specific package version.
*
* @param string $packageHandle The handle of the package
* @param string $packageVersion The version of the package
* @param int|null $progressLimit A custom progress limit (from 0 - no translations at all - to 100 - all strings are translated)
*
* @return Stats[] Array keys are the locale IDs, values are Stats instances
*/
public function getAvailablePackageStats($packageHandle, $packageVersion, $progressLimit = null);
/**
* Get package translations stats for a specific locale ID.
*
* @param string $packageHandle The handle of the package
* @param string $packageVersion The version of the package
*
* @return Stats
*/
public function getPackageStats($packageHandle, $packageVersion, $localeID, $progressLimit = null);
/**
* Fetch the translations for the concrete5 core.
*
* @param string $coreVersion The version of the concrete5 core
* @param string $localeID The locale identifier
* @param string $formatHandle The handle of the format of the translations to be fetched
*
* @return string
*/
public function fetchCoreTranslations($coreVersion, $localeID, $formatHandle = 'mo');
/**
* Fetch the translations for a package.
*
* @param string $packageHandle The handle of the package
* @param string $packageVersion The version of the package
* @param string $localeID The locale identifier
* @param string $formatHandle The handle of the format of the translations to be fetched
*
* @return string
*/
public function fetchPackageTranslations($packageHandle, $packageVersion, $localeID, $formatHandle = 'mo');
/**
* Fill-in already known translations.
*
* @param Translations $translations
*
* @return Translations
*/
public function fillTranslations(Translations $translations);
}