paulfioravanti / plover-cycle-translations

Plover plugin to enable cycling through multiple translations defined in a single steno outline.
https://pypi.org/project/plover-cycle-translations/
GNU General Public License v3.0
0 stars 0 forks source link

Plugin working with an error window #1

Closed Sillabix closed 1 month ago

Sillabix commented 1 month ago

With the selector stroke the cycle command works changing the current displayed definition but a windows pop up saying "ERROR:engine on_stroked failed ValueError: Text not cycleable or cycleable text needs to be re-stroked".

Plover version: 4.0.0rc2+6.g53c416f

paulfioravanti commented 1 month ago

Hi @Sillabix, I cannot seem to reproduce the issue that you are seeing using Plover 4.0.0rc2, so could you please let me know the following information:

Sillabix commented 1 month ago

Plugin version: 0.5.1 OS: Windows 10 Outline and translation (Michela system): "FPRen": "=CYCLE:treno,terreno" Steps to perform: 1) write "FPRen" on the machine; 2) write the cycle stroke "Ff" (video attached

https://github.com/user-attachments/assets/080be02a-e1b7-440a-9198-76757d3ece3d

paulfioravanti commented 1 month ago

Given what I can see in the error message, it seems that it is occurring in the _stroked callback function. In that function, it is assuming that the undo stroke is *, whereas it looks like you are using U. This is causing the _translations to not be reset when a stroke is not cycleable, and is likely the cause of this issue.

I admit that I only tested this out on a WSI layout, where undo is *, so it looks like I may have to enable customisation of that key to support layouts like Michela.

paulfioravanti commented 1 month ago

@Sillabix, I have just released v0.5.2 of the plugin with what I think will be a fix, so please try updating the plugin via the Plover plugins manager and give it a try.

Sillabix commented 1 month ago

Just tried. It works beautifully now. Thanks a lot for fixing it!