Skip to content

Commit cea8ed8

Browse files
Fixes for py312 rf7 (robotframework#2701)
* Fix translated message on memory overflow in Messages Log * Attempt to fix runner animation. Reduce spaces in status * Update linux.yml Workaround for bug in Mesa * Update linux.yml missing -y option * Update linux.yml Attempt to fix broken locale * Update linux.yml Another try in fix locale * Update linux.yml More fixes in locale * Update linux.yml install lang-en in Fedora * Update linux.yml more fixes in locale * Update linux.yml
1 parent 029977c commit cea8ed8

File tree

12 files changed

+371
-334
lines changed

12 files changed

+371
-334
lines changed

.github/workflows/linux.yml

+10
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,10 @@ jobs:
7777
- name: Setup environment
7878
run: |
7979
sudo dnf install -y sdl12-compat python3-wxpython4 xorg-x11-server-Xvfb python3-pip psmisc
80+
sudo dnf downgrade -y mesa* --refresh
81+
sudo dnf install -y glibc-locale-source glibc-langpack-en
82+
export LC_ALL=C
83+
sudo localedef -i en_US -f UTF-8 en_US.UTF-8
8084
sudo -H pip install -r requirements-dev.txt
8185
- name: Run tests
8286
run: |
@@ -106,13 +110,19 @@ jobs:
106110
run: |
107111
sudo apt update -y
108112
sudo apt install -y libsdl1.2debian libsdl2-2.0-0 libnotify4
113+
sudo locale-gen en_US.UTF-8
109114
sudo pip install https://extras.wxpython.org/wxPython4/extras/linux/gtk3/ubuntu-22.04/wxPython-4.2.1-cp310-cp310-linux_x86_64.whl
110115
sudo pip install -r requirements-dev.txt
111116
Xvfb &
112117
export DISPLAY=:0
113118
invoke test-ci
114119
pip install .
115120
which ride.py
121+
export LC_ALL=C
122+
export LANG=en_US.utf8
123+
echo "$LANG UTF-8" >> /etc/locale.gen
124+
sudo locale-gen
125+
sudo update-locale --reset LANG=$LANG
116126
xvfb-run --server-args="-screen 0, 1280x720x24" -a ride.py &
117127
sleep 10
118128
killall xvfb-run

src/robotide/contrib/testrunner/testrunnerplugin.py

+19-7
Original file line numberDiff line numberDiff line change
@@ -584,7 +584,7 @@ def on_timer(self, event):
584584
if not self._test_runner.is_running():
585585
self.on_process_ended(None)
586586
return
587-
out_buffer, err_buffer, _ = self._test_runner.get_output_and_errors(self.get_current_profile())
587+
out_buffer, err_buffer, __ = self._test_runner.get_output_and_errors(self.get_current_profile())
588588
if len(out_buffer) > 0:
589589
self._append_to_console_log(out_buffer, source="stdout")
590590
if len(err_buffer) > 0:
@@ -1149,10 +1149,10 @@ class ProgressBar(wx.Panel):
11491149
def __init__(self, parent, fail_color='#FF8E8E', pass_color="#9FCC9F", skip_color='yellow'):
11501150
wx.Panel.__init__(self, parent, wx.ID_ANY)
11511151
self._sizer = wx.BoxSizer(wx.HORIZONTAL)
1152-
self._gauge = wx.Gauge(self, size=(100, 10))
1152+
self._gauge = wx.Gauge(self, size=(100, 15), style=wx.GA_HORIZONTAL)
11531153
self._label = Label(self)
11541154
self._sizer.Add(self._label, 1, wx.EXPAND | wx.LEFT, 10)
1155-
self._sizer.Add(self._gauge, 0, wx.ALIGN_CENTER_VERTICAL | wx.RIGHT, 10)
1155+
self._sizer.Add(self._gauge, 0, wx.ALIGN_CENTER_VERTICAL | wx.RIGHT, 15)
11561156
self._sizer.Layout()
11571157
self.SetSizer(self._sizer)
11581158
self._gauge.Hide()
@@ -1190,10 +1190,11 @@ def Start(self):
11901190
"""Signals the start of a test run; initialize progressbar."""
11911191
self._initialize_state()
11921192
self._start_time = time.time()
1193+
self._gauge.SetForegroundColour(self._default_colour)
11931194
self._gauge.Show()
11941195
self._sizer.Layout()
1195-
self.SetBackgroundColour(self._default_colour)
11961196
self.SetForegroundColour(self._foreground_colour)
1197+
self.SetBackgroundColour(self._default_colour)
11971198
self._timer.Start(50)
11981199

11991200
def Stop(self):
@@ -1224,27 +1225,38 @@ def get_visible_color(self, color):
12241225
def _update_message(self):
12251226
"""Update the displayed elapsed time, passed and failed counts"""
12261227
elapsed = time.time() - self._start_time
1227-
message = _("elapsed time: %s pass: %s skip: %s fail: %s") % (
1228+
message = _("elapsed time: %s pass: %s skip: %s fail: %s") % (
12281229
self._seconds_to_string(elapsed), self._pass, self._skip, self._fail)
12291230
message += self._get_current_keyword_text()
1230-
self._label.SetLabel(message)
12311231
if self._fail > 0:
12321232
self.SetForegroundColour(self.get_visible_color(self.fail_color))
12331233
self.SetBackgroundColour(self.fail_color)
1234+
self._label.SetForegroundColour(self.get_visible_color(self.fail_color))
1235+
self._label.SetBackgroundColour(self.fail_color)
12341236
elif self._skip > 0:
12351237
self.SetForegroundColour(self.get_visible_color(self.skip_color))
12361238
self.SetBackgroundColour(self.skip_color)
1239+
self._label.SetForegroundColour(self.get_visible_color(self.skip_color))
1240+
self._label.SetBackgroundColour(self.skip_color)
12371241
elif self._pass > 0:
12381242
self.SetForegroundColour(self.get_visible_color(self.pass_color))
12391243
self.SetBackgroundColour(self.pass_color)
1244+
self._label.SetForegroundColour(self.get_visible_color(self.pass_color))
1245+
self._label.SetBackgroundColour(self.pass_color)
1246+
else:
1247+
self.SetForegroundColour(self._foreground_colour)
1248+
self.SetBackgroundColour(self._default_colour)
1249+
self._label.SetForegroundColour(self._foreground_colour)
1250+
self._label.SetBackgroundColour(self._default_colour)
1251+
self._label.SetLabel(message)
12401252
# not sure why this is required, but without it the background
12411253
# colors don't look right on Windows
12421254
self.Refresh()
12431255

12441256
def _get_current_keyword_text(self):
12451257
if not self._current_keywords:
12461258
return ''
1247-
return _(' current keyword: ') + self._fix_size(' -> '.join(self._current_keywords), 50)
1259+
return _(' current keyword: ') + self._fix_size(' -> '.join(self._current_keywords), 50)
12481260

12491261
@staticmethod
12501262
def _fix_size(text, max_length):

src/robotide/localization/RIDE.pot

+48-48
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
msgid ""
66
msgstr ""
77
"Project-Id-Version: PACKAGE VERSION\n"
8-
"POT-Creation-Date: 2024-01-17 00:58+0000\n"
8+
"POT-Creation-Date: 2024-01-28 18:52+0000\n"
99
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
1010
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
1111
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -309,8 +309,8 @@ msgstr ""
309309
#: /home2/helio/github/RIDE/tools/../src/robotide/spec/specimporter.py:36
310310
#: /home2/helio/github/RIDE/tools/../src/robotide/ui/actiontriggers.py:54
311311
#: /home2/helio/github/RIDE/tools/../src/robotide/ui/keywordsearch.py:53
312-
#: /home2/helio/github/RIDE/tools/../src/robotide/ui/mainframe.py:761
313-
#: /home2/helio/github/RIDE/tools/../src/robotide/ui/mainframe.py:773
312+
#: /home2/helio/github/RIDE/tools/../src/robotide/ui/mainframe.py:763
313+
#: /home2/helio/github/RIDE/tools/../src/robotide/ui/mainframe.py:775
314314
#: /home2/helio/github/RIDE/tools/../src/robotide/ui/preview.py:41
315315
msgid "Tools"
316316
msgstr ""
@@ -579,13 +579,13 @@ msgid "No logs directory"
579579
msgstr ""
580580

581581
#:
582-
#: /home2/helio/github/RIDE/tools/../src/robotide/contrib/testrunner/testrunnerplugin.py:1227
583-
msgid "elapsed time: %s pass: %s skip: %s fail: %s"
582+
#: /home2/helio/github/RIDE/tools/../src/robotide/contrib/testrunner/testrunnerplugin.py:1229
583+
msgid "elapsed time: %s pass: %s skip: %s fail: %s"
584584
msgstr ""
585585

586586
#:
587-
#: /home2/helio/github/RIDE/tools/../src/robotide/contrib/testrunner/testrunnerplugin.py:1247
588-
msgid " current keyword: "
587+
#: /home2/helio/github/RIDE/tools/../src/robotide/contrib/testrunner/testrunnerplugin.py:1260
588+
msgid " current keyword: "
589589
msgstr ""
590590

591591
#:
@@ -736,17 +736,17 @@ msgid ""
736736
" "
737737
msgstr ""
738738

739-
#: /home2/helio/github/RIDE/tools/../src/robotide/editor/editordialogs.py:69
739+
#: /home2/helio/github/RIDE/tools/../src/robotide/editor/editordialogs.py:70
740740
#: /home2/helio/github/RIDE/tools/../src/robotide/editor/settingeditors.py:482
741741
#: /home2/helio/github/RIDE/tools/../src/robotide/editor/settingeditors.py:570
742742
#: /home2/helio/github/RIDE/tools/../src/robotide/editor/settingeditors.py:720
743743
msgid "Comment"
744744
msgstr ""
745745

746-
#: /home2/helio/github/RIDE/tools/../src/robotide/editor/editordialogs.py:115
747-
#: /home2/helio/github/RIDE/tools/../src/robotide/editor/editordialogs.py:129
748-
#: /home2/helio/github/RIDE/tools/../src/robotide/editor/editordialogs.py:144
749-
#: /home2/helio/github/RIDE/tools/../src/robotide/editor/editordialogs.py:162
746+
#: /home2/helio/github/RIDE/tools/../src/robotide/editor/editordialogs.py:118
747+
#: /home2/helio/github/RIDE/tools/../src/robotide/editor/editordialogs.py:132
748+
#: /home2/helio/github/RIDE/tools/../src/robotide/editor/editordialogs.py:146
749+
#: /home2/helio/github/RIDE/tools/../src/robotide/editor/editordialogs.py:163
750750
#: /home2/helio/github/RIDE/tools/../src/robotide/editor/editordialogs.py:361
751751
#: /home2/helio/github/RIDE/tools/../src/robotide/editor/editordialogs.py:379
752752
#: /home2/helio/github/RIDE/tools/../src/robotide/editor/editordialogs.py:399
@@ -759,22 +759,22 @@ msgstr ""
759759
msgid "Name"
760760
msgstr ""
761761

762-
#: /home2/helio/github/RIDE/tools/../src/robotide/editor/editordialogs.py:116
763-
#: /home2/helio/github/RIDE/tools/../src/robotide/editor/editordialogs.py:130
764-
#: /home2/helio/github/RIDE/tools/../src/robotide/editor/editordialogs.py:145
762+
#: /home2/helio/github/RIDE/tools/../src/robotide/editor/editordialogs.py:119
763+
#: /home2/helio/github/RIDE/tools/../src/robotide/editor/editordialogs.py:133
764+
#: /home2/helio/github/RIDE/tools/../src/robotide/editor/editordialogs.py:147
765765
#: /home2/helio/github/RIDE/tools/../src/robotide/editor/editordialogs.py:362
766766
#: /home2/helio/github/RIDE/tools/../src/robotide/editor/settingeditors.py:482
767767
#: /home2/helio/github/RIDE/tools/../src/robotide/editor/settingeditors.py:720
768768
msgid "Value"
769769
msgstr ""
770770

771-
#: /home2/helio/github/RIDE/tools/../src/robotide/editor/editordialogs.py:163
772-
#: /home2/helio/github/RIDE/tools/../src/robotide/editor/editordialogs.py:184
773-
msgid "Args"
771+
#: /home2/helio/github/RIDE/tools/../src/robotide/editor/editordialogs.py:164
772+
msgid "Alias"
774773
msgstr ""
775774

776775
#: /home2/helio/github/RIDE/tools/../src/robotide/editor/editordialogs.py:164
777-
msgid "Alias"
776+
#: /home2/helio/github/RIDE/tools/../src/robotide/editor/editordialogs.py:184
777+
msgid "Args"
778778
msgstr ""
779779

780780
#: /home2/helio/github/RIDE/tools/../src/robotide/editor/editordialogs.py:183
@@ -821,11 +821,11 @@ msgstr ""
821821
msgid "Find Usages"
822822
msgstr ""
823823

824-
#: /home2/helio/github/RIDE/tools/../src/robotide/editor/fieldeditors.py:185
824+
#: /home2/helio/github/RIDE/tools/../src/robotide/editor/fieldeditors.py:187
825825
msgid "Columns"
826826
msgstr ""
827827

828-
#: /home2/helio/github/RIDE/tools/../src/robotide/editor/fieldeditors.py:189
828+
#: /home2/helio/github/RIDE/tools/../src/robotide/editor/fieldeditors.py:191
829829
msgid "Number of columns that are shown in this editor. Selected value is stored and used globally."
830830
msgstr ""
831831

@@ -976,7 +976,7 @@ msgid "Variable "
976976
msgstr ""
977977

978978
#: /home2/helio/github/RIDE/tools/../src/robotide/editor/kweditor.py:1180
979-
#: /home2/helio/github/RIDE/tools/../src/robotide/editor/texteditor.py:522
979+
#: /home2/helio/github/RIDE/tools/../src/robotide/editor/texteditor.py:527
980980
#: /home2/helio/github/RIDE/tools/../src/robotide/searchtests/dialogsearchtests.py:49
981981
#: /home2/helio/github/RIDE/tools/../src/robotide/searchtests/dialogsearchtests.py:127
982982
#: /home2/helio/github/RIDE/tools/../src/robotide/searchtests/dialogsearchtests.py:184
@@ -1084,35 +1084,35 @@ msgstr ""
10841084
msgid "Add Metadata"
10851085
msgstr ""
10861086

1087-
#: /home2/helio/github/RIDE/tools/../src/robotide/editor/texteditor.py:370
1087+
#: /home2/helio/github/RIDE/tools/../src/robotide/editor/texteditor.py:367
10881088
msgid "ERROR: Data sanity check failed!"
10891089
msgstr ""
10901090

1091-
#: /home2/helio/github/RIDE/tools/../src/robotide/editor/texteditor.py:370
1091+
#: /home2/helio/github/RIDE/tools/../src/robotide/editor/texteditor.py:367
10921092
msgid "Error at line"
10931093
msgstr ""
10941094

1095-
#: /home2/helio/github/RIDE/tools/../src/robotide/editor/texteditor.py:371
1095+
#: /home2/helio/github/RIDE/tools/../src/robotide/editor/texteditor.py:368
10961096
msgid "Reset changes?"
10971097
msgstr ""
10981098

1099-
#: /home2/helio/github/RIDE/tools/../src/robotide/editor/texteditor.py:372
1099+
#: /home2/helio/github/RIDE/tools/../src/robotide/editor/texteditor.py:369
11001100
msgid "Can not apply changes from Text Editor"
11011101
msgstr ""
11021102

1103-
#: /home2/helio/github/RIDE/tools/../src/robotide/editor/texteditor.py:505
1103+
#: /home2/helio/github/RIDE/tools/../src/robotide/editor/texteditor.py:510
11041104
msgid "Apply Changes"
11051105
msgstr ""
11061106

1107-
#: /home2/helio/github/RIDE/tools/../src/robotide/editor/texteditor.py:532
1107+
#: /home2/helio/github/RIDE/tools/../src/robotide/editor/texteditor.py:537
11081108
msgid "Syntax colorization disabled due to missing requirements."
11091109
msgstr ""
11101110

1111-
#: /home2/helio/github/RIDE/tools/../src/robotide/editor/texteditor.py:533
1111+
#: /home2/helio/github/RIDE/tools/../src/robotide/editor/texteditor.py:538
11121112
msgid "Get help"
11131113
msgstr ""
11141114

1115-
#: /home2/helio/github/RIDE/tools/../src/robotide/editor/texteditor.py:548
1115+
#: /home2/helio/github/RIDE/tools/../src/robotide/editor/texteditor.py:553
11161116
msgid ""
11171117
"<h1>Syntax colorization</h1>\n"
11181118
" <p>\n"
@@ -1141,11 +1141,11 @@ msgid ""
11411141
" "
11421142
msgstr ""
11431143

1144-
#: /home2/helio/github/RIDE/tools/../src/robotide/editor/texteditor.py:573
1144+
#: /home2/helio/github/RIDE/tools/../src/robotide/editor/texteditor.py:578
11451145
msgid "Getting syntax colorization"
11461146
msgstr ""
11471147

1148-
#: /home2/helio/github/RIDE/tools/../src/robotide/editor/texteditor.py:671
1148+
#: /home2/helio/github/RIDE/tools/../src/robotide/editor/texteditor.py:676
11491149
msgid "No matches found."
11501150
msgstr ""
11511151

@@ -1631,67 +1631,67 @@ msgid ""
16311631
"Do you want to proceed without saving?"
16321632
msgstr ""
16331633

1634-
#: /home2/helio/github/RIDE/tools/../src/robotide/ui/mainframe.py:487
1634+
#: /home2/helio/github/RIDE/tools/../src/robotide/ui/mainframe.py:489
16351635
msgid "Choose a directory containing Robot files"
16361636
msgstr ""
16371637

1638-
#: /home2/helio/github/RIDE/tools/../src/robotide/ui/mainframe.py:552
1638+
#: /home2/helio/github/RIDE/tools/../src/robotide/ui/mainframe.py:554
16391639
msgid "RIDE - Preferences"
16401640
msgstr ""
16411641

1642-
#: /home2/helio/github/RIDE/tools/../src/robotide/ui/mainframe.py:639
1642+
#: /home2/helio/github/RIDE/tools/../src/robotide/ui/mainframe.py:641
16431643
msgid "Workspace modifications detected on the file system."
16441644
msgstr ""
16451645

1646-
#: /home2/helio/github/RIDE/tools/../src/robotide/ui/mainframe.py:640
1646+
#: /home2/helio/github/RIDE/tools/../src/robotide/ui/mainframe.py:642
16471647
msgid "Do you want to reload the workspace?"
16481648
msgstr ""
16491649

1650-
#: /home2/helio/github/RIDE/tools/../src/robotide/ui/mainframe.py:642
1650+
#: /home2/helio/github/RIDE/tools/../src/robotide/ui/mainframe.py:644
16511651
msgid "Answering <Yes> will discard unsaved changes."
16521652
msgstr ""
16531653

1654-
#: /home2/helio/github/RIDE/tools/../src/robotide/ui/mainframe.py:643
1654+
#: /home2/helio/github/RIDE/tools/../src/robotide/ui/mainframe.py:645
16551655
msgid "Answering <No> will ignore the changes on disk."
16561656
msgstr ""
16571657

1658-
#: /home2/helio/github/RIDE/tools/../src/robotide/ui/mainframe.py:644
1658+
#: /home2/helio/github/RIDE/tools/../src/robotide/ui/mainframe.py:646
16591659
msgid "Files Changed On Disk"
16601660
msgstr ""
16611661

1662-
#: /home2/helio/github/RIDE/tools/../src/robotide/ui/mainframe.py:686
1662+
#: /home2/helio/github/RIDE/tools/../src/robotide/ui/mainframe.py:688
16631663
msgid "Customize..."
16641664
msgstr ""
16651665

1666-
#: /home2/helio/github/RIDE/tools/../src/robotide/ui/mainframe.py:774
1666+
#: /home2/helio/github/RIDE/tools/../src/robotide/ui/mainframe.py:776
16671667
msgid "search unused keywords"
16681668
msgstr ""
16691669

1670-
#: /home2/helio/github/RIDE/tools/../src/robotide/ui/mainframe.py:774
1670+
#: /home2/helio/github/RIDE/tools/../src/robotide/ui/mainframe.py:776
16711671
msgid "stop test run"
16721672
msgstr ""
16731673

1674-
#: /home2/helio/github/RIDE/tools/../src/robotide/ui/mainframe.py:775
1674+
#: /home2/helio/github/RIDE/tools/../src/robotide/ui/mainframe.py:777
16751675
msgid "preview"
16761676
msgstr ""
16771677

1678-
#: /home2/helio/github/RIDE/tools/../src/robotide/ui/mainframe.py:775
1678+
#: /home2/helio/github/RIDE/tools/../src/robotide/ui/mainframe.py:777
16791679
msgid "view ride log"
16801680
msgstr ""
16811681

1682-
#: /home2/helio/github/RIDE/tools/../src/robotide/ui/mainframe.py:817
1682+
#: /home2/helio/github/RIDE/tools/../src/robotide/ui/mainframe.py:819
16831683
msgid "Shortcut keys for RIDE"
16841684
msgstr ""
16851685

1686-
#: /home2/helio/github/RIDE/tools/../src/robotide/ui/mainframe.py:855
1686+
#: /home2/helio/github/RIDE/tools/../src/robotide/ui/mainframe.py:857
16871687
msgid "Show"
16881688
msgstr ""
16891689

1690-
#: /home2/helio/github/RIDE/tools/../src/robotide/ui/mainframe.py:856
1690+
#: /home2/helio/github/RIDE/tools/../src/robotide/ui/mainframe.py:858
16911691
msgid "Hide"
16921692
msgstr ""
16931693

1694-
#: /home2/helio/github/RIDE/tools/../src/robotide/ui/mainframe.py:857
1694+
#: /home2/helio/github/RIDE/tools/../src/robotide/ui/mainframe.py:859
16951695
msgid "Close"
16961696
msgstr ""
16971697

-11 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)