From 0a1a6f85e59989d772b6340481b205a5df2fd057 Mon Sep 17 00:00:00 2001 From: ggoffy Date: Mon, 22 Feb 2021 10:58:46 +0100 Subject: [PATCH] moved to RC1 --- README.md | 3 +- docs/changelog.txt | 9 ++- index.php | 21 +++++-- language/german/modinfo.php | 2 +- templates/wgtransifex_packages_list.tpl | 1 + xoops_version.php | 82 ++++++++++++------------- 6 files changed, 68 insertions(+), 50 deletions(-) diff --git a/README.md b/README.md index 1161eb5..a7f2596 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,6 @@ +![alt XOOPS CMS](https://xoops.org/images/logoXoopsPhp8.png) ![alt XOOPS CMS](https://xoops.org/images/logoXoops4GithubRepository.png) -## wgTransifex module for [XOOPS CMS 2.5.10+](https://xoops.org) +## wgTransifex module for [XOOPS CMS 2.5.11+](https://xoops.org) [![XOOPS CMS Module](https://img.shields.io/badge/XOOPS%20CMS-Module-blue.svg)](https://xoops.org) [![Software License](https://img.shields.io/badge/license-GPL-brightgreen.svg?style=flat)](https://www.gnu.org/licenses/gpl-2.0.html) diff --git a/docs/changelog.txt b/docs/changelog.txt index 2050135..97f4d6c 100644 --- a/docs/changelog.txt +++ b/docs/changelog.txt @@ -1,3 +1,9 @@ +=================================================================== +2021/02/22 Version 1.05 RC1 +=================================================================== + - fixed problem with display filter (goffy) + - fixed problems with display collections (goffy) + =================================================================== 2020/12/13 Version 1.05 beta =================================================================== @@ -6,9 +12,8 @@ - added image size (goffy) - fixed smarty default problem (goffy) - fixed data type bug (array/string) (goffy) - - fixed problem with display collections (goffy) + - fixed problems with display collections (goffy) - added search to index page (goffy) - - fixed problem with display filter (goffy) =================================================================== 2020/12/13 Version 1.05 alpha diff --git a/index.php b/index.php index 42aa9c0..f72350f 100644 --- a/index.php +++ b/index.php @@ -114,11 +114,9 @@ $crProjects->add(new \Criteria('pro_translations', '0', '>')); $crProjects->add(new \Criteria('pro_status', Constants::STATUS_READTX, '>=')); $projectsCount = $projectsHandler->getCount($crProjects); - $GLOBALS['xoopsTpl']->assign('projectsCount', $projectsCount); - $crProjects->setStart($start); - $crProjects->setLimit($limit); - $projectsAll = $projectsHandler->getAll($crProjects); if ($projectsCount > 0) { + $projectsCount = 0; + $projectsAll = $projectsHandler->getAll($crProjects); $packagesList = []; if ('' !== $pkgFilterText) { $crPkgFilter = new \CriteriaCompo(); @@ -188,6 +186,7 @@ $pkgCounter++; } if($pkgCounter > 0) { + //sort array $primary = array_column($languagesList, 'lang_primary'); $percentage = array_column($languagesList, 'traperc'); array_multisort($primary, SORT_DESC, $percentage, SORT_DESC, $languagesList); @@ -198,8 +197,20 @@ 'desc' => $pkgDesc, 'langs' => $languagesList ]; + //reduce to start/limit + $i = 0; + $projectsList = []; + foreach ($packagesList as $key => $value) { + $i++; + if ($i > $start && $i <= ($start + $limit)) { + $projectsList[$key] = $value; + } + } + } } + $projectsCount = \count($packagesList); + $GLOBALS['xoopsTpl']->assign('projectsCount', $projectsCount); // Display Navigation if ($projectsCount > $limit) { require_once XOOPS_ROOT_PATH . '/class/pagenav.php'; @@ -208,7 +219,7 @@ } $GLOBALS['xoopsTpl']->assign('lang_thereare', \sprintf(\_MA_WGTRANSIFEX_INDEX_THEREARE, $packagesCount)); } - $GLOBALS['xoopsTpl']->assign('packagesList', $packagesList); + $GLOBALS['xoopsTpl']->assign('packagesList', $projectsList); break; } diff --git a/language/german/modinfo.php b/language/german/modinfo.php index 8b36bd8..8a27c02 100644 --- a/language/german/modinfo.php +++ b/language/german/modinfo.php @@ -90,7 +90,7 @@ \define('_MI_WGTRANSIFEX_PANEL_TYPE_DESC', 'Panel Type is the bootstrap html div.'); \define('_MI_WGTRANSIFEX_INDEX_DISPLAY', 'Anzeige Indexseite'); \define('_MI_WGTRANSIFEX_INDEX_DISPLAY_DESC', 'Definiere wie die Übersetzungen auf der Indexseite angezeigt werden sollen.'); -\define('_MI_WGTRANSIFEX_INDEX_DISPLAY_SINGLE', 'Jedes Sprachpakete als eigender Eintrag'); +\define('_MI_WGTRANSIFEX_INDEX_DISPLAY_SINGLE', 'Jedes Sprachpakete als eigener Eintrag'); \define('_MI_WGTRANSIFEX_INDEX_DISPLAY_COLLECTION', 'Erstelle eine Zusammenstellung aller Sprachpakete je Projekt'); \define('_MI_WGTRANSIFEX_IDPAYPAL', 'Paypal ID'); \define('_MI_WGTRANSIFEX_IDPAYPAL_DESC', 'Deinen PayPal IDfür Spenden hier angeben.'); diff --git a/templates/wgtransifex_packages_list.tpl b/templates/wgtransifex_packages_list.tpl index 39e65aa..f5ed86d 100644 --- a/templates/wgtransifex_packages_list.tpl +++ b/templates/wgtransifex_packages_list.tpl @@ -10,6 +10,7 @@ <{$smarty.const._MA_WGTRANSIFEX_PACKAGE_DESC}>: <{$package.desc}> <{/if}> <{$smarty.const._MA_WGTRANSIFEX_PACKAGE_LANG_ID}>: <{$package.lang_id}> + <{$smarty.const._MA_WGTRANSIFEX_PACKAGE_TRAPERC}>: <{$package.traperc_text}> <{$smarty.const._MA_WGTRANSIFEX_PACKAGE_DATE}>: <{$package.date}> diff --git a/xoops_version.php b/xoops_version.php index 5e6b1d3..26c7964 100644 --- a/xoops_version.php +++ b/xoops_version.php @@ -28,49 +28,49 @@ $moduleDirNameUpper = \mb_strtoupper($moduleDirName); // ------------------- Informations ------------------- // $modversion = [ - 'version' => 1.05, - 'module_status' => 'alpha', - 'release_date' => '2020/10/11', - 'name' => \_MI_WGTRANSIFEX_NAME, - 'description' => \_MI_WGTRANSIFEX_DESC, - 'author' => 'TDM XOOPS', - 'author_mail' => 'info@email.com', - 'author_website_url' => 'http://xoops.org', + 'version' => 1.05, + 'module_status' => 'RC1', + 'release_date' => '2021/02/22', + 'name' => \_MI_WGTRANSIFEX_NAME, + 'description' => \_MI_WGTRANSIFEX_DESC, + 'author' => 'Goffy (XOOPS Germany)', + 'author_mail' => 'webmaster@wedega.com', + 'author_website_url' => 'http://myxoops.org', 'author_website_name' => 'XOOPS Project', - 'credits' => 'XOOPS Development Team', - 'license' => 'GPL 2.0 or later', - 'license_url' => 'http://www.gnu.org/licenses/gpl-3.0.en.html', - 'help' => 'page=help', - 'release_info' => 'release_info', - 'release_file' => XOOPS_URL . "/modules/$moduleDirName/docs/release_info file", - 'manual' => 'link to manual file', - 'manual_file' => XOOPS_URL . "/modules/$moduleDirName/docs/install.txt", - 'min_php' => '7.3', - 'min_xoops' => '2.5.10', - 'min_admin' => '1.2', - 'min_db' => ['mysql' => '5.6', 'mysqli' => '5.6'], - 'image' => 'assets/images/logoModule.png', - 'dirname' => \basename(__DIR__), - 'dirmoduleadmin' => 'Frameworks/moduleclasses/moduleadmin', - 'sysicons16' => '../../Frameworks/moduleclasses/icons/16', - 'sysicons32' => '../../Frameworks/moduleclasses/icons/32', - 'modicons16' => 'assets/icons/16', - 'modicons32' => 'assets/icons/32', - 'demo_site_url' => 'https://xoops.org', - 'demo_site_name' => 'XOOPS Demo Site', - 'support_url' => 'https://xoops.org/modules/newbb', - 'support_name' => 'Support Forum', - 'module_website_url' => 'www.xoops.org', + 'credits' => 'XOOPS Development Team', + 'license' => 'GPL 2.0 or later', + 'license_url' => 'http://www.gnu.org/licenses/gpl-3.0.en.html', + 'help' => 'page=help', + 'release_info' => 'release_info', + 'release_file' => XOOPS_URL . "/modules/$moduleDirName/docs/release_info file", + 'manual' => 'link to manual file', + 'manual_file' => XOOPS_URL . "/modules/$moduleDirName/docs/install.txt", + 'min_php' => '7.3', + 'min_xoops' => '2.5.10', + 'min_admin' => '1.2', + 'min_db' => ['mysql' => '5.6', 'mysqli' => '5.6'], + 'image' => 'assets/images/logoModule.png', + 'dirname' => \basename(__DIR__), + 'dirmoduleadmin' => 'Frameworks/moduleclasses/moduleadmin', + 'sysicons16' => '../../Frameworks/moduleclasses/icons/16', + 'sysicons32' => '../../Frameworks/moduleclasses/icons/32', + 'modicons16' => 'assets/icons/16', + 'modicons32' => 'assets/icons/32', + 'demo_site_url' => 'https://xoops.org', + 'demo_site_name' => 'XOOPS Demo Site', + 'support_url' => 'https://xoops.org/modules/newbb', + 'support_name' => 'Support Forum', + 'module_website_url' => 'www.xoops.org', 'module_website_name' => 'XOOPS Project', - 'release' => '2020-10-11', - 'system_menu' => 1, - 'hasAdmin' => 1, - 'hasMain' => 1, - 'adminindex' => 'admin/index.php', - 'adminmenu' => 'admin/menu.php', - 'onInstall' => 'include/install.php', - 'onUninstall' => 'include/uninstall.php', - 'onUpdate' => 'include/update.php', + 'release' => '2020-10-11', + 'system_menu' => 1, + 'hasAdmin' => 1, + 'hasMain' => 1, + 'adminindex' => 'admin/index.php', + 'adminmenu' => 'admin/menu.php', + 'onInstall' => 'include/install.php', + 'onUninstall' => 'include/uninstall.php', + 'onUpdate' => 'include/update.php', ]; // ------------------- Templates ------------------- // $modversion['templates'] = [