mirror of
https://github.com/4ian/GDevelop.git
synced 2025-10-15 10:19:04 +00:00
Ensure True/False and Yes/No parameter have a valid value even with i18n
This commit is contained in:
@@ -207,16 +207,30 @@ void ParameterEditorLauncher::LaunchEditor(wxWindow * parent, gd::Project & proj
|
||||
}
|
||||
else if ( metadata.GetType() == "trueorfalse" )
|
||||
{
|
||||
TrueOrFalse dialog(parent, _("Choose True or False to fill the parameter"), _("True or False"));
|
||||
TrueOrFalse dialog(parent, _("Choose True or False for this parameter"), _("True or False"));
|
||||
if ( dialog.ShowModal() == 1 )
|
||||
editCtrl->ChangeValue(_("True"));
|
||||
{
|
||||
gd::String result = _("True");
|
||||
if (result != "True" && result != "Vrai") {
|
||||
result = "True";
|
||||
}
|
||||
|
||||
editCtrl->ChangeValue(result);
|
||||
}
|
||||
else
|
||||
editCtrl->ChangeValue(_("False"));
|
||||
}
|
||||
else if ( metadata.GetType() == "yesorno" )
|
||||
{
|
||||
if (wxMessageBox(_("Choose yes or no to fullfil parent parameter:"), _("Yes or no") ,wxYES_NO ) == wxYES)
|
||||
editCtrl->ChangeValue(_("yes"));
|
||||
if (wxMessageBox(_("Choose yes or no for this parameter:"), _("Yes or no") ,wxYES_NO ) == wxYES)
|
||||
{
|
||||
gd::String result = _("yes");
|
||||
if (result != "yes" && result != "oui") {
|
||||
result = "yes";
|
||||
}
|
||||
|
||||
editCtrl->ChangeValue(result);
|
||||
}
|
||||
else
|
||||
editCtrl->ChangeValue(_("no"));
|
||||
|
||||
|
Reference in New Issue
Block a user