Translate app UI from Turkish to English

Translates string resources, hardcoded layout text and user-facing
strings in Java sources (toasts, dialogs, status labels, upload log).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-17 11:38:00 +02:00
co-authored by Claude Opus 5.5
parent 8f49871e6f
commit 864ac612da
12 changed files with 170 additions and 170 deletions
@@ -363,9 +363,9 @@ public class MainActivity extends AppCompatActivity {
String ssid = wifi.currentSsid();
wifiSsid.setText(ssid == null ? getString(R.string.wifi_not_connected) : ssid);
if (ssid != null) {
wifiState.setText("Bağlı ♥");
wifiState.setText("Connected ♥");
} else if (!wifi.isWifiEnabled()) {
wifiState.setText("Wi-Fi kapalı");
wifiState.setText("Wi-Fi off");
}
// Left alone otherwise: a message the button just set says more about what is
// happening than "not connected" would.
@@ -458,10 +458,10 @@ public class MainActivity extends AppCompatActivity {
consumptionReset.setOnClickListener(v -> {
if (consumptionPeriod != ConsumptionTracker.Period.TRIP_A && consumptionPeriod != ConsumptionTracker.Period.TRIP_B) return;
String name = consumptionPeriod == ConsumptionTracker.Period.TRIP_A ? "Trip A" : "Trip B";
new MaterialAlertDialogBuilder(this).setTitle(name + " sıfırlansın mı?")
.setMessage("Bu sayacın kayıtlı tüketim geçmişi kalıcı olarak silinir.")
.setNegativeButton("Vazgeç", null)
.setPositiveButton("Sıfırla", (d, w) -> {
new MaterialAlertDialogBuilder(this).setTitle("Reset " + name + "?")
.setMessage("This counter's recorded consumption history will be permanently deleted.")
.setNegativeButton("Cancel", null)
.setPositiveButton("Reset", (d, w) -> {
consumptionTracker.reset(consumptionPeriod);
refreshConsumption();
}).show();
@@ -475,9 +475,9 @@ public class MainActivity extends AppCompatActivity {
if (!consumptionTracker.setSohPercent(value)) throw new NumberFormatException();
consumptionSohLayout.setError(null);
consumptionSohInput.setText(String.format(java.util.Locale.US, "%.1f", value));
Toast.makeText(this, "SoH kaydedildi", Toast.LENGTH_SHORT).show();
Toast.makeText(this, "SoH saved", Toast.LENGTH_SHORT).show();
} catch (NumberFormatException e) {
consumptionSohLayout.setError("1 ile 100 arasında bir değer girin");
consumptionSohLayout.setError("Enter a value between 1 and 100");
}
}
@@ -533,9 +533,9 @@ public class MainActivity extends AppCompatActivity {
if (!chargeSessionTracker.setPricePerKwh(value)) throw new NumberFormatException();
chargePriceLayout.setError(null);
chargePriceInput.setText(String.format(java.util.Locale.US, "%.2f", value));
Toast.makeText(this, "Şarj fiyatı kaydedildi", Toast.LENGTH_SHORT).show();
Toast.makeText(this, "Charging price saved", Toast.LENGTH_SHORT).show();
} catch (NumberFormatException e) {
chargePriceLayout.setError("Geçerli bir ₺/kWh değeri girin");
chargePriceLayout.setError("Enter a valid ₺/kWh value");
}
}
@@ -550,9 +550,9 @@ public class MainActivity extends AppCompatActivity {
// below — which then describe the previous DC session — be read as this charge.
boolean dc = ChargingState.isDcCharging(
code, s.getChargePortConnected(), s.getBatteryPowerKw(), s.getSpeedKmh());
chargeStatus.setText(dc ? "DC hızlı şarj"
: charging ? "AC şarj (ölçülmüyor)"
: (session.startedAtMs > 0 ? "Son şarj" : "Şarj yok"));
chargeStatus.setText(dc ? "DC fast charging"
: charging ? "AC charging (not metered)"
: (session.startedAtMs > 0 ? "Last charge" : "Not charging"));
chargeSoc.setText(fmt(s.getSocPercent(), "%.1f %%"));
chargeStartSoc.setText(fmt(session.startSocPercent, "%.1f %%"));
chargeVoltage.setText(fmt(s.getBatteryVoltageV(), "%.1f V"));
@@ -586,20 +586,20 @@ public class MainActivity extends AppCompatActivity {
consumptionSpeed.setText(t.hours <= 0 ? "—" : String.format(java.util.Locale.getDefault(),
"%.1f km/h", t.km / t.hours));
long minutes = Math.round(t.hours * 60d);
consumptionTime.setText(String.format(java.util.Locale.getDefault(), "%d sa %02d dk",
consumptionTime.setText(String.format(java.util.Locale.getDefault(), "%d h %02d min",
minutes / 60, minutes % 60));
consumptionSoc.setText(String.format(java.util.Locale.getDefault(), "%.1f %%", t.soc));
// Daily history: cloud first, local fallback for today (not yet uploaded).
ConsumptionTracker.Totals day = cloudDay(selectedConsumptionDate);
if (day == null) day = consumptionTracker.totalsForDay(selectedConsumptionDate);
if (day.km == 0 && day.kwh == 0 && day.hours == 0 && day.soc == 0) {
consumptionDailyHistory.setText("Bu tarih için kayıt yok");
consumptionDailyHistory.setText("No records for this date");
} else {
String average = day.km < 0.1 ? "—" : String.format(java.util.Locale.getDefault(),
"%.1f kWh/100 km", day.kwh * 100d / day.km);
long dayMinutes = Math.round(day.hours * 60d);
consumptionDailyHistory.setText(String.format(java.util.Locale.getDefault(),
"Mesafe %.1f km\nEnerji %.2f kWh\nOrtalama %s\nSüre %d sa %02d dk\nSOC farkı %.1f %%",
"Distance %.1f km\nEnergy %.2f kWh\nAverage %s\nDuration %d h %02d min\nSOC change %.1f %%",
day.km, day.kwh, average, dayMinutes / 60, dayMinutes % 60, day.soc));
}
}
@@ -666,17 +666,17 @@ public class MainActivity extends AppCompatActivity {
Integer status = s.getChargingStatus();
if (status != null) {
switch (status) {
case 1: return "AC şarj ♥";
case 10: return "DC hızlı şarj ♥";
case 5: return "Bağlanıyor…";
case 7: return "Kabloda, şarj yok";
case 8: return "Durduruldu";
case 0: return "Şarj yok";
default: return "Durum " + status;
case 1: return "AC charging ♥";
case 10: return "DC fast charging ♥";
case 5: return "Connecting…";
case 7: return "Plugged in, not charging";
case 8: return "Stopped";
case 0: return "Not charging";
default: return "Status " + status;
}
}
Boolean plugged = s.getChargePortConnected();
if (plugged != null) return plugged ? "Bağlı ♥" : "Bağlı değil";
if (plugged != null) return plugged ? "Connected ♥" : "Not connected";
return "—";
}
@@ -689,13 +689,13 @@ public class MainActivity extends AppCompatActivity {
// ---------- Call log ----------
/**
* "Şimdi yükle" button — forces a cache drain + fresh chunk on a background thread,
* ignoring the 2-minute throttle. The result lands in the upload log (Kayıtlar tab).
* "Upload now" button — forces a cache drain + fresh chunk on a background thread,
* ignoring the 2-minute throttle. The result lands in the upload log (Logs tab).
*/
private void manualFlush() {
if (consumptionCloudClient == null || consumptionTracker == null) return;
AbrpUploadService.log().record(new UploadLog.Entry(
System.currentTimeMillis(), 0, true, "Manuel sync başlatıldı…"));
System.currentTimeMillis(), 0, true, "Manual sync started…"));
new Thread(() -> {
String result = consumptionCloudClient.flushNow(
consumptionTracker, System.currentTimeMillis());
@@ -704,19 +704,19 @@ public class MainActivity extends AppCompatActivity {
}
/**
* Tüketim sekmesi "Yenile" button — sends cached chunks + fresh delta, invalidates the
* Consumption tab "Refresh" button — sends cached chunks + fresh delta, invalidates the
* history cache so the next poll fetches fresh data from the cloud, then refreshes the UI.
*/
private void refreshFromCloud() {
if (consumptionCloudClient == null || consumptionTracker == null) return;
AbrpUploadService.log().record(new UploadLog.Entry(
System.currentTimeMillis(), 0, true, "Tüketim yenileniyor…"));
System.currentTimeMillis(), 0, true, "Refreshing consumption…"));
new Thread(() -> {
consumptionCloudClient.flushNow(consumptionTracker, System.currentTimeMillis());
consumptionCloudClient.invalidateHistory();
runOnUiThread(() -> {
refreshConsumption();
Toast.makeText(this, "Tüketim yenilendi", Toast.LENGTH_SHORT).show();
Toast.makeText(this, "Consumption refreshed", Toast.LENGTH_SHORT).show();
});
}, "cloud-refresh").start();
}
@@ -764,7 +764,7 @@ public class MainActivity extends AppCompatActivity {
break;
case RUNNING:
case STARTING:
statusText.setText("Tüketim takibi aktif");
statusText.setText("Consumption tracking active");
statusText.setTextColor(COLOR_OK);
break;
case STOPPED: