Removes invalid language files from an installation.
More...
Removes invalid language files from an installation.
Definition at line 14 of file ReleaseCleaner.php.
Elgg\I18n\ReleaseCleaner::__construct |
( |
array |
$codes = [] | ) |
|
Constructor.
- Parameters
-
string[] | $codes Valid language codes |
Definition at line 31 of file ReleaseCleaner.php.
Elgg\I18n\ReleaseCleaner::cleanInstallation |
( |
string |
$dir | ) |
|
Clean up within an installation.
- Parameters
-
string | $dir | The installation dir |
- Returns
- void
Definition at line 46 of file ReleaseCleaner.php.
Elgg\I18n\ReleaseCleaner::cleanLanguagesDir |
( |
string |
$dir | ) |
|
Elgg\I18n\ReleaseCleaner::cleanupEmptyTranslations |
( |
string |
$translation_file | ) |
|
|
protected |
Remove empty translations from a translation file.
- Parameters
-
string | $translation_file | path to the translation file |
- Returns
- void
Definition at line 169 of file ReleaseCleaner.php.
Elgg\I18n\ReleaseCleaner::cleanupMissingTranslationParameters |
( |
string |
$directory, |
|
|
string |
$language_code |
|
) |
| |
|
protected |
Try to cleanup translations with a different argument count than English as this can cause failed translations.
- Parameters
-
string | $directory | Language directory to use for the English translation |
string | $language_code | Language core to try to cleanup |
- Returns
- void
Definition at line 127 of file ReleaseCleaner.php.
Elgg\I18n\ReleaseCleaner::detectAdditionalKeys |
( |
string |
$directory, |
|
|
string |
$language_code |
|
) |
| |
|
protected |
Detect translation keys that (still) exist in a translation but no longer in the English translation.
- Parameters
-
string | $directory | Directory to read translation from |
string | $language_code | Translation to compare to English |
- Returns
- void
Definition at line 214 of file ReleaseCleaner.php.
Elgg\I18n\ReleaseCleaner::detectIdenticalTranslations |
( |
string |
$directory, |
|
|
string |
$language_code |
|
) |
| |
|
protected |
Detect identical translations, this could be due to a wrong Transifex import.
- Parameters
-
string | $directory | Directory to read translation from |
string | $language_code | Translation to compare to English |
- Returns
- void
Definition at line 235 of file ReleaseCleaner.php.
Elgg\I18n\ReleaseCleaner::normalizeLanguageCode |
( |
string |
$code | ) |
|
|
protected |
Normalize a language code (e.g.
from Transifex)
- Parameters
-
- Returns
- string
Definition at line 201 of file ReleaseCleaner.php.
Elgg\I18n\ReleaseCleaner::$log = [] |
The documentation for this class was generated from the following file: