Changeset 16012 in josm for trunk/src/org


Ignore:
Timestamp:
2020-03-03T20:58:02+01:00 (5 years ago)
Author:
simon04
Message:

see #18845 - Move lang to resources/data/trans/

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/tools/I18n.java

    r15547 r16012  
    3030 */
    3131public final class I18n {
     32
     33    private static final String CORE_TRANS_DIRECTORY = "/data/trans/";
     34    private static final String PLUGIN_TRANS_DIRECTORY = "data/";
    3235
    3336    /**
     
    341344
    342345    private static URL getTranslationFile(String lang) {
    343         return I18n.class.getResource("/data/"+lang.replace('@', '-')+".lang");
     346        return I18n.class.getResource(CORE_TRANS_DIRECTORY + lang.replace('@', '-') + ".lang");
    344347    }
    345348
     
    417420        if ("en".equals(loadedCode))
    418421            return;
    419         final ZipEntry enfile = new ZipEntry("data/en.lang");
    420         final ZipEntry langfile = new ZipEntry("data/"+loadedCode+".lang");
     422        final ZipEntry enfile = new ZipEntry(PLUGIN_TRANS_DIRECTORY + "en.lang");
     423        final ZipEntry langfile = new ZipEntry(PLUGIN_TRANS_DIRECTORY + loadedCode + ".lang");
    421424        try (
    422425            ZipFile zipFile = new ZipFile(source, StandardCharsets.UTF_8);
Note: See TracChangeset for help on using the changeset viewer.