Problem/Motivation
No text is displayed after "Missing translations:" on the Available translation updates report page.
Steps to reproduce
1. Install drupal 8. Make sure automatic updates are switched off.
2. Enable Language module.
3. Enable Interface translation.
4. Add a language on admin/config/regional/language
5. Enable the Update manager module.
6. Go to admin/reports/translations, the status of the added language is "Missing translations for one project
Drupal core (8.0.0-beta4). File not found at http://ftp.drupal.org/files/translations/8.x/drupal/drupal-8.0.0-beta4.h... nor at translations://drupal-8.0.0-beta4.hu.po" or similar.
7. Now click "Check manually".
Result: The status changes to: "Updates for: Drupal core
Drupal core (2015-01-19)
Missing translations for:" and is followed by nothing.
Proposed resolution
Change order of "Missing translations for:" and the list of modules.
Comment | File | Size | Author |
---|---|---|---|
#48 | 2410315-nr-bot.txt | 145 bytes | needs-review-queue-bot |
#43 | lang_2.png | 100.66 KB | lomale@bluewin.ch |
#43 | lang_1.png | 104.92 KB | lomale@bluewin.ch |
#33 | Language_added.JPG | 377.4 KB | Truptti |
#33 | No_error_displayed.JPG | 87.39 KB | Truptti |
Comments
Comment #1
balagan CreditAttribution: balagan commentedComment #2
Gábor HojtsyComment #3
balagan CreditAttribution: balagan commentedComment #4
balagan CreditAttribution: balagan commentedThe template_preprocess_locale_translation_update_info function in the core\modules\locale\locale.pages.inc file is responsible for this.
On line 99 $details['missing_updates_list']['#prefix'] = t('Missing translations for:'); happens even if the '#items' in the 'missing_updates_list' array is empty. That is set from the $releases variable, so I check if that is !empty().
Comment #5
balagan CreditAttribution: balagan commentedComment #6
Gábor HojtsyIs there a test that we can expand to check for this? That would be great!
Comment #7
balagan CreditAttribution: balagan commentedOr maybe just change line 78 to !empty() instead of isset()?
Comment #8
balagan CreditAttribution: balagan commentedI think using !empty() is a better solution. That whole code has no point to run, if $variables['not_found'] is empty.
Comment #11
balagan CreditAttribution: balagan commentedActually "Missing translations for" is a bit misleading. Seeing the code it seems it displays the list of the missing updates (files not found). First I thought it would be listing projects with downloadeble translations.
Should we change it to "Missing updates for:" instead? I think that describes more properly what it would show.
Comment #12
Gábor HojtsyMakes sense to me.
Comment #13
balagan CreditAttribution: balagan commentedI have changed "Missing translations for" to "Missing updates for:"
Comment #15
balagan CreditAttribution: balagan commentedComment #16
balagan CreditAttribution: balagan commentedUpdated failing tests.
Comment #17
balagan CreditAttribution: balagan commentedComment #19
balagan CreditAttribution: balagan commentedForgot to git diff after fixing this.
Comment #20
balagan CreditAttribution: balagan commentedComment #21
jhedstromThis appears to have some test coverage, but could potentially be expanded. Patch no longer applies though.
Comment #22
Nitesh Sethia CreditAttribution: Nitesh Sethia as a volunteer commentedRerolled the patch as per the latest D8 release.
Comment #26
haripalrao CreditAttribution: haripalrao commentedRerolled
Comment #27
vaibhavjainUpdated status, and removed tag.
Comment #29
Gábor HojtsyLooks like that did not last long unfortunately :/ Sorry nobody had time to do a quick review in the meantime :/
Comment #32
mpdonadiospecifically
Pretty sure this is the correct merge, and LocaleUpdateInterfaceTest passes locally now.
Comment #33
Truptti CreditAttribution: Truptti at Axelerant commentedTried verifying the issue as per the steps mentioned, but the error is not displayed on '/admin/reports/translations' page (made sure that auto update is switched off).Could not reproduce the error.
Comment #37
lpalgarvio CreditAttribution: lpalgarvio as a volunteer commentedComment #43
lomale@bluewin.ch CreditAttribution: lomale@bluewin.ch as a volunteer and commentedHi i come back on this.
I have "Missing translations for 13 projects" for language English.
I found out that somewhere the path for eng i.e.
https://ftp.drupal.org/files/translations/all/address/address-8.x-1.9.en.po
has been changed to
address-8.x-1.9.en-gb.po 03-Nov-2020 17:47 787
See pictures 1+2
I'm on
Drupal-Version 8.9.13
PHP 7.4.16
you can we fix that??
Comment #48
needs-review-queue-bot CreditAttribution: needs-review-queue-bot as a volunteer commentedThe Needs Review Queue Bot tested this issue. It either no longer applies to Drupal core, or fails the Drupal core commit checks. Therefore, this issue status is now "Needs work".
Apart from a re-roll or rebase, this issue may need more work to address feedback in the issue or MR comments. To progress an issue, incorporate this feedback as part of the process of updating the issue. This helps other contributors to know what is outstanding.
Consult the Drupal Contributor Guide to find step-by-step guides for working with issues.