Problem

The Drupal 7 project listing shows every project with a progress bar over all languages (string count times the number of languages), the number of untranslated strings and the number of strings with suggestions. Its "explore projects statistics" setting hides those three columns but keeps the list, and only the general statistics setting replaces the page with the disabled message.

On 3.0.x the total binds as count ?? (0 * languages), so the bar is measured against one language only; the untranslated and suggestions columns are gone; and either setting hides the whole list. The translation counts were also distinct strings rather than string and language pairs, which makes a total over all languages meaningless (translating everything in two languages counts once), and they were cached for an hour without invalidation, so the list lagged behind approvals.

Proposed resolution

  • Multiply the string count by the languages, and count translated and suggested strings per language, so the progress is progress over all languages as the Drupal 7 code intended. (The Drupal 7 queries count distinct strings and join the suggestion flags on the wrong alias, which is why its own multi-language numbers are off; the Drupal 7 code stays as is.)
  • Untranslated and suggestions columns like Drupal 7; the "explore projects statistics" setting drops the columns, the general statistics setting drops the list.
  • The cached counts carry the translation and status flag list cache tags, and the page is invalidated when languages change.

Tests

Drupal 7 first: testExploreProjects() checks the three columns and the counts of two projects sharing a string before and after a translation and a suggestion, with a second language, and the two settings. Ported as L10nExploreProjectsTest.

LLM disclosure

LLM was used to find, diagnose explain and fix this issue. With human review.

Comments

gábor hojtsy created an issue. See original summary.

  • 086092d3 committed on 7.x-1.x
    fix #3621599: Explore projects: progress never multiplied by the...

  • 4f5f956e committed on 3.0.x
    fix #3621599: Explore projects: progress never multiplied by the...
gábor hojtsy’s picture

Status: Active » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.