If we build multi-themes into firmware, each of them set itself
to be the default theme, what theme should it be?
To make it clear, we only set mediaurlbase if the theme is the
first time to be installed/built-in.
This resolve the issue that theme always change to somewhat default
after upgrading the firmware even with a config-keep-upgrade
Signed-off-by: Chen Minqiang <ptpt52@gmail.com>
(backported from commit fc150636b9)
The cssmin utility incorrectly breaks up calc() expressions when
minifying rules. Avoid the problem by trimming uneeded spaces.
Fixes: #3801
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 63057a08dc)
dnsmasq v2.80 made 'dnssec-check-unsigned' the default, reflect this in
the gui.
Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
(cherry picked from commit c58ae7d3f4)
This prevents a situation where the tabs will be disabled by the dispatcher
once the last config section has been removed. This would allow a user to
disable SSH via the UI but not to reenable it.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(backported from commit baa3bd4aac)
Do not expect a specific markup structure but use querySelector() to locate
the input element.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 34c06b4704)
* minimal change to accept the usual logread location
plus the alternative location (/usr/sbin/logread)
used by syslog-ng (see openwrt/packages/issues/11535 for reference)
Signed-off-by: Dirk Brenken <dev@brenken.org>
(cherry picked from commit 085f3f7809)
Currently relay.js is included in any case even if
the router doesn't have the needed package to use it.
Fix this by checking if the system has this feature.
Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
(cherry picked from commit 3d70d3e5d7)
Add /sbin/block to the generic Feature list to make
it easily accessible by getProtocolHandlers
Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
(cherry picked from commit d8e1aef150)
Refactor the po2lmo conversion code to be more robust and to properly
handle input files without location comments.
Ref: 9c1bac4168 (commitcomment-37036663)
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 2a1245a497)
- 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>
(cherry picked from commit 9939fc5a26)
- Extract and store the plural calculation function in .lmo files
- Handle plural translation messages
- Handle translation contexts
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 9c1bac4168)
Corrects the bad access mode from a previous commit that did not allow rpcd luci to execute.
Signed-off-by: David Lam <david@thedavid.net>
(cherry picked from commit cbb1c3cf93)
- Process deletions before additions or changes, allowing user code to
remove and recreate a section with the same name.
- Only record section deletions when the section to be removed actually
existed in the original config or when it was staged for creation
earlier. This avoids stray ubus not found exception when saving.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 49c6a810e9)