Skip to content

Commit

Permalink
Improve error message, update ts files
Browse files Browse the repository at this point in the history
  • Loading branch information
FrancescoCeruti committed Jan 11, 2025
1 parent 3d84c1e commit 1aa6043
Show file tree
Hide file tree
Showing 9 changed files with 285 additions and 262 deletions.
10 changes: 5 additions & 5 deletions lisp/application.py
Original file line number Diff line number Diff line change
Expand Up @@ -206,13 +206,13 @@ def __save_to_file(self, session_file):
logger.exception(
translate(
"ApplicationError",
"""
Error while writing the session file "{}"\n
Due to bad data, the session cannot be saved.
Please check any recent changes to cue pipelines.
""",
"Saving your session failed due to bad data.\n"
"The file still contains your last successful save and has not been overwritten.\n\n"
"This is likely because of corrupted data from a plugin."
" Try to revert recent changes to cues or settings, and save the file again.",
).format(session_file)
)

else:
with open(session_file, mode="w", encoding="utf-8") as file:
file.write(session_json)
Expand Down
44 changes: 22 additions & 22 deletions lisp/i18n/ts/en/action_cues.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,22 @@
<context>
<name>CollectionCue</name>
<message>
<location filename="../../../plugins/action_cues/collection_cue.py" line="110" />
<location filename="../../../plugins/action_cues/collection_cue.py" line="111" />
<source>Add</source>
<translation>Add</translation>
</message>
<message>
<location filename="../../../plugins/action_cues/collection_cue.py" line="111" />
<location filename="../../../plugins/action_cues/collection_cue.py" line="112" />
<source>Remove</source>
<translation>Remove</translation>
</message>
<message>
<location filename="../../../plugins/action_cues/collection_cue.py" line="180" />
<location filename="../../../plugins/action_cues/collection_cue.py" line="186" />
<source>Cue</source>
<translation>Cue</translation>
</message>
<message>
<location filename="../../../plugins/action_cues/collection_cue.py" line="181" />
<location filename="../../../plugins/action_cues/collection_cue.py" line="187" />
<source>Action</source>
<translation>Action</translation>
</message>
Expand Down Expand Up @@ -65,7 +65,7 @@
<context>
<name>CueCategory</name>
<message>
<location filename="../../../plugins/action_cues/index_action_cue.py" line="40" />
<location filename="../../../plugins/action_cues/volume_control.py" line="55" />
<source>Action cues</source>
<translation type="unfinished" />
</message>
Expand All @@ -82,26 +82,26 @@
<source>Collection Cue</source>
<translation>Collection Cue</translation>
</message>
<message>
<location filename="../../../plugins/action_cues/stop_all.py" line="29" />
<source>Stop-All</source>
<translation>Stop-All</translation>
</message>
<message>
<location filename="../../../plugins/action_cues/command_cue.py" line="41" />
<source>Command Cue</source>
<translation>Command Cue</translation>
</message>
<message>
<location filename="../../../plugins/action_cues/volume_control.py" line="54" />
<source>Volume Control</source>
<translation>Volume Control</translation>
<location filename="../../../plugins/action_cues/stop_all.py" line="29" />
<source>Stop-All</source>
<translation>Stop-All</translation>
</message>
<message>
<location filename="../../../plugins/action_cues/index_action_cue.py" line="39" />
<source>Index Action</source>
<translation>Index Action</translation>
</message>
<message>
<location filename="../../../plugins/action_cues/volume_control.py" line="54" />
<source>Volume Control</source>
<translation>Volume Control</translation>
</message>
</context>
<context>
<name>IndexActionCue</name>
Expand Down Expand Up @@ -172,30 +172,30 @@
<translation>Seek Settings</translation>
</message>
<message>
<location filename="../../../plugins/action_cues/collection_cue.py" line="108" />
<location filename="../../../plugins/action_cues/collection_cue.py" line="109" />
<source>Edit Collection</source>
<translation>Edit Collection</translation>
</message>
<message>
<location filename="../../../plugins/action_cues/stop_all.py" line="43" />
<source>Stop Settings</source>
<translation>Stop Settings</translation>
</message>
<message>
<location filename="../../../plugins/action_cues/command_cue.py" line="118" />
<source>Command</source>
<translation>Command</translation>
</message>
<message>
<location filename="../../../plugins/action_cues/volume_control.py" line="129" />
<source>Volume Settings</source>
<translation>Volume Settings</translation>
<location filename="../../../plugins/action_cues/stop_all.py" line="43" />
<source>Stop Settings</source>
<translation>Stop Settings</translation>
</message>
<message>
<location filename="../../../plugins/action_cues/index_action_cue.py" line="65" />
<source>Action Settings</source>
<translation>Action Settings</translation>
</message>
<message>
<location filename="../../../plugins/action_cues/volume_control.py" line="129" />
<source>Volume Settings</source>
<translation>Volume Settings</translation>
</message>
</context>
<context>
<name>StopAll</name>
Expand Down
82 changes: 41 additions & 41 deletions lisp/i18n/ts/en/cart_layout.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,48 +4,68 @@
<context>
<name>CartLayout</name>
<message>
<location filename="../../../plugins/cart_layout/layout.py" line="174" />
<source>Reset volume</source>
<location filename="../../../plugins/cart_layout/settings.py" line="82" />
<source>Default behaviors (applied to new sessions)</source>
<translation type="unfinished" />
</message>
<message>
<location filename="../../../plugins/cart_layout/layout.py" line="184" />
<source>Add page</source>
<location filename="../../../plugins/cart_layout/layout.py" line="190" />
<source>Countdown mode</source>
<translation type="unfinished" />
</message>
<message>
<location filename="../../../plugins/cart_layout/layout.py" line="239" />
<source>Add pages</source>
<location filename="../../../plugins/cart_layout/layout.py" line="192" />
<source>Show seek-bars</source>
<translation type="unfinished" />
</message>
<message>
<location filename="../../../plugins/cart_layout/layout.py" line="187" />
<source>Remove current page</source>
<location filename="../../../plugins/cart_layout/layout.py" line="194" />
<source>Show dB-meters</source>
<translation type="unfinished" />
</message>
<message>
<location filename="../../../plugins/cart_layout/settings.py" line="86" />
<source>Countdown mode</source>
<location filename="../../../plugins/cart_layout/layout.py" line="198" />
<source>Show accurate time</source>
<translation type="unfinished" />
</message>
<message>
<location filename="../../../plugins/cart_layout/settings.py" line="87" />
<source>Show seek-bars</source>
<location filename="../../../plugins/cart_layout/layout.py" line="196" />
<source>Show volume</source>
<translation type="unfinished" />
</message>
<message>
<location filename="../../../plugins/cart_layout/settings.py" line="88" />
<source>Show dB-meters</source>
<location filename="../../../plugins/cart_layout/settings.py" line="91" />
<source>Grid size</source>
<translation type="unfinished" />
</message>
<message>
<location filename="../../../plugins/cart_layout/settings.py" line="90" />
<source>Show volume</source>
<location filename="../../../plugins/cart_layout/settings.py" line="92" />
<source>Number of columns:</source>
<translation type="unfinished" />
</message>
<message>
<location filename="../../../plugins/cart_layout/settings.py" line="89" />
<source>Show accurate time</source>
<location filename="../../../plugins/cart_layout/settings.py" line="93" />
<source>Number of rows:</source>
<translation type="unfinished" />
</message>
<message>
<location filename="../../../plugins/cart_layout/layout.py" line="174" />
<source>Reset volume</source>
<translation type="unfinished" />
</message>
<message>
<location filename="../../../plugins/cart_layout/layout.py" line="184" />
<source>Add page</source>
<translation type="unfinished" />
</message>
<message>
<location filename="../../../plugins/cart_layout/layout.py" line="239" />
<source>Add pages</source>
<translation type="unfinished" />
</message>
<message>
<location filename="../../../plugins/cart_layout/layout.py" line="187" />
<source>Remove current page</source>
<translation type="unfinished" />
</message>
<message>
Expand All @@ -59,17 +79,17 @@
<translation type="unfinished" />
</message>
<message>
<location filename="../../../plugins/cart_layout/layout.py" line="484" />
<location filename="../../../plugins/cart_layout/layout.py" line="491" />
<source>Warning</source>
<translation type="unfinished" />
</message>
<message>
<location filename="../../../plugins/cart_layout/layout.py" line="486" />
<location filename="../../../plugins/cart_layout/layout.py" line="493" />
<source>Every cue in the page will be lost.</source>
<translation type="unfinished" />
</message>
<message>
<location filename="../../../plugins/cart_layout/layout.py" line="489" />
<location filename="../../../plugins/cart_layout/layout.py" line="496" />
<source>Are you sure to continue?</source>
<translation type="unfinished" />
</message>
Expand All @@ -88,26 +108,6 @@
<source>Stop</source>
<translation type="unfinished" />
</message>
<message>
<location filename="../../../plugins/cart_layout/settings.py" line="82" />
<source>Default behaviors (applied to new sessions)</source>
<translation type="unfinished" />
</message>
<message>
<location filename="../../../plugins/cart_layout/settings.py" line="91" />
<source>Grid size</source>
<translation type="unfinished" />
</message>
<message>
<location filename="../../../plugins/cart_layout/settings.py" line="92" />
<source>Number of columns:</source>
<translation type="unfinished" />
</message>
<message>
<location filename="../../../plugins/cart_layout/settings.py" line="93" />
<source>Number of rows:</source>
<translation type="unfinished" />
</message>
</context>
<context>
<name>LayoutDescription</name>
Expand Down
53 changes: 34 additions & 19 deletions lisp/i18n/ts/en/controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,15 @@
<context>
<name>Controller</name>
<message>
<location filename="../../../plugins/controller/controller.py" line="166" />
<location filename="../../../plugins/controller/controller.py" line="178" />
<source>Cannot load controller protocol: "{}"</source>
<translation type="unfinished" />
</message>
<message>
<location filename="../../../plugins/controller/controller.py" line="153" />
<source>Unrecognized layout action: "{}"</source>
<translation type="unfinished" />
</message>
</context>
<context>
<name>ControllerKeySettings</name>
Expand Down Expand Up @@ -178,68 +183,78 @@ do not forget to edit the path later.</source>
<context>
<name>ControllerSettings</name>
<message>
<location filename="../../../plugins/controller/protocols/midi.py" line="122" />
<location filename="../../../plugins/controller/protocols/keyboard.py" line="79" />
<source>Add</source>
<translation>Add</translation>
</message>
<message>
<location filename="../../../plugins/controller/protocols/midi.py" line="123" />
<location filename="../../../plugins/controller/protocols/keyboard.py" line="80" />
<source>Remove</source>
<translation>Remove</translation>
</message>
</context>
<context>
<name>GlobalAction</name>
<message>
<location filename="../../../plugins/controller/common.py" line="41" />
<location filename="../../../plugins/controller/common.py" line="44" />
<source>Go</source>
<translation type="unfinished" />
</message>
<message>
<location filename="../../../plugins/controller/common.py" line="42" />
<location filename="../../../plugins/controller/common.py" line="45" />
<source>Reset</source>
<translation type="unfinished" />
</message>
<message>
<location filename="../../../plugins/controller/common.py" line="43" />
<location filename="../../../plugins/controller/common.py" line="46" />
<source>Stop all cues</source>
<translation type="unfinished" />
</message>
<message>
<location filename="../../../plugins/controller/common.py" line="44" />
<location filename="../../../plugins/controller/common.py" line="47" />
<source>Pause all cues</source>
<translation type="unfinished" />
</message>
<message>
<location filename="../../../plugins/controller/common.py" line="45" />
<location filename="../../../plugins/controller/common.py" line="48" />
<source>Resume all cues</source>
<translation type="unfinished" />
</message>
<message>
<location filename="../../../plugins/controller/common.py" line="48" />
<location filename="../../../plugins/controller/common.py" line="51" />
<source>Interrupt all cues</source>
<translation type="unfinished" />
</message>
<message>
<location filename="../../../plugins/controller/common.py" line="51" />
<location filename="../../../plugins/controller/common.py" line="54" />
<source>Fade-out all cues</source>
<translation type="unfinished" />
</message>
<message>
<location filename="../../../plugins/controller/common.py" line="54" />
<location filename="../../../plugins/controller/common.py" line="57" />
<source>Fade-in all cues</source>
<translation type="unfinished" />
</message>
<message>
<location filename="../../../plugins/controller/common.py" line="57" />
<location filename="../../../plugins/controller/common.py" line="60" />
<source>Move standby forward</source>
<translation type="unfinished" />
</message>
<message>
<location filename="../../../plugins/controller/common.py" line="60" />
<location filename="../../../plugins/controller/common.py" line="63" />
<source>Move standby back</source>
<translation type="unfinished" />
</message>
<message>
<location filename="../../../plugins/controller/common.py" line="66" />
<source>Switch to previous page</source>
<translation type="unfinished" />
</message>
<message>
<location filename="../../../plugins/controller/common.py" line="69" />
<source>Switch to next page</source>
<translation type="unfinished" />
</message>
</context>
<context>
<name>Osc Cue</name>
Expand Down Expand Up @@ -280,19 +295,19 @@ do not forget to edit the path later.</source>
<translation type="unfinished" />
</message>
<message>
<location filename="../../../plugins/controller/protocols/keyboard.py" line="44" />
<source>Keyboard Shortcuts</source>
<translation>Keyboard Shortcuts</translation>
<location filename="../../../plugins/controller/protocols/osc.py" line="230" />
<source>OSC Controls</source>
<translation type="unfinished" />
</message>
<message>
<location filename="../../../plugins/controller/protocols/midi.py" line="64" />
<source>MIDI Controls</source>
<translation>MIDI Controls</translation>
</message>
<message>
<location filename="../../../plugins/controller/protocols/osc.py" line="230" />
<source>OSC Controls</source>
<translation type="unfinished" />
<location filename="../../../plugins/controller/protocols/keyboard.py" line="44" />
<source>Keyboard Shortcuts</source>
<translation>Keyboard Shortcuts</translation>
</message>
</context>
</TS>
Loading

0 comments on commit 1aa6043

Please sign in to comment.