Skip to content

Commit 67f086f

Browse files
committed
"sl-SI" added to locales
1 parent cc06b95 commit 67f086f

File tree

2 files changed

+24
-28
lines changed

2 files changed

+24
-28
lines changed

src/main/java/org/myrobotlab/service/InMoov2.java

Lines changed: 14 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,7 @@ public InMoov2Config apply(InMoov2Config c) {
281281
super.apply(c);
282282
try {
283283

284-
locales = Locale.getLocaleMap("en-US", "fr-FR", "es-ES", "de-DE", "nl-NL", "pl-PL", "ru-RU", "hi-IN", "it-IT", "fi-FI", "pt-PT", "tr-TR");
284+
locales = Locale.getLocaleMap("en-US", "fr-FR", "es-ES", "de-DE", "nl-NL", "pl-PL", "ru-RU", "hi-IN", "it-IT", "fi-FI", "pt-PT", "sl-SI", "tr-TR");
285285

286286
if (c.locale != null) {
287287
setLocale(c.locale);
@@ -1209,8 +1209,8 @@ public void onPirOff() {
12091209
public void onPirOn() {
12101210
log.info("onPirOn");
12111211
if (config.flashOnPir == true) {
1212-
invoke("publishFlash", "pir");
1213-
}
1212+
invoke("publishFlash", "pir");
1213+
}
12141214
ProgramAB chatBot = (ProgramAB) getPeer("chatBot");
12151215
if (chatBot != null) {
12161216
String botState = chatBot.getPredicate("botState");
@@ -2224,13 +2224,13 @@ public void startService() {
22242224

22252225
// chatbot getresponse attached to publishEvent
22262226
addListener("publishEvent", getPeerName("chatBot"), "getResponse");
2227-
2227+
22282228
ServiceInterface p = getPeer("python");
22292229
if (p != null) {
22302230
try {
2231-
PythonConfig c = (PythonConfig)p.getConfig();
2231+
PythonConfig c = (PythonConfig) p.getConfig();
22322232
c.scriptRootDir = "data" + fs + "InMoov2";
2233-
} catch(Exception e) {
2233+
} catch (Exception e) {
22342234
log.error("setting python scriptRootDir failed", e);
22352235
}
22362236
}
@@ -2308,34 +2308,29 @@ public void waitTargetPos() {
23082308
sendToPeer("leftArm", "waitTargetPos");
23092309
sendToPeer("torso", "waitTargetPos");
23102310
}
2311-
2311+
23122312
public Double getUltrasonicRightDistance() {
2313-
UltrasonicSensor uss = (UltrasonicSensor)getPeer("ultrasonicRight");
2313+
UltrasonicSensor uss = (UltrasonicSensor) getPeer("ultrasonicRight");
23142314
if (uss != null) {
23152315
return uss.range();
2316-
}
2317-
else
2318-
{
2316+
} else {
23192317
warn("No ultrasonicRight attached");
23202318
return 0.0;
23212319
}
23222320
}
2323-
2324-
2321+
23252322
public Double getUltrasonicLeftDistance() {
2326-
UltrasonicSensor uss = (UltrasonicSensor)getPeer("ultrasonicLeft");
2323+
UltrasonicSensor uss = (UltrasonicSensor) getPeer("ultrasonicLeft");
23272324
if (uss != null) {
23282325
return uss.range();
2329-
}
2330-
else
2331-
{
2326+
} else {
23322327
warn("No ultrasonicLeft attached");
23332328
return 0.0;
23342329
}
23352330
}
2336-
2331+
23372332
public Map publishClassification(Map<String, Object> c) {
2338-
// log.info(c);
2333+
// log.info(c);
23392334
return c;
23402335
}
23412336

src/main/java/org/myrobotlab/service/data/Locale.java

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -143,15 +143,15 @@ public String getDisplayCountry() {
143143
}
144144

145145
public static Map<String, Locale> getDefaults() {
146-
// Pulls all languages available from the OS, not useful to us
147-
// Map<String, Locale> locales = new TreeMap<>();
148-
// java.util.Locale[] ls = java.util.Locale.getAvailableLocales();
149-
// for (java.util.Locale l : ls) {
150-
// Locale newLocale = new Locale(l.toString());
151-
// if (l.toString() != null && l.toString().length() != 0) {
152-
// locales.put(newLocale.tag, newLocale);
153-
// }
154-
// }
146+
// Pulls all languages available from the OS, not useful to us
147+
// Map<String, Locale> locales = new TreeMap<>();
148+
// java.util.Locale[] ls = java.util.Locale.getAvailableLocales();
149+
// for (java.util.Locale l : ls) {
150+
// Locale newLocale = new Locale(l.toString());
151+
// if (l.toString() != null && l.toString().length() != 0) {
152+
// locales.put(newLocale.tag, newLocale);
153+
// }
154+
// }
155155
// We really only support a few Locales dictated by ProgramAB, Polly,
156156
// WebkitSpeechRecognition, & WebKitSpeechSynthesis - this should be
157157
// a rollup of other services ?
@@ -169,6 +169,7 @@ public static Map<String, Locale> getDefaults() {
169169
locales.put("pl-PL", new Locale("pl-PL"));
170170
locales.put("pt-PT", new Locale("pt-PT"));
171171
locales.put("ru-RU", new Locale("ru-RU"));
172+
locales.put("sl-SI", new Locale("sl-SI"));
172173
locales.put("tr-TR", new Locale("tr-TR"));
173174
return locales;
174175
}

0 commit comments

Comments
 (0)