|
|
@@ -6,7 +6,7 @@ require_once __DIR__ . '/i18n/I18nCompletionValidator.php';
|
|
|
require_once __DIR__ . '/i18n/I18nData.php';
|
|
|
require_once __DIR__ . '/i18n/I18nFile.php';
|
|
|
require_once __DIR__ . '/i18n/I18nUsageValidator.php';
|
|
|
-require_once __DIR__ . '/../constants.php';
|
|
|
+require_once dirname(__DIR__) . '/constants.php';
|
|
|
|
|
|
$cliOptions = new class extends CliOptionsParser {
|
|
|
/** @var array<int,string> $language */
|
|
|
@@ -104,7 +104,7 @@ function embedSvg(string $contents): string {
|
|
|
|
|
|
if ($cliOptions->generateReadme) {
|
|
|
$supportedFormats = ['txt', 'svg'];
|
|
|
- $flagsDir = __DIR__ . '/../docs/i18n/flags';
|
|
|
+ $flagsDir = dirname(__DIR__) . '/docs/i18n/flags';
|
|
|
|
|
|
$markdownImgStr = '';
|
|
|
foreach ($percentage as $lang => $value) {
|
|
|
@@ -131,7 +131,7 @@ if ($cliOptions->generateReadme) {
|
|
|
$template = '<!-- This file is automatically generated by `cli/check.translation.php -g` -->' . "\n";
|
|
|
|
|
|
if ($svg === '') {
|
|
|
- $i18nGen = include __DIR__ . "/../app/i18n/$lang/gen.php";
|
|
|
+ $i18nGen = include dirname(__DIR__) . "/app/i18n/$lang/gen.php";
|
|
|
if (!is_array($i18nGen) || !is_string($i18nGen['flag'] ?? null)) {
|
|
|
echo 'Error: No Unicode flag found for language ' . $lang, PHP_EOL;
|
|
|
exit(1);
|