-
Notifications
You must be signed in to change notification settings - Fork 443
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
Fix DatePicker Translation #2748
Conversation
Better localisation for data-picker
@@ -271,6 +271,8 @@ | |||
<script src="<?= SystemURLs::getRootPath() ?>/skin/adminlte/plugins/input-mask/jquery.inputmask.date.extensions.js"></script> | |||
<script src="<?= SystemURLs::getRootPath() ?>/skin/adminlte/plugins/input-mask/jquery.inputmask.extensions.js"></script> | |||
<script src="<?= SystemURLs::getRootPath() ?>/skin/adminlte/plugins/datepicker/bootstrap-datepicker.js"></script> | |||
<script src="<?= SystemURLs::getRootPath() ?>/skin/adminlte/plugins/datepicker/locales/bootstrap-datepicker.<?= substr($localeInfo->getLocale(), 0, 2) ?>.js"></script> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fullcalendar has nothing to do with datepicker
bootstrap-datepicker.xx.js are included in the locale file see http://demo.churchcrm.io/master/skin/locale/fr_FR.js
please let us know the issue you are trying to fix
@@ -283,6 +285,10 @@ | |||
<script src="<?= SystemURLs::getRootPath() ?>/skin/adminlte/plugins/chartjs/Chart.min.js"></script> | |||
<script src="<?= SystemURLs::getRootPath() ?>/skin/adminlte/plugins/pace/pace.min.js"></script> | |||
<script src="<?= SystemURLs::getRootPath() ?>/skin/adminlte/plugins/select2/select2.full.min.js"></script> | |||
<script src="<?= SystemURLs::getRootPath() ?>/skin/adminlte/plugins/select2/i18n/<?= substr($localeInfo->getLocale(), 0, 2) ?>.js"></script> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what does this fix as we can add that to http://demo.churchcrm.io/master/skin/locale/fr_FR.js also
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So the only way is to use the guidelines of select2 and data-picker, or to use the js.php way.
So this is the way, I follow.
@@ -283,6 +285,10 @@ | |||
<script src="<?= SystemURLs::getRootPath() ?>/skin/adminlte/plugins/chartjs/Chart.min.js"></script> | |||
<script src="<?= SystemURLs::getRootPath() ?>/skin/adminlte/plugins/pace/pace.min.js"></script> | |||
<script src="<?= SystemURLs::getRootPath() ?>/skin/adminlte/plugins/select2/select2.full.min.js"></script> | |||
<script src="<?= SystemURLs::getRootPath() ?>/skin/adminlte/plugins/select2/i18n/<?= substr($localeInfo->getLocale(), 0, 2) ?>.js"></script> | |||
<script> | |||
$(".multiSearch").select2.defaults.set("language", "<?= substr($localeInfo->getLocale(), 0, 2) ?>"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what does this change?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This code will translate other languages :
- the select2
- all the date-picker.
For us it's important.
Last this the only way in the guidelines to translate this two parts.
closes #2717
Better localisation for data-picker.
<script src="/skin/fullcalendar/fullcalendar.js"></script>I substitute :
to :
<script src="/skin/adminlte/plugins/datepicker/locales/bootstrap-datepicker.getLocale(),0,2) ?>.js"></script>