Package Build Tools
Dashboard > Extend concrete5 > Package Tools
To help you prepare packages for download, Package Magic provides a suite of tools including dashboard equivalents to the CLI tools for translation, short tags expansion and SVG icon compilation. You can even use Package Magic to edit the version in the package controller and optionally append a comment noting when and who by.
All automated changes to package files are made safely through intermediaries and checked for compilation errors before replacing the actual package files.
Package Magic provides a lot more than the core CLI tools. With Package Magic you can review detailed reports of what your translation strings are, which strings are translated at translate.concrete5.org, and what those translations are.
Most tools can operate on installed packages and on uploaded packages that are 'Awaiting Installation', so you don't need to actually install a package before applying a tool to it. As noted below, some tools such as Force Update are only applicable to packages that are installed.
Package tools >CSS Validate
Validate CSS files.
CSS files are vaildated by submitting to the W3C Validation Service.
Package tools > Clear All Translations
Removes all translations and removes the /languages directory.
Select an installed or available to install concrete5 package and apply this tool to clear all translations. The /languages directory will be removed and with it all .pot, .po and .mo files and all locale subdirectories.
Package tools > Compile Check
Checks that all .php files compile.
Select an installed or available to install concrete5 package and apply this tool to run a compilation check on all php files in the package. This makes most sense for packages that are awaiting installation. Any package already installed is unlikely to have faulty php files within it (but you never know).
For any developers adding further tools that may run into processing limits, this tool also serves as an example of ajaxed file-by-file processing.
Package tools > Edit Package Version
Increment the package version.
Select a package and use this tool to increment the version number in the package controller. This should normally be immediately followed by running the package update. Use this prior to downloading a modified package archive.
Options are provided to
- Run the package update after version edit has completed
- Preserve a history trail of versions as a comment
- Attach a date and time as a comment
- Attach a note of the user
- Attach a note of the concrete5 core version
Package tools > Expand Short Tags
Expand short tags in all php source files, replacing the original file with the same file with tags expanded.
Select a package and apply this tool to expand short tags <? and
Package tools > Extract Translation Strings
Extract translatable strings and create an associated pot file.
Select a package and apply this tool to extract translatable strings. Translatable strings are extracted from t(), tc() and t2() functions in the package source and collected into a .pot file. This is the first step of translating a package - these strings then need to be translated for each language at concrete5 Translate (https://translate.concrete5.org).
Package tools > Force Package Update
Force concrete5 to execute the package update, even if the version number has not been incremented. This tool is only applicable to installed packages.
Select an installed concrete5 package and apply this tool to force the package update to run, together with other update processing from the core. This can be helpful while developing packages to avoid messing with new version numbers.
Package tools > Icon Add
Add a package icon sourced from the concrete5 file manager.
Select an image file from the file manager and use it to add or replace the icon.png for a package. Icons are generally 97x97px, but on more recent versions of concrete5 can be up to 200x200px.
Package tools > Inspect
Inspect package contents. This tool is only applicable to installed packages.
Select an installed concrete5 package and apply this tool to inspect package contents, as in the core Uninstall dialog.
Package tools > Manage Locales
Manage the package translation locales.
Select a package and apply this tool to manage locales. A list of all locales will be presented with currently configured locales checked. When run, the configured locales will be populated with available translations from concrete5 Translate (https://translate.concrete5.org).
Various preselect groups of locales are available for:
- Core locales, the locales available for the concrete5 core
- Package locales, the locales the current package has .po/.mo files for
- Aggregated package locales, an aggregate of package locales across installed packages (ie, not including those awaiting installation)
For each group, discrete buttons:
- Add the group to the selected locales
- Remove the group from the selected locales
- Replace the selected locales with the group
For any developers adding further tools that may run into processing limits, this tool also serves as an example of ajaxed processing that is not related 1:1 with files in the package.
Package tools > Prohibited Code Check
Search source for deprecated code and a forbidden functions.
Select an installed or available to install concrete5 package and apply this tool to anayze the package file-by-file for deprecated code and forbidden functions. This check is not complete as the semantics of some unwanted code is too complex for simple analysis. For a full markeplace Linter check, please use the Linter test page.
These are all things that may be considered by the PRB, but are not absolutes. Deprecated code changes with core versions and forbidden functions can be granted exceptions where their use is relevant to the application.
Individual checks are implemented through a further level of Prohibited Code Check plugins.
Package tools > Remove Package Files
Removes all files associated with an uninstalled package.
The core Add Functionality page provides a means to remove all files associated with a package at the time it is installed, but only at the time it is unistalled. This tool will remove all files and directories associated with a package as long as it is not currently installed, so can be used to clear up packages uploaded but never installed, or packages uninstalled but not removed at the time.
Package tools > Review Files
Conveniently see the files report without running any other tools.
Select a package and apply this tool to review the files. The files report is presented without any other tools needing to be run first.
Package tools > SVG icon compile
Compile package and block icons in SVG format into .png files.
Select a package and apply this tool to compile package and block icon.svg files to a corresponding icon.png.
Package tools > Translation Completeness
Report on the completeness for locales in package.
Select a package and apply this tool to report on the completeness of translations.
Package tools > View Translation Strings
View translatable strings in the package pot file.
Select a package and apply this tool to review translatable strings from the package .pot file.
Last updated: 9 months ago