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
@@ -79,7 +79,7 @@ final class ConsumptionCloudClient {
* Every 30 minutes, takes a delta chunk from the tracker and sends it. Chunks that fail
* to send (offline, server error) accumulate in a local cache and are retried on the
* next cycle — so a drive through a dead-signal area still reaches the cloud once the
* head unit is back on the hotspot. Every attempt is logged to the in-app "Kayıtlar" tab.
* head unit is back on the hotspot. Every attempt is logged to the in-app "Logs" tab.
*
* @param nowMs wall clock, recorded with the payload — the throttle below runs on a
* monotonic clock instead, so a backwards NTP correction cannot stall
@@ -96,7 +96,7 @@ final class ConsumptionCloudClient {
// Drain any cached chunks first — a backlog from an offline period has priority.
int cached = drainChunkCache();
if (cached > 0) {
logEvent(true, 200, "Cache boşaltıldı: " + cached + " chunk gönderildi");
logEvent(true, 200, "Cache drained: " + cached + " chunk(s) sent");
invalidateHistory();
}
@@ -115,14 +115,14 @@ final class ConsumptionCloudClient {
try {
JSONObject body = consumptionBody(chunk, nowMs);
if (send("/v1/consumption/daily", "PUT", body)) {
logEvent(true, 200, "Chunk " + chunk.date + " gönderildi (+"
logEvent(true, 200, "Chunk " + chunk.date + " sent (+"
+ String.format("%.1f", chunk.day.km) + "km, +"
+ String.format("%.2f", chunk.day.kwh) + "kWh)");
invalidateHistory();
} else {
cacheChunk(body);
int pending = pendingChunkCount();
logEvent(false, 0, "Chunk gönderilemedi — cache'de bekliyor (" + pending + " chunk)");
logEvent(false, 0, "Chunk not sent — waiting in cache (" + pending + " chunk(s))");
}
} catch (Exception e) {
// Network failure: cache the chunk for the next cycle.
@@ -131,7 +131,7 @@ final class ConsumptionCloudClient {
cacheChunk(body);
} catch (Exception ignored) { }
int pending = pendingChunkCount();
logEvent(false, 0, "Çevrimdışı — cache'de bekliyor (" + pending + " chunk): " + e.getMessage());
logEvent(false, 0, "Offline — waiting in cache (" + pending + " chunk(s)): " + e.getMessage());
Log.w(TAG, "Chunk sync failed, cached: " + e.getMessage());
}
}
@@ -190,7 +190,7 @@ final class ConsumptionCloudClient {
return loadChunkCache().length();
}
/** Records a cloud-sync attempt to the in-app log (the "Kayıtlar" tab). */
/** Records a cloud-sync attempt to the in-app log (the "Logs" tab). */
private void logEvent(boolean success, int httpStatus, String detail) {
UploadLog log = AbrpUploadService.log();
if (log == null) return;
@@ -220,7 +220,7 @@ final class ConsumptionCloudClient {
try {
syncPendingCharges(charges, pending);
} catch (Exception e) {
logEvent(false, 0, "Şarj session sync hatası: " + e.getMessage());
logEvent(false, 0, "Charging session sync error: " + e.getMessage());
Log.w(TAG, "Charging-session sync unavailable: " + e.getMessage());
}
}
@@ -235,10 +235,10 @@ final class ConsumptionCloudClient {
Log.i(TAG, "Uploading charge session: " + id);
if (send("/v1/charging-sessions/" + id, "PUT", body)) {
charges.markUploaded(id);
logEvent(true, 200, "Şarj session gönderildi: " + id);
logEvent(true, 200, "Charging session sent: " + id);
Log.i(TAG, "Successfully uploaded charge session: " + id);
} else {
logEvent(false, 0, "Şarj session gönderilemedi: " + id);
logEvent(false, 0, "Charging session not sent: " + id);
Log.w(TAG, "Failed to upload charge session: " + id);
return;
}
@@ -310,11 +310,11 @@ final class ConsumptionCloudClient {
List<DayRecord> fresh = fetchHistory();
if (!fresh.isEmpty()) cachedHistory = fresh;
Log.i(TAG, "Fetched " + fresh.size() + " history records from cloud");
logEvent(true, 200, "History çekildi: " + fresh.size() + " gün");
logEvent(true, 200, "History fetched: " + fresh.size() + " day(s)");
} catch (Exception e) {
String msg = e.getMessage() == null ? e.getClass().getSimpleName() : e.getMessage();
Log.w(TAG, "History fetch unavailable: " + msg);
logEvent(false, 0, "History fetch hatası: " + msg);
logEvent(false, 0, "History fetch error: " + msg);
}
}
@@ -325,11 +325,11 @@ final class ConsumptionCloudClient {
/**
* Immediately attempts to send every cached chunk and take a fresh one, ignoring the
* 2-minute throttle. Called from the UI "Şimdi yükle" button. Returns a one-line
* 2-minute throttle. Called from the UI "Upload now" button. Returns a one-line
* status for the log.
*/
String flushNow(ConsumptionTracker tracker, long nowMs) {
if (endpoint.isEmpty() || token.isEmpty()) return "API yapılandırılmamış";
if (endpoint.isEmpty() || token.isEmpty()) return "API not configured";
int cached = drainChunkCache();
ConsumptionTracker.CloudSnapshot chunk = tracker.takeChunkDelta();
int total = cached;
@@ -348,9 +348,9 @@ final class ConsumptionCloudClient {
}
int pending = pendingChunkCount();
String msg = total > 0
? total + " chunk yüklendi" + (pending > 0 ? ", " + pending + " hâlâ bekliyor" : "")
: (pending > 0 ? pending + " chunk yüklenemedi (internet?)" : "Yüklenecek yeni veri yok");
logEvent(total > 0, total > 0 ? 200 : 0, "Manuel sync: " + msg);
? total + " chunk(s) uploaded" + (pending > 0 ? ", " + pending + " still pending" : "")
: (pending > 0 ? pending + " chunk(s) could not be uploaded (internet?)" : "No new data to upload");
logEvent(total > 0, total > 0 ? 200 : 0, "Manual sync: " + msg);
return msg;
}