diff --git a/pom.xml b/pom.xml index e976a7c..1ac554f 100644 --- a/pom.xml +++ b/pom.xml @@ -34,7 +34,7 @@ 999999-SNAPSHOT jenkinsci/locale-plugin - 2.452.1 + 2.452.3 1810.v9b_c30a_249a_4c false diff --git a/src/main/java/hudson/plugins/locale/PluginImpl.java b/src/main/java/hudson/plugins/locale/PluginImpl.java index 2a9130b..bcd3d76 100644 --- a/src/main/java/hudson/plugins/locale/PluginImpl.java +++ b/src/main/java/hudson/plugins/locale/PluginImpl.java @@ -41,7 +41,7 @@ public class PluginImpl extends GlobalConfiguration { // Set of allowed locales private static final Set ALLOWED_LOCALES = new HashSet<>(Arrays.asList( - "bg", "ca", "cs", "da", "de", "el", "en_GB", "es", "es_AR", "et", "fi", "fr", "he", "hu", "it", "ja", "ko", + "bg", "ca", "cs", "da", "de", "el", "en", "es", "es_AR", "et", "fi", "fr", "he", "hu", "it", "ja", "ko", "lt", "lv", "nb_NO", "nl", "pl", "pt_BR", "pt_PT", "ro", "ru", "sk", "sl", "sr", "sv_SE", "tr", "uk", "zh_CN", "zh_TW")); @@ -170,9 +170,9 @@ public GlobalConfigurationCategory getCategory() { public ListBoxModel doFillSystemLocaleItems() { ListBoxModel items = new ListBoxModel(); - // Use originalLocale to display the "Use Browser Locale" option + // Use originalLocale to display the "Use Default Locale" option String originalLocaleDisplay = String.format( - "Use Browser Locale - %s (%s)", originalLocale.getDisplayName(), originalLocale.toString()); + "Use Default Locale - %s (%s)", originalLocale.getDisplayName(), originalLocale.toString()); items.add(new ListBoxModel.Option(originalLocaleDisplay, USE_BROWSER_LOCALE)); Locale[] availableLocales = Locale.getAvailableLocales(); diff --git a/src/test/java/hudson/plugins/locale/PluginImplTest.java b/src/test/java/hudson/plugins/locale/PluginImplTest.java index 746bc88..5cb7620 100644 --- a/src/test/java/hudson/plugins/locale/PluginImplTest.java +++ b/src/test/java/hudson/plugins/locale/PluginImplTest.java @@ -28,7 +28,7 @@ public void setUp() { // Set of allowed locales for the test private static final Set ALLOWED_LOCALES = new HashSet<>(Arrays.asList( - "bg", "ca", "cs", "da", "de", "el", "en_GB", "es", "es_AR", "et", "fi", "fr", "he", "hu", "it", "ja", "ko", + "bg", "ca", "cs", "da", "de", "el", "en", "es", "es_AR", "et", "fi", "fr", "he", "hu", "it", "ja", "ko", "lt", "lv", "nb_NO", "nl", "pl", "pt_BR", "pt_PT", "ro", "ru", "sk", "sl", "sr", "sv_SE", "tr", "uk", "zh_CN", "zh_TW")); @@ -38,16 +38,16 @@ public void testDoFillSystemLocaleItems() { ListBoxModel model = plugin.doFillSystemLocaleItems(); // Expected size of the ListBoxModel - int expectedSize = ALLOWED_LOCALES.size() + 1; // +1 for the "Use Browser Locale" option + int expectedSize = ALLOWED_LOCALES.size() + 1; // +1 for the "Use Default Locale" option // Verify the returned ListBoxModel size assertEquals("The returned ListBoxModel size is not as expected", expectedSize, model.size()); - // Verify that the first option is "Use Browser Locale" + // Verify that the first option is "Use Default Locale" String expectedFirstOption = String.format( - "Use Browser Locale - %s (%s)", + "Use Default Locale - %s (%s)", Locale.getDefault().getDisplayName(), Locale.getDefault().toString()); - assertEquals("The first option should be 'Use Browser Locale'", expectedFirstOption, model.get(0).name); + assertEquals("The first option should be 'Use Default Locale'", expectedFirstOption, model.get(0).name); // Verify that the allowed locales are correctly added to the ListBoxModel, excluding the first option for (String localeStr : ALLOWED_LOCALES) { @@ -55,7 +55,7 @@ public void testDoFillSystemLocaleItems() { String expectedOption = String.format("%s - %s", locale.getDisplayName(), locale.toString()); boolean found = false; - for (int i = 1; i < model.size(); i++) { // Start from 1 to skip the "Use Browser Locale" option + for (int i = 1; i < model.size(); i++) { // Start from 1 to skip the "Use Default Locale" option if (model.get(i).name.equals(expectedOption)) { found = true; break;