A user on Twitter pointed out that we always say "Update/Edit/Remove Index" in the right-click context menu for an index. Ideally we should name the exact type instead of just Index there. If you're wondering about the cultural history of indexes: https://en.wikipedia.org/wiki/Index_(publishing) We have seven types of indexes, so implementing this would require creating 21 new translatable strings. The Navigator also has "Delete Index", but the use there is clearer as the user is looking at a tree named "Indexes". The commands are FN_UPDATE_CUR_TOX aka .uno:UpdateCurIndex FN_EDIT_CURRENT_TOX aka .uno:EditCurIndex FN_REMOVE_CUR_TOX aka .uno:RemoveTableOf The .uno commands you will find in many .xml files defining popup menus. Their visibility in the context menu is controlled in SwTextShell::GetIdxState() of sw/source/uibase/shells/textidx.cxx SwView::GetState() of sw/source/uibase/uiview/viewstat.cxx Probably a pile of conditions would be required to satisfy this request.
The seven types are: Table of Contents, Alphabetical Index, Table of Figures, Index of Tables, User-Defined, Table of Objects, Bibliography. Concatenation might work like "Edit %1" translated to "%1 ändern" with possible issues regarding upper case. And the "User-Defined" ToC is awkward.
Kira, are you interested in this issue?
(In reply to Heiko Tietze from comment #1) > The seven types are: Table of Contents, Alphabetical Index, Table of > Figures, Index of Tables, User-Defined, Table of Objects, Bibliography. > Concatenation might work like "Edit %1" translated to "%1 ändern" with > possible issues regarding upper case. And the "User-Defined" ToC is awkward. Due to differences in languages, easy shortcuts like %1 might indeed not work.
(In reply to Heiko Tietze from comment #2) > Kira, are you interested in this issue? I'll take some time to review this, thanks.
If the ask is to create strings that would ONLY affect the labels displayed in the context menu items (I assume this means multiple labels can apply to one .uno command), then I'm not certain how to approach this. However, I can kind of see how to fix the issue by creating new .uno commands for each of the new strings, then utilizing the disableItem() method (found in sw/source/uibase/shells/textidx.cxx and sw/source/uibase/uiview/viewstat.cxx) to remove the item from the context menu if the TOXTypes do not match. Something along the lines of: if (TOXType != TOX_TABLES) { //3 new UNO commands for update/edit/remove index of tables disableItem(FN_UPDATE_CUR_TOX_TABLES) disableItem(FN_EDIT_CURRENT_TOX_TABLES) disableItem(FN_REMOVE_CUR_TOX_TABLES) } ...etc... but not sure if this is what you're looking for :)
I'm not sure, if this is even worth doing, but just wanted to bring this into discussion as it was mentioned in a public channel.
Not worth the effort for l10n (adding different labels or even UNO commands) but if we can easily change the label when the context menu pops-up it might be worth a few minutes work. Hossein, please take a look if this can be made an easyhack. IIRC we have menu dynamic labels somewhere. If not we better abstain from effort.
Heiko Tietze committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/e0808a1f84c40ea15d2d88beebd97659e7d46348 Resolves tdf#161574 - Individual labels for TOXes in the UI It will be available in 25.2.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Seems to work fine. Now that Twitter user should be a happy camper. Version: 25.2.0.0.alpha0+ (X86_64) / LibreOffice Community Build ID: 12e08b3cba0e75f1bd3a42f30e4830d723b24ece CPU threads: 8; OS: Linux 6.10; UI render: default; VCL: kf6 (cairo+wayland) Locale: fi-FI (fi_FI.UTF-8); UI: en-US Calc: CL threaded