controlsfx / controlsfx

High quality UI controls to complement the core JavaFX distribution
https://controlsfx.org
BSD 3-Clause "New" or "Revised" License
1.57k stars 269 forks source link

Add I18N support for button labels in TableFilter #946

Open JonathanGiles opened 7 years ago

JonathanGiles commented 7 years ago

Original report by Dominic Gallichand (Bitbucket: gallic00, GitHub: gallic00).


I came across this excellent article about using the TableFilter on a TableView : http://fxexperience.com/2016/03/introducing-the-controlsfx-tablefilter/. This feature is very neatly done and very user-friendly.

I was wondering if there was a way to change the labels in the buttons of the filter (APPLY, NONE, ALL and RESET ALL) so that it fits the language of my application. I tried to find these labels in the I18N message bundles but could not find them.

I checked the code and noticed that in the FilterPanel class, the buttons are created with the label strings (example for NONE button below) :

{code} //initialize unselect all button Button unselectAllButton = new Button("NONE"); HBox.setHgrow(unselectAllButton, Priority.ALWAYS); {code}

Am I missing something about the setup of the I18N?

JonathanGiles commented 7 years ago

Original comment by Thomas Nield (Bitbucket: thomasnield, GitHub: thomasnield).


Thanks Dominic!

JonathanGiles commented 7 years ago

Original comment by Dominic Gallichand (Bitbucket: gallic00, GitHub: gallic00).


Alright I'll check that out. Thanks for quick reply and good luck with that new job.

JonathanGiles commented 7 years ago

Original comment by Thomas Nield (Bitbucket: thomasnield, GitHub: thomasnield).


No you're not missing anything. I just didn't implement i18N support. I'm crazy busy right now with a new job, but you are welcome to put in a PR.