summaryrefslogtreecommitdiff
path: root/build
Commit message (Collapse)AuthorAgeFilesLines
* build/i18n-add-language: fix regexpPaul Donald2024-01-031-1/+1
| | | | | | | prevents zh, nb, bn allows bn_BD, nb_NO, pt_BR, zh_Hans, zh_Hant Signed-off-by: Paul Donald <newtwen@gmail.com>
* build: update build/i18n-* toolsPaul Donald2024-01-035-32/+70
| | | | | | | | | | | modify i18n-add-language.sh so it can: - be run from any path - bootstrap any (or all) po folder(s) with existing language(s) - (partially) update luci.mk with new languages deprecate build/i18n-init.sh Signed-off-by: Paul Donald <newtwen@gmail.com>
* build: i18n-scan.pl: process HTTPS DNS proxy provider descriptionsJo-Philipp Wich2023-08-311-1/+1
| | | | | Ref: https://github.com/openwrt/luci/pull/6546#issue-1872235715 Signed-off-by: Jo-Philipp Wich <jo@mein.io>
* build: i18n-scan.pl: add support for ucode sources and templatesJo-Philipp Wich2022-10-251-2/+62
| | | | | | | Recognize ucode source files and ucode templates and add the necessary logic to preprocess ucode templates into valid JavaScript sources. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
* treewide: separate Lua runtime resourcesJo-Philipp Wich2022-10-252-2/+2
| | | | | | | | | | | 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>
* build: add zoneinfo2ucode.plJo-Philipp Wich2022-10-251-0/+93
| | | | | | | | Add a zoneinfo2ucode.pl script which is the ucode equivalent to zoneinfo2lua.pl. It will generate a ucode module exporting a dictionary of known timezone names and their corresponding TZ strings. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
* build: i18n-sync.sh: fix i18n-update.pl invocationJo-Philipp Wich2021-07-221-1/+7
| | | | | Fixes: 4d3c0f347c ("build: i18n-sync.sh: allow restricting to directory") Signed-off-by: Jo-Philipp Wich <jo@mein.io>
* build: i18n-sync.sh: allow restricting to directoryJo-Philipp Wich2021-07-181-3/+3
| | | | Signed-off-by: Jo-Philipp Wich <jo@mein.io>
* build: add script to find commits suitable for cherry pickingJo-Philipp Wich2021-07-011-0/+44
| | | | Signed-off-by: Jo-Philipp Wich <jo@mein.io>
* treewide: replace `which` with `command -v`Paul Spooren2020-08-201-1/+1
| | | | | | | | | | Fix shellcheck SC2230 > which is non-standard. Use builtin 'command -v' instead. Once applied to everything concerning OpenWrt we can disable the busybox feature `which` and save 3.8kB. Signed-off-by: Paul Spooren <mail@aparcar.org>
* build/i18n-merge-master: ignore apps deleted in masterHannu Nyman2020-05-151-3/+8
| | | | | | | | | | | | | | | Refine the code to ignore apps that have been deleted from master but still exist in release branches. E.g. luci-app-samba Previously the unhandled git error from non-existing master mangled the .po files in the release branch: the 18n header was removed and all non-ASCII chars were deleted from translation. Fix this by processing only those files where 'git show' succeeds. Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi> (cherry picked from commit e4baee8d25 in openwrt-19.07)
* build: i18n-scan.pl: make ACL descriptions translatableJo-Philipp Wich2020-04-171-2/+2
| | | | Signed-off-by: Jo-Philipp Wich <jo@mein.io>
* luci-app-statistics: convert plugin definitions to JSONJo-Philipp Wich2020-02-061-1/+1
| | | | Signed-off-by: Jo-Philipp Wich <jo@mein.io>
* build: i18n-add-language.sh: more lenient code validationJo-Philipp Wich2020-02-051-1/+1
| | | | | | Allow language codes with underscores and capital letters. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
* build: add script to merge master translation into branchesJo-Philipp Wich2020-01-291-0/+17
| | | | 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-2/+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: i18n-scan.pl: use xgettext to extract message stringsJo-Philipp Wich2020-01-221-218/+173
| | | | | | | | | | | | Using xgettext has a few benefits compared to the previous perl extraction approach. The xgettext utility is able to properly distinguish commented from uncommented code and it is able handle concatenated constant expressions such as `_("Some " + "string")`. A further benefit is the ability to extract translations with disambiguation contexts and plural translation calls. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
* build: sort location annotation table in i18n sync processHannu Nyman2020-01-081-1/+5
| | | | | | | | | | | | | The scanning routine has caused unnecessary changes to the .po files if a string has been found in multiple files and those files have been found in different order than the previous time. Sort the location annotations to avoid unnecessary changes to the .po files. (sort is alphabetic, so the line numbers are also sorted alphabetically) Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi> [apply a Schwartzian transform to sort locations by path, then line number] Signed-off-by: Jo-Philipp Wich <jo@mein.io>
* build: i18n-scan.pl: support extracting translations from menu jsonJo-Philipp Wich2019-12-161-3/+118
| | | | Signed-off-by: Jo-Philipp Wich <jo@mein.io>
* treewide: move server side CBI support to luci-compatJo-Philipp Wich2019-11-031-1/+1
| | | | Signed-off-by: Jo-Philipp Wich <jo@mein.io>
* build: i18n-scan.pl: properly handle bracket-quoted stringsJo-Philipp Wich2019-05-311-38/+50
| | | | | Fixes: #2738 Signed-off-by: Jo-Philipp Wich <jo@mein.io>
* build: add i18n-add-language.sh helperJo-Philipp Wich2019-01-101-0/+37
| | | | | | | This script helps to initialize a new translation language over the entire source tree. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
* luci-app-statistics: remove old deprecated rrdtool po filesHannu Nyman2018-11-111-1/+1
| | | | | | | | | Remove old rrdtool.po* files that have been deprecated already in 2011-2015. Also remove reference to them from i18n-sync.pl Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
* build: i18n-scan.pl: *.js support, location annotationsJo-Philipp Wich2018-11-051-6/+39
| | | | | | | | Extend i18n-scan.pl to scan JavaScript files for translation strings as well and annotate produced *.po template files with source code location markers. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
* treewide: Fix typos in commentsyangfl2018-10-103-3/+3
| | | | Signed-off-by: David Yang <mmyangfl@gmail.com>
* build/mkbasepot.sh: Fix i18n after luci-mod-admin-full splitHannu Nyman2018-09-191-0/+1
| | | | | | | | | | Fix i18n sync scripts by including also the three new modules luci-mod-{network,status,system} in base.pot. Note: I did not remove luci.mod-admin-full in case it will ever get some new contents. Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
* build: add check-controller.sh, a utility to test controller filesJo-Philipp Wich2018-04-061-0/+30
| | | | | | | The main purpose of the script is to check if the module declaration matches and if associated cbi resources are properly referenced. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
* build/zoneinfo2lua.pl: logic for Etc/GMT timezonesHannu Nyman2017-05-081-0/+28
| | | | | | | Add logic to add Etc/GMT timezones (like GMT+5) although the zones are not included in zone.tab Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
* build/luadoc: Fix typos (found by codespell)Stefan Weil2016-03-262-4/+4
| | | | Signed-off-by: Stefan Weil <sw@weilnetz.de>
* build/makedocs.sh: handle relative output directoriesJo-Philipp Wich2015-09-021-1/+8
| | | | Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
* build: rework i18n-sync.sh to support new structureJo-Philipp Wich2015-04-201-20/+13
| | | | Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
* zoneinfo2lua.pl to generate shorter copyright messagesHannu Nyman2015-02-041-21/+3
| | | | | | | | | | Change zoneinfo2lua.pl to generate the short copyright messages that have been there since https://github.com/openwrt/luci/commit/7a3493b1f7d75a3945279115324cf2ff4da26b7b Also change the advice on line 3 about directory, where this script should be run. Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
* build: add modified luadoc for use with LuCI sourcesJo-Philipp Wich2015-01-2820-2/+2511
| | | | Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
* build: remove remainders of old build systemJo-Philipp Wich2015-01-087-148/+0
| | | | Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
* build: adapt zoneinfo2lua.pl to new structureJo-Philipp Wich2015-01-081-1/+1
| | | | Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
* build: adapt i18n-update.pl to new structureJo-Philipp Wich2015-01-081-12/+26
| | | | Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
* build: adapt mkbasepot.sh to new structureJo-Philipp Wich2015-01-081-4/+4
| | | | Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
* Rework LuCI build systemJo-Philipp Wich2015-01-081-41/+0
| | | | | | | | * 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>
* build: rewrite mkversion.sh to use git metadata (#239)Jo-Philipp Wich2014-11-011-5/+21
| | | | | | | The current build/mkversion.sh still expected an SVN repository layout, rewrite it to derive tags and branchnames from git metadata. Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
* build: generate strictly increasing git revisions (#225)Jo-Philipp Wich2014-10-141-1/+4
| | | | | | | | | | | | | | | | | Instead of simply emitting a "git-$hash" revision, take the commit time into account to generate strictly increasing revisions to preserve opkg upgrade capabilities. The format is "git-YY.DDD.SSSSS-HHHHHHH" with the following defined fields: - YY year number (00..99) - DDD day of year (001..366) - SSSSSS second of day (00000..86399) - HHHHHHH abbreviated git commit hash An example revision is "git-14.283.50202-bb388f0". Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
* build: preserve original .po header when updating from templates to reduce ↵Jo-Philipp Wich2014-06-131-3/+33
| | | | | | diff noise Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
* build: adjust mkbasepot.sh after modules/base mergeJo-Philipp Wich2014-06-131-3/+2
| | | | Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
* build: add mkrevision.sh helper script which properly infers the revision ↵Jo-Philipp Wich2013-03-251-0/+24
| | | | from either svn, git-svn or git work copies
* build: remove two obsolete scriptsJo-Philipp Wich2012-12-182-253/+0
|
* properly support git in build/i18n-init.shDaniel Golle2012-11-201-1/+2
|
* build: i18n-sync.sh: also recreate base.potJo-Philipp Wich2012-07-011-0/+1
|
* build: fixup header order in i18n-update.pl to minimize diffs to pootleJo-Philipp Wich2012-07-011-0/+17
|
* build: add i18n-sync.sh, a script to automatically sync most translationsJo-Philipp Wich2012-06-271-0/+24
|
* build: escape backslashes in i18n stringsJo-Philipp Wich2012-04-221-0/+1
|
* build/i18n-init.sh: add git supportJo-Philipp Wich2012-04-061-2/+11
| | | | Signed-off-by: Gabor Juhos <juhosg@openwrt.org>