Skip to content

Commit

Permalink
Entry Type names are now translated using the "site" translation cate…
Browse files Browse the repository at this point in the history
…gory. Bump to 1.0.2
  • Loading branch information
mmikkel committed May 22, 2018
1 parent 0dcb800 commit 836fdcd
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/).

## 1.0.2 - 2018-05-23
### Improved
- Entry Type names are now translated using the "site" translation category

## 1.0.1 - 2018-05-01
### Improved
- Improves asset bundle loading to avoid conflicts with other plugins
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "mmikkel/child-me",
"description": "Easily create child elements",
"type": "craft-plugin",
"version": "1.0.1",
"version": "1.0.2",
"keywords": [
"craft",
"cms",
Expand Down
2 changes: 1 addition & 1 deletion src/ChildMe.php
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ function () {
foreach ($entryTypes as $entryType) {
$section = $entryType->section->handle;
if (!isset($data[$section])) $data[$section] = [];
$data[$section][$entryType->id] = $entryType->name;
$data[$section][$entryType->id] = Craft::t('site', $entryType->name);
}
Craft::$app->getView()->registerAssetBundle(ChildMeBundle::class);
Craft::$app->getView()->registerJs('Craft.ChildMePlugin.init(' . Json::encode($data) . ')');
Expand Down

0 comments on commit 836fdcd

Please sign in to comment.