Skip to content

Commit 6e24d5f

Browse files
committed
Refactor L10N data.
1 parent 7133256 commit 6e24d5f

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

l10n/fr.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
# License: GNU/GPLv2
88
# @see LICENSE.txt
99
#
10-
# This file: French language data (last modified: 2022.08.21).
10+
# This file: French language data (last modified: 2023.09.23).
1111
#
1212
# Regarding translations: My native language is English. Because this is a free
1313
# and open-source hobby project which generates zero income, and translatable
@@ -42,8 +42,8 @@ cli_ln3: |
4242
du fichier ou répertoire que vous voulez que phpMussel analyse et appuyez
4343
sur Entrée ; Tapez « c » et appuyez sur Entrée pour une liste de commandes
4444
du mode CLI ; Tapez « q » et appuyez sur Entrée pour quitter.
45-
cli_pe1: "Pas un valide PE fichier !"
46-
cli_pe2: "Sections du PE :"
45+
cli_pe1: "Pas un valide PE fichier\_!"
46+
cli_pe2: "Sections du PE\_:"
4747
cli_signature_placeholder: "NOM-DE-SIGNATURE"
4848
cli_working: "En cours"
4949
cli_commands: |
@@ -76,4 +76,4 @@ cli_commands: |
7676
-- Analyser un fichier ou un répertoire.
7777

7878
c -- Imprimer cette liste des commandes.
79-
invalid_url: "URL non valide !"
79+
invalid_url: "URL non valide\_!"

src/CLI.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
* License: GNU/GPLv2
99
* @see LICENSE.txt
1010
*
11-
* This file: CLI handler (last modified: 2023.09.19).
11+
* This file: CLI handler (last modified: 2023.09.25).
1212
*/
1313

1414
namespace phpMussel\CLI;
@@ -74,7 +74,7 @@ public function __construct(\phpMussel\Core\Loader &$Loader, \phpMussel\Core\Sca
7474
"\r%d/%d %s ...",
7575
$this->Loader->InstanceCache['ThisScanDone'],
7676
$this->Loader->InstanceCache['ThisScanTotal'],
77-
$this->Loader->L10N->getString('scan_complete')
77+
$this->Loader->L10N->getString('response.Complete')
7878
);
7979
return true;
8080
});
@@ -206,7 +206,7 @@ public function __construct(\phpMussel\Core\Loader &$Loader, \phpMussel\Core\Sca
206206
/** Convert a hexadecimal to a binary string. */
207207
elseif ($Command === 'hex_decode') {
208208
$TargetData = substr($Clean, strlen($Command) + 1);
209-
echo "\n" . ($this->Loader->hexSafe($TargetData) ?: $this->Loader->L10N->getString('invalid_data')) . "\n";
209+
echo "\n" . ($this->Loader->hexSafe($TargetData) ?: $this->Loader->L10N->getString('response.Invalid data')) . "\n";
210210
}
211211

212212
/** Convert a binary string to a base64 string. */
@@ -218,7 +218,7 @@ public function __construct(\phpMussel\Core\Loader &$Loader, \phpMussel\Core\Sca
218218
/** Convert a base64 string to a binary string. */
219219
elseif ($Command === 'base64_decode') {
220220
$TargetData = substr($Clean, strlen($Command) + 1);
221-
echo "\n" . (base64_decode($TargetData) ?: $this->Loader->L10N->getString('invalid_data')) . "\n";
221+
echo "\n" . (base64_decode($TargetData) ?: $this->Loader->L10N->getString('response.Invalid data')) . "\n";
222222
}
223223

224224
/** Scan a file or directory. */
@@ -273,7 +273,7 @@ public function recursiveCommand(string $Command, callable $Callable): string
273273
[$Command, $Params] = explode(' ', $Command);
274274
if (is_dir($Params)) {
275275
if (!is_readable($Params)) {
276-
return sprintf($this->Loader->L10N->getString('Failed to access %s'), $Params) . "\n";
276+
return sprintf($this->Loader->L10N->getString('response.Failed to access %s'), $Params) . "\n";
277277
}
278278
$Decal = [':-) - (-:', ':-) \\ (-:', ':-) | (-:', ':-) / (-:'];
279279
$Frame = 0;
@@ -400,7 +400,7 @@ private function coexFile(string $Clean): string
400400
$Data = $this->Loader->readFileContent($Params);
401401
}
402402
if (empty($Data)) {
403-
return $this->Loader->L10N->getString('invalid_data') . "\n";
403+
return $this->Loader->L10N->getString('response.Invalid data') . "\n";
404404
}
405405
return sprintf(
406406
"\$sha256:%s;\$StringLength:%d;%s\n",
@@ -427,7 +427,7 @@ private function hashFile(string $Clean): string
427427
$Data = $this->Loader->readFileContent($Params);
428428
}
429429
if (empty($Data)) {
430-
return $this->Loader->L10N->getString('invalid_data') . "\n";
430+
return $this->Loader->L10N->getString('response.Invalid data') . "\n";
431431
}
432432
return hash($this->LastAlgo, $Data) . ':' . strlen($Data) . ':' . $this->Loader->L10N->getString('cli_signature_placeholder') . "\n";
433433
});

0 commit comments

Comments
 (0)