Blame SOURCES/TestTranslations.java

9d5b7b
/* TestTranslations -- Ensure translations are available for new timezones
9d5b7b
   Copyright (C) 2022 Red Hat, Inc.
9d5b7b
9d5b7b
This program is free software: you can redistribute it and/or modify
9d5b7b
it under the terms of the GNU Affero General Public License as
9d5b7b
published by the Free Software Foundation, either version 3 of the
9d5b7b
License, or (at your option) any later version.
9d5b7b
9d5b7b
This program is distributed in the hope that it will be useful,
9d5b7b
but WITHOUT ANY WARRANTY; without even the implied warranty of
9d5b7b
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
9d5b7b
GNU Affero General Public License for more details.
9d5b7b
9d5b7b
You should have received a copy of the GNU Affero General Public License
9d5b7b
along with this program.  If not, see <http://www.gnu.org/licenses/>.
9d5b7b
*/
9d5b7b
9d5b7b
import java.util.Arrays;
9d5b7b
import java.util.Locale;
192879
import java.util.ResourceBundle;
b3b67a
192879
import sun.util.resources.LocaleData;
192879
import sun.util.locale.provider.LocaleProviderAdapter;
b3b67a
192879
public class TestTranslations {
9d5b7b
    public static void main(String[] args) {
192879
        for (String zone : args) {
192879
            System.out.printf("Translations for %s\n", zone);
192879
            for (Locale l : Locale.getAvailableLocales()) {
192879
                ResourceBundle bundle = new LocaleData(LocaleProviderAdapter.Type.JRE).getTimeZoneNames(l);
192879
                System.out.printf("Locale: %s, language: %s, translations: %s\n", l, l.getDisplayLanguage(), Arrays.toString(bundle.getStringArray(zone)));
9d5b7b
            }
9d5b7b
        }
9d5b7b
    }
9d5b7b
}