fix deprecation warning in locale module
Merge branch 'fix-deprecated-locale' into develop