config: remove ENABLE_TRANSLATIONS

This commit is contained in:
Andrew Dolgov 2011-03-18 19:25:06 +03:00
parent 565ca5653c
commit 7b26a148b0
7 changed files with 49 additions and 74 deletions

View File

@ -24,9 +24,7 @@
no_cache_incantation();
if (ENABLE_TRANSLATIONS == true) {
startup_gettext();
}
$script_started = getmicrotime();

View File

@ -82,9 +82,6 @@
// If update daemon and update_feeds should send digests
// Disable if you prefer querying special URL (see wiki)
define('ENABLE_TRANSLATIONS', true);
// Enable support for interface translations
define('MYSQL_CHARSET', 'UTF8');
// Connection charset for MySQL. If you have a legacy database and/or experience
// garbage unicode characters with this option, try setting it to a blank string.

View File

@ -42,7 +42,6 @@
return $tr;
}
if (ENABLE_TRANSLATIONS == true) { // If translations are enabled.
require_once "lib/accept-to-gettext.php";
require_once "lib/gettext/gettext.inc";
@ -70,8 +69,6 @@
_setlocale(LC_MESSAGES, $lang);
} else if (defined('LC_ALL')) {
_setlocale(LC_ALL, $lang);
} else {
die("can't setlocale(): please set ENABLE_TRANSLATIONS to false in config.php");
}
if (defined('MOBILE_VERSION')) {
@ -87,16 +84,6 @@
startup_gettext();
} else { // If translations are enabled.
function __($msg) {
return $msg;
}
function startup_gettext() {
// no-op
return true;
}
} // If translations are enabled.
if (defined('MEMCACHE_SERVER')) {
$memcache = new Memcache;
$memcache->connect(MEMCACHE_SERVER, 11211);

View File

@ -28,9 +28,6 @@ function __(msg) {
}
<?php
if (ENABLE_TRANSLATIONS) {
$l10n = _get_reader();
for ($i = 0; $i < $l10n->total; $i++) {
@ -39,6 +36,4 @@ function __(msg) {
print T_js_decl($orig, $translation);
}
}
?>

View File

@ -1,4 +1,4 @@
<?php # This file has been generated at: Fri Mar 18 18:25:12 MSK 2011
<?php # This file has been generated at: Fri Mar 18 19:23:17 MSK 2011
__("Title");
__("Title or Content");

View File

@ -136,7 +136,6 @@ function validateLoginForm(f) {
<td align="right"><input type="password" name="password"
onchange="fetchProfiles()" onfocus="fetchProfiles()"
value="<?php echo $_SERVER["REMOTE_USER"] ?>"></td></tr>
<?php if (ENABLE_TRANSLATIONS) { ?>
<tr><td align="right"><?php echo __("Language:") ?></td>
<td align="right">
<?php
@ -145,7 +144,6 @@ function validateLoginForm(f) {
?>
</td></tr>
<?php } ?>
<tr><td align="right"><?php echo __("Profile:") ?></td>
<td align="right" id="profile_box">

View File

@ -1,3 +1,3 @@
<?php # This file has been generated at: Fri Mar 18 18:21:15 MSK 2011
<?php # This file has been generated at: Fri Mar 18 19:24:44 MSK 2011
define('GENERATED_CONFIG_CHECK', 21);
$requred_defines = array( 'DB_TYPE', 'DB_HOST', 'DB_USER', 'DB_NAME', 'DB_PASS', 'MAGPIE_FETCH_TIME_OUT', 'MAGPIE_CACHE_DIR', 'MAGPIE_CACHE_AGE', 'ICONS_DIR', 'ICONS_URL', 'SINGLE_USER_MODE', 'TMP_DIRECTORY', 'ENABLE_UPDATE_DAEMON', 'DAEMON_SLEEP_INTERVAL', 'DATABASE_BACKED_SESSIONS', 'SESSION_CHECK_ADDRESS', 'SESSION_COOKIE_LIFETIME', 'SESSION_EXPIRE_TIME', 'DAEMON_UPDATE_LOGIN_LIMIT', 'CHECK_FOR_NEW_VERSION', 'DIGEST_ENABLE', 'DIGEST_EMAIL_LIMIT', 'DAEMON_SENDS_DIGESTS', 'ENABLE_TRANSLATIONS', 'MYSQL_CHARSET', 'DEFAULT_UPDATE_METHOD', 'SIMPLEPIE_CACHE_DIR', 'SIMPLEPIE_CACHE_IMAGES', 'COUNTERS_MAX_AGE', 'DIGEST_FROM_NAME', 'DIGEST_FROM_ADDRESS', 'DIGEST_SUBJECT', 'DIGEST_SMTP_HOST', 'DIGEST_SMTP_LOGIN', 'DIGEST_SMTP_PASSWORD', 'DAEMON_FEED_LIMIT', 'ALLOW_REMOTE_USER_AUTH', 'AUTO_LOGIN', 'LOCK_DIRECTORY', 'ENABLE_GZIP_OUTPUT', 'PHP_EXECUTABLE', 'ENABLE_REGISTRATION', 'REG_NOTIFY_ADDRESS', 'REG_MAX_USERS', 'FEEDBACK_URL', 'FORCE_ARTICLE_PURGE', 'SPHINX_ENABLED', 'SPHINX_INDEX', 'ENABLE_TWEET_BUTTON', 'CONSUMER_KEY', 'CONSUMER_SECRET', 'ISCONFIGURED', 'CONFIG_VERSION'); ?>
$requred_defines = array( 'DB_TYPE', 'DB_HOST', 'DB_USER', 'DB_NAME', 'DB_PASS', 'MAGPIE_FETCH_TIME_OUT', 'MAGPIE_CACHE_DIR', 'MAGPIE_CACHE_AGE', 'ICONS_DIR', 'ICONS_URL', 'SINGLE_USER_MODE', 'TMP_DIRECTORY', 'ENABLE_UPDATE_DAEMON', 'DAEMON_SLEEP_INTERVAL', 'DATABASE_BACKED_SESSIONS', 'SESSION_CHECK_ADDRESS', 'SESSION_COOKIE_LIFETIME', 'SESSION_EXPIRE_TIME', 'DAEMON_UPDATE_LOGIN_LIMIT', 'CHECK_FOR_NEW_VERSION', 'DIGEST_ENABLE', 'DIGEST_EMAIL_LIMIT', 'DAEMON_SENDS_DIGESTS', 'MYSQL_CHARSET', 'DEFAULT_UPDATE_METHOD', 'SIMPLEPIE_CACHE_DIR', 'SIMPLEPIE_CACHE_IMAGES', 'COUNTERS_MAX_AGE', 'DIGEST_FROM_NAME', 'DIGEST_FROM_ADDRESS', 'DIGEST_SUBJECT', 'DIGEST_SMTP_HOST', 'DIGEST_SMTP_LOGIN', 'DIGEST_SMTP_PASSWORD', 'DAEMON_FEED_LIMIT', 'ALLOW_REMOTE_USER_AUTH', 'AUTO_LOGIN', 'LOCK_DIRECTORY', 'ENABLE_GZIP_OUTPUT', 'PHP_EXECUTABLE', 'ENABLE_REGISTRATION', 'REG_NOTIFY_ADDRESS', 'REG_MAX_USERS', 'FEEDBACK_URL', 'FORCE_ARTICLE_PURGE', 'SPHINX_ENABLED', 'SPHINX_INDEX', 'ENABLE_TWEET_BUTTON', 'CONSUMER_KEY', 'CONSUMER_SECRET', 'ISCONFIGURED', 'CONFIG_VERSION'); ?>