Skip to content

Commit

Permalink
Merge pull request #59 from craftcms/bugfix/datepicker-i18n
Browse files Browse the repository at this point in the history
Fix i18n datepicker
  • Loading branch information
timkelty authored Dec 5, 2024
2 parents bfbb6cc + 1420468 commit 6a3a4d6
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/cli/controllers/AssetBundlesController.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
use craft\cloud\web\AssetManager;
use craft\console\Controller;
use craft\helpers\App;
use craft\web\assets\datepickeri18n\DatepickerI18nAsset;
use ReflectionClass;
use yii\console\Exception;
use yii\console\ExitCode;
Expand Down Expand Up @@ -69,6 +70,11 @@ public function actionPublishBundle(string $className): int
return;
}

// Set the language to a `web/assets/datepickeri18n/dist/datepicker-*.js` match so the entire directory is published
if ($className === DatepickerI18nAsset::class) {
Craft::$app->language = 'en-GB';
}

/** @var AssetBundle $assetBundle */
$assetBundle = Craft::createObject($className);

Expand Down

0 comments on commit 6a3a4d6

Please sign in to comment.