feat(queue): add empty_message + empty_filter_message override#47
Open
foXaCe wants to merge 1 commit into
Open
feat(queue): add empty_message + empty_filter_message override#47foXaCe wants to merge 1 commit into
foXaCe wants to merge 1 commit into
Conversation
Lets callers override the built-in NO ITEMS IN QUEUE. / NO ITEMS MATCH THIS FILTER. strings so downstream apps (eg. ScrapeGoat with NextUI i18n) can localise the empty-state placeholders without forking the widget.
Open
7 tasks
foXaCe
added a commit
to foXaCe/NextUI
that referenced
this pull request
May 23, 2026
Adds ~150 sg.* keys consumed by the companion PR on Helaas/nextui-scrapegoat-pak. Covers main menu, library list, ROM detail, queue/progress screens, settings, dialogs, warnings. The parser now decodes \\n / \\t / \\\\ escapes so multi-line dialog strings (cancel-all confirmation, background-scraping warning, ...) can sit on a single .lang line. Existing single-line keys are unaffected. Also localises btn.up_down / btn.left_right (was hardcoded U/D and L/R literals in gametime/bootlogo/battery/ledcontrol) so the button hints render as H/B and G/D in French. New gametime.title_fmt key for the Game Tracker top title. Companion PRs: - Helaas/nextui-scrapegoat-pak#9 - Helaas/Apostrophe#47 (queue widget i18n hook)
Contributor
There was a problem hiding this comment.
Pull request overview
Adds optional overrides to the queue viewer so downstream apps can localize the empty-state placeholder strings without forking the widget, while keeping default behavior when overrides are unset.
Changes:
- Extend
ap_queue_optswithempty_messageandempty_filter_messageoptional fields. - Update
ap_queue_viewerempty-state rendering to prefer these overrides when non-NULLand non-empty.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+429
to
+430
| const char *empty_message; /* Optional override for "NO ITEMS IN QUEUE." */ | ||
| const char *empty_filter_message; /* Optional override for "NO ITEMS MATCH THIS FILTER." */ |
Owner
|
Thanks for the PR. i18n and the other PRs are currently being discussed on the Discord. |
Author
|
I did the OS and the store too |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds two optional fields on
ap_queue_optsso callers can override the built-inNO ITEMS IN QUEUE./NO ITEMS MATCH THIS FILTER.placeholders without forking the widget.When the override is
NULLor empty, the existing English strings are used — fully backwards compatible.Why
I'm wiring NextUI's i18n layer into ScrapeGoat (companion PR: https://github.com/Helaas/nextui-scrapegoat-pak) and the queue's empty-state placeholders were the only Apostrophe-rendered strings I couldn't override from the calling pak. Without this change downstream apps either show an English string in an otherwise localised UI, or have to ship a forked copy of
apostrophe_widgets.hjust to swap two literals.Diff
Same shape as the existing
filter_labels[4]override added earlier.Test plan
tg5040) via ScrapeGoat withlanguage=frinminuisettings.txt.