72805[FEATURE] Add presets when adding new languages for a site
Commit message
Review
-
Code review CR +2 Done
- Benni Mack +2
- Guido Schmechel +1
-
Verified V +2 Done
- Benni Mack +2
- Guido Schmechel +1
- core-ci +1 CI
Issues 1
Files 8
- Build/Sources/TypeScript/backend/form-engine/container/site-language-container.ts+30 −2
- typo3/sysext/backend/Classes/Controller/SiteInlineAjaxController.php2+5 −0
- typo3/sysext/backend/Classes/Form/Container/SiteLanguageContainer.php4+7 −3
- typo3/sysext/backend/Resources/Private/Language/locallang_siteconfiguration_tca.xlf+8 −0
- typo3/sysext/backend/Resources/Private/Templates/Form/SiteLanguageContainer.html5+13 −8
- typo3/sysext/backend/Resources/Public/JavaScript/form-engine/container/site-language-container.js+1 −1
- typo3/sysext/core/Classes/Site/SiteLanguagePresets.php8new+436 −0
- typo3/sysext/core/Documentation/Changelog/12.3/Feature-99321-AddSiteLanguagePresets.rstnew+31 −0
Review log 5680
Show 3955 earlier messages
-
Christoph Lehmann uploaded patch set 1 12/28/21, 05:03
-
core-ci voted on patch set 1 V -1 12/28/21, 05:06 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/21473
-
Stefan Bürk uploaded patch set 2 12/30/21, 16:34
-
core-ci voted on patch set 2 V +1 12/30/21, 16:49 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/21527
-
Stefan Bürk commented on patch set 2 01/14/22, 23:12
Note: Only fixed cgl issues with patchset 2. This is still "[WIP]", regardin the commit message. So feel to proceed. Was just to "help" out. -
Benni Mack commented on patch set 2 01/21/22, 23:29
Locales.php:135I suggest to move this to its own class next to SiteLanguage, just called "SiteLanguagePresets" -
Christoph Lehmann commented on patch set 2 01/24/22, 09:29
I try to finalize it asap.Locales.php:135ReplyYes, that's better. Will do. -
Christoph Lehmann rebased onto patch set 3 01/27/22, 22:57
-
core-ci voted on patch set 3 V +1 01/27/22, 23:08 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/22604
-
Christoph Lehmann uploaded patch set 4 01/27/22, 23:19
-
Christoph Lehmann updated the commit message in patch set 5 01/27/22, 23:31
-
core-ci voted on patch set 4 V -1 01/27/22, 23:32 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/22605
-
core-ci voted on patch set 5 V -1 01/27/22, 23:44 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/22606
-
Christoph Lehmann uploaded patch set 6
V -112/04/22, 22:09 -
core-ci voted on patch set 6 V +1 12/04/22, 22:17 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/34613
-
Christoph Lehmann uploaded patch set 7
V +112/04/22, 22:33 -
Christoph Lehmann updated the commit message in patch set 8 12/04/22, 22:37
-
Christoph Lehmann commented on patch set 8 12/04/22, 22:37
Locales.php:135ReplyDone -
core-ci voted on patch set 7 V +1 12/04/22, 22:41 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/34614
-
core-ci voted on patch set 8 V +1 12/04/22, 22:45 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/34615
-
Christoph Lehmann uploaded patch set 9
V +112/08/22, 19:42 -
Christoph Lehmann updated the commit message in patch set 10 12/08/22, 19:42
-
core-ci voted on patch set 10 V -1 12/08/22, 19:51 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/34813
-
core-ci voted on patch set 9 V -1 12/08/22, 19:53 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/34812
-
Stefan Bürk commented on patch set 10 12/08/22, 19:54
Rest file should be moved to 12.2 (eventually rebase patch before to have folder) -
Christoph Lehmann uploaded patch set 11
V -112/08/22, 20:08 -
Christoph Lehmann commented on patch set 11 12/08/22, 20:10
Reply
Done -
core-ci voted on patch set 11 V +1 12/08/22, 20:16 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/34814
-
Guido Schmechel commented on patch set 11 V +1 12/12/22, 09:59
Regardless of the point to be made, it all worked out well. Nice feature!SiteLanguagePresets.php:540To be clarified -
Christoph Lehmann commented on patch set 11 12/12/22, 10:03
SiteLanguagePresets.php:540ReplyI didn't find a flag for Zimbabwe. -
Guido Schmechel commented on patch set 11 12/12/22, 10:18
SiteLanguagePresets.php:540Reply"zw" would be the correct value. You can also specify this. The problem is rather that the flag of Andorra is currently being issued there: => https://github.com/TYPO3/typo3/blob/main/typo3/sysext/core/Resources/Public/Icons/Flags/ZW.png https://en.wikipedia.org/wiki/Flag_of_Andorra -
Guido Schmechel commented on patch set 11 12/12/22, 10:22
SiteLanguagePresets.php:540Reply -
Stefan Bürk commented on patch set 11 12/12/22, 11:25
Some things we should at least talk about (for eventually following ups): unrelated to this change: * normally, the drop down only contains locales installed on the system for selection * no-validation if the locale is still valid (installed) available, visually or something like that related to this change: * pre-sets lists `<locale>.UTF-8` without checking if they are installed on the system * pre-sets list do not take into account eventually sub-locales of the system, e.g 'de_DE.UTF-8@euro' Providing the pre-sets may lead to simply creating languages without valid system locales installed, and without further notices. The "normal" way it listed at least available locales on the current system it is executed. We should at least having some todo's to tackle here some issues. And eventually provide "pre-sets" only if locale is installed or something like that. At least we should discuss about these things here. Beside this, nice change and a change which basicly makes sense. -
Christoph Lehmann commented on patch set 11 12/12/22, 12:50
Reply
Talked to Benny last week, he wanted to go on with it and merge changes in his new Feature "Locales instead typo3language". But yes, the problem with non-existing locales is still valid, good catch. How about a FlashMessage "The locale is currently not available on your system" in the newly created IRRE-element? -
Christoph Lehmann commented on patch set 11 12/12/22, 21:05
Reply
Just fyi about the @euro modifier: https://wiki.archlinux.de/title/Locale#:~:text=Der%20Sonderfall%20de_DE.utf8%40euro,das%20Eurozeichen%20explizit%20vorhanden%20ist. states, that it's usage is contra-productive, because the locale falls back to ISO-8859-15 which does not contain all unicode characters. -
Andreas Kienast commented on patch set 11 12/13/22, 14:59
SiteLanguagePresets.php:540ReplyIssue is solved. -
Georg Ringer commented on patch set 11 12/13/22, 17:39
Feature-99321-AddSiteLanguagePresets.rst:21just from reading, I don't really know which time I save as integrator? would I have presets in my site package for the most uses languages and then I can use those instead of manually adopting the site configuration or copy paste from some other places? -
Christoph Lehmann commented on patch set 11 12/13/22, 19:27
Feature-99321-AddSiteLanguagePresets.rst:21Reply"Integrators spend less time adding new site languages by using site language presets which provide sensible and common default values for all site language properties." What do you think of that? -
Christoph Lehmann commented on patch set 12
V +112/13/22, 21:44Published edit on patch set 11. -
Christoph Lehmann commented on patch set 12 12/13/22, 21:46
SiteLanguagePresets.php:540ReplyThanks. I added 'zw' as flag and removed the comment. -
core-ci voted on patch set 12 V +1 12/13/22, 21:53 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/35069
-
Georg Ringer commented on patch set 12 V +1 CR +1 12/14/22, 05:48
Feature-99321-AddSiteLanguagePresets.rst:21ReplyAck -
Jörg Bösche voted on patch set 12 CR +1 12/15/22, 15:22
-
Guido Schmechel commented on patch set 12 V +1 CR +1 12/15/22, 21:56
The current state is already completely fine! However, I still have a question: Does it make sense to add an event for the presets? Is that worthwhile? With https://docs.typo3.org/m/typo3/reference-coreapi/main/en-us/ApiOverview/Localization/ManagingTranslations.html#custom-languages there would still be an edge case. The custom language itself is a special case, so a preset might not be worth it. But if, for example, you add "Swiss german" to every project for your customers, it might be helpful? What is your opinion on this? -
Benni Mack commented on patch set 12 12/20/22, 17:06
Personally, I think we should avoid setlocale() in general (one of the reasons strftime is deprecated btw) and fully build on top of php-intl. -
Georg Ringer rebased onto patch set 13
CR +1V +112/29/22, 08:36 -
core-ci voted on patch set 13 V +1 12/29/22, 08:48 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/35388
-
Chris Müller uploaded patch set 14
V +102/08/23, 17:57 -
core-ci voted on patch set 14 V +1 02/08/23, 18:23 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/37404
-
Josef Glatz commented on patch set 14 CR -1 02/08/23, 18:25
SiteLanguageContainer.html:12Are we safe for every translated language if we don't add the three dots to the translated string? -
Josef Glatz commented on patch set 15
CR -1V +102/08/23, 18:27Published edit on patch set 14. -
core-ci voted on patch set 15 V +1 02/08/23, 19:01 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/37407
-
Josef Glatz commented on patch set 15 CR -1 02/08/23, 19:14
SiteLanguageContainer.html:12Replyimagine a RTL language. I would add this also to the LLL string -
Benni Mack uploaded patch set 16
CR -1V +102/10/23, 14:39 -
core-ci voted on patch set 16 V -1 02/10/23, 15:00 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/37566
-
Christoph Lehmann rebased onto patch set 17
V -102/10/23, 22:32 -
core-ci voted on patch set 17 V +1 02/10/23, 22:39 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/37591
-
Christoph Lehmann uploaded patch set 18
V +102/10/23, 23:07 -
Christoph Lehmann commented on patch set 18 02/10/23, 23:09
SiteLanguageContainer.html:12ReplyDone -
core-ci voted on patch set 18 V +1 02/10/23, 23:14 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/37592
-
Christoph Lehmann uploaded patch set 19
V +102/10/23, 23:21 -
Christoph Lehmann uploaded patch set 20 02/10/23, 23:21
-
Christoph Lehmann commented on patch set 20 02/10/23, 23:24
Reply
Let's care about unavailable locales in a further issue. I would a warning in system environment check. -
core-ci voted on patch set 19 V +1 02/10/23, 23:30 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/37593
-
core-ci voted on patch set 20 V +1 02/10/23, 23:30 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/37594
-
Benni Mack commented on patch set 20 02/11/23, 09:48
Added some feedback. Once this is done, I can take care of the other remarks from Stefan etc.SiteInlineAjaxController.php:121->getPresetDetailsForLanguage($language);SiteLanguageContainer.php:149we could move this logic below into the Presets class ("getAllForSelector()").SiteLanguageContainer.php:214needs also a XLF part, I assumeSiteLanguageContainer.html:16just from testing (and we do have the styling in there. we should use the regular classes to define a bit of styling instead of having inline styles.SiteLanguagePresets.php:41really good. now... could we use the actual locale like "cs-CZ" as key of the arrays? this way we are prepared for even further streamlining work. -
Christoph Lehmann uploaded patch set 21
V +102/14/23, 21:52 -
Christoph Lehmann commented on patch set 21 02/14/23, 21:53
SiteInlineAjaxController.php:121ReplyDoneSiteLanguageContainer.php:149ReplyDoneSiteLanguageContainer.php:214Replyremoved since superflousSiteLanguagePresets.php:41ReplyDone -
core-ci voted on patch set 21 V +1 02/14/23, 22:00 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/37716
-
Benni Mack uploaded patch set 22
V +103/07/23, 06:55 -
core-ci voted on patch set 22 V -1 03/07/23, 07:20 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/38576
-
Andreas Kienast uploaded patch set 23
V -103/07/23, 17:12 -
core-ci voted on patch set 23 V -1 03/07/23, 17:43 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/38617
-
Benni Mack uploaded patch set 24
V -103/22/23, 21:09 -
Benni Mack voted on patch set 24 V +1 CR +1 03/22/23, 21:10
-
Benni Mack commented on patch set 24 03/22/23, 21:10
SiteLanguageContainer.html:16ReplyDone -
core-ci voted on patch set 24 V +1 03/22/23, 21:18 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/39418
-
Guido Schmechel voted on patch set 24 V +1 CR +1 03/22/23, 23:12
-
Benni Mack voted on patch set 24 V +2 CR +2 03/22/23, 23:23
-
Benni Mack merged patch set 25 03/22/23, 23:23