changes
This commit is contained in:
@ -162,11 +162,11 @@ function extractLocaleFromFilePath($filePath)
|
||||
function extractTranslationKeys($filePath): array
|
||||
{
|
||||
$translationKeys = [];
|
||||
$contents = new \SimpleXMLElement(file_get_contents($filePath));
|
||||
$contents = new SimpleXMLElement(file_get_contents($filePath));
|
||||
|
||||
foreach ($contents->file->body->{'trans-unit'} as $translationKey) {
|
||||
$translationId = (string) $translationKey['id'];
|
||||
$translationKey = (string) $translationKey->source;
|
||||
$translationKey = (string) ($translationKey['resname'] ?? $translationKey->source);
|
||||
|
||||
$translationKeys[$translationId] = $translationKey;
|
||||
}
|
||||
|
Reference in New Issue
Block a user