Skip to content

Commit

Permalink
Fixed #99
Browse files Browse the repository at this point in the history
  • Loading branch information
brandonkelly committed Oct 26, 2018
1 parent d7b301e commit 29494ea
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

### Fixed
- Fixed a bug where image editor would be unavailable for inserted assets. ([#95](https://github.com/craftcms/redactor/issues/95))
- Fixed a bug where Redactor was not getting translated properly for Norwegian languages. ([#99](https://github.com/craftcms/redactor/issues/99))

## 2.1.6 - 2018-08-21

Expand Down
6 changes: 5 additions & 1 deletion src/assets/redactor/RedactorAsset.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,10 @@ public function init()

$languages = array_unique([Craft::$app->language, Craft::$app->getLocale()->getLanguageID()]);

if (!empty(array_intersect($languages, ['nb', 'nn']))) {
$languages[] = 'no';
}

foreach ($languages as $lang) {
$subPath = 'lang'.DIRECTORY_SEPARATOR."{$lang}.js";
if (is_file($this->sourcePath.DIRECTORY_SEPARATOR.$subPath)) {
Expand All @@ -60,7 +64,7 @@ public function init()

/**
* Register the custom translations for the Redactor field.
*
*
* @param $view
*/
public static function registerTranslations($view)
Expand Down

0 comments on commit 29494ea

Please sign in to comment.