DocumentTranslator-Legacy icon indicating copy to clipboard operation
DocumentTranslator-Legacy copied to clipboard

Skip translation of hidden text.

Open joseairesfernandes opened this issue 5 years ago • 8 comments

Thanks for such good application.

In order to improve it's functionality It would be good if we could choose the ignore hidden text in Word files. This way users should be able to hide the sections in the document that do not need translation and process only the text that would need to be translated.

Same for Excel. Hidden sheets, columns and rows should not be processed. And as for PowerPoint, hidden slides should also be ignored.

Hope this helps. Jose

joseairesfernandes avatar Sep 04 '18 08:09 joseairesfernandes

Thanks for the tip. I'll have a look.

chriswendt1 avatar Sep 07 '18 01:09 chriswendt1

I am thinking it should be a user option "Translate hidden text", which is off by default. Agree?

chriswendt1 avatar Sep 11 '18 01:09 chriswendt1

We are also developing this feature on our side as we really need it. For now we have a checkbox in the Translate Documents tab:

2018-09-11 09_51_43

However it is probably better to have this option moved to Settings and add a section for document options. It will make adding other options easier in the future.

About the hidden text feature: I have managed to make it work for Word documents and could share that part if you want. The change involves adding some extra code to the ProcessWordDocument method, as well as an optional argument (bool ignoreHidden = false).

Currently working on Excel documents, which is trickier as the same shared string can appear both hidden and unhidden in the same document.

TGuiMel avatar Sep 11 '18 08:09 TGuiMel

Hi Chris,

Thanks for looking into this. I agree about making this optional and also to enable this under the settings section. Will you finally include and option for each? This is, for Word (skip hidden text), Excel (skip filtered content and hidden sheets) and PowerPoint (skip hidden slides).

This new feature will be very good since it will save lots of post processing time.

Thanks for your help. Jose

On Tue, Sep 11, 2018 at 10:09 AM TGuiMel [email protected] wrote:

We are also developing this feature on our side as we really need it. For now we have a checkbox in the Translate Documents tab:

[image: 2018-09-11 09_51_43] https://user-images.githubusercontent.com/19893027/45346173-bd4eee80-b5a8-11e8-88b4-96107a16f385.jpg

However it is probably better to have this option moved to Settings and add a section for document options. It will make adding other options easier in the future.

About the hidden text feature: I have managed to make it work for Word documents and could share that part if you want. The change involves adding some extra code to the ProcessWordDocument method, as well as an optional argument (bool ignoreHidden = true).

Currently working on Excel documents, which is trickier as the same shared string can appear both hidden and unhidden in the same document.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/MicrosoftTranslator/DocumentTranslator/issues/70#issuecomment-420186025, or mute the thread https://github.com/notifications/unsubscribe-auth/AlP2fcHvFgU7A_JV7E6EG4itkxux3vyyks5uZ2-ggaJpZM4WYfFT .

joseairesfernandes avatar Sep 11 '18 08:09 joseairesfernandes

Hi Chris,

I am also wondering whether it would be a good idea to get Word, Excel and Powerpoint processing logic to separate classes rather than have them all in DocumentTranslationManager. More options means more complexity and it can become unwieldy after a while.

TGuiMel avatar Sep 11 '18 08:09 TGuiMel

I'd appreciate if you contribute your code for the hidden text. I think the option should be in the Translate Documents dialog like you have it, because the user should be aware of it each time. Can remember the user setting for the next run, just like it remembers the last language setting.

chriswendt1 avatar Sep 11 '18 14:09 chriswendt1

I agree would be easier to maintain if the classes per Word/Excel/PowerPoint document type were separated.

chriswendt1 avatar Sep 11 '18 14:09 chriswendt1

@TGuiMel, thank you so much for PR. I accepted and added the feature to remember the user setting for the next run. Will be in 2.1.2 and later. Only for Word documents for now. Leaving the issue open for the other document formats.

chriswendt1 avatar Sep 16 '18 04:09 chriswendt1