When you have a new D8 installation there is no sites/default/files/translations directory automatically available yet.
This directory is required by the "Import translation file" function at the user interface translation configuration page. See attached print screen for error messages which are not very helpfull for a beginner.
Temporary solution: file system configuration page has to be saved once so that the missing directory gets created.
Comment | File | Size | Author |
---|---|---|---|
ImportTranslation.png | 53.94 KB | cirage |
Comments
Comment #1
Gábor HojtsyI've seen this one as well. Thanks for the report. Found the same temporary solution as well :) We should either (a) create the directory when the locale module is enabled (I would say do this) or (b) create it when attempting to first use it (but we don't really know when it is going to be). Alternately, we can also stop saving the uploaded files in that directory, but I think this changed when the import process changed to work with the built-in localization update.
Comment #2
Sutharsan CreditAttribution: Sutharsan commentedI would suggest that, once the built-in localization update is realised, we only save when the directory is available and if the uploaded filename matches the l.d.o pattern of {project name}-{version}.{language code}.po.
Comment #3
Gábor HojtsyWell, I think even if the first thing you do is import a .po file on the UI, the directory should be created for consistency. As-is currently, people cannot import a .po file without first going and saving the file settings screen.
Comment #4
YesCT CreditAttribution: YesCT commentedI think we can create the translations directory like we did in #1848490: Import translations automatically during installation
Not novice, but medium to copy the small bit of relevant code and make a new patch here.
Comment #5
Sutharsan CreditAttribution: Sutharsan commentedGábor raised the question, but we did not answer it. Should we or should we not make the translations directory required?
Making the directory required will make the code easier, but it means that translation files will be stored regardless of them being used a second time.
Comment #6
Gábor Hojtsy@Sutharsan: I don't think its a problem if files are stored even if not used anymore. It could serve as a good track-back of what sources were used to set up the site's translations. Config translation will not need the files any more than locale module itself.
Comment #7
YesCT CreditAttribution: YesCT commentedComment #8
Sutharsan CreditAttribution: Sutharsan commentedIn the meantime the translations directory did become required. This issue will no longer occur. Closing the issue.