fix(i18n, ui): Fix double scrollbars and implement full en_GB translations
This commit is contained in:
2842
addons/mymach_fleet_intelligence/i18n/en.po
Normal file
2842
addons/mymach_fleet_intelligence/i18n/en.po
Normal file
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
2842
addons/mymach_fleet_intelligence/i18n/en_US.po
Normal file
2842
addons/mymach_fleet_intelligence/i18n/en_US.po
Normal file
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
36
addons/mymach_fleet_intelligence/i18n/run_translate.py
Normal file
36
addons/mymach_fleet_intelligence/i18n/run_translate.py
Normal file
@@ -0,0 +1,36 @@
|
||||
import polib
|
||||
from deep_translator import GoogleTranslator
|
||||
import os
|
||||
|
||||
base_dir = "/mnt/extra-addons/mymach_fleet_intelligence/i18n"
|
||||
en_us_path = os.path.join(base_dir, "en_US.po")
|
||||
en_gb_path = os.path.join(base_dir, "en_GB.po")
|
||||
|
||||
print(f"Loading {en_us_path}...")
|
||||
po = polib.pofile(en_us_path, encoding='utf-8')
|
||||
|
||||
translator = GoogleTranslator(source='tr', target='en')
|
||||
|
||||
count = 0
|
||||
for entry in po:
|
||||
msgid = entry.msgid
|
||||
if not msgid.strip():
|
||||
continue
|
||||
|
||||
if not entry.msgstr or not entry.msgstr.strip() or entry.msgstr == msgid:
|
||||
try:
|
||||
translated = translator.translate(msgid)
|
||||
if translated:
|
||||
entry.msgstr = translated
|
||||
count += 1
|
||||
if count % 10 == 0:
|
||||
print(f"Translated {count} entries...")
|
||||
except Exception as e:
|
||||
print(f"Error translating '{msgid}': {e}")
|
||||
entry.msgstr = msgid # fallback
|
||||
|
||||
po.save(en_us_path)
|
||||
po.save(os.path.join(base_dir, "en.po"))
|
||||
po.save(os.path.join(base_dir, "en_GB.po"))
|
||||
print(f"Total new translated: {count}")
|
||||
print(f"Saved {en_us_path}, en.po, en_GB.po with translations!")
|
||||
@@ -12,29 +12,36 @@
|
||||
}
|
||||
|
||||
/* Make the form view fully edge-to-edge, removing all Odoo paddings/margins/backgrounds */
|
||||
.o_content:has(.mymach_zara_form) { overflow: hidden !important; height: 100% !important; }
|
||||
.o_content:has(.mymach_zara_form),
|
||||
.o_form_view:has(.mymach_zara_form),
|
||||
.mymach_zara_form {
|
||||
overflow: hidden !important;
|
||||
height: 100% !important;
|
||||
background-color: #0f172a !important;
|
||||
padding: 0 !important;
|
||||
margin: 0 !important;
|
||||
height: 100vh !important;
|
||||
min-height: 100% !important;
|
||||
width: 100% !important;
|
||||
max-width: 100% !important;
|
||||
display: flex !important;
|
||||
display: flex !important; overflow: hidden !important;
|
||||
flex-direction: column !important;
|
||||
}
|
||||
|
||||
.mymach_zara_form .o_form_sheet_bg {
|
||||
overflow: hidden !important;
|
||||
height: 100% !important;
|
||||
background: #0f172a !important;
|
||||
padding: 0 !important;
|
||||
margin: 0 !important;
|
||||
width: 100% !important;
|
||||
height: 100vh !important;
|
||||
min-height: 100% !important;
|
||||
max-width: 100% !important;
|
||||
}
|
||||
|
||||
.mymach_zara_form .o_form_sheet {
|
||||
overflow: hidden !important;
|
||||
height: 100% !important;
|
||||
background-color: #0f172a !important;
|
||||
border: none !important;
|
||||
padding: 0 !important;
|
||||
@@ -42,21 +49,20 @@
|
||||
box-shadow: none !important;
|
||||
width: 100% !important;
|
||||
max-width: 100% !important;
|
||||
height: 100vh !important;
|
||||
min-height: 100vh !important;
|
||||
min-height: 100% !important;
|
||||
}
|
||||
|
||||
/* Zara/Fashion-inspired Minimalist Editorial Styles */
|
||||
.mymach_zara_container {
|
||||
overflow: hidden !important;
|
||||
height: 100% !important;
|
||||
background-image: url('/mymach_fleet_intelligence/static/description/car_hero.png');
|
||||
background-size: cover;
|
||||
background-position: center;
|
||||
border-radius: 0px !important; /* Edge-to-edge: no rounded corners */
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
width: 100% !important;
|
||||
height: 100vh !important;
|
||||
min-height: 100vh !important;
|
||||
min-height: 100% !important;
|
||||
margin: 0 !important;
|
||||
padding: 0 !important;
|
||||
}
|
||||
@@ -75,10 +81,10 @@
|
||||
.mymach_zara_content {
|
||||
position: relative;
|
||||
z-index: 2;
|
||||
padding: 35px;
|
||||
padding: 15px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 25px;
|
||||
gap: 10px;
|
||||
}
|
||||
|
||||
.mymach_zara_title {
|
||||
@@ -87,7 +93,7 @@
|
||||
letter-spacing: 4px;
|
||||
text-transform: uppercase;
|
||||
color: #ffffff !important;
|
||||
font-size: 26px !important;
|
||||
font-size: 20px !important;
|
||||
margin: 0;
|
||||
text-shadow: 0 2px 10px rgba(0,0,0,0.5);
|
||||
}
|
||||
@@ -112,10 +118,10 @@
|
||||
color: #0f172a !important;
|
||||
font-family: 'Outfit', sans-serif;
|
||||
font-weight: 800 !important;
|
||||
font-size: 12px !important;
|
||||
font-size: 11px !important;
|
||||
letter-spacing: 1px;
|
||||
text-transform: uppercase;
|
||||
padding: 22px 12px !important;
|
||||
padding: 12px 6px !important;
|
||||
box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2) !important;
|
||||
transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1) !important;
|
||||
display: inline-block;
|
||||
@@ -133,8 +139,8 @@
|
||||
|
||||
.mymach_zara_btn i {
|
||||
color: #0f172a !important;
|
||||
font-size: 20px;
|
||||
margin-bottom: 6px;
|
||||
font-size: 16px;
|
||||
margin-bottom: 4px;
|
||||
transition: transform 0.3s ease;
|
||||
}
|
||||
|
||||
@@ -160,8 +166,8 @@
|
||||
font-weight: 700;
|
||||
color: #ffffff;
|
||||
border-bottom: 1px solid rgba(255, 255, 255, 0.2);
|
||||
padding-bottom: 6px;
|
||||
margin-bottom: 15px;
|
||||
padding-bottom: 4px;
|
||||
margin-bottom: 10px;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 2px;
|
||||
}
|
||||
|
||||
@@ -75,30 +75,30 @@ action = {
|
||||
</div>
|
||||
|
||||
<!-- Grup 1: Temel Operasyonlar -->
|
||||
<div style="margin-top: 10px;">
|
||||
<div style="margin-top: 8px;">
|
||||
<h3 class="mymach_zara_group_title" style="color: #38bdf8; border-color: rgba(56, 189, 248, 0.25);">Temel Operasyonlar</h3>
|
||||
<div class="row text-center">
|
||||
<div class="col-md-3 mb-3">
|
||||
<div class="col-md mb-2">
|
||||
<button name="%(fleet.fleet_vehicle_action)d" type="action" class="btn mymach_zara_btn" style="width: 100%;" groups="mymach_fleet_intelligence.group_mymach_fleet_manager">
|
||||
<i class="fa fa-car mb-2"></i><br/> Akıllı Araç Yönetimi
|
||||
</button>
|
||||
</div>
|
||||
<div class="col-md-3 mb-3">
|
||||
<div class="col-md mb-2">
|
||||
<button name="%(mymach_fleet_intelligence.action_mymach_fleet_reservation)d" type="action" class="btn mymach_zara_btn" style="width: 100%;">
|
||||
<i class="fa fa-calendar-check-o mb-2"></i><br/> Araç Talebi & Randevu
|
||||
</button>
|
||||
</div>
|
||||
<div class="col-md-3 mb-3">
|
||||
<div class="col-md mb-2">
|
||||
<button name="%(mymach_fleet_intelligence.action_mymach_fleet_handover)d" type="action" class="btn mymach_zara_btn" style="width: 100%;">
|
||||
<i class="fa fa-key mb-2"></i><br/> Araç Teslim & İade
|
||||
</button>
|
||||
</div>
|
||||
<div class="col-md-3 mb-3">
|
||||
<div class="col-md mb-2">
|
||||
<button name="%(mymach_fleet_intelligence.action_mymach_fleet_periodic_maintenance)d" type="action" class="btn mymach_zara_btn" style="width: 100%;">
|
||||
<i class="fa fa-wrench mb-2"></i><br/> Periyodik Bakım Takibi
|
||||
</button>
|
||||
</div>
|
||||
<div class="col-md-3 mb-3">
|
||||
<div class="col-md mb-2">
|
||||
<button name="%(hr.open_view_employee_list_my)d" type="action" class="btn mymach_zara_btn" style="width: 100%;" groups="mymach_fleet_intelligence.group_mymach_fleet_manager">
|
||||
<i class="fa fa-users mb-2"></i><br/> Personel Kartları
|
||||
</button>
|
||||
@@ -107,25 +107,25 @@ action = {
|
||||
</div>
|
||||
|
||||
<!-- Grup Sürücü: Sürücü Hızlı İşlemler (Sadece sürücülere görünür veya herkese) -->
|
||||
<div style="margin-top: 15px;" groups="base.group_user">
|
||||
<div style="margin-top: 8px;" groups="base.group_user">
|
||||
<h3 class="mymach_zara_group_title" style="color: #fbbf24; border-color: rgba(251, 191, 36, 0.25);">Sürücü Hızlı İşlemler</h3>
|
||||
<div class="row text-center">
|
||||
<div class="col-md-3 mb-3">
|
||||
<div class="col-md mb-2">
|
||||
<button name="%(mymach_fleet_intelligence.action_mymach_fleet_contract)d" type="action" class="btn mymach_zara_btn" style="width: 100%;">
|
||||
<i class="fa fa-file-text-o mb-2"></i><br/> Tahsis Sözleşmem
|
||||
</button>
|
||||
</div>
|
||||
<div class="col-md-3 mb-3">
|
||||
<div class="col-md mb-2">
|
||||
<button name="%(fleet.fleet_vehicle_log_services_action)d" type="action" class="btn mymach_zara_btn" style="width: 100%;">
|
||||
<i class="fa fa-wrench mb-2"></i><br/> Yakıt & Servis Fişi Ekle
|
||||
</button>
|
||||
</div>
|
||||
<div class="col-md-3 mb-3">
|
||||
<div class="col-md mb-2">
|
||||
<button name="%(mymach_fleet_intelligence.action_mymach_fleet_fine)d" type="action" class="btn mymach_zara_btn" style="width: 100%;">
|
||||
<i class="fa fa-ticket mb-2"></i><br/> Trafik Cezalarım
|
||||
</button>
|
||||
</div>
|
||||
<div class="col-md-3 mb-3">
|
||||
<div class="col-md mb-2">
|
||||
<button name="%(mymach_fleet_intelligence.action_driver_route_exceptions)d" type="action" class="btn mymach_zara_btn mymach_zara_btn_warning" style="width: 100%; border-color: #ef4444; color: #ef4444;">
|
||||
<i class="fa fa-bell-o mb-2"></i><br/> Bekleyen Rota Uyarılarım
|
||||
</button>
|
||||
@@ -134,25 +134,25 @@ action = {
|
||||
</div>
|
||||
|
||||
<!-- Grup 2: Güvenlik & Rota Uyum Motoru -->
|
||||
<div style="margin-top: 15px;" groups="mymach_fleet_intelligence.group_mymach_fleet_manager">
|
||||
<div style="margin-top: 8px;" groups="mymach_fleet_intelligence.group_mymach_fleet_manager">
|
||||
<h3 class="mymach_zara_group_title" style="color: #f43f5e; border-color: rgba(244, 63, 94, 0.25);">Güvenlik & Rota Uyum Motoru</h3>
|
||||
<div class="row text-center">
|
||||
<div class="col-md-3 mb-3">
|
||||
<div class="col-md mb-2">
|
||||
<button name="%(mymach_fleet_intelligence.action_mymach_fleet_contract)d" type="action" class="btn mymach_zara_btn" style="width: 100%;">
|
||||
<i class="fa fa-file-text-o mb-2"></i><br/> Tahsis Sözleşmeleri
|
||||
</button>
|
||||
</div>
|
||||
<div class="col-md-3 mb-3">
|
||||
<div class="col-md mb-2">
|
||||
<button name="%(mymach_fleet_intelligence.action_mymach_fleet_fine)d" type="action" class="btn mymach_zara_btn" style="width: 100%;">
|
||||
<i class="fa fa-exclamation-triangle mb-2"></i><br/> Giderler & Cezalar
|
||||
</button>
|
||||
</div>
|
||||
<div class="col-md-3 mb-3">
|
||||
<div class="col-md mb-2">
|
||||
<button name="%(mymach_fleet_intelligence.action_mymach_fleet_security_log)d" type="action" class="btn mymach_zara_btn" style="width: 100%;" groups="mymach_fleet_intelligence.group_mymach_fleet_manager">
|
||||
<i class="fa fa-shield mb-2"></i><br/> Güvenlik İhlal Logları
|
||||
</button>
|
||||
</div>
|
||||
<div class="col-md-3 mb-3">
|
||||
<div class="col-md mb-2">
|
||||
<button name="%(mymach_fleet_intelligence.action_mymach_fleet_unresolved_exceptions)d" type="action" class="btn mymach_zara_btn mymach_zara_btn_warning" style="width: 100%;" groups="mymach_fleet_intelligence.group_mymach_fleet_manager">
|
||||
<i class="fa fa-gavel mb-2"></i><br/> Çözüm Bekleyen Rotalar
|
||||
</button>
|
||||
@@ -161,25 +161,25 @@ action = {
|
||||
</div>
|
||||
|
||||
<!-- Grup 3: Analitik Paneller & Gider Yönetimi -->
|
||||
<div style="margin-top: 15px;" groups="mymach_fleet_intelligence.group_mymach_fleet_manager">
|
||||
<div style="margin-top: 8px;" groups="mymach_fleet_intelligence.group_mymach_fleet_manager">
|
||||
<h3 class="mymach_zara_group_title" style="color: #10b981; border-color: rgba(16, 185, 129, 0.25);">Analitik Paneller & Gider Yönetimi</h3>
|
||||
<div class="row text-center">
|
||||
<div class="col-md-3 mb-3">
|
||||
<div class="col-md mb-2">
|
||||
<button name="%(mymach_fleet_intelligence.action_mymach_fleet_dashboard_client)d" type="action" class="btn mymach_zara_btn" style="width: 100%;">
|
||||
<i class="fa fa-map-o mb-2"></i><br/> Canlı Harita
|
||||
</button>
|
||||
</div>
|
||||
<div class="col-md-3 mb-3">
|
||||
<div class="col-md mb-2">
|
||||
<button name="%(mymach_fleet_intelligence.action_mymach_fleet_maintenance_cost)d" type="action" class="btn mymach_zara_btn" style="width: 100%;">
|
||||
<i class="fa fa-money mb-2"></i><br/> Akaryakıt Giderleri
|
||||
</button>
|
||||
</div>
|
||||
<div class="col-md-3 mb-3">
|
||||
<div class="col-md mb-2">
|
||||
<button name="%(mymach_fleet_intelligence.action_mymach_fleet_home_chart_server)d" type="action" class="btn mymach_zara_btn" style="width: 100%;">
|
||||
<i class="fa fa-line-chart mb-2"></i><br/> Kilometre & Yakıt Grafiği
|
||||
</button>
|
||||
</div>
|
||||
<div class="col-md-3 mb-3">
|
||||
<div class="col-md mb-2">
|
||||
<button name="%(mymach_fleet_intelligence.action_fuel_index)d" type="action" class="btn mymach_zara_btn" style="width: 100%;">
|
||||
<i class="fa fa-percent mb-2"></i><br/> Akaryakıt Endeksi & Enflasyon
|
||||
</button>
|
||||
@@ -242,13 +242,13 @@ action = {
|
||||
<!-- Floating Content Wrapper -->
|
||||
<div class="mymach_zara_content">
|
||||
<!-- Zara-Style Minimalist Editorial Header -->
|
||||
<div style="text-align: center; margin-bottom: 20px; border-bottom: 1px solid rgba(255,255,255,0.08); padding-bottom: 20px;">
|
||||
<div style="text-align: center; margin-bottom: 10px; border-bottom: 1px solid rgba(255,255,255,0.08); padding-bottom: 20px;">
|
||||
<h1 class="mymach_zara_title">KİLOMETRE & YAKIT ANALİZİ</h1>
|
||||
<p class="mymach_zara_subtitle" style="color: #cbd5e1 !important; text-align: center; display: block; width: 100%;">FİLO KİLOMETRE GELİŞİMİ VE YAKIT TÜKETİM ANALİTİKLERİ</p>
|
||||
</div>
|
||||
|
||||
<!-- İnteraktif Yakıt & KM Grafiği ve Seçiciler -->
|
||||
<div style="background: rgba(15, 23, 42, 0.4); border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 12px; padding: 20px;">
|
||||
<div style="background: rgba(15, 23, 42, 0.4); border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 12px; padding: 15px;">
|
||||
<div class="row">
|
||||
<div class="col-md-4 mb-3">
|
||||
<label for="selected_vehicle_id" style="color: #cbd5e1; font-weight: 500; margin-bottom: 5px; display: block;">Analiz Edilecek Araç:</label>
|
||||
@@ -263,35 +263,35 @@ action = {
|
||||
<field name="chart_metric" widget="radio" options="{'horizontal': true}" style="color: white !important;"/>
|
||||
</div>
|
||||
</div>
|
||||
<div style="margin-top: 15px;">
|
||||
<div style="margin-top: 8px;">
|
||||
<field name="chart_html" readonly="1"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Otonom Rota Planlama & Sapma Denetimi Bölümü -->
|
||||
<div style="margin-top: 20px; background: rgba(15, 23, 42, 0.4); border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 12px; padding: 20px;" groups="mymach_fleet_intelligence.group_mymach_fleet_manager">
|
||||
<h3 style="color: #38bdf8; font-size: 15px; font-weight: 600; margin-top: 0; margin-bottom: 15px; display: flex; align-items: center; gap: 8px;">
|
||||
<div style="margin-top: 12px; background: rgba(15, 23, 42, 0.4); border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 12px; padding: 15px;" groups="mymach_fleet_intelligence.group_mymach_fleet_manager">
|
||||
<h3 style="color: #38bdf8; font-size: 15px; font-weight: 600; margin-top: 0; margin-bottom: 8px; display: flex; align-items: center; gap: 8px;">
|
||||
🗺️ OTONOM ROTA PLANLAMA VE SAPMA DENETİMİ (1 KM TOLERANS)
|
||||
</h3>
|
||||
<div class="row">
|
||||
<div class="col-md-3 mb-3">
|
||||
<div class="col-md mb-2">
|
||||
<label for="route_destination" style="color: #cbd5e1; font-weight: 500; margin-bottom: 5px; display: block;">Hedef Konum:</label>
|
||||
<field name="route_destination" style="background: rgba(15, 23, 42, 0.6) !important; color: white !important; border: 1px solid rgba(255, 255, 255, 0.15) !important; border-radius: 6px; padding: 6px; width: 100%; display: block;"/>
|
||||
</div>
|
||||
<div class="col-md-3 mb-3">
|
||||
<div class="col-md mb-2">
|
||||
<label for="route_selected" style="color: #cbd5e1; font-weight: 500; margin-bottom: 5px; display: block;">Planlanan Rota:</label>
|
||||
<field name="route_selected" style="background: rgba(15, 23, 42, 0.6) !important; color: white !important; border: 1px solid rgba(255, 255, 255, 0.15) !important; border-radius: 6px; padding: 6px; width: 100%; display: block;"/>
|
||||
</div>
|
||||
<div class="col-md-3 mb-3">
|
||||
<div class="col-md mb-2">
|
||||
<label for="route_simulated_distance" style="color: #cbd5e1; font-weight: 500; margin-bottom: 5px; display: block;">Simüle Yolculuk (KM):</label>
|
||||
<field name="route_simulated_distance" style="background: rgba(15, 23, 42, 0.6) !important; color: white !important; border: 1px solid rgba(255, 255, 255, 0.15) !important; border-radius: 6px; padding: 6px; width: 100%; display: block;"/>
|
||||
</div>
|
||||
<div class="col-md-3 mb-3" style="display: flex; align-items: flex-end; gap: 10px;">
|
||||
<div class="col-md mb-2" style="display: flex; align-items: flex-end; gap: 10px;">
|
||||
<button name="action_calculate_routes" string="Rotaları Hesapla" type="object" class="btn btn-secondary" style="width: 100%; background: #1e293b; color: white; border: 1px solid rgba(255,255,255,0.1); font-weight: bold;"/>
|
||||
<button name="action_simulate_route_drive" string="Sürüşü Simüle Et" type="object" class="btn btn-primary" style="width: 100%; background: #3b82f6; color: white; border: none; font-weight: bold;"/>
|
||||
</div>
|
||||
</div>
|
||||
<div style="margin-top: 15px;">
|
||||
<div style="margin-top: 8px;">
|
||||
<field name="route_results_html" readonly="1"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user