Skip to content

Debloat any Android or Google TV over Wi-Fi and get an Apple TV-style home.

launcher: Spanish/Catalan greeting hours — Buenas tardes until 21:00

Erresedos682ec9aa5f74
diff --git a/launcher/app/src/main/java/com/gathin/tvhome/MainActivity.java b/launcher/app/src/main/java/com/gathin/tvhome/MainActivity.java
index e6d030c6d..920de6ea5 100644
--- a/launcher/app/src/main/java/com/gathin/tvhome/MainActivity.java
+++ b/launcher/app/src/main/java/com/gathin/tvhome/MainActivity.java
@@ -2180,15 +2180,21 @@ public class MainActivity extends Activity implements AppAdapter.TileListener {
private void updateGreeting() {
int hour = Calendar.getInstance().get(Calendar.HOUR_OF_DAY);
int res;
- // Indonesian day parts run on different hours than English:
- // Pagi 00-10, Siang 10-15, Sore 15-18, Malam 18-24.
- // The app's own locale (per-app language on Android 13+), under either code Android uses for Indonesian.
+ // Locale-specific day parts (app language on Android 13+).
+ // Indonesian: Pagi 00-10, Siang 10-15, Sore 15-18, Malam 18-24.
+ // Spanish: "Buenas tardes" runs into the evening; "Buenas noches" from 21 (English switches at 17,
+ // and both evening and night strings are "Buenas noches").
String lang = getResources().getConfiguration().getLocales().get(0).getLanguage();
if ("in".equals(lang) || "id".equals(lang)) {
if (hour < 10) res = R.string.good_morning;
else if (hour < 15) res = R.string.good_afternoon;
else if (hour < 18) res = R.string.good_evening;
else res = R.string.good_night;
+ } else if ("es".equals(lang) || "ca".equals(lang)) {
+ if (hour < 6) res = R.string.good_night;
+ else if (hour < 12) res = R.string.good_morning;
+ else if (hour < 21) res = R.string.good_afternoon;
+ else res = R.string.good_night;
} else {
if (hour < 5) res = R.string.good_night;
else if (hour < 12) res = R.string.good_morning;