CRUD
CRUD copied to clipboard
[Bug] Edit title and headline should put the entity name inside of the translation
Bug report
The default edit title and headline currently use the translation and put the entity name after it, concatenating both together. This might work well in English, it does not work well in German (and I'm sure there's other languages where this doesn't work great either). Precisely for use cases like this, Laravel has support for parameters in translation keys, allowing translations to move the entity name where it makes sense for the language.
Relevant code parts are here and here.
What I did
Set the application language to german
What I expected to happen
Correct translation
What happened
Wrong translation
Is it a bug in the latest version of Backpack?
Yes
Backpack, Laravel, PHP, DB version
PHP VERSION:
PHP 7.4.24 (cli) (built: Sep 23 2021 21:36:11) ( NTS ) Copyright (c) The PHP Group Zend Engine v3.4.0, Copyright (c) Zend Technologies with Zend OPcache v7.4.24, Copyright (c), by Zend Technologies with blackfire v1.69.0~linux-x64-non_zts74, https://blackfire.io, by Blackfire
LARAVEL VERSION:
v8.69.0@545181da688db64fed6d8427e55f630a90ca0d32
BACKPACK VERSION:
4.1.60@bec5cfa11f0cd0712c79256748acf5850080c0ee
Hello there! Thanks for opening your first issue on this repo!
Just a heads-up: Here at Backpack we use Github Issues only for tracking bugs. Talk about new features is also acceptable. This helps a lot in keeping our focus on improving Backpack. If you issue is not a bug/feature, please help us out by closing the issue yourself and posting in the appropriate medium (see below). If you're not sure where it fits, it's ok, a community member will probably reply to help you with that.
Backpack communication channels:
- Bug Reports, Feature Requests - Github Issues (here);
- Quick help (How do I do X) - Gitter Chatroom;
- Long questions (I have done X and Y and it won't do Z wtf) - Stackoverflow, using the
backpack-for-laraveltag; - Showing off something you've made, asking for opinion on Backpack/Laravel matters - Reddit;
Please keep in mind Backpack offers no official / paid support. Whatever help you receive here, on Gitter, Slack or Stackoverflow is thanks to our awesome awesome community members, who give up some of their time to help their peers. If you want to join our community, just start pitching in. We take pride in being a welcoming bunch.
Thank you!
-- Justin Case The Backpack Robot
I also noticed that for "create" buttons and headline.
Got it, thank you @kolaente ! I've added the issue to 4.2.x project - we're now super focused on finishing a few MUST-DOs, to get 4.2 launched at the end of November.
Thanks again!
Doing a cleanup of old issues.
I don't think there is any issue here as we provide a sensible default, but users can configure it using the headings and title methods: https://backpackforlaravel.com/docs/6.x/crud-operations#titles-headings-and-subheadings
Let me know if that does not work for you and we can re-open if needed.
Cheers