From 16a131380bb1ae17a18e4bf95d345cffb80a787c Mon Sep 17 00:00:00 2001 From: Patrick Crandol Date: Sun, 18 Nov 2018 05:37:22 -0500 Subject: I18n standardization (#2138) * i18n Admin standardization cz - moved items incorrectly placed in system array to extensions array nl - remove registration array in user array that doesn't appear in any other translations - possibly from an old version that didn't get removed? oc - reordered list to standardize order with other translation files. * Alphabetize extensions Array * Standardize conf.php he - removed options not appearing in other i18n files, added missing strings * Standardize feedback.php he - removed line not found in other translation files nl - removed line not found in other translation files * Standardize gen.php * Standardize index.php Major sorting of oc. Added tags to several languages * Standardize install.php ru - added missing strings it - remove extra string not found in other config files he - add missing strings, remove strings not found in other languages oc - reorganize * Standardize sub.php * Standardize and fix TODOs use format "//TODO - Translation" for easier searching * Fix whitespace --- app/i18n/kr/admin.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'app/i18n/kr/admin.php') diff --git a/app/i18n/kr/admin.php b/app/i18n/kr/admin.php index bc65b3fa2..ac4a808e7 100644 --- a/app/i18n/kr/admin.php +++ b/app/i18n/kr/admin.php @@ -67,8 +67,8 @@ return array( 'ok' => 'JSON 확장 기능이 설치되어 있습니다.', ), 'mbstring' => array( - 'nok' => 'Cannot find the recommended library mbstring for Unicode.', //TODO - 'ok' => 'You have the recommended library mbstring for Unicode.', //TODO + 'nok' => 'Cannot find the recommended library mbstring for Unicode.', //TODO - Translation + 'ok' => 'You have the recommended library mbstring for Unicode.', //TODO - Translation ), 'minz' => array( 'nok' => 'Minz 프레임워크를 찾을 수 없습니다.', @@ -106,23 +106,23 @@ return array( ), ), 'extensions' => array( + 'author' => '제작자', + 'community' => '사용 가능한 커뮤니티 확장 기능들', + 'description' => '설명', 'disabled' => '비활성화됨', 'empty_list' => '설치된 확장 기능이 없습니다', 'enabled' => '활성화됨', + 'latest' => '설치됨', + 'name' => '이름', 'no_configure_view' => '이 확장 기능은 설정이 없습니다.', 'system' => array( '_' => '시스템 확장 기능', 'no_rights' => '시스템 확장 기능 (이 확장 기능에 대한 권한이 없습니다)', ), 'title' => '확장 기능', + 'update' => '업데이트 있음', 'user' => '사용자 확장 기능', - 'community' => '사용 가능한 커뮤니티 확장 기능들', - 'name' => '이름', 'version' => '버전', - 'description' => '설명', - 'author' => '제작자', - 'latest' => '설치됨', - 'update' => '업데이트 있음', ), 'stats' => array( '_' => '통계', -- cgit v1.2.3 From ebb9ee0873333c111546412ad08bf5207529f24a Mon Sep 17 00:00:00 2001 From: Patrick Crandol Date: Sun, 18 Nov 2018 13:34:41 -0500 Subject: Edit cookie_duration from GUI (#2137) * Use cookie_duration correctly * WIP allow cookie_duration to be modified from GUI * Allow cookie_duration to actually be updated * Update view to properly display cookie_duration * Add new strings in Translation Files * Fix typo * Fix trailing whitespace * I18n: French translation * I18n fr: Forgot todo --- app/Controllers/configureController.php | 2 ++ app/Models/Auth.php | 11 ++++++----- app/Models/ConfigurationSetter.php | 3 +++ app/i18n/cz/admin.php | 14 +++++++++----- app/i18n/de/admin.php | 4 ++++ app/i18n/en/admin.php | 4 ++++ app/i18n/es/admin.php | 4 ++++ app/i18n/fr/admin.php | 4 ++++ app/i18n/he/admin.php | 14 +++++++++----- app/i18n/it/admin.php | 4 ++++ app/i18n/kr/admin.php | 4 ++++ app/i18n/nl/admin.php | 4 ++++ app/i18n/oc/admin.php | 4 ++++ app/i18n/pt-br/admin.php | 4 ++++ app/i18n/ru/admin.php | 4 ++++ app/i18n/tr/admin.php | 4 ++++ app/i18n/zh-cn/admin.php | 4 ++++ app/views/configure/system.phtml | 8 ++++++++ 18 files changed, 85 insertions(+), 15 deletions(-) (limited to 'app/i18n/kr/admin.php') diff --git a/app/Controllers/configureController.php b/app/Controllers/configureController.php index 20bcd2e76..9c3900f39 100755 --- a/app/Controllers/configureController.php +++ b/app/Controllers/configureController.php @@ -308,6 +308,7 @@ class FreshRSS_configure_Controller extends Minz_ActionController { * - user limit (default: 1) * - user category limit (default: 16384) * - user feed limit (default: 16384) + * - user login duration for form auth (default: 2592000) */ public function systemAction() { if (!FreshRSS_Auth::hasAccess('admin')) { @@ -318,6 +319,7 @@ class FreshRSS_configure_Controller extends Minz_ActionController { $limits['max_registrations'] = Minz_Request::param('max-registrations', 1); $limits['max_feeds'] = Minz_Request::param('max-feeds', 16384); $limits['max_categories'] = Minz_Request::param('max-categories', 16384); + $limits['cookie_duration'] = Minz_Request::param('cookie-duration', 2592000); FreshRSS_Context::$system_conf->limits = $limits; FreshRSS_Context::$system_conf->title = Minz_Request::param('instance-name', 'FreshRSS'); FreshRSS_Context::$system_conf->auto_update_url = Minz_Request::param('auto-update-url', false); diff --git a/app/Models/Auth.php b/app/Models/Auth.php index 8c711308c..d1e26b8e8 100644 --- a/app/Models/Auth.php +++ b/app/Models/Auth.php @@ -233,9 +233,10 @@ class FreshRSS_FormAuth { $token_file = DATA_PATH . '/tokens/' . $token . '.txt'; $mtime = @filemtime($token_file); - if ($mtime + 2629744 < time()) { - // Token has expired (> 1 month) or does not exist. - // TODO: 1 month -> use a configuration instead + $limits = $conf->limits; + $cookie_duration = empty($limits['cookie_duration']) ? 2592000 : $limits['cookie_duration']; + if ($mtime + $cookie_duration < time()) { + // Token has expired (> cookie_duration) or does not exist. @unlink($token_file); return array(); } @@ -256,7 +257,7 @@ class FreshRSS_FormAuth { } $limits = $conf->limits; - $cookie_duration = empty($limits['cookie_duration']) ? 2629744 : $limits['cookie_duration']; + $cookie_duration = empty($limits['cookie_duration']) ? 2592000 : $limits['cookie_duration']; $expire = time() + $cookie_duration; Minz_Session::setLongTermCookie('FreshRSS_login', $token, $expire); return $token; @@ -277,7 +278,7 @@ class FreshRSS_FormAuth { public static function purgeTokens() { $conf = Minz_Configuration::get('system'); $limits = $conf->limits; - $cookie_duration = empty($limits['cookie_duration']) ? 2629744 : $limits['cookie_duration']; + $cookie_duration = empty($limits['cookie_duration']) ? 2592000 : $limits['cookie_duration']; $oldest = time() - $cookie_duration; foreach (new DirectoryIterator(DATA_PATH . '/tokens/') as $file_info) { // $extension = $file_info->getExtension(); doesn't work in PHP < 5.3.7 diff --git a/app/Models/ConfigurationSetter.php b/app/Models/ConfigurationSetter.php index ad703dfc5..ec6380df4 100644 --- a/app/Models/ConfigurationSetter.php +++ b/app/Models/ConfigurationSetter.php @@ -335,6 +335,9 @@ class FreshRSS_ConfigurationSetter { private function _limits(&$data, $values) { $max_small_int = 16384; $limits_keys = array( + 'cookie_duration' => array( + 'min' => 0, + ), 'cache_duration' => array( 'min' => 0, ), diff --git a/app/i18n/cz/admin.php b/app/i18n/cz/admin.php index 271a9a253..68127f571 100644 --- a/app/i18n/cz/admin.php +++ b/app/i18n/cz/admin.php @@ -157,11 +157,15 @@ return array( 'top_feed' => 'Top ten kanálů', ), 'system' => array( - '_' => 'System configuration', //TODO - Translation - 'auto-update-url' => 'Auto-update server URL', //TODO - Translation - 'instance-name' => 'Instance name', //TODO - Translation - 'max-categories' => 'Categories per user limit', //TODO - Translation - 'max-feeds' => 'Feeds per user limit', //TODO - Translation + '_' => 'System configuration', //TODO - Translation + 'auto-update-url' => 'Auto-update server URL', //TODO - Translation + 'cookie-duration' => array( + 'help' => 'in seconds', //TODO - Translation + 'number' => 'Duration to keep logged in', //TODO - Translation + ), + 'instance-name' => 'Instance name', //TODO - Translation + 'max-categories' => 'Categories per user limit', //TODO - Translation + 'max-feeds' => 'Feeds per user limit', //TODO - Translation 'registration' => array( 'help' => '0 znamená žádná omezení účtu', 'number' => 'Maximální počet účtů', diff --git a/app/i18n/de/admin.php b/app/i18n/de/admin.php index fe626bb70..f0307dcab 100644 --- a/app/i18n/de/admin.php +++ b/app/i18n/de/admin.php @@ -162,6 +162,10 @@ return array( 'instance-name' => 'Dein Reader Name', 'max-categories' => 'Anzahl erlaubter Kategorien pro Benutzer', 'max-feeds' => 'Anzahl erlaubter Feeds pro Benutzer', + 'cookie-duration' => array( + 'help' => 'in Sekunden', + 'number' => 'Duration to keep logged in', // @todo translate + ), 'registration' => array( 'help' => '0 meint, dass es kein Account Limit gibt', 'number' => 'Maximale Anzahl von Accounts', diff --git a/app/i18n/en/admin.php b/app/i18n/en/admin.php index b1252d672..004089ffc 100644 --- a/app/i18n/en/admin.php +++ b/app/i18n/en/admin.php @@ -162,6 +162,10 @@ return array( 'instance-name' => 'Instance name', 'max-categories' => 'Categories per user limit', 'max-feeds' => 'Feeds per user limit', + 'cookie-duration' => array( + 'help' => 'in seconds', + 'number' => 'Duration to keep logged in', + ), 'registration' => array( 'help' => '0 means that there is no account limit', 'number' => 'Max number of accounts', diff --git a/app/i18n/es/admin.php b/app/i18n/es/admin.php index bd4446ce5..0ec8549bd 100755 --- a/app/i18n/es/admin.php +++ b/app/i18n/es/admin.php @@ -162,6 +162,10 @@ return array( 'instance-name' => 'Nombre de la fuente', 'max-categories' => 'Límite de categorías por usuario', 'max-feeds' => 'Límite de fuentes por usuario', + 'cookie-duration' => array( + 'help' => 'in seconds', // @todo translate + 'number' => 'Duration to keep logged in', // @todo translate + ), 'registration' => array( 'help' => '0 significa que no hay límite en la cuenta', 'number' => 'Número máximo de cuentas', diff --git a/app/i18n/fr/admin.php b/app/i18n/fr/admin.php index 1175c9c65..74605b5ee 100644 --- a/app/i18n/fr/admin.php +++ b/app/i18n/fr/admin.php @@ -162,6 +162,10 @@ return array( 'instance-name' => 'Nom de l’instance', 'max-categories' => 'Limite de catégories par utilisateur', 'max-feeds' => 'Limite de flux par utilisateur', + 'cookie-duration' => array( + 'help' => 'en secondes', + 'number' => 'Durée avant expiration de la session', + ), 'registration' => array( 'help' => 'Un chiffre de 0 signifie que l’on peut créer un nombre infini de comptes', 'number' => 'Nombre max de comptes', diff --git a/app/i18n/he/admin.php b/app/i18n/he/admin.php index 415816d34..e0dfc405d 100644 --- a/app/i18n/he/admin.php +++ b/app/i18n/he/admin.php @@ -157,11 +157,15 @@ return array( 'top_feed' => 'עשרת ההזנות המובילות', ), 'system' => array( - '_' => 'System configuration', //TODO - Translation - 'auto-update-url' => 'Auto-update server URL', //TODO - Translation - 'instance-name' => 'Instance name', //TODO - Translation - 'max-categories' => 'Categories per user limit', //TODO - Translation - 'max-feeds' => 'Feeds per user limit', //TODO - Translation + '_' => 'System configuration', //TODO - Translation + 'auto-update-url' => 'Auto-update server URL', //TODO - Translation + 'cookie-duration' => array( + 'help' => 'in seconds', //TODO - Translation + 'number' => 'Duration to keep logged in', //TODO - Translation + ), + 'instance-name' => 'Instance name', //TODO - Translation + 'max-categories' => 'Categories per user limit', //TODO - Translation + 'max-feeds' => 'Feeds per user limit', //TODO - Translation 'registration' => array( 'help' => '0 means that there is no account limit', //TODO - Translation 'number' => 'Max number of accounts', //TODO - Translation diff --git a/app/i18n/it/admin.php b/app/i18n/it/admin.php index 88972aa8f..d4253e9ba 100644 --- a/app/i18n/it/admin.php +++ b/app/i18n/it/admin.php @@ -162,6 +162,10 @@ return array( 'instance-name' => 'Nome istanza', 'max-categories' => 'Limite categorie per utente', 'max-feeds' => 'Limite feeds per utente', + 'cookie-duration' => array( + 'help' => 'in seconds', // @todo translate + 'number' => 'Duration to keep logged in', // @todo translate + ), 'registration' => array( 'help' => '0 significa che non esiste limite sui profili', 'number' => 'Numero massimo di profili', diff --git a/app/i18n/kr/admin.php b/app/i18n/kr/admin.php index ac4a808e7..532fe30a5 100644 --- a/app/i18n/kr/admin.php +++ b/app/i18n/kr/admin.php @@ -162,6 +162,10 @@ return array( 'instance-name' => '인스턴스 이름', 'max-categories' => '사용자별 카테고리 개수 제한', 'max-feeds' => '사용자별 피드 개수 제한', + 'cookie-duration' => array( + 'help' => 'in seconds', // @todo translate + 'number' => 'Duration to keep logged in', // @todo translate + ), 'registration' => array( 'help' => '0: 제한 없음', 'number' => '계정 최대 개수', diff --git a/app/i18n/nl/admin.php b/app/i18n/nl/admin.php index 1fd31e27a..8a63b885b 100644 --- a/app/i18n/nl/admin.php +++ b/app/i18n/nl/admin.php @@ -162,6 +162,10 @@ return array( 'instance-name' => 'Voorbeeld naam', 'max-categories' => 'Categoriën limiet per gebruiker', 'max-feeds' => 'Feed limiet per gebruiker', + 'cookie-duration' => array( + 'help' => 'in seconds', // @todo translate + 'number' => 'Duration to keep logged in', // @todo translate + ), 'registration' => array( 'help' => '0 betekent geen account limiet', 'number' => 'Maximum aantal accounts', diff --git a/app/i18n/oc/admin.php b/app/i18n/oc/admin.php index 9eab3b4c8..3df36c7c5 100644 --- a/app/i18n/oc/admin.php +++ b/app/i18n/oc/admin.php @@ -159,6 +159,10 @@ return array( 'system' => array( '_' => 'Configuracion sistèma', 'auto-update-url' => 'URL del servici de mesa a jorn', + 'cookie-duration' => array( + 'help' => 'in seconds', //TODO - Translation + 'number' => 'Duration to keep logged in', //TODO - Translation + ), 'instance-name' => 'Nom de l’instància', 'max-categories' => 'Limita de categoria per utilizaire', 'max-feeds' => 'Limita de fluxes per utilizaire', diff --git a/app/i18n/pt-br/admin.php b/app/i18n/pt-br/admin.php index ca88e2039..82559c67b 100644 --- a/app/i18n/pt-br/admin.php +++ b/app/i18n/pt-br/admin.php @@ -162,6 +162,10 @@ return array( 'instance-name' => 'Nome da instância', 'max-categories' => 'Limite de categorias por usuário', 'max-feeds' => 'Limite de Feeds por usuário', + 'cookie-duration' => array( + 'help' => 'in seconds', // @todo translate + 'number' => 'Duration to keep logged in', // @todo translate + ), 'registration' => array( 'help' => '0 significa que não há limite para a conta', 'number' => 'Máximo número de contas', diff --git a/app/i18n/ru/admin.php b/app/i18n/ru/admin.php index efbd8fde0..c9a7d6683 100644 --- a/app/i18n/ru/admin.php +++ b/app/i18n/ru/admin.php @@ -162,6 +162,10 @@ return array( 'instance-name' => 'Название этого сервера', 'max-categories' => 'Количество категорий на пользователя', 'max-feeds' => 'Количество статей на пользователя', + 'cookie-duration' => array( + 'help' => 'in seconds', // @todo translate + 'number' => 'Duration to keep logged in', // @todo translate + ), 'registration' => array( 'help' => '0 означает неограниченное количество пользователей', 'number' => 'Максимальное количество пользователей', diff --git a/app/i18n/tr/admin.php b/app/i18n/tr/admin.php index 81e5d14a2..b1d6671ca 100644 --- a/app/i18n/tr/admin.php +++ b/app/i18n/tr/admin.php @@ -162,6 +162,10 @@ return array( 'instance-name' => 'Örnek isim', 'max-categories' => 'Kullanıcı başına kategori limiti', 'max-feeds' => 'Kullanıcı başına akış limiti', + 'cookie-duration' => array( + 'help' => 'in seconds', // @todo translate + 'number' => 'Duration to keep logged in', // @todo translate + ), 'registration' => array( 'help' => '0 sınır yok anlamındadır', 'number' => 'En fazla hesap sayısı', diff --git a/app/i18n/zh-cn/admin.php b/app/i18n/zh-cn/admin.php index e6ca552ab..e34070526 100644 --- a/app/i18n/zh-cn/admin.php +++ b/app/i18n/zh-cn/admin.php @@ -162,6 +162,10 @@ return array( 'instance-name' => '实例名称', 'max-categories' => '每用户分类限制', 'max-feeds' => '每用户 RSS 源限制', + 'cookie-duration' => array( + 'help' => 'in seconds', // @todo translate + 'number' => 'Duration to keep logged in', // @todo translate + ), 'registration' => array( 'help' => '0 表示无账户数限制', 'number' => '最大账户数', diff --git a/app/views/configure/system.phtml b/app/views/configure/system.phtml index 37b68c991..9af4cc2c9 100644 --- a/app/views/configure/system.phtml +++ b/app/views/configure/system.phtml @@ -51,6 +51,14 @@ + +
+ +
+ + +
+
-- cgit v1.2.3