Compare commits

...

2 Commits

Author SHA1 Message Date
crazywhalecc
237fc535b4 Fix FileSystem remove soft link directory 2024-11-06 16:45:45 +08:00
crazywhalecc
8da3f35815 Fix gettext sanity check 2024-11-06 16:29:17 +08:00
2 changed files with 3 additions and 2 deletions

View File

@@ -367,6 +367,9 @@ class FileSystem
}
}
}
if (is_link($dir)) {
return unlink($dir);
}
return rmdir($dir);
}

View File

@@ -5,7 +5,6 @@ declare(strict_types=1);
assert(function_exists('gettext'));
assert(function_exists('bindtextdomain'));
assert(function_exists('textdomain'));
assert(function_exists('bind_textdomain_codeset'));
if (!is_dir('locale/en_US/LC_MESSAGES/')) {
mkdir('locale/en_US/LC_MESSAGES/', 0755, true);
@@ -19,7 +18,6 @@ setlocale(LC_ALL, 'en_US');
$domain = 'test';
bindtextdomain($domain, 'locale/');
bind_textdomain_codeset($domain, 'UTF-8');
textdomain($domain);
assert(gettext(json_decode('"\u793a\u4f8b"', true)) === 'Example');