<commit_before><?php
	set_include_path(dirname(__FILE__) ."/include" . PATH_SEPARATOR .
		get_include_path());

	define('DISABLE_SESSIONS', true);

	require "functions.php";
	header("Content-Type: text/plain; charset=UTF-8");

	function T_js_decl($s1, $s2) {
		if ($s1 && $s2) {
			$s1 = preg_replace("/\n/", "", $s1);
			$s2 = preg_replace("/\n/", "", $s2);

			$s1 = preg_replace("/\"/", "\\\"", $s1);
			$s2 = preg_replace("/\"/", "\\\"", $s2);

			return "T_messages[\"$s1\"] = \"$s2\";\n";
		}
	}
?>

var T_messages = new Object();

function __(msg) {
	if (T_messages[msg]) {
		return T_messages[msg];
	} else {
		return msg;
	}
}

function ngettext(msg1, msg2, n) {
	return (parseInt(n) > 1) ? msg2 : msg1;
}

<?php
	$l10n = _get_reader();

	for ($i = 0; $i < $l10n->total; $i++) {
		$orig = $l10n->get_original_string($i);
		$translation = __($orig);

		print T_js_decl($orig, $translation);
	}
?>
<commit_msg>localized_js didn't use sessions<commit_after><?php
	set_include_path(dirname(__FILE__) ."/include" . PATH_SEPARATOR .
		get_include_path());

	require_once "sessions.php";
	require_once "functions.php";
	header("Content-Type: text/plain; charset=UTF-8");

	function T_js_decl($s1, $s2) {
		if ($s1 && $s2) {
			$s1 = preg_replace("/\n/", "", $s1);
			$s2 = preg_replace("/\n/", "", $s2);

			$s1 = preg_replace("/\"/", "\\\"", $s1);
			$s2 = preg_replace("/\"/", "\\\"", $s2);

			return "T_messages[\"$s1\"] = \"$s2\";\n";
		}
	}
?>

var T_messages = new Object();

function __(msg) {
	if (T_messages[msg]) {
		return T_messages[msg];
	} else {
		return msg;
	}
}

function ngettext(msg1, msg2, n) {
	return (parseInt(n) > 1) ? msg2 : msg1;
}

<?php
	$l10n = _get_reader();

	for ($i = 0; $i < $l10n->total; $i++) {
		$orig = $l10n->get_original_string($i);
		$translation = __($orig);

		print T_js_decl($orig, $translation);
	}
?>

{'fraction_non_alphanumeric': 0.24136069114470843, 'fraction_numerical': 0.029157667386609073, 'mean_word_length': 3.6792929292929295, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '716600', 'n_tokens_mistral': 856, 'n_tokens_neox': 795, 'n_words': 145}