avoid notices when loading locale file

This issue also exists in 1.3 will make another pr for 1.3 later on