This was working for me on simplytest.me earlier today, but it is not working on my local test site (which has an Internet connection).
I installed Drupal with the Standard profile, and then enabled all 4 Multilingual modules.
I went to admin/config/regional/language and added Spanish. (I later tried this with French and German as well, same result).
It went to a batch screen saying "Updating translations", "Completed 1 of 16" etc.
When the batch was finished, I got back to the Languages page and it showed me 0% translated. The Interface Translation page confirmed this -- nothing was translated. There were no messages in the dblog.
So then I went to
https://localize.drupal.org/translate/languages/es
and downloaded the 8.0-beta6 file for Spanish. I went to
admin/config/regional/translate/import
and imported the file there. This was a much longer batch process, and this worked. I ended up about 97% translated.
Any ideas what could be happening to make simplytest.me work and my site not? It seems like when I did it earlier today on simplytest.me there may have been more steps in the batch process when I added the language than what I saw on my site, but I am not familiar enough with the language add and import translations process to know what was missing.
Comment | File | Size | Author |
---|---|---|---|
#2 | trans-status.png | 19.14 KB | jhodgdon |
Comments
Comment #1
jhodgdonI was wondering if I had my system misconfigured, such as a non-working tmp directory, but that is not the case. Still no idea what is happening.
Comment #2
jhodgdonAnother piece of data is that admin/reports/translations reports "Nothing to check" when I check manually. ??!?
Comment #3
jhodgdonSome other things I looked at:
- On admin/config/regional/translate/settings the translation source is set to " Drupal translation server and local files" (I had not updated that setting).
Ahhhhh.... It looks like there is a dependency on the Update module being installed. I'm looking at locale.translation.inc in function
locale_translation_get_projects()
It does this:
So it looks like if you don't have the Update module installed, you don't get any translation imports. I don't have it turned on.
That seems wrong to me. Is that the desired behavior? If so it should be documented somewhere, like in the locale module help it should say that you can't import translations if the Update module is not installed.
Comment #4
jhodgdonLooking at the code, it appears that this is really an important dependency. When you are importing translations or checking if there are updates, you need to consider Core and all other Projects you've installed, so the Locale module depends on Update to get this information.
So probably the right fix is to document that the Update module is needed if you want to get any translations automatically from localize.drupal.org. In my opinion, we should add a note about this to:
a) The main locale_help() help topic page.
b) When adding a language, set a message if translations could not be imported because of this.
c) On the translation update status report. Or better yet actually that report should not be enabled if the Update module doesn't exist.
d) On the settings page for locale it should either not let you choose to use remote sources for translations, or it should at least tell you you need the Update module.
e) Other pages that depend on this? I am not sure, but there may be others.
Comment #5
Gábor HojtsyYeah its kind of required and not :D if you enable update module THEN uninstall it, then locale will still have some cached data and use that for eternity (incorrectly). Update module is required to collect that data.
Comment #6
jhodgdonOk then on (c) on the Update Status report for translations, we should warn the user if Update module is not enabled that the Project list may be outdated.
Comment #7
Bès CreditAttribution: Bès commentedThere is also the case of custom modules that want to import their translations.
I see here that you need to include "interface translation" properties in the .info.yml to tell where the local .po is located, but you still need to have Update module active to import them.
Comment #8
Sutharsan CreditAttribution: Sutharsan as a volunteer commented#1832946: Runtime translation download fallback works different from installer translation download fallback should be able to fix this problem. I tested with the latest patch (#85) and went through the steps in the issues summary:
With each added language, the translation are automatically downloaded.
Note that the reported problem only occurs with dev releases. For any module with a stable release the translation will be downloaded without Update module being enabled. With the solution in #1832946: Runtime translation download fallback works different from installer translation download fallback also modules with a dev release will get the latest translation from their branch (if available).
Comment #9
jhodgdonThanks very much for testing! It looks like we should mark this as a duplicate of that other issue then.