-
Notifications
You must be signed in to change notification settings - Fork 462
Description
Context
I'm working on a Spanish e-commerce site using Lunar with the table-rate-shipping plugin. I've successfully translated most of the admin panel to Spanish, but I've encountered an issue where one specific navigation label cannot be translated.
What I'm Trying to Do
I need to translate the "Edit Shipping Zone" text that appears in the sub-navigation menu when editing a shipping zone. I've already successfully translated all other navigation items using the standard Laravel translation files in lang/vendor/lunarpanel.shipping/es/.
The Problem
The EditShippingZone page class doesn't implement a getNavigationLabel() method, unlike its sibling pages. This causes Filament to auto-generate the label from the class name ("Edit Shipping Zone"), making translation impossible.
What I've Checked
- Reviewed the documentation for translation support
- Checked existing issues for similar problems
- Verified that other pages in the same module work correctly
- Confirmed the issue exists in the latest version
- Attempted workarounds (extending classes, translation overrides)
Steps to Reproduce
- Install Lunar with table-rate-shipping plugin
- Set application locale to any non-English language (e.g.,
'locale' => 'es') - Add translations in
lang/vendor/lunarpanel.shipping/es/ - Navigate to
/admin/shipping-zones/{id}/rates - Observe the sub-navigation menu
Current Result:
- "Edit Shipping Zone" (Not translated - hardcoded from class name)
- "Tarifas de envío" (Correctly translated)
- "Exclusiones de envío" (Correctly translated)
Expected Result:
All three navigation items should be translated.
Technical Details
Affected File
src/Filament/Resources/ShippingZoneResource/Pages/EditShippingZone.php
Working Example (from same package)
ManageShippingRates.php correctly implements translation:
public static function getNavigationLabel(): string
{
return __('lunarpanel.shipping::relationmanagers.shipping_rates.title_plural');
}Proposed Solution
Add the same pattern to EditShippingZone.php:
public static function getNavigationLabel(): string
{
return __('lunarpanel.shipping::shippingzone.pages.edit.label');
}Environment
- Laravel: 11.46.1
- Lunar: Latest version
- Lunar Table Rate Shipping: Latest version
- PHP: 8.2+
- Filament: v3
Why This Matters
This inconsistency prevents full localization of the admin panel for non-English users. In my case, it's the only English text remaining in an otherwise fully Spanish interface, which creates a poor user experience for my Spanish-speaking admin users.
Additional Notes
I'm happy to submit a PR with the fix if you agree with the proposed solution. The change would be minimal and follow the existing pattern used by other pages in the same module. [I did it yet, see below]
Metadata
Metadata
Assignees
Labels
Type
Projects
Status