luci-app-smart-reboot: add LuCI frontend for smart-reboot - #8328
luci-app-smart-reboot: add LuCI frontend for smart-reboot#8328minicom365 wants to merge 1 commit into
Conversation
This comment has been minimized.
This comment has been minimized.
999d37f to
6c8caf4
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
46e1e52 to
8fd2331
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
8fd2331 to
1682278
Compare
Failed checksIssues marked with an ❌ are failing checks. Commit 1682278
For more details, see the full job log. Something broken? Consider providing feedback. |
minicom365
left a comment
There was a problem hiding this comment.
Implemented all suggested ucode API replacements in smart-reboot-check.
- replaced the
lockshell command withfs.open()+file.lock()/lock("u")and a cleanup helper - removed every
system("lock -u …")occurrence, now using the native handle - swapped
system("sleep …")for the builtinsleep(milliseconds)function
These changes appear in the new commits on both the local repo and the packages branch (see commit c41ab4e6f on the packages PR). All existing review threads can be considered resolved. Thanks for the pointers!
| PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME) | ||
| PO2LMO:=$(STAGING_DIR_HOSTPKG)/bin/po2lmo | ||
|
|
||
| include $(INCLUDE_DIR)/package.mk |
There was a problem hiding this comment.
This Makefile hand-rolls package.mk plus a manual PO2LMO loop and install rules, but every other in-tree luci-app uses the shared luci.mk instead (all 100 apps under applications/luci-app-*/ do — e.g. luci-app-statistics/Makefile). Switching to luci.mk gives you the standard LUCI_TITLE / LUCI_DEPENDS metadata, automatic htdocs/root install, and — importantly — proper i18n packaging (see the next comment). Recommend replacing the bottom half of this Makefile with the conventional form:
include $(TOPDIR)/rules.mk
PKG_NAME:=luci-app-smart-reboot
LUCI_TITLE:=LuCI support for smart-reboot
LUCI_DEPENDS:=+smart-reboot
PKG_LICENSE:=Apache-2.0
include ../../luci.mk
# call BuildPackage - OpenWrt buildroot signature
(+luci-base is added implicitly by luci.mk.)
Generated by Claude Code
|
|
||
| define Build/Compile | ||
| $(INSTALL_DIR) $(PKG_BUILD_DIR)/i18n | ||
| for po in ./po/*/smart-reboot.po; do \ | ||
| lang=$$(basename $$(dirname $$$$po)); \ | ||
| $(PO2LMO) $$$$po $(PKG_BUILD_DIR)/i18n/smart-reboot.$$$$lang.lmo; \ | ||
| done | ||
| endef | ||
|
|
||
| define Package/luci-app-smart-reboot/install | ||
| $(INSTALL_DIR) $(1)/www | ||
| $(CP) ./htdocs/* $(1)/www/ | ||
|
|
||
| $(INSTALL_DIR) $(1)/ | ||
| $(CP) ./root/* $(1)/ | ||
| $(INSTALL_DIR) $(1)/usr/lib/lua/luci/i18n | ||
| $(CP) $(PKG_BUILD_DIR)/i18n/*.lmo $(1)/usr/lib/lua/luci/i18n/ |
There was a problem hiding this comment.
This compiles all 18 catalogs and bundles every .lmo into the main luci-app-smart-reboot package. The in-tree convention (via luci.mk) instead emits one luci-i18n-smart-reboot-<lang> package per language, so a user installs only the translations they want and the base app stays lean. Dropping these custom Build/Compile and install rules and using luci.mk (previous comment) produces the standard per-language i18n packages automatically — no manual po2lmo loop needed.
Generated by Claude Code
| @@ -0,0 +1,38 @@ | |||
| msgid "" | |||
There was a problem hiding this comment.
No po/templates/smart-reboot.pot is included. All in-tree luci-apps commit a po/templates/<name>.pot source catalog (it is the file Weblate translates from and i18n-sync regenerates); without it the translation tooling has no template. Please add the generated po/templates/smart-reboot.pot. Separately, these hand-written catalogs omit the standard PO headers (Project-Id-Version, Plural-Forms, Content-Transfer-Encoding, etc.) that every other in-tree catalog carries — worth generating them through the normal po workflow rather than by hand so they survive the next Weblate sync.
Generated by Claude Code
| @@ -0,0 +1,38 @@ | |||
| msgid "" | |||
| msgstr "Content-Type: text/plain; charset=UTF-8\n" | |||
There was a problem hiding this comment.
nit: this ko catalog's header is missing the Language: ko\n field that every other catalog in this PR includes (e.g. de has Language: de\n), and the file also lacks a trailing newline. Add the language tag for consistency:
| msgstr "Content-Type: text/plain; charset=UTF-8\n" | |
| msgstr "Content-Type: text/plain; charset=UTF-8\nLanguage: ko\n" |
Generated by Claude Code
Formality Check: FailedWe completed the verification flow. Please review the formatting overview logs below. 🛑 CRITICAL ERRORS
Tip Do not close this pull request to make corrections. Instead, modify your existing commits (e.g. Something broken? Consider reporting an issue. |
4072e3d to
11b9739
Compare
openwrt-ai
left a comment
There was a problem hiding this comment.
Reviewed the change since the last review (Makefile now uses luci.mk, resolving the prior packaging and per-language i18n comments). One inline follow-up on the missing PKG_MAINTAINER.
Generated by Claude Code
| PKG_NAME:=luci-app-smart-reboot | ||
| LUCI_TITLE:=LuCI support for smart-reboot | ||
| LUCI_DEPENDS:=+smart-reboot | ||
| PKG_LICENSE:=Apache-2.0 |
There was a problem hiding this comment.
The switch to luci.mk resolves the earlier packaging/i18n comments — thanks. One thing still missing: PKG_MAINTAINER. The formality check on this commit fails with New OpenWrt package is missing the mandatory parameter: 'PKG_MAINTAINER', and 95 of the 100 in-tree applications/luci-app-*/Makefile set it (e.g. luci-app-ddns). Add it next to PKG_LICENSE:
| PKG_LICENSE:=Apache-2.0 | |
| PKG_LICENSE:=Apache-2.0 | |
| PKG_MAINTAINER:=Min Choi <3387910@naver.com> |
Generated by Claude Code
11b9739 to
9c1cdbb
Compare
Add LuCI UI for configuring smart-reboot. - Enable/disable toggle and HH:MM reboot time input - Interface selection with select-all option - Show last automatic reboot timestamp - Provide i18n catalogs for 18 languages Signed-off-by: Min Choi <3387910@naver.com>
9c1cdbb to
856ea2f
Compare
openwrt-ai
left a comment
There was a problem hiding this comment.
Reviewed 1 new commit; no new issues found. The only change since the last review adds PKG_MAINTAINER, resolving the prior formality-check follow-up.
Generated by Claude Code
This adds LuCI support for
smart-reboot.Features
HH:MM)i18n Languages
ko,ja,zh_Hans,zh_Hant,de,fr,es,it,pt_BR,ru,uk,vi,th,id,tr,pl,nl,arTesting
ipq806x/genericDependency
Signed-off-by: minicom365 3387910@naver.com