diff --git a/README.md b/README.md index 9957827..91f16be 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,7 @@ Translating: ------------ The scrip `update-translations.sh` can be used to update the language template and translation files from source. -It will generate the file `locale/main-website.pot` which you can then use as basis to create a new language file in `YOUR_LANG_CODE/LC_MESSAGES/main-website.po` and edit it with a translation program, such as [Poedit](https://poedit.net/). +It will generate the file `locale/onion-link-list.pot` which you can then use as basis to create a new language file in `YOUR_LANG_CODE/LC_MESSAGES/onion-link-list.po` and edit it with a translation program, such as [Poedit](https://poedit.net/). Once you are done, you can open a pull request, or [email me](mailto:daniel@danwin1210.de), to include the translation. Live Demo: diff --git a/setup.php b/setup.php index bc2fb0f..5960f5a 100644 --- a/setup.php +++ b/setup.php @@ -1,40 +1,12 @@ -* -* This program is free software: you can redistribute it and/or modify -* it under the terms of the GNU General Public License as published by -* the Free Software Foundation, either version 3 of the License, or -* (at your option) any later version. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program. If not, see . -*/ if(!extension_loaded('gettext')){ - die('The gettext extension of PHP is required. Please install it first.'); + die('The gettext extension of PHP is required. Please install it first.' . PHP_EOL); } require_once(__DIR__.'/common_config.php'); -if(!extension_loaded('pdo_mysql')){ - die(_('The pdo_mysql extension of PHP is required. Please install it first.')); -} -if(!extension_loaded('pcre')){ - die(_('The pcre extension of PHP is required. Please install it first.')); -} -if(!extension_loaded('json')){ - die(_('The json extension of PHP is required. Please install it first.')); -} -if(!extension_loaded('curl')){ - die(_('The curl extension of PHP is required. Please install it first.')); -} -if(!extension_loaded('date')){ - die(_('The date extension of PHP is required. Please install it first.')); +foreach(['pdo_mysql', 'json', 'pcre', 'curl', 'intl'] as $required_extension) { + if ( ! extension_loaded( 'pdo_mysql' ) ) { + die( sprintf(_( 'The %s extension of PHP is required. Please install it first.' ), $required_extension) . PHP_EOL ); + } } try{ $db=new PDO('mysql:host=' . DBHOST . ';dbname=' . DBNAME . ';charset=utf8mb4', DBUSER, DBPASS, [PDO::ATTR_ERRMODE=>PDO::ERRMODE_WARNING, PDO::ATTR_PERSISTENT=>PERSISTENT]); diff --git a/www/admin.php b/www/admin.php index 31fff69..3ede848 100644 --- a/www/admin.php +++ b/www/admin.php @@ -16,6 +16,7 @@ asort($categories); <?php echo _('Admin interface'); ?> + diff --git a/www/index.php b/www/index.php index 63553da..41b337d 100644 --- a/www/index.php +++ b/www/index.php @@ -111,6 +111,7 @@ function send_html(): void echo ''; echo ''; echo ''; + echo ''; echo ''; echo ''; echo '
';