mirror of
https://github.com/bancika/diy-layout-creator
synced 2026-11-10 17:22:09 +10:00
added italiant translation
sort languages alphabetically
This commit is contained in:
@@ -124,12 +124,12 @@ public class LangUtil {
|
||||
return missing;
|
||||
}
|
||||
|
||||
public static Map<String, Map<String, String>> getAvailableLanguages() {
|
||||
Map<String, Map<String, String>> res = new HashMap<String, Map<String, String>>();
|
||||
public static List<Language> getAvailableLanguages() {
|
||||
List<Language> res = new ArrayList<Language>();
|
||||
File[] files = ResourceLoader.getFiles(LANG_DIR);
|
||||
if (files == null)
|
||||
return res;
|
||||
try {
|
||||
try {
|
||||
for (File file : files) {
|
||||
String key = file.getName().replaceFirst("[.][^.]+$", "");
|
||||
Map<String, String> details = new HashMap<String, String>();
|
||||
@@ -145,8 +145,9 @@ public class LangUtil {
|
||||
} catch (IOException e) {
|
||||
LOG.error("Error loading language file", e);
|
||||
}
|
||||
res.put(key, details);
|
||||
res.add(new Language(key, details));
|
||||
}
|
||||
Collections.sort(res);
|
||||
return res;
|
||||
} catch (Exception e) {
|
||||
LOG.error("Error fetching available languages");
|
||||
|
||||
@@ -0,0 +1,45 @@
|
||||
/*
|
||||
*
|
||||
* DIY Layout Creator (DIYLC). Copyright (c) 2009-2018 held jointly by the individual authors.
|
||||
*
|
||||
* This file is part of DIYLC.
|
||||
*
|
||||
* DIYLC is free software: you can redistribute it and/or modify it under the terms of the GNU
|
||||
* General Public License as published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* DIYLC is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
|
||||
* the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
|
||||
* Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with DIYLC. If not, see
|
||||
* <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package org.diylc.lang;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
public class Language implements Comparable<Language> {
|
||||
|
||||
private String name;
|
||||
private Map<String, String> properties;
|
||||
|
||||
public Language(String name, Map<String, String> properties) {
|
||||
super();
|
||||
this.name = name;
|
||||
this.properties = properties;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public Map<String, String> getProperties() {
|
||||
return properties;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int compareTo(Language o) {
|
||||
return name.compareToIgnoreCase(o.name);
|
||||
}
|
||||
}
|
||||
@@ -3089,6 +3089,10 @@
|
||||
<org.diylc.appframework.update.Change>
|
||||
<changeType>NEW_FEATURE</changeType>
|
||||
<description>Added "Crystal Oscillator" component</description>
|
||||
</org.diylc.appframework.update.Change>
|
||||
<org.diylc.appframework.update.Change>
|
||||
<changeType>NEW_FEATURE</changeType>
|
||||
<description>Added Italian UI translation</description>
|
||||
</org.diylc.appframework.update.Change>
|
||||
<org.diylc.appframework.update.Change>
|
||||
<changeType>IMPROVEMENT</changeType>
|
||||
@@ -3102,6 +3106,10 @@
|
||||
<changeType>IMPROVEMENT</changeType>
|
||||
<description>Fixed the orientation of the second coil of humbucker pickups. Now it's north start, north finish, south finish, south start</description>
|
||||
</org.diylc.appframework.update.Change>
|
||||
<org.diylc.appframework.update.Change>
|
||||
<changeType>IMPROVEMENT</changeType>
|
||||
<description>Improved Spanish translation</description>
|
||||
</org.diylc.appframework.update.Change>
|
||||
<org.diylc.appframework.update.Change>
|
||||
<changeType>BUG_FIX</changeType>
|
||||
<description>Projects created with version older than 4.5 that contain "Trace Cut" are showing errors when loaded in 4.5</description>
|
||||
|
||||
Reference in New Issue
Block a user