Skip to content

Commit

Permalink
Make sure to translate entry type names. Bump to 2.2.3
Browse files Browse the repository at this point in the history
  • Loading branch information
mmikkel committed Oct 18, 2024
1 parent 54e022a commit eda7e05
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 14 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/).

## 2.2.3 - 2024-10-18
### Fixed
- Fixed a bug where Child Me! would not translate entry type names in the "New child" disclosure menu.

## 2.2.2 - 2024-06-10
### Fixed
- Fixed an incompatibility issue with Craft 5.2, which could trigger a PHP exception when attempting to create a new child for "Edited" elements
Expand Down
36 changes: 23 additions & 13 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,49 +2,59 @@
"name": "mmikkel/child-me",
"description": "Easily create child elements",
"type": "craft-plugin",
"version": "2.2.2",
"keywords": [
"version": "2.2.3",
"keywords":
[
"craft",
"cms",
"craftcms",
"craft-plugin",
"child me"
],
"support": {
"support":
{
"docs": "https://github.com/mmikkel/ChildMe-Craft/blob/master/README.md",
"issues": "https://github.com/mmikkel/ChildMe-Craft/issues"
},
"license": "MIT",
"authors": [
"authors":
[
{
"name": "Mats Mikkel Rummelhoff",
"homepage": "https://vaersaagod.no"
}
],
"require": {
"require":
{
"craftcms/cms": "^5.0.0",
"php": "^8.2"
},
"minimum-stability": "dev",
"prefer-stable": true,
"config": {
"allow-plugins": {
"config":
{
"allow-plugins":
{
"yiisoft/yii2-composer": true,
"craftcms/plugin-installer": true
}
},
"repositories": [
"repositories":
[
{
"type": "composer",
"url": "https://asset-packagist.org"
}
],
"autoload": {
"psr-4": {
"mmikkel\\childme\\": "src/"
"autoload":
{
"psr-4":
{
"mmikkel\\childme\\": "src/"
}
},
"extra": {
"extra":
{
"name": "Child Me!",
"handle": "child-me",
"schemaVersion": "1.0.0",
Expand All @@ -53,4 +63,4 @@
"changelogUrl": "https://raw.githubusercontent.com/mmikkel/ChildMe-Craft/master/CHANGELOG.md",
"class": "mmikkel\\childme\\ChildMe"
}
}
}
2 changes: 1 addition & 1 deletion src/ChildMe.php
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ private function _renderChildMeButtonForEntry(Entry $entry): string
'parentId' => $entry->canonicalId,
'typeId' => $entryType->id,
]),
'label' => $entryType->name,
'label' => Craft::t('site', $entryType->name),
'icon' => !empty($entryType->icon) ? Cp::iconSvg($entryType->icon) : null,
'color' => !empty($entryType->color) ? $entryType->color : null,
];
Expand Down

0 comments on commit eda7e05

Please sign in to comment.