Skip to content

Commit 4baaa92

Browse files
Merge pull request #8604 from christianbeeznest/fixes-plugin-buycourse12
Plugin: Improve BuyCourses plugin translations
2 parents 8739eb8 + fb429da commit 4baaa92

13 files changed

Lines changed: 167 additions & 58 deletions

public/plugin/BuyCourses/lang/en_US.php

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -640,3 +640,40 @@
640640
$strings['EnableCourse'] = 'Enable course';
641641
$strings['EnableSession'] = 'Enable session';
642642
$strings['EnableSubscription'] = 'Enable subscription';
643+
644+
// Translation audit additions.
645+
$strings['CancelledAction'] = 'Action cancelled.';
646+
$strings['Name'] = 'Name';
647+
$strings['NoPurchaseHistoryYet'] = 'No purchase history yet.';
648+
$strings['SubscriptionNotDeleted'] = 'The subscription could not be deleted.';
649+
$strings['SubscriptionNotUpdated'] = 'The subscription could not be updated.';
650+
$strings['ServiceUpdateFailed'] = 'Service update failed.';
651+
$strings['ServiceAppliedToUserAccountHelp'] = 'This service will be applied to your account.';
652+
$strings['ServiceAppliesToReadOnlyHelp'] = 'This value is read-only in the current implementation to preserve legacy services.';
653+
$strings['SubscriptionPeriodsNotConfigured'] = 'Subscription periods are not configured';
654+
$strings['SubscriptionPeriodInUseCannotBeDeleted'] = 'This subscription period is currently in use and cannot be deleted.';
655+
$strings['ConfirmRemoveSubscriptionPeriod'] = 'Are you sure you want to remove this subscription period?';
656+
$strings['PurchasedService'] = 'Purchased';
657+
$strings['NextCharge'] = 'Next charge';
658+
$strings['RecurringProfile'] = 'Profile';
659+
$strings['CancelAutoBillingConfirm'] = 'Cancel auto billing for this service?';
660+
$strings['RecurringPaymentReplacedByNewProfile'] = 'Replaced by a new BuyCourses recurring profile.';
661+
$strings['RecurringPaymentCancelledByCustomer'] = 'Cancelled by customer from BuyCourses service panel.';
662+
$strings['InvalidFormTokenRefreshPage'] = 'Invalid form token. Please refresh the page and try again.';
663+
$strings['CouponCodeRequired'] = 'Coupon code is required.';
664+
$strings['CouponDiscountTypeRequired'] = 'Discount type is required.';
665+
$strings['CouponDiscountMustBeZeroOrGreater'] = 'Discount must be zero or greater.';
666+
$strings['CouponStartAndEndDatesRequired'] = 'Both start and end dates are required.';
667+
$strings['CouponStartDateCannotBeLaterThanEndDate'] = 'The start date cannot be later than the end date.';
668+
$strings['CouponCouldNotBeSaved'] = 'The coupon could not be saved.';
669+
$strings['CouponAddPageDescription'] = 'Create a coupon, define the discount type and validity period, and assign it to courses, sessions or services.';
670+
$strings['CouponFormHelp'] = 'Complete the form below and save the coupon configuration.';
671+
$strings['CouponDiscountTypeHelp'] = 'Percentage or fixed amount.';
672+
$strings['CouponDateHelp'] = 'Define the validity period for the coupon.';
673+
$strings['CouponScopeHelp'] = 'Assign the coupon to one or more courses, sessions or services.';
674+
$strings['DiscountCoupons'] = 'Discount coupons';
675+
$strings['Recibo'] = 'Receipt';
676+
$strings['FrequencyIsNotConfigured'] = 'Subscription periods are not configured yet. Please configure at least one subscription period before creating a subscription.';
677+
$strings['SubscriptionSaveError'] = 'The subscription could not be saved. Please review the data and try again.';
678+
$strings['SubscriptionPeriodsRequired'] = 'You must add at least one subscription period before saving.';
679+
$strings['FrequencyNotRemoved'] = 'The subscription period could not be removed.';

public/plugin/BuyCourses/lang/es.php

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -642,3 +642,38 @@
642642
$strings['EnableCourse'] = 'Habilitar curso';
643643
$strings['EnableSession'] = 'Habilitar sesión';
644644
$strings['EnableSubscription'] = 'Habilitar suscripción';
645+
646+
// Translation audit additions.
647+
$strings['CancelledAction'] = 'Acción cancelada.';
648+
$strings['Name'] = 'Nombre';
649+
$strings['NoPurchaseHistoryYet'] = 'Aún no hay historial de compras.';
650+
$strings['SubscriptionNotDeleted'] = 'No se pudo eliminar la suscripción.';
651+
$strings['SubscriptionNotUpdated'] = 'No se pudo actualizar la suscripción.';
652+
$strings['ServiceUpdateFailed'] = 'No se pudo actualizar el servicio.';
653+
$strings['ServiceAppliedToUserAccountHelp'] = 'Este servicio se aplicará a tu cuenta.';
654+
$strings['ServiceAppliesToReadOnlyHelp'] = 'Este valor es de solo lectura en la implementación actual para preservar los servicios heredados.';
655+
$strings['SubscriptionPeriodsNotConfigured'] = 'Los períodos de suscripción no están configurados';
656+
$strings['SubscriptionPeriodInUseCannotBeDeleted'] = 'Este período de suscripción está en uso y no se puede eliminar.';
657+
$strings['ConfirmRemoveSubscriptionPeriod'] = '¿Seguro que quieres quitar este período de suscripción?';
658+
$strings['PurchasedService'] = 'Comprado';
659+
$strings['NextCharge'] = 'Próximo cobro';
660+
$strings['RecurringProfile'] = 'Perfil';
661+
$strings['CancelAutoBillingConfirm'] = '¿Cancelar el cobro automático de este servicio?';
662+
$strings['RecurringPaymentReplacedByNewProfile'] = 'Reemplazado por un nuevo perfil recurrente de BuyCourses.';
663+
$strings['RecurringPaymentCancelledByCustomer'] = 'Cancelado por el cliente desde el panel de servicios de BuyCourses.';
664+
$strings['InvalidFormTokenRefreshPage'] = 'Token de formulario inválido. Actualiza la página e inténtalo de nuevo.';
665+
$strings['CouponCodeRequired'] = 'El código del cupón es obligatorio.';
666+
$strings['CouponDiscountTypeRequired'] = 'El tipo de descuento es obligatorio.';
667+
$strings['CouponDiscountMustBeZeroOrGreater'] = 'El descuento debe ser cero o mayor.';
668+
$strings['CouponStartAndEndDatesRequired'] = 'Las fechas de inicio y fin son obligatorias.';
669+
$strings['CouponStartDateCannotBeLaterThanEndDate'] = 'La fecha de inicio no puede ser posterior a la fecha de fin.';
670+
$strings['CouponCouldNotBeSaved'] = 'No se pudo guardar el cupón.';
671+
$strings['CouponAddPageDescription'] = 'Crea un cupón, define el tipo de descuento y el período de validez, y asígnalo a cursos, sesiones o servicios.';
672+
$strings['CouponFormHelp'] = 'Completa el formulario y guarda la configuración del cupón.';
673+
$strings['CouponDiscountTypeHelp'] = 'Porcentaje o importe fijo.';
674+
$strings['CouponDateHelp'] = 'Define el período de validez del cupón.';
675+
$strings['CouponScopeHelp'] = 'Asigna el cupón a uno o más cursos, sesiones o servicios.';
676+
$strings['FrequencyIsNotConfigured'] = 'Los períodos de suscripción no están configurados todavía. Configura al menos un período antes de crear una suscripción.';
677+
$strings['SubscriptionSaveError'] = 'No se pudo guardar la suscripción. Revisa los datos e inténtalo de nuevo.';
678+
$strings['SubscriptionPeriodsRequired'] = 'Debes añadir al menos un período de suscripción antes de guardar.';
679+
$strings['FrequencyNotRemoved'] = 'No se pudo eliminar el período de suscripción.';

public/plugin/BuyCourses/lang/fr_FR.php

Lines changed: 42 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@
146146
$strings['hide_free_text'] = "Cacher le texte 'Free' ou 'Gratuit'";
147147
$strings['culqi_enable'] = 'Activé culqi';
148148
$strings['include_services'] = 'Inclure les services';
149-
$strings['CurrencyIsNotConfigured'] = 'Please, configure a currency before continuing.';
149+
$strings['CurrencyIsNotConfigured'] = 'Veuillez configurer une devise avant de continuer.';
150150
$strings['Services'] = 'Services';
151151
$strings['Service'] = 'Service';
152152
$strings['NewService'] = 'Nouveau service';
@@ -221,7 +221,7 @@
221221
$strings['YourCoursesNeedAtLeastOneLearningPath'] = 'The courses to which you are subscribed need at least one learning path that contains a final certificate item';
222222
$strings['GlobalTaxPerc'] = 'Global tax rate';
223223
$strings['GlobalTaxPercDescription'] = 'Default tax rate that will be used unless there is a specific tax rate for the course, session or service.';
224-
$strings['TaxPerc'] = 'Tax rate';
224+
$strings['TaxPerc'] = 'Taux de taxe';
225225
$strings['TaxPercDescription'] = 'If left blank, the global tax rate will be used.';
226226
$strings['ByDefault'] = 'by default (global value)';
227227
$strings['OnlyCourses'] = 'Only courses';
@@ -379,8 +379,8 @@
379379
$strings['NoSubscriptionsFound'] = 'No subscriptions found.';
380380
$strings['NoTeacherInformationAvailable'] = 'No teacher information available.';
381381
$strings['OpenPluginSettings'] = 'Open plugin settings';
382-
$strings['PayPalApiCredentialsIncomplete'] = 'PayPal API credentials are incomplete.';
383-
$strings['PayPalErrorCodeMessage'] = 'PayPal error: %s - %s';
382+
$strings['PayPalApiCredentialsIncomplete'] = 'Les identifiants API PayPal sont incomplets.';
383+
$strings['PayPalErrorCodeMessage'] = 'Erreur PayPal : %s - %s';
384384
$strings['PluginSettings'] = 'Plugin settings';
385385
$strings['ProcessingDontCloseThisWindow'] = 'Processing. Do not close this window.';
386386
$strings['SalesReportSearchHelp'] = 'Choose a filter mode and update the fields below to refresh the sales report.';
@@ -398,7 +398,7 @@
398398
$strings['TransferEmailInformation'] = 'Transfer email information';
399399
$strings['TransferEmailInformationHelp'] = 'Extra information shown in the email sent after selecting bank transfer.';
400400
$strings['TryChangingSearchFilter'] = 'Try changing the search filter.';
401-
$strings['UnknownPayPalError'] = 'Unknown PayPal error';
401+
$strings['UnknownPayPalError'] = 'Erreur PayPal inconnue';
402402
$strings['Updated'] = 'Updated';
403403
$strings['Usage'] = 'Usage';
404404
$strings['UserName'] = 'Username';
@@ -640,3 +640,40 @@
640640
$strings['EnableCourse'] = 'Activer un cours';
641641
$strings['EnableSession'] = 'Activer une session';
642642
$strings['EnableSubscription'] = 'Activer un abonnement';
643+
644+
// Translation audit additions.
645+
$strings['CancelledAction'] = 'Action annulée.';
646+
$strings['Name'] = 'Nom';
647+
$strings['NoPurchaseHistoryYet'] = 'Aucun historique d’achat pour le moment.';
648+
$strings['SubscriptionNotDeleted'] = 'L’abonnement n’a pas pu être supprimé.';
649+
$strings['SubscriptionNotUpdated'] = 'L’abonnement n’a pas pu être mis à jour.';
650+
$strings['ServiceUpdateFailed'] = 'Le service n’a pas pu être mis à jour.';
651+
$strings['ServiceAppliedToUserAccountHelp'] = 'Ce service sera appliqué à votre compte.';
652+
$strings['ServiceAppliesToReadOnlyHelp'] = 'Cette valeur est en lecture seule dans l’implémentation actuelle afin de préserver les services hérités.';
653+
$strings['SubscriptionPeriodsNotConfigured'] = 'Les périodes d’abonnement ne sont pas configurées';
654+
$strings['SubscriptionPeriodInUseCannotBeDeleted'] = 'Cette période d’abonnement est actuellement utilisée et ne peut pas être supprimée.';
655+
$strings['ConfirmRemoveSubscriptionPeriod'] = 'Voulez-vous vraiment retirer cette période d’abonnement ?';
656+
$strings['PurchasedService'] = 'Acheté';
657+
$strings['NextCharge'] = 'Prochain prélèvement';
658+
$strings['RecurringProfile'] = 'Profil';
659+
$strings['CancelAutoBillingConfirm'] = 'Annuler la facturation automatique de ce service ?';
660+
$strings['RecurringPaymentReplacedByNewProfile'] = 'Remplacé par un nouveau profil récurrent BuyCourses.';
661+
$strings['RecurringPaymentCancelledByCustomer'] = 'Annulé par le client depuis le panneau des services BuyCourses.';
662+
$strings['InvalidFormTokenRefreshPage'] = 'Jeton de formulaire invalide. Actualisez la page et réessayez.';
663+
$strings['CouponCodeRequired'] = 'Le code du coupon est obligatoire.';
664+
$strings['CouponDiscountTypeRequired'] = 'Le type de remise est obligatoire.';
665+
$strings['CouponDiscountMustBeZeroOrGreater'] = 'La remise doit être égale ou supérieure à zéro.';
666+
$strings['CouponStartAndEndDatesRequired'] = 'Les dates de début et de fin sont obligatoires.';
667+
$strings['CouponStartDateCannotBeLaterThanEndDate'] = 'La date de début ne peut pas être postérieure à la date de fin.';
668+
$strings['CouponCouldNotBeSaved'] = 'Le coupon n’a pas pu être enregistré.';
669+
$strings['CouponAddPageDescription'] = 'Créez un coupon, définissez le type de remise et la période de validité, puis attribuez-le à des cours, sessions ou services.';
670+
$strings['CouponFormHelp'] = 'Complétez le formulaire ci-dessous et enregistrez la configuration du coupon.';
671+
$strings['CouponDiscountTypeHelp'] = 'Pourcentage ou montant fixe.';
672+
$strings['CouponDateHelp'] = 'Définissez la période de validité du coupon.';
673+
$strings['CouponScopeHelp'] = 'Attribuez le coupon à un ou plusieurs cours, sessions ou services.';
674+
$strings['DiscountCoupons'] = 'Coupons de réduction';
675+
$strings['Recibo'] = 'Reçu';
676+
$strings['FrequencyIsNotConfigured'] = 'Les périodes d’abonnement ne sont pas encore configurées. Configurez au moins une période avant de créer un abonnement.';
677+
$strings['SubscriptionSaveError'] = 'L’abonnement n’a pas pu être enregistré. Vérifiez les données et réessayez.';
678+
$strings['SubscriptionPeriodsRequired'] = 'Vous devez ajouter au moins une période d’abonnement avant d’enregistrer.';
679+
$strings['FrequencyNotRemoved'] = 'La période d’abonnement n’a pas pu être supprimée.';

public/plugin/BuyCourses/src/coupon_add.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ function buildCouponLookup(array $ids): array
232232
$submittedToken = (string) ($_POST['csrf_token'] ?? '');
233233
if ('' === $submittedToken || !hash_equals($csrfToken, $submittedToken)) {
234234
$messages[] = Display::return_message(
235-
'Invalid form token. Please refresh the page and try again.',
235+
$plugin->get_lang('InvalidFormTokenRefreshPage'),
236236
'error',
237237
false
238238
);
@@ -241,7 +241,7 @@ function buildCouponLookup(array $ids): array
241241

242242
if ('' === $formData['code']) {
243243
$messages[] = Display::return_message(
244-
'Coupon code is required.',
244+
$plugin->get_lang('CouponCodeRequired'),
245245
'error',
246246
false
247247
);
@@ -251,7 +251,7 @@ function buildCouponLookup(array $ids): array
251251
$discountType = (int) $formData['discount_type'];
252252
if (!array_key_exists($discountType, $discountTypes)) {
253253
$messages[] = Display::return_message(
254-
'Discount type is required.',
254+
$plugin->get_lang('CouponDiscountTypeRequired'),
255255
'error',
256256
false
257257
);
@@ -261,7 +261,7 @@ function buildCouponLookup(array $ids): array
261261
$discountAmount = (float) str_replace(',', '.', $formData['discount_amount']);
262262
if ($discountAmount < 0) {
263263
$messages[] = Display::return_message(
264-
'Discount must be zero or greater.',
264+
$plugin->get_lang('CouponDiscountMustBeZeroOrGreater'),
265265
'error',
266266
false
267267
);
@@ -273,14 +273,14 @@ function buildCouponLookup(array $ids): array
273273

274274
if (null === $validStart || null === $validEnd) {
275275
$messages[] = Display::return_message(
276-
'Both start and end dates are required.',
276+
$plugin->get_lang('CouponStartAndEndDatesRequired'),
277277
'error',
278278
false
279279
);
280280
$hasError = true;
281281
} elseif ($validStart > $validEnd) {
282282
$messages[] = Display::return_message(
283-
'The start date cannot be later than the end date.',
283+
$plugin->get_lang('CouponStartDateCannotBeLaterThanEndDate'),
284284
'error',
285285
false
286286
);
@@ -324,7 +324,7 @@ function buildCouponLookup(array $ids): array
324324
}
325325

326326
$messages[] = Display::return_message(
327-
'The coupon could not be saved.',
327+
$plugin->get_lang('CouponCouldNotBeSaved'),
328328
'error',
329329
false
330330
);

0 commit comments

Comments
 (0)