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;
2a5672
import java.util.ResourceBundle;
189079
2a5672
import sun.util.resources.LocaleData;
2a5672
import sun.util.locale.provider.LocaleProviderAdapter;
189079
2a5672
public class TestTranslations {
f9b467
    public static void main(String[] args) {
2a5672
        for (String zone : args) {
2a5672
            System.out.printf("Translations for %s\n", zone);
2a5672
            for (Locale l : Locale.getAvailableLocales()) {
2a5672
                ResourceBundle bundle = new LocaleData(LocaleProviderAdapter.Type.JRE).getTimeZoneNames(l);
2a5672
                System.out.printf("Locale: %s, language: %s, translations: %s\n", l, l.getDisplayLanguage(), Arrays.toString(bundle.getStringArray(zone)));
f9b467
            }
f9b467
        }
f9b467
    }
f9b467
}