Skip to content

Commit

Permalink
Merge pull request #40 from ggoffy/master
Browse files Browse the repository at this point in the history
moved to RC1
  • Loading branch information
ggoffy authored Feb 22, 2021
2 parents 9b6bed9 + 0a1a6f8 commit caa95a4
Show file tree
Hide file tree
Showing 6 changed files with 68 additions and 50 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -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)

Expand Down
9 changes: 7 additions & 2 deletions docs/changelog.txt
Original file line number Diff line number Diff line change
@@ -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
===================================================================
Expand All @@ -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
Expand Down
21 changes: 16 additions & 5 deletions index.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -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);
Expand All @@ -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';
Expand All @@ -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;
}

Expand Down
2 changes: 1 addition & 1 deletion language/german/modinfo.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.');
Expand Down
1 change: 1 addition & 0 deletions templates/wgtransifex_packages_list.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
<span class='package-line col-sm-9 justify'><{$smarty.const._MA_WGTRANSIFEX_PACKAGE_DESC}>: <{$package.desc}></span>
<{/if}>
<span class='package-line col-sm-9 justify'><{$smarty.const._MA_WGTRANSIFEX_PACKAGE_LANG_ID}>: <img src="<{$modPathIconFlags}><{$package.lang_flag}>" alt="<{$package.lang_id}>" title="<{$package.lang_id}>"></span>
<span class='package-line col-sm-9 justify'><{$smarty.const._MA_WGTRANSIFEX_PACKAGE_TRAPERC}>: <{$package.traperc_text}></span>
<span class='package-line col-sm-9 justify'><{$smarty.const._MA_WGTRANSIFEX_PACKAGE_DATE}>: <{$package.date}></span>
</div>
</div>
Expand Down
82 changes: 41 additions & 41 deletions xoops_version.php
Original file line number Diff line number Diff line change
Expand Up @@ -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'] = [
Expand Down

0 comments on commit caa95a4

Please sign in to comment.