BUG: changing quotes from context menu does not work
Dan
d3vf4n at tutanota.com
Fri Sep 22 18:48:20 UTC 2023
Hello,
while translating the UI I have run across this strange behaviour, which I qualify as a bug: the context-menu item to change a quotation mark character does not work as expected.
STEPS TO REPRODUCE
==================
1. Open a new file in LyX and set its document language to Spanish.
2. Make sure the quoting style is the default for Spanish (Document > Settings... > Language), «» and "".
3. In the workarea, change the paragraph's language to German (right click with mouse).
4. Enter a quotation mark and note that the character written is «.
5. Place the cursor back before the quotation mark just introduced and open the context menu (right click).
6. From the context menu, choose the item to change the quotation mark to the paragraph's language default quotation style (see attached image).
Alternatively, you can just download the attached LyX file I provide and skip over to step 5.
PROBLEM
========
Existing quotation characters do not switch to the paragraph's language default quotes when instructed to, via the context menu. In this test case, from Spanish («) to German (,,).
EXPECTED BEHAVIOUR
===================
Any quote character present in the document should be switched to the paragraph's language-default quoting style when instructed to, via the context menu.
POSSIBLE SOLUTION
=================
The problem seems to be that the function attached to the context-menu item actually ignores the paragraph's language and uses the document's language ("changetype f.."): see the text attachment (output of "lyx -dbg action"); also have a look at the attached image, namely the message pane.
On the other hand, changing the quote character via the items in the submenu "Change Style" from the very same context menu works as expected. Therefore, it seems the problem is specific with the "Reset to language default" context-menu item.
Daniel.
--
Enviat amb Tutanota.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Lyx-quotes-context-menu.png
Type: image/png
Size: 229500 bytes
Desc: not available
URL: <http://lists.lyx.org/pipermail/lyx-devel/attachments/20230922/7c941e51/attachment-0001.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Lyx-problem-quoting-styles.lyx
Type: application/x-lyx
Size: 1055 bytes
Desc: not available
URL: <http://lists.lyx.org/pipermail/lyx-devel/attachments/20230922/7c941e51/attachment-0001.lyx>
-------------- next part --------------
S'està depurant `action' (Ordres d'usuari)
GuiApplication.cpp (1746): cmd: action: 269 [window-new] arg: '' x: 0 y: 0
GuiApplication.cpp (1514): dispatch msg is `'
GuiApplication.cpp (1746): cmd: action: 3 [buffer-new] arg: '' x: 0 y: 0
GuiApplication.cpp (1514): dispatch msg is `'
GuiApplication.cpp (1746): cmd: action: 219 [dialog-show] arg: 'character' x: 0 y: 0
GuiApplication.cpp (1544): verbose dispatch msg (dialog-show character)
GuiApplication.cpp (1746): cmd: action: 22 [textstyle-update] arg: 'family 16
series 2
shape 4
size 12
emph 0
underbar 3
strikeout 3
xout 3
uuline 3
uwave 3
noun 0
number 0
nospellcheck 0
color 102
language ngerman
toggleall false' x: 0 y: 0
BufferView.cpp (1366): BufferView::dispatch: cmd: action: 22 [textstyle-update] arg: 'family 16
series 2
shape 4
size 12
emph 0
underbar 3
strikeout 3
xout 3
uuline 3
uwave 3
noun 0
number 0
nospellcheck 0
color 102
language ngerman
toggleall false' x: 0 y: 0
Buffer.cpp (2900): Buffer::dispatch: cmd: action: 22 [textstyle-update] arg: 'family 16
series 2
shape 4
size 12
emph 0
underbar 3
strikeout 3
xout 3
uuline 3
uwave 3
noun 0
number 0
nospellcheck 0
color 102
language ngerman
toggleall false' x: 0 y: 0
Cursor.cpp (781): Cursor::dispatch: cmd: action: 22 [textstyle-update] arg: 'family 16
series 2
shape 4
size 12
emph 0
underbar 3
strikeout 3
xout 3
uuline 3
uwave 3
noun 0
number 0
nospellcheck 0
color 102
language ngerman
toggleall false' x: 0 y: 0
cursor: | anchor:
inset: 0x562db22bb720 idx: 0 par: 0 pos: 0 | inset: 0x562db22bb720 idx: 0 par: 0 pos: 0
selection: 0 boundary: 0
Cursor.cpp (811): Cursor::dispatch: cmd: action: 22 [textstyle-update] arg: 'family 16
series 2
shape 4
size 12
emph 0
underbar 3
strikeout 3
xout 3
uuline 3
uwave 3
noun 0
number 0
nospellcheck 0
color 102
language ngerman
toggleall false' x: 0 y: 0
cursor: | anchor:
inset: 0x562db22bb720 idx: 0 par: 0 pos: 0 | inset: 0x562db22bb720 idx: 0 par: 0 pos: 0
selection: 0 boundary: 0
insets/InsetText.cpp (311): InsetText::doDispatch(): cmd: action: 22 [textstyle-update] arg: 'family 16
series 2
shape 4
size 12
emph 0
underbar 3
strikeout 3
xout 3
uuline 3
uwave 3
noun 0
number 0
nospellcheck 0
color 102
language ngerman
toggleall false' x: 0 y: 0
Text.cpp (4038): Text::dispatch: cmd: action: 22 [textstyle-update] arg: 'family 16
series 2
shape 4
size 12
emph 0
underbar 3
strikeout 3
xout 3
uuline 3
uwave 3
noun 0
number 0
nospellcheck 0
color 102
language ngerman
toggleall false' x: 0 y: 0
GuiApplication.cpp (1514): dispatch msg is `Text properties applied: Emphasis Off, Noun Off, Language: German'
GuiApplication.cpp (1746): cmd: action: 65 [quote-insert] arg: '' x: 0 y: 0
BufferView.cpp (1366): BufferView::dispatch: cmd: action: 65 [quote-insert] arg: '' x: 0 y: 0
Buffer.cpp (2900): Buffer::dispatch: cmd: action: 65 [quote-insert] arg: '' x: 0 y: 0
Cursor.cpp (781): Cursor::dispatch: cmd: action: 65 [quote-insert] arg: '' x: 0 y: 0
cursor: | anchor:
inset: 0x562db22bb720 idx: 0 par: 0 pos: 0 | inset: 0x562db22bb720 idx: 0 par: 0 pos: 0
selection: 0 boundary: 0
Cursor.cpp (811): Cursor::dispatch: cmd: action: 65 [quote-insert] arg: '' x: 0 y: 0
cursor: | anchor:
inset: 0x562db22bb720 idx: 0 par: 0 pos: 0 | inset: 0x562db22bb720 idx: 0 par: 0 pos: 0
selection: 0 boundary: 0
insets/InsetText.cpp (311): InsetText::doDispatch(): cmd: action: 65 [quote-insert] arg: '' x: 0 y: 0
Text.cpp (4038): Text::dispatch: cmd: action: 65 [quote-insert] arg: '' x: 0 y: 0
GuiApplication.cpp (1514): dispatch msg is `'
GuiApplication.cpp (1746): cmd: action: 286 [char-left] arg: '' x: 0 y: 0
BufferView.cpp (1366): BufferView::dispatch: cmd: action: 286 [char-left] arg: '' x: 0 y: 0
Buffer.cpp (2900): Buffer::dispatch: cmd: action: 286 [char-left] arg: '' x: 0 y: 0
Cursor.cpp (781): Cursor::dispatch: cmd: action: 286 [char-left] arg: '' x: 0 y: 0
cursor: | anchor:
inset: 0x562db22bb720 idx: 0 par: 0 pos: 1 | inset: 0x562db22bb720 idx: 0 par: 0 pos: 0
selection: 0 boundary: 0
Cursor.cpp (811): Cursor::dispatch: cmd: action: 286 [char-left] arg: '' x: 0 y: 0
cursor: | anchor:
inset: 0x562db22bb720 idx: 0 par: 0 pos: 1 | inset: 0x562db22bb720 idx: 0 par: 0 pos: 0
selection: 0 boundary: 0
insets/InsetText.cpp (311): InsetText::doDispatch(): cmd: action: 286 [char-left] arg: '' x: 0 y: 0
Text.cpp (4038): Text::dispatch: cmd: action: 286 [char-left] arg: '' x: 0 y: 0
Text.cpp (4038): Text::dispatch: cmd: action: 32 [char-backward] arg: '' x: 0 y: 0
GuiApplication.cpp (1514): dispatch msg is `'
GuiApplication.cpp (1746): cmd: action: 227 [inset-modify] arg: 'changetype f..' x: 0 y: 0
BufferView.cpp (1366): BufferView::dispatch: cmd: action: 227 [inset-modify] arg: 'changetype f..' x: 0 y: 0
Buffer.cpp (2900): Buffer::dispatch: cmd: action: 227 [inset-modify] arg: 'changetype f..' x: 0 y: 0
Cursor.cpp (781): Cursor::dispatch: cmd: action: 227 [inset-modify] arg: 'changetype f..' x: 0 y: 0
cursor: | anchor:
inset: 0x562db22bb720 idx: 0 par: 0 pos: 0 | inset: 0x562db22bb720 idx: 0 par: 0 pos: 0
selection: 0 boundary: 0
Cursor.cpp (799): Cursor::dispatch: (AtPoint) cmd: action: 227 [inset-modify] arg: 'changetype f..' x: 0 y: 0
cursor: | anchor:
inset: 0x562db22bb720 idx: 0 par: 0 pos: 0 | inset: 0x562db22bb720 idx: 0 par: 0 pos: 0
selection: 0 boundary: 0
GuiApplication.cpp (1544): verbose dispatch msg (inset-modify changetype f..)
GuiApplication.cpp (1746): cmd: action: 227 [inset-modify] arg: 'changetype f..' x: 0 y: 0
BufferView.cpp (1366): BufferView::dispatch: cmd: action: 227 [inset-modify] arg: 'changetype f..' x: 0 y: 0
Buffer.cpp (2900): Buffer::dispatch: cmd: action: 227 [inset-modify] arg: 'changetype f..' x: 0 y: 0
Cursor.cpp (781): Cursor::dispatch: cmd: action: 227 [inset-modify] arg: 'changetype f..' x: 0 y: 0
cursor: | anchor:
inset: 0x562db22bb720 idx: 0 par: 0 pos: 0 | inset: 0x562db22bb720 idx: 0 par: 0 pos: 0
selection: 0 boundary: 0
Cursor.cpp (799): Cursor::dispatch: (AtPoint) cmd: action: 227 [inset-modify] arg: 'changetype f..' x: 0 y: 0
cursor: | anchor:
inset: 0x562db22bb720 idx: 0 par: 0 pos: 0 | inset: 0x562db22bb720 idx: 0 par: 0 pos: 0
selection: 0 boundary: 0
GuiApplication.cpp (1544): verbose dispatch msg (inset-modify changetype f..)
Save document?
----------------------------------------
The document newfile1.lyx has not been saved yet.
Do you want to save the document or discard it entirely?
Assuming answer is &Save
More information about the lyx-devel
mailing list