script/todo.php
private function compareTranslations(array $default, array $languages)
    {
        // Return diff language by language
        foreach ($languages as $language) {
            $this->addOutput($language);
            $current = $this->getTranslations($this->basePath, $language);

            foreach ($default as $key => $values) {
                $valuesKeys = array_keys($values);

                foreach ($valuesKeys as $key2) {
                    if (in_array($key2, ['custom', 'attributes'], true)) {
                        continue;
                    }

                    if (!isset($current[$key][$key2])) {
                        $this->addOutput($language, "  * {$key} : {$key2} : not present");
                    } elseif ($current[$key][$key2] === $default[$key][$key2]) {
                        $this->addOutput($language, "  * {$key} : {$key2}");
                    }
                }
            }
        }
    }
private function compareTranslations(array $default, array $languages)
    {
        // Return diff language by language
        foreach ($languages as $language) {
            $this->addOutput($language);
            $current = $this->getTranslations($this->basePath, $language);

            foreach ($default as $key => $values) {
                $valuesKeys = array_keys($values);

                foreach ($valuesKeys as $key2) {
                    if (in_array($key2, ['custom', 'attributes'], true)) {
                        continue;
                    }

                    if (!isset($current[$key][$key2])) {
                        $this->addOutput($language, "  * {$key} : {$key2} : not present");
                    } elseif ($current[$key][$key2] === $default[$key][$key2]) {
                        $this->addOutput($language, "  * {$key} : {$key2}");
                    }
                }
            }
        }
    }
private function compareTranslations ( array $ default , array $ languages ) { // Return diff language by language foreach ( $ languages as $ language ) { $ this -> addOutput ( $ language ) ; $ current = $ this -> getTranslations ( $ this -> basePath , $ language ) ; foreach ( $ default as $ key => $ values ) { $ valuesKeys = array_keys ( $ values ) ; foreach ( $ valuesKeys as $ key2 ) { if ( in_array ( $ key2 , [ 'custom' , 'attributes' ] , true ) ) { continue ; } if ( ! isset ( $ current [ $ key ] [ $ key2 ] ) ) { $ this -> addOutput ( $ language , "  * {$key} : {$key2} : not present" ) ; } elseif ( $ current [ $ key ] [ $ key2 ] === $ default [ $ key ] [ $ key2 ] ) { $ this -> addOutput ( $ language , "  * {$key} : {$key2}" ) ; } } } } }
Compare translations.

@param array $default   language by default
@param array $languages others languages
Compare translations .