There are a few generic I18N issues with in-app development:
When I deselect the tab for workflows in the demo, one of the new options is [none(unknown).title], and a missing I18N error is logged accordingly:
Missing resource '[none(unknown).title]'.
~~The relevant part of the stack trace: ~~
at com.top_logic.basic.util.DefaultBundle.getString(DefaultBundle.java:220)
at com.top_logic.mig.html.layout.TabInfo.getLabel(TabInfo.java:114)
at com.top_logic.layout.component.TabbedLayoutComponentResourceProvider.getLabelNullSafe(TabbedLayoutComponentResourceProvider.java:23)
For this tab, the problem can probably be fixed easily. But it’s an example of a general problem: If a view is configured “incorrectly,” it causes a “Missing resource” error that the customer doesn’t know what to do with. After all, they can’t enter [none(unknown).title] into the properties files. Nor does the error message indicate which view is causing the problem or how it can be fixed. And it’s also unclear exactly what is configured “incorrectly” in the view. Therefore, this generic problem should be fixed first. Fixing the problem for this one view would merely hide the generic issue until a customer stumbles upon it. Therefore, I will not fix it directly in #25048. Since the specific example is in the demo, it shouldn’t affect customers if I don’t fix this one example directly.
When a dialog is configured, I see a missing I18N key in the log the next time I log in:
Missing resource [none(unknown).openAsDialog].
Ultimately, the “none(unknown)” comes from here: LayoutComponent.Config.getResPrefix(), because the dialog’s configuration uses getResPrefix() to generate the label for the open button. And “none(unknown)” is the default.
In general, “none(unknown)” is problematic for the customer because, in case of doubt, they have no idea where it comes from, and even if they did, there’s nothing they could do about it. And in such cases, I, too, have to debug first to figure out where it’s coming from. To address the latter problem, it would help somewhat if at least the class that generates the NoKey were also logged.It would be even better to reduce the use of ` NoKey ` and `NoPrefix`. For example, if a component doesn’t have a `ResPrefix `, why does it have to return `NoPrefix`? Couldn’t it instead return a prefix for “component without ResPrefix”—such as `DEFAULT_COMPONENT_PREFIX`?- Error messages such as “none(unknown) ” have been expanded to include contextual information. If the `tl:ResPrefix` of a component configuration is not set, a `tl:NoPrefix` is now returned instead of the meaningless `tl:ResPrefix.NONE`—with the fully qualified name of the component (if available) or the name of the implementation class as a fallback.
When creating a dialog, the default title is "No Content." However, when I open the dialog, the following is displayed instead of an empty dialog title:
[deprecated:3810f414-5858-41fd-bdf5-b48f2dbbcbaa.layout.xml#Dialog.title]|[deprecated:]
When I create a new view but don’t enter a name, the title shows [none(unknown).title]. I expected an empty title.- Titles for views are now required.
Test
Titles are required when creating views. It should not be possible to create a tab, table, tree, etc., without a title.