Blame SOURCES/TestTranslations.java

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