They came from the phone's locale, so a phone set to Spanish showed "Octubre 2026" with an English interface (and I18nTest failed on any machine not set to English). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
22 lines
914 B
Java
22 lines
914 B
Java
package org.gingercal;
|
|
|
|
import android.app.Application;
|
|
|
|
/** Runs before any screen, service or alarm: interface language (Galician by default), bundled TLS. */
|
|
public class GingerApp extends Application {
|
|
@Override
|
|
public void onCreate() {
|
|
super.onCreate();
|
|
L.gl = !"en".equals(getSharedPreferences("gingercal", 0).getString("lang", "gl"));
|
|
org.gingercal.net.CertVerifier.setRootStore(new org.gingercal.net.AssetRoots(this));
|
|
org.gingercal.net.Http.USER_AGENT = "CalendarLite/1.6 (Android 2.3)";
|
|
tlsTexts();
|
|
}
|
|
|
|
/** The bundled TLS stack's messages, in the current language. */
|
|
static void tlsTexts() {
|
|
org.gingercal.net.CertVerifier.msgMismatch = L.t("The server certificate is for a different address (%1$s).");
|
|
org.gingercal.net.CertVerifier.msgDates = L.t("The server certificate has expired, or the phone's date is wrong.");
|
|
}
|
|
}
|