Pārlūkot izejas kodu

Add additional translation string for russian

tags/v0.7.0
itismadness pirms 6 gadiem
vecāks
revīzija
9ca69be3be
3 mainītis faili ar 23 papildinājumiem un 7 dzēšanām
  1. +9
    -2
      src/Command/AnalyzeCommand.php
  2. +10
    -4
      src/Logchecker.php
  3. +4
    -1
      src/eac_languages.php

+ 9
- 2
src/Command/AnalyzeCommand.php Parādīt failu

@@ -4,7 +4,7 @@ namespace OrpheusNET\Logchecker\Command;

use OrpheusNET\Logchecker\Logchecker;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Input\{InputArgument,InputOption,InputInterface};
use Symfony\Component\Console\Output\OutputInterface;

class AnalyzeCommand extends Command {
@@ -13,7 +13,8 @@ class AnalyzeCommand extends Command {
->setName('analyze')
->setDescription('analyze log file')
->setHelp('This command analyzes a log file')
->addArgument('file', true, 'Log file to analyze');
->addOption('output', null, InputOption::VALUE_NONE, 'Print the HTML log text')
->addArgument('file', InputArgument::REQUIRED, 'Log file to analyze');
}

protected function execute(InputInterface $input, OutputInterface $output) {
@@ -35,5 +36,11 @@ class AnalyzeCommand extends Command {
$output->writeln(' '.$detail);
}
}

if ($input->getOption('output')) {
$output->writeln('');
$output->writeln('Log Text:');
$output->writeln($log_text);
}
}
}

+ 10
- 4
src/Logchecker.php Parādīt failu

@@ -87,7 +87,7 @@ class Logchecker {
}
}
catch (\Exception $exc) {
$this->account('chardet failed to analyze log encoding', false, false, true, true);
$this->account('chardet failed to analyze log encoding', false, false, false, true);
}
}
}
@@ -144,9 +144,15 @@ class Logchecker {
if (empty($this->EAC_LANG['en'][$Key])) {
continue;
}
$Log = preg_replace('/'.preg_quote($Value, '/').'/ui', $this->EAC_LANG['en'][$Key], $this->Log);
if ($Log !== null) {
$this->Log = $Log;

if (!is_array($Value)) {
$Value = [$Value];
}
foreach ($Value as $VValue) {
$Log = preg_replace('/'.preg_quote($VValue, '/').'/ui', $this->EAC_LANG['en'][$Key], $this->Log);
if ($Log !== null) {
$this->Log = $Log;
}
}
}
break;


+ 4
- 1
src/eac_languages.php Parādīt failu

@@ -315,7 +315,10 @@ $EAC_LANG['ru'] = array(
1308 => "Качество",
1328 => "Высокое",
1329 => "Низкое",
1309 => "Добавление ID3-тега",
1309 => [
"Добавление ID3-тега",
"Добавление ID3-тэга",
],
1310 => "Формат сэмплов",
1320 => "Обработка зазоров",
1321 => "Не обнаружено, добавлено к предыдущему треку",


Notiek ielāde…
Atcelt
Saglabāt