wxFormBuilder

Welcome to wxFormBuilder’s issue tracking system! We hope that wxFormBuilder provides you with many hours of increased productivity.

Please feel free to post bug reports and feature requests here. You can feel free to discuss an issue or feature on the forum but if you decide it needs to be looked at you need to post it here. If a feature request or bug report is not on this site there is a good chance it won’t be worked on. So, as a rule, post them here.

Thanks for your cooperation,
The wxFormBuilder Team

| Tasklist |

FS#418 - Localization in code generation doesn't work for wildcards in wxFilePickerCtrl...

Attached to Project: wxFormBuilder
Opened by Sebastian Vater (BastyCDGS) - Tuesday, 24 March 2009, 14:41 GMT+2
Task Type Bug Report
Category Specific Widget
Status Unconfirmed
Assigned To No-one
Operating System All
Severity Medium
Priority Normal
Reported Version 3.0
Due in Version Undecided
Due Date Undecided
Percent Complete 0%
Votes 0
Private No

Details

What steps will reproduce the problem?

  1. Start wxFormBuilder (I did with 3.0.57 Unicode build for Ubuntu 8.04) and create a project with internalization support so wxFormBuilder generates C++ code via _(”...”) macros...
  2. Create any GUI which contains at least one wxFilePickerCtrl (maybe wxDirPickerCtrl also is affected?)
  3. Setup things in the wxFilePickerCtrl like wildcards, title, flags, etc.
  4. Generate the C++ code
  5. Open the code, you’ll find something like this:
	TestFilePicker = new wxFilePickerCtrl( NotebookSettings, wxID_ANY, wxEmptyString, _("Select a WAV file"), wxT("WAVE files (*.wav)|*.wav|All files (*.*)|*.*"), wxDefaultPosition, wxDefaultSize, wxFLP_CHANGE_DIR|wxFLP_DEFAULT_STYLE|wxFLP_FILE_MUST_EXIST|wxFLP_OPEN );
	SettingsSizer->Add( TestFilePicker, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxALL|wxRIGHT, 5 );

What is the expected output? What do you see instead?

Expected output with activated internalization should be:

 [...] _("WAVE files (*.wav)|*.wav|All files (*.*)|*.*") [...]

so that the wildcard descriptions also get translated. What I’m seeing instead is:

 [...] wxT("WAVE files (*.wav)|*.wav|All files (*.*)|*.*") [...]

which doesn’t call the gettext () functions...

Please use labels and text to provide additional information.

Fixing this should be straight forward, since all to be done is to check whetever internalization is active and if this is the case, replace the wxT() for the wildcard part with _()

This task depends upon

Comment by Sebastian Vater (BastyCDGS) - Friday, 27 March 2009, 11:49 GMT+2

Hello, I got into this myself and submitted a patch...

To use it, go to your plugins/additional/xml directory of wxFormBuilder, where the file additional.xml can be found. Then apply the patch on the terminal with the command:

patch -p0 -i additional.xml.patch

After this, restart wxFormBuilder and wxFilePickerCtrl should internationalize the wildcards correctly...

Comment by Sebastian Vater (BastyCDGS) - Friday, 27 March 2009, 11:55 GMT+2

BTW, would be glad if this patch could be integrated into one of the next wxFormBuilder versions...it's really a small simple change (in fact just a wxString to wxString_i18n conversion).

Loading...