Skip to content

Commit

Permalink
Rephrase "Polygons" as "Shapes" where suitable
Browse files Browse the repository at this point in the history
Duplicate/Delete/... will work on not-polygon shapes
  • Loading branch information
akx committed Oct 1, 2024
1 parent b9c83ff commit 3fe16ce
Showing 1 changed file with 17 additions and 17 deletions.
34 changes: 17 additions & 17 deletions labelme/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -397,44 +397,44 @@ def __init__(
else None
)
editMode = action(
self.tr("Edit Polygons"),
self.tr("Edit Shapes"),
self.setEditMode,
shortcuts["edit_polygon"],
"edit",
self.tr("Move and edit the selected polygons"),
self.tr("Move and edit the selected shapes"),
enabled=False,
)

delete = action(
self.tr("Delete Polygons"),
self.tr("Delete Shapes"),
self.deleteSelectedShape,
shortcuts["delete_polygon"],
"cancel",
self.tr("Delete the selected polygons"),
self.tr("Delete the selected shapes"),
enabled=False,
)
duplicate = action(
self.tr("Duplicate Polygons"),
self.tr("Duplicate Shape"),
self.duplicateSelectedShape,
shortcuts["duplicate_polygon"],
"copy",
self.tr("Create a duplicate of the selected polygons"),
self.tr("Create a duplicate of the selected shape"),
enabled=False,
)
copy = action(
self.tr("Copy Polygons"),
self.tr("Copy Shape"),
self.copySelectedShape,
shortcuts["copy_polygon"],
"copy_clipboard",
self.tr("Copy selected polygons to clipboard"),
self.tr("Copy selected shape(s) to clipboard"),
enabled=False,
)
paste = action(
self.tr("Paste Polygons"),
self.tr("Paste Shape"),
self.pasteSelectedShape,
shortcuts["paste_polygon"],
"paste",
self.tr("Paste copied polygons"),
self.tr("Paste copied shape(s)"),
enabled=False,
)
undoLastPoint = action(
Expand Down Expand Up @@ -464,27 +464,27 @@ def __init__(
)

hideAll = action(
self.tr("&Hide\nPolygons"),
self.tr("&Hide\nShapes"),
functools.partial(self.togglePolygons, False),
shortcuts["hide_all_polygons"],
icon="eye",
tip=self.tr("Hide all polygons"),
tip=self.tr("Hide all shapes"),
enabled=False,
)
showAll = action(
self.tr("&Show\nPolygons"),
self.tr("&Show\nShapes"),
functools.partial(self.togglePolygons, True),
shortcuts["show_all_polygons"],
icon="eye",
tip=self.tr("Show all polygons"),
tip=self.tr("Show all shapes"),
enabled=False,
)
toggleAll = action(
self.tr("&Toggle\nPolygons"),
self.tr("&Toggle\nShapes"),
functools.partial(self.togglePolygons, None),
shortcuts["toggle_all_polygons"],
icon="eye",
tip=self.tr("Toggle all polygons"),
tip=self.tr("Toggle all shapes"),
enabled=False,
)

Expand Down Expand Up @@ -2104,7 +2104,7 @@ def removeSelectedPoint(self):
def deleteSelectedShape(self):
yes, no = QtWidgets.QMessageBox.Yes, QtWidgets.QMessageBox.No
msg = self.tr(
"You are about to permanently delete {} polygons, " "proceed anyway?"
"You are about to permanently delete {} shapes, proceed anyway?"
).format(len(self.canvas.selectedShapes))
if yes == QtWidgets.QMessageBox.warning(
self, self.tr("Attention"), msg, yes | no, yes
Expand Down

0 comments on commit 3fe16ce

Please sign in to comment.