Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: Submit Button Label Cannot Be Translated #1907

Open
AndroidOL opened this issue Feb 27, 2025 · 0 comments
Open

Bug: Submit Button Label Cannot Be Translated #1907

AndroidOL opened this issue Feb 27, 2025 · 0 comments
Labels

Comments

@AndroidOL
Copy link

AndroidOL commented Feb 27, 2025

Describe the Bug

createSubmit method to support dynamic translation #2ae4667

I noticed that in src/Forms/FormFactory.php and modules/Behaviour/behaviour_manage_edit.php, the $label and $values['type'] parameter is not wrapped with __(), which prevents the submit button text from being properly localized.

I have not created a pull request to avoid unintended changes affecting other users. I hope the developers can review this issue and apply the necessary fix.

To Reproduce

src/Forms/FormFactory.php

return $this->createButton($label, null, $id)->setType('submit')->addClass('text-right');
return $this->createSubmit($label)->prepend($cancelLink);

Expected behavior

src/Forms/FormFactory.php

return $this->createButton(__($label), null, $id)->setType('submit')->addClass('text-right');
return $this->createSubmit(__($label))->prepend($cancelLink);

Actual behavior

Submit Button Label Not Translated in FormFactory.php

Screenshots

No response

Gibbon version

28.0.01

Browser

Chrome

Browser Version

No response

Additional Context

No response

@AndroidOL AndroidOL added the bug label Feb 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant