alejandroautalan / pygubu-designer

A simple GUI designer for the python tkinter module
GNU General Public License v3.0
827 stars 101 forks source link

Code Generation fails when using Chinese translations #159

Closed ObaraEmmanuel closed 1 year ago

ObaraEmmanuel commented 2 years ago

Code generation fails when locale is set to zh_CN or zh_Hans. Probably also fails for other locales which contain characters which are not valid in a python identifier. This is because translations are applied to generated class names.

alejandroautalan commented 2 years ago

Hello @ObaraEmmanuel, thanks for the bug report. Can you provide a minimal UI example to reproduce the error?

Regards Alejandro A.

ObaraEmmanuel commented 2 years ago

The problem is with the class name so even a single frame UI is sufficient to reproduce the issue. The default class name is what is causing the problem. Screenshot from 2022-10-23 09-36-21

新项目App is not a valid class name. But I realize now it can be changed.