Commit e65eeabe by Alexander Makarov

Fixed translation tool and docs

parent 98a4be27
......@@ -15,7 +15,7 @@ use yii\helpers\Html;
/**
* TranslationController handles tasks related to framework translations.
*
* build translation ../docs/guide" "../docs/guide_ru" --title="Russian guide translation report" > report_guide_ru.html
* build translation "../docs/guide" "../docs/guide_ru" "Russian guide translation report" > report_guide_ru.html
*
* @author Alexander Makarov <sam@rmcreative.ru>
*/
......@@ -122,7 +122,7 @@ class TranslationController extends Controller
* @param string $diff DIFF
* @return string highlighted DIFF
*/
protected function highlightDiff($diff)
public function highlightDiff($diff)
{
$lines = explode("\n", $diff);
foreach ($lines as $key => $val) {
......
......@@ -40,7 +40,7 @@ use yii\helpers\Html;
<p><?php echo Html::encode($error)?></p>
<?php endforeach ?>
<?php if(!empty($result['diff'])):?>
<code class="diff"><pre><?php echo $this->highlightDiff($result['diff'])?></pre></code>
<code class="diff"><pre><?php echo $this->context->highlightDiff($result['diff'])?></pre></code>
<?php endif?>
<?php endforeach ?>
</body>
......
......@@ -30,7 +30,7 @@ Yii переводится на множество языков, в том чи
в директории `build` и выполнив:
```
build translation ../docs/guide" "../docs/guide-ru" --title="Russian guide translation report" > report-guide-ru.html
build translation "../docs/guide" "../docs/guide_ru" "Russian guide translation report" > report_guide_ru.html
```
Перед тем, как начать перевод, убедитесь, что никто им ещё не занимается и запишите себя в
......
......@@ -39,5 +39,5 @@ After initial work is done you can get what's changed since last translation of
`build` directory:
```
build translation ../docs/guide" "../docs/guide-ru" --title="Russian guide translation report" > report-guide-ru.html
build translation "../docs/guide" "../docs/guide_ru" "Russian guide translation report" > report_guide_ru.html
```
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment