Bug 154607 - In menu XML files the "menu:label" property should be localizable
Summary: In menu XML files the "menu:label" property should be localizable
Status: RESOLVED INSUFFICIENTDATA
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Localization (show other bugs)
Version:
(earliest affected)
7.6.0.0 alpha0+
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-04-04 17:28 UTC by Rafael Lima
Modified: 2025-11-25 15:34 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Rafael Lima 2023-04-04 17:28:54 UTC
This ticket is a spinoff from a discussion in Gerrit while fixing bug 151338.

The XML files used to define menus / popup menus in LibreOffice support a menu:label property, which allows the definition of a custom label instead of showing the command's Label or ContextLabel (as defined in the .xcu file). See:

https://opengrok.libreoffice.org/xref/core/framework/dtd/menubar.dtd

The only problem is that this label wouldn't be picked up for translation. So I would like to propose that these labels become localizable. For that, we would need to create a new property menu:localize in the DTD file (similar to what we already have in help XHP files). However, here menu:localize would be assumed as False if omitted, and labels that are supposed to be translatable would have to be flagged with menu:localize="True". 

This would make it much easier to create menus / popup menus and give names that are specific to certain situations without having to create new Uno commands.

Currently the menu:label property is only used in Math (see code pointer below) to define multiple menu entries that use the same command with a string argument. To the best of my knowledge, the labels here are not translatable.

https://opengrok.libreoffice.org/xref/core/starmath/uiconfig/smath/popupmenu/edit.xml
Comment 1 Buovjaga 2023-04-11 12:53:58 UTC
Comments from Cloph:

15:11:05 <cloph> why two ways to define it? why is the label in xcu not sufficient?
15:13:57 <cloph> (the example with math explicitly sattes that they use labels here because they are not translatable/that anything that should be translated should be done in the xcu instead)
15:15:52 <cloph> apart from that no hard feelings, however not sure whether just label alone will be sufficient/whether a context attribute or similar to uniquely identify the string also would be necessarily, similar to strings in .ui files.
Comment 2 Xisco Faulí 2025-03-04 11:41:01 UTC
Hello,
It's been a while since this issue was reported.
Could you please try to reproduce it with the latest version of LibreOffice from https://www.libreoffice.org/download/libreoffice-fresh/ ?
I have set the bug's status to 'NEEDINFO'. Please change it back to 'UNCONFIRMED' if the bug is still present in the latest version.
Comment 3 QA Administrators 2025-09-01 03:12:59 UTC Comment hidden (obsolete)
Comment 4 QA Administrators 2025-11-25 15:34:24 UTC
Dear Rafael Lima,

Please read this message in its entirety before proceeding.

Your bug report is being closed as INSUFFICIENTDATA due to inactivity and
a lack of information which is needed in order to accurately
reproduce and confirm the problem. We encourage you to retest
your bug against the latest release. If the issue is still
present in the latest stable release, we need the following
information (please ignore any that you've already provided):

a) Provide details of your system including your operating
   system and the latest version of LibreOffice that you have
   confirmed the bug to be present

b) Provide easy to reproduce steps – the simpler the better

c) Provide any test case(s) which will help us confirm the problem

d) Provide screenshots of the problem if you think it might help

e) Read all comments and provide any requested information

Once all of this is done, please set the bug back to UNCONFIRMED
and we will attempt to reproduce the issue. Please do not:

a) respond via email 

b) update the version field in the bug or any of the other details
   on the top section of our bug tracker

Warm Regards,
QA Team

MassPing-NeedInfo-FollowUp