From 28f926b8f305ce9906af4e890ba0dfb204c58428 Mon Sep 17 00:00:00 2001 From: Guy Sartorelli Date: Thu, 5 Oct 2023 11:55:57 +1300 Subject: [PATCH] FIX Expose localisations --- composer.json | 5 +++-- src/Method.php | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index 6b2cb2a..ae5394c 100644 --- a/composer.json +++ b/composer.json @@ -35,9 +35,10 @@ }, "extra": { "expose": [ - "client/dist" + "client/dist", + "client/lang" ] }, "minimum-stability": "dev", "prefer-stable": true -} \ No newline at end of file +} diff --git a/src/Method.php b/src/Method.php index b58d517..5a12a66 100644 --- a/src/Method.php +++ b/src/Method.php @@ -57,6 +57,7 @@ public function getThumbnail(): string public function applyRequirements(): void { + Requirements::add_i18n_javascript('silverstripe/totp-authenticator: client/lang'); Requirements::javascript('silverstripe/totp-authenticator: client/dist/js/bundle.js'); Requirements::css('silverstripe/totp-authenticator: client/dist/styles/bundle.css'); }