Review main Merged

77375[FEATURE] Automatic language key handling with regions (ISO 3166-1)

Benni Mack CR +2 V +2 Normal +161 −18 updated 01/24/23, 13:21

Commit message

TYPO3 can now handle language keys with a given region,
such as "de-AT" without extending TYPO3's native language
handling. When a "de-AT.locallang.xlf" file exists,
it is used, but will fall back to "de.locallang.xlf" itself.

The language is based on ISO 639-1,
whereas the region should be used from ISO 3166-1.

For backwards-compatibility, locales with underscore
are also possible "de_AT".

Review

  • Code review CR +2 Done
    • Benni Mack +2
    • Georg Ringer +1
    • Andreas Kienast +1
  • Verified V +2 Done
    • Benni Mack +2
    • Georg Ringer +1
    • core-ci +1 CI

Issues 1

Files 4

Review log 3047

Show 1122 earlier messages
  1. Benni Mack uploaded patch set 1 01/13/23, 11:43

  2. core-ci voted on patch set 1 V -1 01/13/23, 11:51 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/35759

  3. Benni Mack uploaded patch set 2 V -1 01/13/23, 13:04

  4. core-ci voted on patch set 2 V +1 01/13/23, 13:13 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/35764

  5. Benni Mack commented on patch set 3 V +1 01/14/23, 20:07

    Published edit on patch set 2.
  6. core-ci voted on patch set 3 V -1 01/14/23, 20:24 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/35802

  7. Benni Mack commented on patch set 4 V -1 01/14/23, 20:27

    Published edit on patch set 3.
  8. core-ci voted on patch set 4 V -1 01/14/23, 20:35 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/35803

  9. Benni Mack rebased onto patch set 5 V -1 01/16/23, 11:12

  10. core-ci voted on patch set 5 V -1 01/16/23, 11:20 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/35845

  11. Benni Mack uploaded patch set 6 V -1 01/16/23, 13:50

  12. core-ci voted on patch set 6 V +1 01/16/23, 13:58 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/35852

  13. Benni Mack uploaded patch set 7 V +1 01/17/23, 10:53

  14. Benni Mack uploaded patch set 8 01/17/23, 10:55

  15. core-ci voted on patch set 7 V +1 01/17/23, 11:05 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/35930

  16. core-ci voted on patch set 8 V +1 01/17/23, 11:13 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/35932

  17. Benni Mack uploaded patch set 9 V +1 01/17/23, 11:32

  18. Benni Mack updated the commit message in patch set 10 01/17/23, 11:39

  19. core-ci voted on patch set 10 V +1 01/17/23, 11:52 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/35941

  20. core-ci voted on patch set 9 V +1 01/17/23, 11:52 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/35939

  21. Benni Mack commented on patch set 11 V +1 01/17/23, 12:16

    Published edit on patch set 10.
  22. core-ci voted on patch set 11 V +1 01/17/23, 12:25 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/35951

  1. Stefan Bürk commented on patch set 11 01/17/23, 12:43

    LanguageService.php:100

    point or exclamation mark at the end ? -> `Configure it!` ? or should it flow to the next comment block ?

    RichTextElement.php:202

    `initialized` .. was wrong before ...
  2. Benni Mack voted on patch set 11 CR -1 01/17/23, 13:02

  3. Benni Mack uploaded patch set 12 CR -1 V +1 01/17/23, 13:47

  4. core-ci voted on patch set 12 V +1 01/17/23, 13:55 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/35965

  5. Benni Mack commented on patch set 12 01/17/23, 14:10

    LanguageService.php:100 Reply

    Done

    RichTextElement.php:202 Reply

    Done
  6. Benni Mack uploaded patch set 13 V +1 01/17/23, 14:12

  7. core-ci voted on patch set 13 V +1 01/17/23, 14:21 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/35967

  8. Benni Mack commented on patch set 14 V +1 01/17/23, 15:23

    Published edit on patch set 13.
  9. core-ci voted on patch set 14 V +1 01/17/23, 15:31 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/35974

  10. Andreas Kienast commented on patch set 13 01/17/23, 15:33

    Locales.php:148

    "this should be defined here"?
  11. Georg Ringer commented on patch set 14 01/17/23, 15:34

    Locales.php:157

    should we still ship that?

    Feature-86913-AutomaticSupportForLanguageFilesOfLanguagesWithRegionSuffix.rst:25

    I would use a more realistic version, what about Spaß vs Spass? as we really got that for swiss variants having everything in german but the ß replaced
  12. Benni Mack commented on patch set 14 01/17/23, 22:25

    Locales.php:148 Reply

    yes, will remove it in the next iteration.

    Locales.php:157 Reply

    We could register it as a common supported language, but I'd rather not do this in this patch?

    Feature-86913-AutomaticSupportForLanguageFilesOfLanguagesWithRegionSuffix.rst:25 Reply

    In Germany "Spaß" and "Spass" are both valid and depends on the authors' style to write. Is there a difference in Switzerland that nothing should be with "ß"? If so, I'm happy to change it.
  13. Benni Mack updated the commit message in patch set 15 V +1 01/17/23, 22:26

  14. core-ci voted on patch set 15 V +1 01/17/23, 22:35 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/36045

  15. Georg Ringer commented on patch set 15 01/18/23, 06:23

    Locales.php:148 Reply

    Ack

    Feature-86913-AutomaticSupportForLanguageFilesOfLanguagesWithRegionSuffix.rst:25 Reply

    yes, switzerland doesn't use an ß at all, and in austria writing "Spass" in school would be an error ;)
  16. Benni Mack uploaded patch set 16 V +1 01/24/23, 09:42

  17. Andreas Kienast commented on patch set 16 01/24/23, 09:55

    Locales.php:279

    nitpick only: `empty($dependencies)` could be replaced with `$dependencies === []` and checked first as this is "faster" than `str_contains()`.

    RichTextElement.php:212

    nitpick: conditions can be swapped
  18. core-ci voted on patch set 16 V +1 01/24/23, 10:00 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/36525

  19. Andreas Kienast uploaded patch set 17 V +1 01/24/23, 10:08

  20. core-ci voted on patch set 17 V +1 01/24/23, 10:15 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/36528

  21. Andreas Kienast commented on patch set 17 CR +1 01/24/23, 10:40

    Locales.php:279 Reply

    Done

    RichTextElement.php:212 Reply

    Done
  22. Benni Mack commented on patch set 17 01/24/23, 12:54

    Feature-86913-AutomaticSupportForLanguageFilesOfLanguagesWithRegionSuffix.rst:25 Reply

    OK. The most common topic I had with de_DE and de_CH was "Offerte" in the past decade, but the differences between de_AT and de_CH I was unaware of today. Can you update the RST or should we leave it like it is?
  23. Georg Ringer commented on patch set 17 V +1 CR +1 01/24/23, 13:18

    Feature-86913-AutomaticSupportForLanguageFilesOfLanguagesWithRegionSuffix.rst:25 Reply

    Done
  24. Benni Mack voted on patch set 17 V +2 CR +2 01/24/23, 13:21

  25. Benni Mack merged patch set 18 01/24/23, 13:21