Bug 114286 - Move uno command entries from module specific xcu file to GenericCommands.xcu
Summary: Move uno command entries from module specific xcu file to GenericCommands.xcu
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
6.1.0.0.alpha0+
Hardware: All All
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard: target:6.1.0 target:7.4.0 target:7.6....
Keywords:
Depends on:
Blocks: l10n-Optimization
  Show dependency treegraph
 
Reported: 2017-12-06 17:09 UTC by Yousuf Philips (jay) (retired)
Modified: 2023-05-30 14:52 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 Yousuf Philips (jay) (retired) 2017-12-06 17:09:04 UTC
A number of uno commands have duplicate entries per module and moving them into GenericCommands.xcu will reduce duplicate translations.
Comment 1 Yousuf Philips (jay) (retired) 2017-12-06 17:20:50 UTC
.uno:UnderlineDouble - https://gerrit.libreoffice.org/45974
Comment 2 Commit Notification 2017-12-16 12:25:02 UTC
Yousuf Philips committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=b1f93cad88d92e443966a3970a73fcfd7267f7a6

tdf#114286 Move UnderlineDouble to GenericCommands

It will be available in 6.1.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 3 Xisco Faulí 2018-01-16 09:46:54 UTC
Hi Yousuf,
Could it be converted into an easyHack?
Do you have the list of uno commands that can be moved to GenericCommands.xcu ?
Comment 4 Yousuf Philips (jay) (retired) 2018-01-16 18:41:49 UTC
(In reply to Xisco Faulí from comment #3)
> Could it be converted into an easyHack?

Yes it should be simple enough to be an easyhack.

> Do you have the list of uno commands that can be moved to
> GenericCommands.xcu ?

No dont have a list, so either someone goes manually through each module xcu files or a script should be made to generate such a list.
Comment 5 Julien Nabet 2022-03-11 17:05:50 UTC
I found 2 entries:
- .uno:SendMailDocAsMS
- .uno:SendMailDocAsOOo

To find them:
grep uno officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu|cut -d'"' -f2|grep -v value |sort  >  ~/lo/bugs/114286_dup/writeruno.txt

grep uno officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu|cut -d'"' -f2|grep -v value |sort  >  ~/lo/bugs/114286_dup/genericuno.txt

grep uno officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu|cut -d'"' -f2|grep -v value |sort  >  ~/lo/bugs/114286_dup/calcuno.txt

grep uno officecfg/registry/data/org/openoffice/Office/UI/DrawImpressCommands.xcu|cut -d'"' -f2|grep -v value |sort  >  ~/lo/bugs/114286_dup/drawuno.txt

then comm -12 genericuno.txt calcuno.txt to have just some results:
.uno:Delete
.uno:DeleteAllNotes
.uno:GoLeftBlock
.uno:InsertAnnotation
.uno:SendMailDocAsMS
.uno:SendMailDocAsOOo

Then I grep each of them and found only last ones.

I suppose there must be much simpler but I had just this in mind.
Comment 6 Julien Nabet 2022-03-11 17:08:57 UTC
Dumb me!
I should use comm for the other files, not from generic one and others.
Anyway, it seems redundant to have these 2 commands in each module + generic.
Comment 7 Julien Nabet 2022-03-11 17:11:28 UTC
Argh, not that simple, values of the nodes differ of course...
Comment 8 Julien Nabet 2022-03-11 17:22:28 UTC
Just a focus on an example found:
".uno:SplitCell"
In Calc:
      <node oor:name=".uno:SplitCell" oor:op="replace">
        <prop oor:name="Label" oor:type="xs:string">
          <value xml:lang="en-US">Unmerge Cells</value>
        </prop>
        <prop oor:name="Properties" oor:type="xs:int">
          <value>1</value>
        </prop>
      </node>

In Draw/Impress:
      <node oor:name=".uno:SplitCell" oor:op="replace">
        <prop oor:name="Label" oor:type="xs:string">
          <value xml:lang="en-US">Split Cells</value>
        </prop>
        <prop oor:name="Properties" oor:type="xs:int">
          <value>1</value>
        </prop>
      </node>


In Writer:
      <node oor:name=".uno:SplitCell" oor:op="replace">
        <prop oor:name="Label" oor:type="xs:string">
          <value xml:lang="en-US">Split Cells...</value>
        </prop>
        <prop oor:name="Properties" oor:type="xs:int">
          <value>1</value>
        </prop>
      </node>

Should we let as it is or should we use the same wording and put it in generic ?
Comment 9 Julien Nabet 2022-03-11 20:06:50 UTC
Keeping on the analysis, I tried:
for i in $(comm -12 calcuno.txt drawuno.txt);do grep -n $i *;echo "\n";done

and noticed this one:
calcuno.txt:163:.uno:InsertAnnotation
drawuno.txt:152:.uno:InsertAnnotation
genericuno.txt:489:.uno:InsertAnnotation

I thought about removing Calc and Draw .uno:InsertAnnotation since they are already present in a generic file, any thoughts here ?
Comment 10 Commit Notification 2022-03-15 16:43:07 UTC
Julien Nabet committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/2aae3ef9ab464b72f6616aa8a66b6f17cae456a4

Related tdf#114286: put duplicates commands in GenericCommands (MergeCells)

It will be available in 7.4.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.
Comment 11 Julien Nabet 2022-03-15 19:53:37 UTC
Heiko: any thoughts about my last comments here? Indeed "MergeCells" case was quite simple, the others that I pinpointed are less straightforward.
Comment 12 Heiko Tietze 2022-03-16 07:00:56 UTC
(In reply to Julien Nabet from comment #11)
> Heiko: any thoughts about my last comments here?

Generic has all kind of labels while sc uses popup only and sd none. Cleaning up this command sounds not only safe to me but improves consistency.
Comment 13 Julien Nabet 2022-03-16 19:26:37 UTC
(In reply to Heiko Tietze from comment #12)
> (In reply to Julien Nabet from comment #11)
> > Heiko: any thoughts about my last comments here?
> 
> Generic has all kind of labels while sc uses popup only and sd none.
> Cleaning up this command sounds not only safe to me but improves consistency.

Thank you for your feedback, I submitted this patch https://gerrit.libreoffice.org/c/core/+/131676 for SplitCell
Comment 14 Julien Nabet 2022-03-16 19:30:42 UTC
patch to remove useless "InsertAnnotation" in Calc/Draw part since already present in Generic part:
https://gerrit.libreoffice.org/c/core/+/131679
Comment 15 Commit Notification 2022-03-17 08:28:54 UTC
Julien Nabet committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/763e5d233d18a26f64dd8c4db67ce62ee289832e

Related tdf#114286: put duplicates commands in GenericCommands (DeleteColumns)

It will be available in 7.4.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.
Comment 16 Commit Notification 2022-03-17 09:21:17 UTC
Julien Nabet committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/7a7bf6afcdb8f069e750ac8cd4126930674e3f4b

Related tdf#114286: remove duplicates commands in Calc/Draw (InsertAnnotation)

It will be available in 7.4.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.
Comment 17 Commit Notification 2022-03-17 16:47:08 UTC
Julien Nabet committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/52a695d2ceb4231a9fcc419959e29023ecef037b

Related tdf#114286: put duplicates commands in GenericCommands (DeleteRows)

It will be available in 7.4.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.
Comment 18 Commit Notification 2022-03-21 17:23:05 UTC
Julien Nabet committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/2aa3097fe2beb56d43f037723997c8d37a7251b4

Related tdf#114286: put duplicates commands in GenericCommands (SplitCell)

It will be available in 7.4.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.
Comment 19 Commit Notification 2023-05-23 18:13:32 UTC
Julien Nabet committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/980b5f2676c3a57022893c244617a61594c5f696

Revert "Related tdf#114286: put duplicates commands in GenericCommands..."

It will be available in 7.6.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.
Comment 20 Commit Notification 2023-05-24 07:26:39 UTC
Julien Nabet committed a patch related to this issue.
It has been pushed to "libreoffice-7-5":

https://git.libreoffice.org/core/commit/68427cc4964716c89c6e97943bd3f0d309e231c2

Revert "Related tdf#114286: put duplicates commands in GenericCommands..."

It will be available in 7.5.5.

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.
Comment 21 Commit Notification 2023-05-30 14:52:48 UTC
Julien Nabet committed a patch related to this issue.
It has been pushed to "libreoffice-7-5-4":

https://git.libreoffice.org/core/commit/eb5491238913b39313133622614e76d760232f75

Revert "Related tdf#114286: put duplicates commands in GenericCommands..."

It will be available in 7.5.4.

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.