Bug 157648 - FORMATTING: Setting language for Selection/Paragraph/All text can't be shortcut
Summary: FORMATTING: Setting language for Selection/Paragraph/All text can't be shortcut
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.0 all versions
Hardware: All All
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: needsUXEval
Depends on:
Blocks: Languages 89259
  Show dependency treegraph
 
Reported: 2023-10-06 23:55 UTC by skagon
Modified: 2023-12-17 09:06 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 skagon 2023-10-06 23:55:09 UTC
Description:
There is no way to make a keyboard shortcut of the Tools–Language–For Selection/Paragraph/All text–Language.

It is somewhat annoying to be expected to do Tools–Language–For Selection–English (or any other language) with the mouse or with Alt-T etc. Pasting unformatted text often has the side effect of the language not being recognised correctly, so I have to manually select all words that are underlined in red and manually set the language. I have to do this several times each day. I thought of making a shortcut, but alas, in the Customise–Keyboard–Function or Category, there is no option that would follow the "Set Language for Selection to English/French/German/whatever".

I don't know if this should be marked as a bug, I'll just put it up as an enhancement and go from there.

Steps to Reproduce:
1. Open Tools–Customise–Keyboard
2. Try to find an option to set the language of the text to a specific language
3. You can't. There is no option or command that would do that, which could be set as a shortcut.

Actual Results:
The option is not there. In the entire list, there is no Language setting command.

Expected Results:
There should have been an available function to set the language of the selected or current text or paragraph to a specific language.


Reproducible: Always


User Profile Reset: No

Additional Info:
Version: 7.5.7.1 (X86_64) / LibreOffice Community
Build ID: 47eb0cf7efbacdee9b19ae25d6752381ede23126
CPU threads: 8; OS: Windows 10.0 Build 19045; UI render: Skia/Raster; VCL: win
Locale: el-GR (en_GB); UI: en-GB
Calc: CL threaded
Comment 1 Dieter 2023-10-22 11:10:43 UTC
Not sure, if this is possible at all. So let's ask design-team

Additional information
You also have access to language selection of paragraph via statusbar
Comment 2 skagon 2023-10-22 13:49:34 UTC
(In reply to Dieter from comment #1)
> Not sure, if this is possible at all. So let's ask design-team
> 
> Additional information
> You also have access to language selection of paragraph via statusbar

Note that language in statusbar is invisible unless the Writer window is at least half my screen in width (≈1000px).
Comment 3 Heiko Tietze 2023-10-23 06:55:38 UTC
If you paste unformatted text it takes the attributes of the paragraph, if you want to clear attributes from pasted text you could use ctrl+M / Format > Clear Direct Formatting, and last but not least you should check your paragraph style (and character styles in case of multiple languages).

Besides the supposed workflow I see no good way to shortcut variable menu entries. It depends on the configuration whether English is listed.

Another option for you might be to click on the language at the statusbar. But it would be direct formatting and styles is still the preferred method.

Does this help?
Comment 4 skagon 2023-10-23 11:24:17 UTC
(In reply to Heiko Tietze from comment #3)
> If you paste unformatted text it takes the attributes of the paragraph, if
> you want to clear attributes from pasted text you could use ctrl+M / Format
> > Clear Direct Formatting, and last but not least you should check your
> paragraph style (and character styles in case of multiple languages).
> 
> Besides the supposed workflow I see no good way to shortcut variable menu
> entries. It depends on the configuration whether English is listed.
> 
> Another option for you might be to click on the language at the statusbar.
> But it would be direct formatting and styles is still the preferred method.
> 
> Does this help?

As I mentioned in the previous comment, the Language box in the statusbar goes invisible, unless the Writer window is >1000px (approximately). Therefore, in my normal workflow, it's invisible always.

Pasting text goes all over the place, as I regularly (=50 times every day) paste mixed language text, and I then have to manually fix all the words that are not in the correct language.

I'm already using AutoHotKey, but I find it dumb to have a shortcut for an action that's 5 keypresses long (alt-T, G, F, E, or whatever else) for something that could be handled internally.
Comment 5 QA Administrators 2023-10-24 03:13:47 UTC Comment hidden (obsolete)
Comment 6 Cor Nouws 2023-11-16 12:14:35 UTC
Hi skagon,

(In reply to skagon from comment #0)
> ...
> Expected Results:
> There should have been an available function to set the language of the
> selected or current text or paragraph to a specific language.
I can somehow understand your wish, but I think it also means that there should be a command for <n> languages, that you can use with the shortcut?

(In reply to skagon from comment #4)
> ...
> Pasting text goes all over the place, as I regularly (=50 times every day)
> paste mixed language text, and I then have to manually fix all the words
> that are not in the correct language.
You mean to say that Paste Special, Without Formatting does not clean the language information from the text you paste?
That is not the behavior as I know it.
If you can reproduce that reliable, to me it looks like a bug. And then it deserves a report, sample document(s) and text, obviously :)

thanks - Cor
Comment 7 skagon 2023-11-16 13:46:32 UTC
(In reply to Cor Nouws from comment #6)
> I can somehow understand your wish, but I think it also means that there
> should be a command for <n> languages, that you can use with the shortcut?

I'm saying there should be the *option* for n languages, where those who need that functionality, can set their own shortcuts.

> 
> You mean to say that Paste Special, Without Formatting does not clean the
> language information from the text you paste?
> That is not the behavior as I know it.
> If you can reproduce that reliable, to me it looks like a bug. And then it
> deserves a report, sample document(s) and text, obviously :)

The issue is that my work entails copy-pasting mixed language text on a daily basis. I've even got a shortcut for pasting unformatted text, but whenever I do, the pasted text is all seen as the current active language I'm using. So, I've immediately got the spell-checker filling the document with red underlines! One way or the other, (Greek or UK English) a lot of the pasted text is in the wrong language.
I can reproduce it as reliably as every single time, every single day, I don't see it as a bug per se, it's just strange. If you feel it's a bug, go ahead.
If you want to try it yourself, you can go, for example, here: https://blog.public.gr/eikona-kai-ihos/black-friday-2023-tileorasi and copy-paste the first paragraph. You'll see that half the pasted text is not in the correct language (it's Greek with English words or phrases interspersed).

> 
> thanks - Cor

Thank you!
Comment 8 Heiko Tietze 2023-11-17 08:08:38 UTC
We discussed the topic in the design meeting.

The out-of-the box solution is to define a new character style with just the language, to use tools > customize > keyboard: styles > character styles to assign a shortcut to this style (ideally you do this in a template) and finally select text and apply the style per shortcut.
Comment 9 skagon 2023-11-20 13:18:37 UTC
(In reply to Heiko Tietze from comment #8)
> We discussed the topic in the design meeting.
> 
> The out-of-the box solution is to define a new character style with just the
> language, to use tools > customize > keyboard: styles > character styles to
> assign a shortcut to this style (ideally you do this in a template) and
> finally select text and apply the style per shortcut.

I've done exactly as you suggested. I'm sorry to report two issues here:

a. Is there a way to make a character style that does NOT override the font, just the font language? So far, it seems that the character style *has* to have a specific font set (I don't think I have to explain why this is bad).

b. The solution doesn't seem to work at all times. Whenever I paste text, it seems to be in a sort of "limbo", with no language set. Pressing the shortcut I created for the new character styles, seems to mostly work for English words that were pasted, but not always for Greek. Especially if I haven't selected any text and just have the cursor somewhere within a single word – the expected funtionality there would be to apply the character style to the entire word where the cursor is in.
Comment 10 Heiko Tietze 2023-11-21 06:38:52 UTC
(In reply to skagon from comment #9)
> a. Is there a way to make a character style that does NOT override the font,
> just the font language?
The character style (CS) stores only the modified attributes. If you change only the language it wont modify the font name/size/color etc. See also the Organizer tab.

> b. The solution doesn't seem to work at all times.
If you paste it depends on whether you paste with formattings or paste special without. In the first case you get the language of the source, in the second from the current paragraph style. In any case it is overwritten by the CS that you need to apply (remember: the request was to introduce a command that allows changing this attribute, which is possible via CS).


The status FIXED is used for tickets that received a patch, WONTFIX/WF means that an enhancement request is not going to get implemented (and NOTABUG/NAB that an alledged non-working function is not an issue).
Comment 12 skagon 2023-11-22 09:56:32 UTC
(In reply to Heiko Tietze from comment #10)
> The character style (CS) stores only the modified attributes. If you change
> only the language it wont modify the font name/size/color etc. See also the
> Organizer tab.

Great, thanks.

> If you paste it depends on whether you paste with formattings or paste
> special without. In the first case you get the language of the source, in
> the second from the current paragraph style. In any case it is overwritten
> by the CS that you need to apply (remember: the request was to introduce a
> command that allows changing this attribute, which is possible via CS).

I was (always) referring to pasting unformatted text. If I may say so, it seems messy – pasted text takes up the current selected language, even if the text is plain English, or takes up English, even though the text is Greek. If I may use the forbidden 'W' (MS Word), it has a setting that makes the default paste to be "unformatted" text, and pasting any unformatted text in a document, Word seems to recognise the language automatically, without any problem. Is there such a possibility in LO Writer (perhaps using the Unicode info of each character?), or should I file a new bug?
Comment 13 Heiko Tietze 2023-11-22 10:45:32 UTC
(In reply to skagon from comment #12)
> Greek. If I may use the forbidden 'W' (MS Word), it has a setting that makes
> the default paste to be "unformatted" text, and pasting any unformatted text
> in a document, Word seems to recognise the language automatically, without
> any problem. Is there such a possibility in LO Writer (perhaps using the
> Unicode info of each character?), or should I file a new bug?
LibreOffice is all about freedom of choice. And most users know how to paste without formatting. Such a switch to swap the default would necessarily be off keeping the current functionality and you end up in the same need for expertise.
Comment 14 skagon 2023-11-22 15:13:17 UTC
(In reply to Heiko Tietze from comment #13)
> LibreOffice is all about freedom of choice. And most users know how to paste
> without formatting. Such a switch to swap the default would necessarily be
> off keeping the current functionality and you end up in the same need for
> expertise.

Excuse me for saying, it doesn't look like much freedom of choice, when MS Word has it readily available (right below the Paste icon, there's the setting "Set default paste") and LO doesn't even offer it as an option safely tucked away.

However, the main point was the "smart cut and paste" of Word, if that's the force which automatically recognises text languages. I don't know how I can paste Greek characters and Writer still persist assigning them to the English language.