[Fix] [Minor] locale_path is place inside the if condition