Opened 7 months ago

Closed 7 months ago

#16266 closed defect (fixed)

Make translatable labels of colors and cursors in wxPropertyGrid

Reported by: awi Owned by: VZ
Priority: low Milestone:
Component: wxPropertyGrid Version: dev-latest
Keywords: label wxSystemColourProperty wxColourProperty wxCursorProperty Cc:
Blocked By: Blocking:
Patch: yes

Description

Some labels (for wxSystemColourProperty, wxColourProperty, wxCursorProperty) exposed via GUI are not currently translatable.
Patch to make them translatable is attached.

Attachments (2)

Translatable-labels-of-colors-and-cursors.patch download (4.0 KB) - added by awi 7 months ago.
Translatable labels of colors and cursors.
Another-fixes-to-wxPropertyGrid.patch download (1.3 KB) - added by awi 7 months ago.
Another fixes to wxPropertyGrid.

Download all attachments as: .zip

Change History (7)

Changed 7 months ago by awi

Translatable labels of colors and cursors.

comment:1 Changed 7 months ago by VZ

  • Owner set to VZ
  • Resolution set to fixed
  • Status changed from new to closed

In 76558:

Make names of properties used in wxPropertyGrid translatable.

Use _() around these user-visible strings, not wxT().

Closes #16266.

comment:2 Changed 7 months ago by VZ

In 76562:

Compilation fixes to wxPropertyGrid after r76558.

We can't use _() in the static wxChar* arrays: first, because this doesn't
compile and second because if it did compile, it still wouldn't work as no
message catalogs are loaded yet when the static arrays are initialized.

Use wxTRANSLATE() instead and arrange for the strings to be translated when
they are really used. This is rather ugly and perhaps it would be better to
avoid passing untranslated labels array to the property classes but at least
the code compiles again now.

See #16266.

Changed 7 months ago by awi

Another fixes to wxPropertyGrid.

comment:3 Changed 7 months ago by awi

  • Resolution fixed deleted
  • Status changed from closed to reopened

Some runtime errors (memory access violation caused by NULL pointers) can be observed when wxEnumProperty is created in the new way.
Patch fixing this issue is attached.

comment:4 Changed 7 months ago by vadz

Thanks a lot for testing and fixing this!

comment:5 Changed 7 months ago by VZ

  • Resolution set to fixed
  • Status changed from reopened to closed

In 76569:

Fix bugs in wxEnumProperty introduced by r76562.

The compilation fixes introduced run-time fixes due to not account for the use
of NULL pointers (which are not accepted as choices cache but are accepted as
choices values, go figure).

Closes #16266.

Note: See TracTickets for help on using tickets.