Load the english file again in case BS table doesn’t have a translation #15133
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
We were seeing an issue where if the user selected a language that the Bootstrap Table library didn't have translated yet, it would default the table translations ("Show page x of y", etc) to Chinese. Per their docs:
So what was happening is that the table would look for a language in the bootstrap tables
bootstrap-table-locale-all.min.js
, and if it couldn't find it, it was defaulting to the last locale loaded, which alphabetically would end up beingzh-TW
.This change loads
en-US
up after thebootstrap-table-locale-all.min.js
(even though English is already loaded via the "all" version" so that it will be the "last loaded".It's a bit hacky but it seems to work.