Skip to content

Commit

Permalink
Fix image placeholders and translation
Browse files Browse the repository at this point in the history
  • Loading branch information
mattwire committed Jun 21, 2023
1 parent 1bb0833 commit 7186155
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion CRM/Mosaico/Graphics/Intervention.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
*/
class CRM_Mosaico_Graphics_Intervention extends CRM_Mosaico_Graphics_Interface {

const FONT_PATH = 'packages/mosaico/dist/vendor/notoregular/NotoSans-Regular-webfont.ttf';
const FONT_PATH = 'packages/mosaico/dist/rs/notoregular/noto-sans-400-normal.ttf';

/**
* CRM_Mosaico_Graphics_Intervention constructor.
Expand Down
10 changes: 5 additions & 5 deletions CRM/Mosaico/Page/Editor.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ protected function getScriptUrls() {
$mosaicoDistUrl = CRM_Mosaico_Utils::getMosaicoDistUrl('relative');
$mosaicoExtUrl = CRM_Core_Resources::singleton()->getUrl('uk.co.vedaconsulting.mosaico');
return [
"{$mosaicoDistUrl}/rs/mosaico-libs-and-tinymce.min.js?v=0.18&r={$cacheCode}",
"{$mosaicoDistUrl}/rs/mosaico.min.js?v=0.18&r={$cacheCode}",
"{$mosaicoDistUrl}/mosaico-libs-and-tinymce.min.js?v=0.18&r={$cacheCode}",
"{$mosaicoDistUrl}/mosaico.min.js?v=0.18&r={$cacheCode}",
];
}

Expand All @@ -34,8 +34,8 @@ protected function getStyleUrls() {
$mosaicoDistUrl = CRM_Mosaico_Utils::getMosaicoDistUrl('relative');
// $mosaicoExtUrl = CRM_Core_Resources::singleton()->getUrl('uk.co.vedaconsulting.mosaico');
return [
"{$mosaicoDistUrl}/rs/mosaico-libs-and-tinymce.min.css?v=0.18&r={$cacheCode}",
"{$mosaicoDistUrl}/rs/mosaico-material.min.css?v=0.18&r={$cacheCode}",
"{$mosaicoDistUrl}/mosaico-libs-and-tinymce.min.css?v=0.18&r={$cacheCode}",
"{$mosaicoDistUrl}/mosaico-material.min.css?v=0.18&r={$cacheCode}",
];
}

Expand Down Expand Up @@ -89,7 +89,7 @@ protected function createMosaicoConfig() {
// Adding translation strings if exist
$locale = CRM_Core_I18n::getLocale();
$lang = CRM_Core_I18n_PseudoConstant::shortForLong($locale);
$translationFile = CRM_Core_Resources::singleton()->getPath(E::LONG_NAME, "packages/mosaico/dist/lang/mosaico-{$lang}.json");
$translationFile = CRM_Core_Resources::singleton()->getPath(E::LONG_NAME, "packages/mosaico/dist/rs/lang/mosaico-{$lang}.json");
if (file_exists($translationFile)) {
$config['strings'] = json_decode(file_get_contents($translationFile));
}
Expand Down
2 changes: 1 addition & 1 deletion CRM/Mosaico/Utils.php
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ public static function getLayoutPath() {
public static function getMosaicoDistUrl($preferFormat, $file = NULL) {
$key = "distUrl";
if (!isset(Civi::$statics[__CLASS__][$key])) {
Civi::$statics[__CLASS__][$key] = CRM_Core_Resources::singleton()->getUrl('uk.co.vedaconsulting.mosaico', 'packages/mosaico/dist');
Civi::$statics[__CLASS__][$key] = CRM_Core_Resources::singleton()->getUrl('uk.co.vedaconsulting.mosaico', 'packages/mosaico/dist/rs');
}
return self::filterAbsoluteRelative($preferFormat, Civi::$statics[__CLASS__][$key] . ($file ? "/$file" : ''));
}
Expand Down

0 comments on commit 7186155

Please sign in to comment.