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