Created attachment 201780 [details] Draw navigator redaction shapes not translated Steps to Reproduce: 1. Open a document in Writer 2. Type same text in the document and insert a image 3. Open Tools - Auto-Redact 4. Set a text target and a all image target 5. click OK 6. Open the navigator in Draw via F5 7. The entries redaction shapes are not translated See also attached image. Version: 25.8.0.0.beta1 (X86_64) / LibreOffice Community Build ID: 1b25e37a63c5a6f16bdcb365ed3da80ac419e6e4 CPU threads: 16; OS: Windows 11 X86_64 (build 22631); UI render: Skia/Vulkan; VCL: win Locale: de-DE (de_DE); UI: de-DE Calc: CL threaded
It seems to me that the code depends on the names: https://git.libreoffice.org/core/+/a9e9175ba6be99bebd82228e78cd77f33b1515ea/sfx2/source/doc/objserv.cxx#950 I suppose they could be made translation-aware. Maybe this could be an easy hack.
Sure, do not show internal IDs in the UI. Not sure about the easy hack. This rectangle is a UNO command...? Maybe Jim knows.
Here are some hints on one way to go about making the redaction shape names translatable: Locations "ImageRedactionShape", "RectangleRedactionShape", and "FreeformRedactionsShape" are referenced: officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu sd/uiconfig/sdraw/menubar/menubar.xml sd/uiconfig/sdraw/toolbar/redactionbar.xml sfx2/source/doc/SfxRedactionHelper.cxx sfx2/source/doc/objserv.cxx Places to add code to set the redaction shape name to a defined name: sd/source/ui/unoidl/unopage.cxx SdDrawPage::add sd/source/ui/func/fuconrec.cxx FuConstructRectangle::SetAttributes sd/source/ui/func/fuconbez.cxx FuConstructBezierPolygon::SetAttributes Translation strings can be define in: include/sfx2/strings.hrc Currently all redacted objects of a type receive the same type name, i.e. ImageRedactionShape types are named "ImageRedactionShape", RectangleRedactionShape types are named "RectangleRedactionShape" and FreeformRedactionShape types are named "FreeformRedactionShape". This is a problem for the Navigator which requires unique names to be able to correctly navigate to objects. Possibly we want to include making redaction object names unique in this patch?