<commit_before><?  defined('C5_EXECUTE') or die(_("Access Denied."));
$type = isset($_REQUEST['type']) ? $_REQUEST['type'] : 'addon';
$cID = isset($_REQUEST['cID']) ? $_REQUEST['cID'] : null;
$install = isset($_REQUEST['install']) ? $_REQUEST['install'] : false;

if (!empty($cID)) {
	$ph = Loader::helper('package');
	$error = $ph->install_remote($type, $cID, $install);
} else {
	$error = t('No package specified.');
}

if (empty($error)) {
	$msg = "<p>The package was successfully " . 
		($install ? "installed." : "downloaded and unzipped onto your server.</p>");
} else {
	$msg = "<p>The package could not be installed.</p>" .
		"<p>$error</p>";
}
?>

<div><?=$msg?></div><commit_msg>making package install page be better for localization<commit_after><?  defined('C5_EXECUTE') or die(_("Access Denied."));
$type = isset($_REQUEST['type']) ? $_REQUEST['type'] : 'addon';
$cID = isset($_REQUEST['cID']) ? $_REQUEST['cID'] : null;
$install = isset($_REQUEST['install']) ? $_REQUEST['install'] : false;

if (!empty($cID)) {
	$ph = Loader::helper('package');
	$error = $ph->install_remote($type, $cID, $install);
} else {
	$error = t('No package specified.');
}

if (empty($error)) {
	if ($install) {
		$msg = t('The package was successfully installed.');
	} else {
		$msg = t('The package was successfully downloaded and decompressed on your server.');
	}
} else {
	$msg = t("The package could not be installed: %s.", $error);
}
?>

<div><p><?=$msg?></p></div>
{'fraction_non_alphanumeric': 0.23666210670314639, 'fraction_numerical': 0.0013679890560875513, 'mean_word_length': 5.388646288209607, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 21, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5315843', 'n_tokens_mistral': 504, 'n_tokens_neox': 508, 'n_words': 124}