Feat: Updating entrypoint and missing lunar translations!

This commit is contained in:
2026-09-29 00:03:37 +03:00
parent 25021bdafb
commit 70787ace44
5 changed files with 52 additions and 20 deletions
+3
View File
@@ -87,6 +87,9 @@ php artisan db:seed --class="Modules\Core\Localization\Database\Seeders\Validati
echo "[entrypoint] Seeding checkout translations..."
php artisan db:seed --class="Modules\Core\Checkout\Database\Seeders\CheckoutTranslationsSeeder" --force --quiet || true
echo "[entrypoint] Seeding storefront translations..."
php artisan db:seed --class="Modules\Core\Localization\Database\Seeders\StorefrontTranslationsSeeder" --force --quiet || true
# Upserts by primary key (no --refresh), so this stays cheap and idempotent on
# every boot rather than flushing and rebuilding the whole index each time. Runs
# in production too — a deploy that changed an indexer's field list needs this
+18
View File
@@ -0,0 +1,18 @@
<?php
/**
* lunarphp/table-rate-shipping v1.5.0 ships no Greek translations for this
* namespace at all (only 'en' and a handful of other locales — no 'el'
* directory exists in the package), so this override is the only source
* for these keys in Greek, not a merge over an existing package file.
* ManageShippingRates.php:58 calls the 'prices_inc_tax' key specifically
* (missing the 'l' the package's own English file uses — see the 'en'
* override's docblock), so that's the one included here.
*/
return [
'shipping_rates' => [
'notices' => [
'prices_inc_tax' => 'Όλες οι τιμές περιλαμβάνουν ΦΠΑ, το οποίο θα ληφθεί υπόψη στον υπολογισμό της ελάχιστης αξίας παραγγελίας.',
],
],
];
+19
View File
@@ -0,0 +1,19 @@
<?php
/**
* Override for lunarphp/table-rate-shipping v1.5.0's own relationmanagers.php
* (vendor/lunarphp/table-rate-shipping/resources/lang/en/relationmanagers.php)
* — that file defines 'prices_incl_tax', but ManageShippingRates.php:58 calls
* __('lunarpanel.shipping::relationmanagers.shipping_rates.notices.prices_inc_tax')
* (missing the 'l'), so the key is genuinely never found. Merged over the
* package's own file (array_replace_recursive, see Illuminate\Translation\
* FileLoader::loadNamespaceOverrides()), so only the broken key needs
* restating here — everything else in that file still applies.
*/
return [
'shipping_rates' => [
'notices' => [
'prices_inc_tax' => 'All prices include tax, which will be considered when calculating minimum spend.',
],
],
];
@@ -1,17 +1,14 @@
{{--
Order confirmation (boboko-core's OrderPlacedNotification).
Core only passes $reference, $total and $lines, so the order itself is
reached through a line (every OrderLine belongs to it). Interim until core
passes the Order to this view.
Sent from the queue with no locale of its own, so it always renders in the
app default (Greek). Copy is Greek on purpose, like the other core emails.
Copy is hardcoded Greek regardless of the order's own saved locale
(Order.meta['locale'], set at checkout) — the notification is still sent
with ->locale() so subject/wrapper text picks it up, but this view's own
prose isn't translated per-locale yet.
--}}
@extends('emails.layout')
@php
$order = $lines->first()->order;
$productLines = $lines->where('type', '!=', 'shipping');
$shippingLine = $lines->firstWhere('type', 'shipping');
@@ -21,15 +18,18 @@
->first()
?->translate('name');
// Lunar doesn't copy the coupon onto the order; the cart row keeps it.
$couponCode = $order->cart?->coupon_code;
// Copied onto Order.meta at checkout (CheckoutService::initiatePayment()),
// rather than read from the cart row — the cart may since have been
// cleared/reused, but the order's own record of what coupon it was
// placed with must stay fixed.
$couponCode = $order->meta['coupon_code'] ?? null;
$email = $order->billingAddress?->contact_email ?? $order->shippingAddress?->contact_email;
$comments = $order->shippingAddress?->delivery_instructions;
// Sanitized HTML from Store Details, only for bank transfer orders.
$bankTransferInstructions = app(\Modules\Core\Store\Services\StoreDetailsService::class)
->bankTransferInstructionsFor($order, 'el');
->bankTransferInstructionsFor($order, $order->meta['locale'] ?? 'el');
$muted = 'color:#5c5c5c;font-size:14px;';
$font = "font-family:'Manrope',Arial,Helvetica,sans-serif;";
@@ -1,14 +1,6 @@
{{-- Core passes only the order reference here (and the amount for payment emails). Greek on purpose: sent from the queue in the app default locale. --}}
{{-- Greek on purpose: sent from the queue in the app default locale. --}}
@extends('emails.layout')
@php
// Core passes Lunar's English label; map it back to the status key so the
// shared <x-order-status> can show the translated one. Interim, until core
// passes the order (or its status) to this view.
$status = collect(config('lunar.orders.statuses'))
->search(fn (array $config) => $config['label'] === $statusLabel) ?: $statusLabel;
@endphp
@section('title', "Ενημέρωση παραγγελίας")
@section('preheader', "Η παραγγελία σου #{$reference} ενημερώθηκε.")
@@ -18,7 +10,7 @@
Η παραγγελία σου ενημερώθηκε
</h1>
<p style="margin:0 0 32px;">Η κατάσταση της παραγγελίας σου <strong>#{{ $reference }}</strong> είναι τώρα: <strong><x-order-status :status="$status" /></strong></p>
<p style="margin:0 0 32px;">Η κατάσταση της παραγγελίας σου <strong>#{{ $reference }}</strong> είναι τώρα: <strong><x-order-status :status="$order->status" /></strong></p>
@include('emails.partials.button', [
'url' => route('account.orders', ['locale' => 'el']),