Blame SOURCES/TestTranslations.java

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