Hello,
I've been trying to import the initial translation for Estonian language but keep on getting "File to import not found" error.
The file I'm trying to import is a all in one translation from the old translation server (drupal-all-et.po). Is this happening because of:
1. new suggestions were added before the translation was imported
2. I need to import each core module separately
3. some other reason not related to the translation whatsoever?
| Comment | File | Size | Author |
|---|---|---|---|
| #12 | ImportFeedback.png | 33.98 KB | gábor hojtsy |
| #12 | better-file-error.patch | 741 bytes | gábor hojtsy |
| #4 | modules-node.po | 27.51 KB | paranojik |
Comments
Comment #1
gábor hojtsyIt could be that your file is too big to be saved by PHP even. What's the size of that file?
Comment #2
nonsie2.6 MB - should I try to import each core module separately?
Comment #3
gábor hojtsyI think we have a general 2MB upload limit, not sure why it does not get you an error message of the upload error. Hm. Anyway, I'd import at most in 1MB chunks, but it would take an amazing amount of time. You can just chunk the file inbetween any msgstr "" and msgid "" (between two English - translated pairs). The l10n_server does not care about any of the header values, so it does not care if the header is missing.
Comment #4
paranojik commentedI get an error saying 'The translation file modules-node.po ended unexpectedly at line 982.'. No errors were reported by the msgfmt tool. See attached file.
Comment #5
gábor hojtsy@paranojik: not sure why are you hijacking this issue, when you have nothing to do with @nonsie's report and your file gets uploaded but turns back with a parse error, so your neither your language, neither your error is common to @nonsie's. Your bug is a duplicate of #561296: Error message when importing .po file where the last string is untranslated.
Comment #6
paranojik commentedI'm sorry. I also got the error when importing the initial translation, so I posted here.
Comment #7
gábor hojtsyRetitled to not invite misleading follow ups.
Comment #8
nonsieKika helped me to split the translation into 4 batches, the largest one was 1.1 mb. One of them was successful, the rest failed with errors such as:
The translation file 1.po contains a syntax error on line 1794.
The translation file 3.po ended unexpectedly at line 8007.
The translation file 4.po ended unexpectedly at line 338.
I guess this means we could close this issue since it is related to the upload size or even better note somewhere that the upload max is 2MB?
Comment #9
gábor hojtsyLet's not close this, and make l10n_server intelligently tell you that there was an upload file size problem. My assumption is that it does not look at the file upload error and just assumes it worked and later finds that the file is not there. Moving to l10n_server.
Normally, a .po file above 2MB is too big, since you would not translate such big amounts at once to import. Also, due to the database load, we would not let bigger file uploads anyway.
Comment #10
gábor hojtsyHm, amusingly, the file_save_upload() function we reuse does present error messages to the user when errors occur. Seen at http://api.drupal.org/api/function/file_save_upload/6
Are you sure you did not seen any other messages emitted by Drupal which would inform you on the size limitation?
Comment #11
nonsie"File to import not found" was the only error message I got.
Comment #12
gábor hojtsyHm. Trying to reproduce this on my local machine. If I pick no files, I get the l10n_server error you've seen. I had a 8MB post max size limit, and tried to upload bigger files. Uploading smaller and non-.po files did trigger the .po parser with an error on line 1. But uploading bigger files just thrown off the upload with a form reload but no feedback. Amusing. Even if the post max size did stop the file from uploading, at least the l10n_server checking should have kicked in. Amusing.
Anyway, the best I could do is to highlight the size limits in the upload form and in the error message. The UI for the import was already reworked in #610768: Clean up import UI, fix last string bug and add tests very recently. So what I'm doing here is a more detailed error report on our part. This is the best I could do to I guess.
I'm committing this and marking as fixed.