summaryrefslogtreecommitdiff
path: root/modules/luci-base/src/Makefile
Commit message (Collapse)AuthorAgeFilesLines
* luci-base: always link core.so with libcrypt to satisfy glibc buildsJo-Philipp Wich2022-10-271-1/+1
| | | | | | | | | | | Fixes the following runtime error on glibc based builds: Runtime error: Unable to dlopen file ...: undefined symbol: crypt In module(), file /usr/share/ucode/luci/dispatcher.uc, line 1, byte 1: called from anonymous function (/www/cgi-bin/luci:7:21) Ref: https://forum.openwrt.org/t/x/137250/18 Signed-off-by: Jo-Philipp Wich <jo@mein.io>
* treewide: separate Lua runtime resourcesJo-Philipp Wich2022-10-251-14/+16
| | | | | | | | | | | Move classes required for Lua runtime support into a new `luci-lua-runtime` package. Also replace the `luci.http` and `luci.util` classes in `luci-lib-base` with stubbed versions interacting with the ucode based runtime environment. Finally merge `luci-base-ucode` into the remainders of `luci-base`. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
* luci-base: add support for plural translations and contexts in Lua apiJo-Philipp Wich2020-01-251-4/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Introduce a new luci.template.parser.ntranslate() function which takes a count, a singular and a plural translation string as well as an optional context argument and returns the appropriate, language specific plural translation. - Introduce an optional translation context argument in the existing luci.template.parser.translate() function - Support translation contexts in LuCI template directives. Translation messages are split on the first unescaped pipe character and the reamining string after the pipe is treated as context. Examples: - `string.format(p.ntranslate(n, "1 apple", "%d apples"), n)` will return an appropriate plural translation for the given amount. - `translate("Load", "The system load")` will return an appropiate translation for `Load`, using `The system load` as disambiguation context (a `msgctxt` directive in *.po files). - Likewise `<%:Load|The system load%>` will translate the word `Load` while using the remainder of the string as context. - To use pipes in translations strings literally, they must be escaped: `<%:Use the "\|" character%>` will translate the literal string `Use the "|" character`. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
* build: add build option to minify *.js filesJo-Philipp Wich2018-11-221-0/+3
| | | | Signed-off-by: Jo-Philipp Wich <jo@mein.io>
* LuCI: Display the proper LuCI git branch in GUIHannu Nyman2016-03-101-1/+1
| | | | | | | | | | | | | Adjust luci.mk and luci-base to find out correctly if Luci is built from master or from a branch. Display that value in the footer and the overview page. * Evaluate the git branch in luci.mk and pass that to LuCI submodules as a make variable. Use branch name, ignore tags. * Deprecate svn detection in luci-base's mkversion.sh that generates version.lua. Simply use the value passed by make. Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
* Rework LuCI build systemJo-Philipp Wich2015-01-081-0/+21
* Rename subdirectories to their repective OpenWrt package names * Make each LuCI module its own standalone package * Deploy a shared luci.mk which is used by each module Makefile Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>