24109[BUGFIX] EXT:documentation does not support translated manuals
Commit message
Review
-
Code review CR +2
- Christian Kuhn +2
- Eric Chavaillaz +1
-
Verified V +2
- Christian Kuhn +2
- Eric Chavaillaz +1
- Philipp Gampe +1
Files 4
Review log 17
-
Mr. Jenkins commented on patch set 1 09/27/13, 13:13
Build Successful https://ci.typo3.org/job/typo3-v4-core-gerrit/10973/ : SUCCESS -
Eric Chavaillaz commented on patch set 1 V +1 10/04/13, 05:44
Hi, I try with the extension "in_gallery_flickr". The documentation of the extension exists both in english and in french. My backend is configured with french and when I show the documentation, I got directly the french version, so it's ok! Nice! -
Eric Chavaillaz commented on patch set 1 V +1 10/04/13, 05:54
Ok, if I have a french backend, the french documentation of the extension "in_gallery_flickr" is uploaded. But not the default one. On the other side, I try to check the documentation after choosing english as backend language. I must upload it again (perhaps the default version must be always uploaded?) And after changing again my backend language to french, the english version is choose by default instead of the french (I have both in the "Documentation" folder). I am not sure that is the expected behaviour, so I revert my vote for the moment... -
Xavier Perseguers commented on patch set 1 10/04/13, 06:46
Thanks for reviewing and spotting the problem with English manual. You're right about only the English documentation being shown. I failed to test properly because EXT:sphinx already extended EXT:documentation with "some" language support and did not see that the built-in functionality did not take care of the translated version. -
Xavier Perseguers uploaded patch set 2 10/04/13, 06:58
-
Mr. Jenkins commented on patch set 2 10/04/13, 07:09
Build Successful https://ci.typo3.org/job/typo3-v4-core-gerrit/11080/ : SUCCESS -
Eric Chavaillaz commented on patch set 2 V +1 CR +1 10/04/13, 07:28
Hi, Now it works like a charm... Thanks -
Philipp Gampe commented on patch set 2 10/04/13, 15:41
DocumentationService.php:123I do not think that bitwise OR is correct here. If you reach this place the second time with the same result, then you will reset the success state, won't you? -
Xavier Perseguers commented on patch set 2 10/04/13, 15:55
DocumentationService.php:123ReplyNo it won't reset the success because: TRUE | TRUE = TRUE TRUE | FALSE = TRUE FALSE | TRUE = TRUE anyway, the goal is to know if at least one package could be fetched which is the case here. -
Philipp Gampe voted on patch set 2 CR +1 10/04/13, 16:02
-
Philipp Gampe commented on patch set 2 V +1 10/04/13, 16:23
I would like to have another review with nested languages.DocumentationService.php:123ReplyOk, this is correct ... I was thinking with exclusive OR, but of course 1 | 1 = 1. Done. -
Xavier Perseguers commented on patch set 2 10/06/13, 07:51
@Philippe, can you please describe what you mean and expect by "nested language"? -
Philipp Gampe commented on patch set 2 10/06/13, 09:38
At least some kind of fr_CA -> fr fallback or something like this. You implemented it in the code, but I did not test for it, because I did not have a test setup like this. -
Xavier Perseguers commented on patch set 2 10/06/13, 10:13
The current behaviour is like that: - If your preferred language is e.g., fr_CA, it will find a local copy of your documentation in French even if the actual locale is fr_FR. This is the fallback mechanism that is implemented when searching for a local copy in your preferred language - However, when fetching the localized packages, the dependencies are not taken into account, only the actual language you are using because we don't have a generic way of fetching all translations you are interested in (as we do with Backend module "Languages") so if your language is fr (or de) a manual available as fr_FR (or de_DE) or fr_CA or whatever will be fetched because "fr" (or "de") expands to "fr_FR", "fr_CA" or "de_DE". BUT if you selected "fr_CA" as language, a package "fr_FR" will NOT be fetched because "fr_CA" does not expand to "fr_FR". - The same logic applies if you created a special chain of dependencies such as fr -> de -> default. Fetching a package does not take this chain into account, you will have to fetch "fr" and "de" separately if "fr" is not available but "de" is. I would say that ideally the "languages" Backend module should be extended and reworked to do everything related with languages AND documentation when interacting with t3o. That is, fetching the translated manuals (but also the English manuals!) for both local extensions (as it does for extension labels) and official manuals. So the module should ask user which official manuals should be fetched (NEW, extracted from EXT:documentation > manage) and fetch manuals for all selected languages (just as extension labels) AND English (NEW column English). This is quite some refactoring, possibly even a renaming of the languages BE module and time was a bit short when I started discussing this. As translated manuals are really rare for the time being (and even Sphinx-based manuals are not widely used), it sounds like a bit early to implement much more in this l10n area IMHO -
Philipp Gampe commented on patch set 2 CR 0 10/06/13, 11:38
OK, then I would like to see a unit test for this method(s) that covers the various cases. It should be easy to mock the actual fetching away, as this is an own method. I don't have time this weekend, thus will only be able to work on tests during the sprint in Hannover next week. -
Christian Kuhn voted on patch set 2 V +2 CR +2 10/06/13, 18:51
-
Christian Kuhn merged patch set 3 10/06/13, 18:51