Skip to content
Permalink
Browse files

fix: use Locale.Category.DISPLAY (~lc_messages) when selecting resour…

…ce bundle. (#1115)
  • Loading branch information
trtrmitya authored and vlsi committed Feb 15, 2018
1 parent 48b9897 commit 0e9dfce42c80391d0eefa830600e0ac4c1baae50
Showing with 5 additions and 0 deletions.
  1. +5 −0 pgjdbc/src/main/java/org/postgresql/util/GT.java
@@ -6,6 +6,7 @@
package org.postgresql.util;

import java.text.MessageFormat;
import java.util.Locale;
import java.util.MissingResourceException;
import java.util.ResourceBundle;

@@ -28,7 +29,11 @@ public static String tr(String message, Object... args) {

private GT() {
try {
//#if mvn.project.property.postgresql.jdbc.spec < "JDBC4.1"
_bundle = ResourceBundle.getBundle("org.postgresql.translation.messages");
//#else
_bundle = ResourceBundle.getBundle("org.postgresql.translation.messages", Locale.getDefault(Locale.Category.DISPLAY));
//#endif
} catch (MissingResourceException mre) {
// translation files have not been installed
_bundle = null;

0 comments on commit 0e9dfce

Please sign in to comment.
You can’t perform that action at this time.