Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix module 'locale' has no attribute 'format' #2776

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions lib/python/qtvcp/widgets/origin_offsetview.py
Original file line number Diff line number Diff line change
Expand Up @@ -267,18 +267,18 @@ def reload_offsets(self):
else:
tmpl = self.imperial_text_template

degree_tmpl = "%{}.2f".format(len(locale.format(tmpl, 0)))
degree_tmpl = "%{}.2f".format(len(locale.format_string(tmpl, 0)))

# fill each row of the liststore from the offsets arrays
for row, i in enumerate([ap, rot, g92, tool, g54, g55, g56, g57, g58, g59, g59_1, g59_2, g59_3]):
for column in range(0, 9):
if row == 1:
if column == 2:
self.tabledata[row][column] = locale.format(degree_tmpl, rot)
self.tabledata[row][column] = locale.format_string(degree_tmpl, rot)
else:
self.tabledata[row][column] = " "
else:
self.tabledata[row][column] = locale.format(tmpl, i[column])
self.tabledata[row][column] = locale.format_string(tmpl, i[column])
self.tablemodel.layoutChanged.emit()

# We read the var file directly
Expand Down
Loading