Skip to content

Commit 1f5b369

Browse files
authored
Merge pull request #1337 from mollie/PIPRES-633/hr-lt-translations
PIPRES-633 - PIPRES-631: add Croatian and Lithuanian translations
2 parents 19bba58 + 1509fa0 commit 1f5b369

23 files changed

Lines changed: 5682 additions & 4218 deletions

File tree

controllers/admin/AdminMollieAdvancedSettingsController.php

Lines changed: 73 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ private function getTranslations(): array
9292
{
9393
return [
9494
'advancedSettings' => $this->module->l('Advanced Settings', self::FILE_NAME),
95+
'subtitle' => $this->module->l('Manage your order settings, visual representation and error logging', self::FILE_NAME),
9596
'orderSettings' => $this->module->l('Order Settings', self::FILE_NAME),
9697
'shippingSettings' => $this->module->l('Shipping Settings', self::FILE_NAME),
9798
'errorDebugging' => $this->module->l('Error Debugging', self::FILE_NAME),
@@ -108,6 +109,46 @@ private function getTranslations(): array
108109
'cssPath' => $this->module->l('CSS file', self::FILE_NAME),
109110
'saveSuccess' => $this->module->l('Settings saved successfully', self::FILE_NAME),
110111
'saveError' => $this->module->l('Failed to save settings', self::FILE_NAME),
112+
'apiNotConfigured' => $this->module->l('API not configured', self::FILE_NAME),
113+
'apiNotConfiguredMessage' => $this->module->l('Please configure your Mollie API keys in the API Configuration tab before accessing advanced settings.', self::FILE_NAME),
114+
'selectOption' => $this->module->l('Select option', self::FILE_NAME),
115+
'selectStatuses' => $this->module->l('Select statuses', self::FILE_NAME),
116+
'enabled' => $this->module->l('Enabled', self::FILE_NAME),
117+
'disabled' => $this->module->l('Disabled', self::FILE_NAME),
118+
'invoiceDefaultExplanation' => $this->module->l('Default: The invoice is created based on Order settings > Statuses. There is no custom status created.', self::FILE_NAME),
119+
'invoiceAuthorizedExplanation' => $this->module->l('Authorized: Create a full invoice when the order is authorized. Custom status is created.', self::FILE_NAME),
120+
'invoiceShipmentExplanation' => $this->module->l('On Shipment: Create a full invoice when the order is shipped. Custom status is created.', self::FILE_NAME),
121+
'autoShipLabel' => $this->module->l('Automatically Ship on Marked Statuses', self::FILE_NAME),
122+
'autoShipDescription' => $this->module->l('Enable automatic shipping for selected statuses', self::FILE_NAME),
123+
'autoShipStatusesLabel' => $this->module->l('Automatically ship when one of these statuses is reached', self::FILE_NAME),
124+
'sendShipmentInfo' => $this->module->l('Send shipment information to Mollie', self::FILE_NAME),
125+
'shipmentConfigInfo' => $this->module->l('Configure the shipment information to send to Mollie.', self::FILE_NAME),
126+
'carrierVariablesInfo' => $this->module->l('You can use the following variables for the carrier URLs:', self::FILE_NAME),
127+
'shippingNumber' => $this->module->l('Shipping number', self::FILE_NAME),
128+
'trackingCode' => $this->module->l('Tracking code', self::FILE_NAME),
129+
'billingPostcode' => $this->module->l('Billing postcode', self::FILE_NAME),
130+
'shippingCountryCode' => $this->module->l('Shipping country code', self::FILE_NAME),
131+
'shippingPostcode' => $this->module->l('Shipping postcode', self::FILE_NAME),
132+
'languageCode' => $this->module->l('2-letter language code', self::FILE_NAME),
133+
'doNotAutoShip' => $this->module->l('Do not automatically ship', self::FILE_NAME),
134+
'noTrackingInfo' => $this->module->l('No tracking information', self::FILE_NAME),
135+
'carrierUrl' => $this->module->l('Carrier URL', self::FILE_NAME),
136+
'customUrl' => $this->module->l('Custom URL', self::FILE_NAME),
137+
'module' => $this->module->l('Module', self::FILE_NAME),
138+
'debugModeLabel' => $this->module->l('Debug Mode', self::FILE_NAME),
139+
'debugModeDescription' => $this->module->l('Enable detailed error logging', self::FILE_NAME),
140+
'logLevelLabel' => $this->module->l('Log Level', self::FILE_NAME),
141+
'checkoutPreview' => $this->module->l('Checkout preview:', self::FILE_NAME),
142+
'customCssPath' => $this->module->l('Custom CSS File Path', self::FILE_NAME),
143+
'statusMappingInfo' => $this->module->l('From the dropdown select a PrestaShop order status that will be set when the respective Mollie payment status is triggered.', self::FILE_NAME),
144+
'molliePaymentStatus' => $this->module->l('Mollie Payment Status', self::FILE_NAME),
145+
'prestashopOrderStatus' => $this->module->l('PrestaShop order status', self::FILE_NAME),
146+
'selectStatus' => $this->module->l('Select status', self::FILE_NAME),
147+
'emailStatusInfo' => $this->module->l('If enabled, customers will receive an email when the order status changes', self::FILE_NAME),
148+
'sendEmailOnStatus' => $this->module->l('Send email on status', self::FILE_NAME),
149+
'saving' => $this->module->l('Saving...', self::FILE_NAME),
150+
'saveSettings' => $this->module->l('Save Settings', self::FILE_NAME),
151+
'loadError' => $this->module->l('Failed to load settings', self::FILE_NAME),
111152
];
112153
}
113154

@@ -320,16 +361,16 @@ private function getStatusMappings(): array
320361
$statuses = [];
321362

322363
$statusKeys = [
323-
Config::MOLLIE_STATUS_AWAITING => 'Awaiting',
324-
Config::MOLLIE_STATUS_OPEN => 'Open',
325-
Config::MOLLIE_STATUS_PAID => 'Paid',
326-
Config::MOLLIE_STATUS_COMPLETED => 'Completed',
327-
Config::MOLLIE_STATUS_CANCELED => 'Canceled',
328-
Config::MOLLIE_STATUS_EXPIRED => 'Expired',
329-
Config::MOLLIE_STATUS_REFUNDED => 'Refunded',
330-
Config::MOLLIE_STATUS_PARTIAL_REFUND => 'Partially refunded',
331-
Config::MOLLIE_STATUS_SHIPPING => 'Shipping',
332-
Config::MOLLIE_STATUS_CHARGEBACK => 'Chargeback',
364+
Config::MOLLIE_STATUS_AWAITING => $this->module->l('Awaiting', self::FILE_NAME),
365+
Config::MOLLIE_STATUS_OPEN => $this->module->l('Open', self::FILE_NAME),
366+
Config::MOLLIE_STATUS_PAID => $this->module->l('Paid', self::FILE_NAME),
367+
Config::MOLLIE_STATUS_COMPLETED => $this->module->l('Completed', self::FILE_NAME),
368+
Config::MOLLIE_STATUS_CANCELED => $this->module->l('Canceled', self::FILE_NAME),
369+
Config::MOLLIE_STATUS_EXPIRED => $this->module->l('Expired', self::FILE_NAME),
370+
Config::MOLLIE_STATUS_REFUNDED => $this->module->l('Refunded', self::FILE_NAME),
371+
Config::MOLLIE_STATUS_PARTIAL_REFUND => $this->module->l('Partially refunded', self::FILE_NAME),
372+
Config::MOLLIE_STATUS_SHIPPING => $this->module->l('Shipping', self::FILE_NAME),
373+
Config::MOLLIE_STATUS_CHARGEBACK => $this->module->l('Chargeback', self::FILE_NAME),
333374
];
334375

335376
foreach ($statusKeys as $key => $name) {
@@ -356,14 +397,14 @@ private function saveStatusMappings(array $mappings): void
356397
private function getEmailStatuses(): array
357398
{
358399
$emailKeys = [
359-
Config::MOLLIE_MAIL_WHEN_PAID => 'Paid',
360-
Config::MOLLIE_MAIL_WHEN_COMPLETED => 'Completed',
361-
Config::MOLLIE_MAIL_WHEN_CANCELED => 'Canceled',
362-
Config::MOLLIE_MAIL_WHEN_EXPIRED => 'Expired',
363-
Config::MOLLIE_MAIL_WHEN_REFUNDED => 'Refunded',
364-
Config::MOLLIE_MAIL_WHEN_CHARGEBACK => 'Chargeback',
365-
Config::MOLLIE_MAIL_WHEN_FAILED => 'Failed',
366-
Config::MOLLIE_MAIL_WHEN_SHIPPING => 'Shipping',
400+
Config::MOLLIE_MAIL_WHEN_PAID => $this->module->l('Paid', self::FILE_NAME),
401+
Config::MOLLIE_MAIL_WHEN_COMPLETED => $this->module->l('Completed', self::FILE_NAME),
402+
Config::MOLLIE_MAIL_WHEN_CANCELED => $this->module->l('Canceled', self::FILE_NAME),
403+
Config::MOLLIE_MAIL_WHEN_EXPIRED => $this->module->l('Expired', self::FILE_NAME),
404+
Config::MOLLIE_MAIL_WHEN_REFUNDED => $this->module->l('Refunded', self::FILE_NAME),
405+
Config::MOLLIE_MAIL_WHEN_CHARGEBACK => $this->module->l('Chargeback', self::FILE_NAME),
406+
Config::MOLLIE_MAIL_WHEN_FAILED => $this->module->l('Failed', self::FILE_NAME),
407+
Config::MOLLIE_MAIL_WHEN_SHIPPING => $this->module->l('Shipping', self::FILE_NAME),
367408
];
368409

369410
$statuses = [];
@@ -389,7 +430,7 @@ private function saveEmailStatuses(array $statuses): void
389430

390431
private function getOrderStatuses(): array
391432
{
392-
$orderStatuses = OrderState::getOrderStates($this->language->getDefaultLanguageId());
433+
$orderStatuses = OrderState::getOrderStates($this->context->language->id);
393434
$result = [];
394435

395436
foreach ($orderStatuses as $status) {
@@ -405,43 +446,43 @@ private function getOrderStatuses(): array
405446
private function getInvoiceOptions(): array
406447
{
407448
return [
408-
['id' => (string) Config::MOLLIE_AUTHORIZABLE_PAYMENT_STATUS_DEFAULT, 'name' => 'Default'],
409-
['id' => (string) Config::MOLLIE_AUTHORIZABLE_PAYMENT_STATUS_AUTHORIZED, 'name' => 'Authorized'],
410-
['id' => (string) Config::MOLLIE_AUTHORIZABLE_PAYMENT_STATUS_SHIPPED, 'name' => 'On Shipment'],
449+
['id' => (string) Config::MOLLIE_AUTHORIZABLE_PAYMENT_STATUS_DEFAULT, 'name' => $this->module->l('Default', self::FILE_NAME)],
450+
['id' => (string) Config::MOLLIE_AUTHORIZABLE_PAYMENT_STATUS_AUTHORIZED, 'name' => $this->module->l('Authorized', self::FILE_NAME)],
451+
['id' => (string) Config::MOLLIE_AUTHORIZABLE_PAYMENT_STATUS_SHIPPED, 'name' => $this->module->l('On Shipment', self::FILE_NAME)],
411452
];
412453
}
413454

414455
private function getConfirmationEmailOptions(): array
415456
{
416457
return [
417-
['id' => (string) Config::ORDER_CONF_MAIL_SEND_ON_PAID, 'name' => 'When the order is paid'],
418-
['id' => (string) Config::ORDER_CONF_MAIL_SEND_ON_NEVER, 'name' => 'Never'],
458+
['id' => (string) Config::ORDER_CONF_MAIL_SEND_ON_PAID, 'name' => $this->module->l('When the order is paid', self::FILE_NAME)],
459+
['id' => (string) Config::ORDER_CONF_MAIL_SEND_ON_NEVER, 'name' => $this->module->l('Never', self::FILE_NAME)],
419460
];
420461
}
421462

422463
private function getLogLevelOptions(): array
423464
{
424465
return [
425-
['id' => (string) Config::DEBUG_LOG_NONE, 'name' => 'Nothing'],
426-
['id' => (string) Config::DEBUG_LOG_ERRORS, 'name' => 'Errors'],
427-
['id' => (string) Config::DEBUG_LOG_ALL, 'name' => 'Everything'],
466+
['id' => (string) Config::DEBUG_LOG_NONE, 'name' => $this->module->l('Nothing', self::FILE_NAME)],
467+
['id' => (string) Config::DEBUG_LOG_ERRORS, 'name' => $this->module->l('Errors', self::FILE_NAME)],
468+
['id' => (string) Config::DEBUG_LOG_ALL, 'name' => $this->module->l('Everything', self::FILE_NAME)],
428469
];
429470
}
430471

431472
private function getLogoDisplayOptions(): array
432473
{
433474
return [
434-
['id' => (string) Config::LOGOS_HIDE, 'name' => 'Hide'],
435-
['id' => (string) Config::LOGOS_NORMAL, 'name' => 'Normal'],
436-
['id' => (string) Config::LOGOS_BIG, 'name' => 'Big'],
475+
['id' => (string) Config::LOGOS_HIDE, 'name' => $this->module->l('Hide', self::FILE_NAME)],
476+
['id' => (string) Config::LOGOS_NORMAL, 'name' => $this->module->l('Normal', self::FILE_NAME)],
477+
['id' => (string) Config::LOGOS_BIG, 'name' => $this->module->l('Big', self::FILE_NAME)],
437478
];
438479
}
439480

440481
private function getTranslateMollieOptions(): array
441482
{
442483
return [
443-
['id' => (string) Config::PAYMENTSCREEN_LOCALE_BROWSER_LOCALE, 'name' => 'Use browser locale'],
444-
['id' => (string) Config::PAYMENTSCREEN_LOCALE_SEND_WEBSITE_LOCALE, 'name' => 'Use webshop locale'],
484+
['id' => (string) Config::PAYMENTSCREEN_LOCALE_BROWSER_LOCALE, 'name' => $this->module->l('Use browser locale', self::FILE_NAME)],
485+
['id' => (string) Config::PAYMENTSCREEN_LOCALE_SEND_WEBSITE_LOCALE, 'name' => $this->module->l('Use webshop locale', self::FILE_NAME)],
445486
];
446487
}
447488
}

controllers/admin/AdminMolliePaymentMethodsController.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,11 @@ public function init(): void
242242
'voucherCategoryAll' => $this->module->l('All', self::FILE_NAME),
243243
'voucherCategoryHelp' => $this->module->l('Select a category to use for all products in your webshop.', self::FILE_NAME),
244244
'klarnaNotice' => $this->module->l('Klarna authorises payments for up to 28 days. To capture funds automatically when an order is shipped, enable “Automatically ship on marked status” in the advanced settings. If no capture occurs within 28 days, the authorisation expires and the payment cannot be collected.', self::FILE_NAME),
245+
246+
'apiNotConfigured' => $this->module->l('API not configured', self::FILE_NAME),
247+
'apiNotConfiguredMessage' => $this->module->l('Please configure your Mollie API keys in the API Configuration tab before managing payment methods.', self::FILE_NAME),
248+
'infoBannerText' => $this->module->l('Here you can see all of the %s payment options. To include new payment methods go to', self::FILE_NAME),
249+
'mollieDashboard' => $this->module->l('Mollie dashboard', self::FILE_NAME),
245250
],
246251
]);
247252

0 commit comments

Comments
 (0)