0
0
mirror of https://github.com/openwrt/luci.git synced 2025-07-24 23:12:28 +00:00
Files
Hosted Weblate 01201eefe7 Translated using Weblate (Chinese (Simplified Han script))
Currently translated at 100.0% (33 of 33 strings)

Translation: OpenWrt/LuCI/applications/openlist
Translate-URL: https://hosted.weblate.org/projects/openwrt/luciapplicationsopenlist/zh_Hans/

Translated using Weblate (Ukrainian)

Currently translated at 100.0% (33 of 33 strings)

Translation: OpenWrt/LuCI/applications/openlist
Translate-URL: https://hosted.weblate.org/projects/openwrt/luciapplicationsopenlist/uk/

Translated using Weblate (Polish)

Currently translated at 100.0% (33 of 33 strings)

Translation: OpenWrt/LuCI/applications/openlist
Translate-URL: https://hosted.weblate.org/projects/openwrt/luciapplicationsopenlist/pl/

Translated using Weblate (Georgian)

Currently translated at 5.3% (138 of 2560 strings)

Translation: OpenWrt/LuCI/modules/luci-base
Translate-URL: https://hosted.weblate.org/projects/openwrt/luci/ka/

Translated using Weblate (Georgian)

Currently translated at 5.3% (138 of 2560 strings)

Translation: OpenWrt/LuCI/modules/luci-base
Translate-URL: https://hosted.weblate.org/projects/openwrt/luci/ka/

Translated using Weblate (Georgian)

Currently translated at 5.3% (138 of 2560 strings)

Translation: OpenWrt/LuCI/modules/luci-base
Translate-URL: https://hosted.weblate.org/projects/openwrt/luci/ka/

Translated using Weblate (French)

Currently translated at 1.1% (2 of 178 strings)

Translation: OpenWrt/LuCI/applications/lldpd
Translate-URL: https://hosted.weblate.org/projects/openwrt/luciapplicationslldpd/fr/

Translated using Weblate (French)

Currently translated at 27.1% (22 of 81 strings)

Translation: OpenWrt/LuCI/applications/email
Translate-URL: https://hosted.weblate.org/projects/openwrt/luciapplicationsemail/fr/

Translated using Weblate (French)

Currently translated at 7.7% (6 of 77 strings)

Translation: OpenWrt/LuCI/applications/xinetd
Translate-URL: https://hosted.weblate.org/projects/openwrt/luciapplicationsxinetd/fr/

Translated using Weblate (French)

Currently translated at 33.3% (16 of 48 strings)

Translation: OpenWrt/LuCI/applications/openwisp
Translate-URL: https://hosted.weblate.org/projects/openwrt/luciapplicationsopenwisp/fr/

Translated using Weblate (French)

Currently translated at 9.0% (6 of 66 strings)

Translation: OpenWrt/LuCI/applications/sshtunnel
Translate-URL: https://hosted.weblate.org/projects/openwrt/luciapplicationssshtunnel/fr/

Translated using Weblate (French)

Currently translated at 3.5% (7 of 198 strings)

Translation: OpenWrt/LuCI/applications/smartdns
Translate-URL: https://hosted.weblate.org/projects/openwrt/luciapplicationssmartdns/fr/

Translated using Weblate (French)

Currently translated at 96.7% (59 of 61 strings)

Translation: OpenWrt/LuCI/applications/acme
Translate-URL: https://hosted.weblate.org/projects/openwrt/luciapplicationsacme/fr/

Translated using Weblate (French)

Currently translated at 43.7% (7 of 16 strings)

Translation: OpenWrt/LuCI/applications/squid
Translate-URL: https://hosted.weblate.org/projects/openwrt/luciapplicationssquid/fr/

Translated using Weblate (French)

Currently translated at 51.6% (64 of 124 strings)

Translation: OpenWrt/LuCI/applications/nlbwmon
Translate-URL: https://hosted.weblate.org/projects/openwrt/luciapplicationsnlbwmon/fr/

Translated using Weblate (French)

Currently translated at 26.2% (76 of 290 strings)

Translation: OpenWrt/LuCI/applications/banip
Translate-URL: https://hosted.weblate.org/projects/openwrt/luciapplicationsbanip/fr/

Translated using Weblate (French)

Currently translated at 97.4% (191 of 196 strings)

Translation: OpenWrt/LuCI/applications/ddns
Translate-URL: https://hosted.weblate.org/projects/openwrt/luciapplicationsddns/fr/

Translated using Weblate (French)

Currently translated at 100.0% (62 of 62 strings)

Translated using Weblate (French)

Currently translated at 59.2% (67 of 113 strings)

Translated using Weblate (French)

Currently translated at 100.0% (46 of 46 strings)

Translated using Weblate (French)

Currently translated at 66.0% (35 of 53 strings)

Translated using Weblate (French)

Currently translated at 94.5% (173 of 183 strings)

Translated using Weblate (French)

Currently translated at 96.8% (275 of 284 strings)

Translated using Weblate (French)

Currently translated at 79.4% (2033 of 2560 strings)

Translation: OpenWrt/LuCI/modules/luci-base
Translate-URL: https://hosted.weblate.org/projects/openwrt/luci/fr/

Translated using Weblate (French)

Currently translated at 4.5% (4 of 88 strings)

Translation: OpenWrt/LuCI/applications/mosquitto
Translate-URL: https://hosted.weblate.org/projects/openwrt/luciapplicationsmosquitto/fr/

Translated using Weblate (Lithuanian)

Currently translated at 97.1% (2486 of 2560 strings)

Translation: OpenWrt/LuCI/modules/luci-base
Translate-URL: https://hosted.weblate.org/projects/openwrt/luci/lt/

Translated using Weblate (Lithuanian)

Currently translated at 97.1% (2486 of 2560 strings)

Translation: OpenWrt/LuCI/modules/luci-base
Translate-URL: https://hosted.weblate.org/projects/openwrt/luci/lt/

Translated using Weblate (Lithuanian)

Currently translated at 97.1% (2486 of 2560 strings)

Translation: OpenWrt/LuCI/modules/luci-base
Translate-URL: https://hosted.weblate.org/projects/openwrt/luci/lt/

Translated using Weblate (Lithuanian)

Currently translated at 97.1% (2486 of 2560 strings)

Translation: OpenWrt/LuCI/modules/luci-base
Translate-URL: https://hosted.weblate.org/projects/openwrt/luci/lt/

Translated using Weblate (French)

Currently translated at 82.1% (23 of 28 strings)

Translation: OpenWrt/LuCI/applications/udpxy
Translate-URL: https://hosted.weblate.org/projects/openwrt/luciapplicationsudpxy/fr/

Translated using Weblate (French)

Currently translated at 82.1% (23 of 28 strings)

Translation: OpenWrt/LuCI/applications/udpxy
Translate-URL: https://hosted.weblate.org/projects/openwrt/luciapplicationsudpxy/fr/

Translated using Weblate (French)

Currently translated at 82.1% (23 of 28 strings)

Translation: OpenWrt/LuCI/applications/udpxy
Translate-URL: https://hosted.weblate.org/projects/openwrt/luciapplicationsudpxy/fr/

Translated using Weblate (French)

Currently translated at 82.1% (23 of 28 strings)

Translation: OpenWrt/LuCI/applications/udpxy
Translate-URL: https://hosted.weblate.org/projects/openwrt/luciapplicationsudpxy/fr/

Translated using Weblate (French)

Currently translated at 96.4% (274 of 284 strings)

Translated using Weblate (French)

Currently translated at 79.3% (2032 of 2560 strings)

Translation: OpenWrt/LuCI/modules/luci-base
Translate-URL: https://hosted.weblate.org/projects/openwrt/luci/fr/

Translated using Weblate (Georgian)

Currently translated at 4.7% (121 of 2560 strings)

Translation: OpenWrt/LuCI/modules/luci-base
Translate-URL: https://hosted.weblate.org/projects/openwrt/luci/ka/

Translated using Weblate (Georgian)

Currently translated at 4.7% (121 of 2560 strings)

Translation: OpenWrt/LuCI/modules/luci-base
Translate-URL: https://hosted.weblate.org/projects/openwrt/luci/ka/

Translated using Weblate (Georgian)

Currently translated at 4.7% (121 of 2560 strings)

Translation: OpenWrt/LuCI/modules/luci-base
Translate-URL: https://hosted.weblate.org/projects/openwrt/luci/ka/

Translated using Weblate (Georgian)

Currently translated at 4.0% (16 of 399 strings)

Translated using Weblate (Georgian)

Currently translated at 68.3% (194 of 284 strings)

Added translation using Weblate (Georgian)

Translated using Weblate (Polish)

Currently translated at 100.0% (284 of 284 strings)

Translated using Weblate (Persian)

Currently translated at 20.4% (40 of 196 strings)

Translation: OpenWrt/LuCI/applications/ddns
Translate-URL: https://hosted.weblate.org/projects/openwrt/luciapplicationsddns/fa/

Translated using Weblate (Georgian)

Currently translated at 100.0% (50 of 50 strings)

Translated using Weblate (Portuguese)

Currently translated at 70.0% (21 of 30 strings)

Translated using Weblate (Georgian)

Currently translated at 3.0% (12 of 399 strings)

Translated using Weblate (Portuguese)

Currently translated at 10.9% (14 of 128 strings)

Translation: OpenWrt/LuCI/applications/usteer
Translate-URL: https://hosted.weblate.org/projects/openwrt/luciapplicationsusteer/pt/

Translated using Weblate (Portuguese)

Currently translated at 88.2% (15 of 17 strings)

Translation: OpenWrt/LuCI/applications/eoip
Translate-URL: https://hosted.weblate.org/projects/openwrt/luciapplicationseoip/pt/

Translated using Weblate (Portuguese)

Currently translated at 50.0% (20 of 40 strings)

Translation: OpenWrt/LuCI/applications/example
Translate-URL: https://hosted.weblate.org/projects/openwrt/luciapplicationsexample/pt/

Translated using Weblate (Portuguese)

Currently translated at 22.7% (15 of 66 strings)

Translation: OpenWrt/LuCI/applications/sshtunnel
Translate-URL: https://hosted.weblate.org/projects/openwrt/luciapplicationssshtunnel/pt/

Translated using Weblate (Portuguese)

Currently translated at 95.2% (20 of 21 strings)

Translation: OpenWrt/LuCI/applications/tor
Translate-URL: https://hosted.weblate.org/projects/openwrt/luciapplicationstor/pt/

Translated using Weblate (Portuguese)

Currently translated at 100.0% (211 of 211 strings)

Translation: OpenWrt/LuCI/applications/dockerman
Translate-URL: https://hosted.weblate.org/projects/openwrt/luciapplicationsdockerman/pt/

Translated using Weblate (Portuguese)

Currently translated at 99.4% (185 of 186 strings)

Translation: OpenWrt/LuCI/applications/unbound
Translate-URL: https://hosted.weblate.org/projects/openwrt/luciapplicationsunbound/pt/

Translated using Weblate (Portuguese)

Currently translated at 93.5% (87 of 93 strings)

Translation: OpenWrt/LuCI/applications/clamav
Translate-URL: https://hosted.weblate.org/projects/openwrt/luciapplicationsclamav/pt/

Translated using Weblate (Portuguese)

Currently translated at 100.0% (168 of 168 strings)

Translation: OpenWrt/LuCI/applications/aria2
Translate-URL: https://hosted.weblate.org/projects/openwrt/luciapplicationsaria2/pt/

Translated using Weblate (Portuguese)

Currently translated at 100.0% (196 of 196 strings)

Translation: OpenWrt/LuCI/applications/ddns
Translate-URL: https://hosted.weblate.org/projects/openwrt/luciapplicationsddns/pt/

Translated using Weblate (Portuguese)

Currently translated at 100.0% (44 of 44 strings)

Translated using Weblate (Portuguese)

Currently translated at 73.5% (39 of 53 strings)

Translated using Weblate (Portuguese)

Currently translated at 100.0% (183 of 183 strings)

Added translation using Weblate (Georgian)

Translated using Weblate (French)

Currently translated at 0.3% (1 of 254 strings)

Translation: OpenWrt/LuCI/applications/keepalived
Translate-URL: https://hosted.weblate.org/projects/openwrt/luciapplicationskeepalived/fr/

Translated using Weblate (Georgian)

Currently translated at 2.0% (8 of 399 strings)

Translated using Weblate (French)

Currently translated at 14.2% (3 of 21 strings)

Translation: OpenWrt/LuCI/applications/irqbalance
Translate-URL: https://hosted.weblate.org/projects/openwrt/luciapplicationsirqbalance/fr/

Translated using Weblate (French)

Currently translated at 2.8% (2 of 71 strings)

Translated using Weblate (Georgian)

Currently translated at 68.6% (195 of 284 strings)

Translated using Weblate (French)

Currently translated at 8.0% (12 of 150 strings)

Translation: OpenWrt/LuCI/applications/https-dns-proxy
Translate-URL: https://hosted.weblate.org/projects/openwrt/luciapplicationshttps-dns-proxy/fr/

Translated using Weblate (French)

Currently translated at 25.1% (37 of 147 strings)

Translation: OpenWrt/LuCI/applications/privoxy
Translate-URL: https://hosted.weblate.org/projects/openwrt/luciapplicationsprivoxy/fr/

Translated using Weblate (French)

Currently translated at 25.8% (75 of 290 strings)

Translation: OpenWrt/LuCI/applications/banip
Translate-URL: https://hosted.weblate.org/projects/openwrt/luciapplicationsbanip/fr/

Translated using Weblate (French)

Currently translated at 78.3% (65 of 83 strings)

Translation: OpenWrt/LuCI/applications/attendedsysupgrade
Translate-URL: https://hosted.weblate.org/projects/openwrt/luciapplicationsattendedsysupgrade/fr/

Translated using Weblate (French)

Currently translated at 52.9% (109 of 206 strings)

Translation: OpenWrt/LuCI/applications/adblock
Translate-URL: https://hosted.weblate.org/projects/openwrt/luciapplicationsadblock/fr/

Translated using Weblate (Spanish)

Currently translated at 100.0% (206 of 206 strings)

Translation: OpenWrt/LuCI/applications/adblock
Translate-URL: https://hosted.weblate.org/projects/openwrt/luciapplicationsadblock/es/

Translated using Weblate (Spanish)

Currently translated at 98.6% (145 of 147 strings)

Translation: OpenWrt/LuCI/applications/privoxy
Translate-URL: https://hosted.weblate.org/projects/openwrt/luciapplicationsprivoxy/es/

Co-authored-by: Adam El adnani <eladnaniadam595@gmail.com>
Co-authored-by: Alan <georgianization@outlook.com>
Co-authored-by: Džiugas Januševičius <dziugas1959@hotmail.com>
Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: Manuela Silva <mmsrs@sky.com>
Co-authored-by: Matthaiks <kitynska@gmail.com>
Co-authored-by: Matthieu Leboeuf <contact@matthieul.dev>
Co-authored-by: Salvador Peña <salvadorp74@hotmail.com>
Co-authored-by: erfan alaei <erfan.ads2@gmail.com>
Co-authored-by: Максим Горпиніч <gorpinicmaksim5@gmail.com>
Co-authored-by: 大王叫我来巡山 <hamburger2048@users.noreply.hosted.weblate.org>
Signed-off-by: Adam El adnani <eladnaniadam595@gmail.com>
Signed-off-by: Alan <georgianization@outlook.com>
Signed-off-by: Džiugas Januševičius <dziugas1959@hotmail.com>
Signed-off-by: Manuela Silva <mmsrs@sky.com>
Signed-off-by: Matthaiks <kitynska@gmail.com>
Signed-off-by: Matthieu Leboeuf <contact@matthieul.dev>
Signed-off-by: Salvador Peña <salvadorp74@hotmail.com>
Signed-off-by: erfan alaei <erfan.ads2@gmail.com>
Signed-off-by: Максим Горпиніч <gorpinicmaksim5@gmail.com>
Signed-off-by: 大王叫我来巡山 <hamburger2048@users.noreply.hosted.weblate.org>
Translate-URL: https://hosted.weblate.org/projects/openwrt/luci_modules_luci-mod-dsl/fr/
Translate-URL: https://hosted.weblate.org/projects/openwrt/luciapplicationsantiblock/pt/
Translate-URL: https://hosted.weblate.org/projects/openwrt/luciapplicationsfirewall/fr/
Translate-URL: https://hosted.weblate.org/projects/openwrt/luciapplicationsfirewall/ka/
Translate-URL: https://hosted.weblate.org/projects/openwrt/luciapplicationsfirewall/pl/
Translate-URL: https://hosted.weblate.org/projects/openwrt/luciapplicationsfwknopd/pt/
Translate-URL: https://hosted.weblate.org/projects/openwrt/luciapplicationsminidlna/fr/
Translate-URL: https://hosted.weblate.org/projects/openwrt/luciapplicationsolsr/fr/
Translate-URL: https://hosted.weblate.org/projects/openwrt/luciapplicationsolsr/pt/
Translate-URL: https://hosted.weblate.org/projects/openwrt/luciapplicationsradicale2/fr/
Translate-URL: https://hosted.weblate.org/projects/openwrt/luciapplicationsstatistics/ka/
Translate-URL: https://hosted.weblate.org/projects/openwrt/luciapplicationsuhttpd/fr/
Translate-URL: https://hosted.weblate.org/projects/openwrt/luciapplicationsupnp/fr/
Translate-URL: https://hosted.weblate.org/projects/openwrt/luciapplicationsupnp/pt/
Translate-URL: https://hosted.weblate.org/projects/openwrt/lucimodulesluci-mod-dashboard/ka/
Translation: OpenWrt/LuCI/applications/antiblock
Translation: OpenWrt/LuCI/applications/firewall
Translation: OpenWrt/LuCI/applications/fwknopd
Translation: OpenWrt/LuCI/applications/minidlna
Translation: OpenWrt/LuCI/applications/olsr
Translation: OpenWrt/LuCI/applications/radicale2
Translation: OpenWrt/LuCI/applications/statistics
Translation: OpenWrt/LuCI/applications/uhttpd
Translation: OpenWrt/LuCI/applications/upnp
Translation: OpenWrt/LuCI/modules/luci-mod-dashboard
Translation: OpenWrt/LuCI/modules/luci-mod-dsl
2025-07-03 10:22:51 +03:00
..
2024-10-23 22:29:09 +02:00
2024-12-03 16:25:21 +01:00

Example app for js based Luci

This app is meant to be a starting point for developing new LuCI apps using the modern JavaScript client-rendered approach. Previously the LuCI used a Lua server-side render approach which is deprecated now.

Installation

In all cases, you'll want to log out of the web interface and back in to force a cache refresh after installing the new package.

From git

To install the luci-app-example to your OpenWrt instance (assuming your OpenWRT instance is on 192.168.1.1):

scp -r root/* root@192.168.1.1:/
scp -r htdocs/* root@192.168.1.1:/www/
# execute the UCI defaults script to create the /etc/config/example
ssh root@192.168.1.1 "sh /etc/uci-defaults/80_example"

From packages

Install the app on your OpenWrt installation. This can be an actual router/device, or something like a QEMU virtual machine.

opkg install luci-app-example

Visit the web UI for the device/virtual machine where the package was installed. Log in to OpenWrt, and Example should be present in the navigation menu.

Application structure

See structure.md for details on how to lay out a LuCI application.

Code format

The LuCI Javascript code should be indented with tabs. js-beautify/jsbeautifier can help with this. The examples in this application were formatted with:

js-beautify -t -a -j -w 110 -r <filename>

Editing the code

You can either do direct editing on the device/virtual machine, or use something like sshfs to have remote access from your development computer.

By default, the code is minified by the build process, which makes editing it non-trivial. You can either change the build process, or just copy the file content from the git repository and replace the content on disk.

Javascript code can be found on the device/virtual machine in /www/luci-static/resources/view/example/.

form.js

This is a JS view that uses the form.Map approach to providing a form that can change the configuration. It relies on UCI access, and the relevant ACL declarations are in root/usr/share/rpcd/acl.d/luci-app-example.json.

The declarations are luci-app-example > read > uci and luci-app-example > write > uci. Note that for both permissions, the node name "example" is provided as a list argument to the interface type (uci); this maps to /etc/config/example.

Since form.Map and form.JSONMap create Promises, you cannot embed them inside a E()-built structure.

htmlview.js

This is a read-only view that uses E() to create DOM nodes.

Data is fetched via the function defined in load() - these loads are done as Promises, with the promise results stored in an array. Multiple load functions results are available in the array, and can be accessed via a single argument passed to the render() function.

This code relies on the same ACL grants as form.js.

The signature for E() is E(node_type, {node attributes}, [child nodes]).

rpc.js

The RPC JS page is read-only, and demonstrates using RPC calls to get data. It also demonstrates using the JSONMap form object for mapping a configuration to a form, but makes the form read-only for display purposes.

The configuration is stored in /etc/config/example. The file must exist and created on device boot by UCI defaults script in /root/etc/uci-defaults/80_example. The developer guide has more details about UCI defaults.

The RPCd script is stored as /usr/libexec/rpcd/luci.example, and can be called via ubus.

It relies on RPC access, and the relevant ACL declarations are in root/usr/share/rpcd/acl.d/luci-app-example.json.

The declaration is luci-app-example > read > ubus > luci.example; the list of names under this key is the list of APIs that can be called.

ACLs

ACLs are global for the entire web UI - the declaration of luci-app-example in a file called acl.d/luci-app-example is just a naming convention. Nothing enforces that only the code in luci-app-example is mutating /etc/config/example. Once the ACL is defined to allow reads/writes to a UCI node, any code running from the web UI can make changes to that node.

YAML

You may wish to work with YAML data. See YAML.md for details on how to integrate YAML read support.

Translations

For a real world application (or changes to this example one that you wish to submit upstream), translations should be kept up to date.

To rebuild the translations file, from the root of the repository execute ./build/i18n-scan.pl applications/luci-app-example > applications/luci-app-example/po/templates/example.pot

If the scan command fails with an error about being unable to open/find msguniq, install the GNU gettext package for your operating system.