Skip to content

Conversation

akx
Copy link
Contributor

@akx akx commented Aug 13, 2024

Duplicate/Delete/... will work on not-polygon shapes, so it's a bit strange that the actions talk about Polygons only.

@akx akx force-pushed the nomenclature branch 2 times, most recently from c19fb57 to 815f433 Compare September 4, 2025 05:48
@wkentaro
Copy link
Owner

wkentaro commented Sep 4, 2025

I agree "Polygons" is no longer suitable. Maybe "Annotation" can be an option?

@akx
Copy link
Contributor Author

akx commented Sep 4, 2025

The term "shape" is used internally in the code, though. I think it's alright?

@wkentaro
Copy link
Owner

wkentaro commented Sep 5, 2025

right. flags is also a part of "Annotation", so only calling shapes as "Annotation" is probably not consistent.

let's stick with "Shapes" for now, and come back when needed.

@wkentaro
Copy link
Owner

wkentaro commented Sep 5, 2025

can you also try to update translation file? otherwise, I'll do when I can.

image

@akx
Copy link
Contributor Author

akx commented Sep 5, 2025

Done (by hand). Are there instructions somewhere on how to regenerate those translation files?

@wkentaro wkentaro requested a review from Copilot September 6, 2025 03:54
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR updates user-facing text in the labelme application to use more generic terminology, changing "Polygons" to "Shapes" where appropriate. This improves the user experience by accurately reflecting that the duplicate, delete, copy, paste, hide, show, and toggle operations work on all shape types, not just polygons.

Key changes:

  • Updated action labels and tooltips to use "Shapes" instead of "Polygons"
  • Modified confirmation dialog messages to reference "shapes" rather than "polygons"
  • Updated translation source strings in both English template and Chinese translation files

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
labelme/app.py Updated action labels, tooltips, and dialog messages from "Polygons" to "Shapes"
labelme/translate/empty.ts Updated English translation template with new "Shapes" terminology
labelme/translate/zh_CN.ts Updated Chinese translation source strings to use "Shapes" terminology

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@wkentaro
Copy link
Owner

wkentaro commented Sep 6, 2025

Done (by hand). Are there instructions somewhere on how to regenerate those translation files?

Actually I too forgot how to do since long from last time. I'll make CI so we don't.

brew install qt@5 pyqt@5  # mac
pylupdate5 labelme/*.py labelme/widgets/*.py -ts labelme/translate/zh_CN.ts
lrelease labelme/translate/zh_CN.ts -qm labelme/translate/zh_CN.qm

@wkentaro
Copy link
Owner

wkentaro commented Sep 6, 2025

just merged #1636. can you please reset the change on the translation files?

@akx
Copy link
Contributor Author

akx commented Sep 22, 2025

Re-ran make update_translate.

Duplicate/Delete/... will work on not-polygon shapes
@wkentaro
Copy link
Owner

wkentaro commented Sep 23, 2025

you cannot just update translation files right?

image

need the same replacement of "Polygon" -> "Shape" in the translation file.

@akx
Copy link
Contributor Author

akx commented Sep 24, 2025

need the same replacement of "Polygon" -> "Shape" in the translation file.

I can do that, but according to e.g. Google Translate, 编辑多边形 means "Edit Polygon" in Chinese, not "Edit Shape", so if I do that, then the Chinese translation would be mistranslated from the (new) original.

@wkentaro
Copy link
Owner

Either is fine. If you gonna do translation by yourself, I personally trust DeepL more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants