build: update build/i18n-* tools

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>
This commit is contained in:
Paul Donald
2024-01-03 13:14:06 +00:00
parent c487c4f184
commit b98d8c526e
7 changed files with 90 additions and 37 deletions

11
luci.mk
View File

@@ -18,7 +18,7 @@ LUCI_MINIFY_LUA?=1
LUCI_MINIFY_CSS?=1
LUCI_MINIFY_JS?=1
# Language code titles
#LUCI_LANG_START
LUCI_LANG.ar=العربية (Arabic)
LUCI_LANG.bg=български (Bulgarian)
LUCI_LANG.bn_BD=বাংলা (Bengali)
@@ -42,8 +42,8 @@ LUCI_LANG.ms=Bahasa Melayu (Malay)
LUCI_LANG.nb_NO=Norsk (Norwegian)
LUCI_LANG.nl=Nederlands (Dutch)
LUCI_LANG.pl=Polski (Polish)
LUCI_LANG.pt_BR=Português do Brasil (Brazilian Portuguese)
LUCI_LANG.pt=Português (Portuguese)
LUCI_LANG.pt_BR=Português do Brasil (Brazilian Portuguese)
LUCI_LANG.ro=Română (Romanian)
LUCI_LANG.ru=Русский (Russian)
LUCI_LANG.sk=Slovenčina (Slovak)
@@ -53,6 +53,7 @@ LUCI_LANG.uk=Українська (Ukrainian)
LUCI_LANG.vi=Tiếng Việt (Vietnamese)
LUCI_LANG.zh_Hans=简体中文 (Chinese Simplified)
LUCI_LANG.zh_Hant=繁體中文 (Chinese Traditional)
#LUCI_LANG_END
# Submenu titles
LUCI_MENU.col=1. Collections
@@ -130,10 +131,10 @@ include $(INCLUDE_DIR)/package.mk
# LUCI_SUBMENU: the submenu-item below the LuCI top-level menu inside OpenWrt menuconfig
# usually one of the LUCI_MENU.* definitions
# LUCI_SUBMENU_DEFAULT: the regular SUBMENU defined by LUCI_TYPE or derrived from the packagename
# LUCI_SUBMENU_FORCED: manually forced value SUBMENU to set to by explicit definiton
# LUCI_SUBMENU_DEFAULT: the regular SUBMENU defined by LUCI_TYPE or derived from the packagename
# LUCI_SUBMENU_FORCED: manually forced value SUBMENU to set to by explicit definition
# can be any string, "none" disables the creation of a submenu
# most usefull in combination with LUCI_CATEGORY, to make the package appear
# most useful in combination with LUCI_CATEGORY, to make the package appear
# anywhere in the menu structure
LUCI_SUBMENU_DEFAULT=$(if $(LUCI_MENU.$(LUCI_TYPE)),$(LUCI_MENU.$(LUCI_TYPE)),$(LUCI_MENU.app))
LUCI_SUBMENU=$(if $(LUCI_SUBMENU_FORCED),$(LUCI_SUBMENU_FORCED),$(LUCI_SUBMENU_DEFAULT))