Loading l10n_community/l10n_community.module +12 −5 Original line number Diff line number Diff line Loading @@ -66,16 +66,23 @@ function template_preprocess_l10n_community_progress_columns(array &$variables) if ($sum == 0) { // We handle a project without any source strings available for translation. return [ ['data' => t('No data available yet.'), 'colspan' => 3], ]; $variables['bar'] = t('No data available yet.'); return; } // Compute numbers, percentages and provide alternate text titles. $done_percent = round($translated / $sum * 100, 2); $status = [ 'translated' => [(int) $translated, $done_percent, t('!percent translated')], 'untranslated' => [$sum - $translated, 100 - $done_percent, t('!percent untranslated')], 'translated' => [ $translated, $done_percent, t('!percent translated'), ], 'untranslated' => [ $sum - $translated, 100 - $done_percent, t('!percent untranslated'), ], // suggestions are not in the bar as they overlap with both translated and // untranslated strings, so we cannot display them here. ]; Loading Loading
l10n_community/l10n_community.module +12 −5 Original line number Diff line number Diff line Loading @@ -66,16 +66,23 @@ function template_preprocess_l10n_community_progress_columns(array &$variables) if ($sum == 0) { // We handle a project without any source strings available for translation. return [ ['data' => t('No data available yet.'), 'colspan' => 3], ]; $variables['bar'] = t('No data available yet.'); return; } // Compute numbers, percentages and provide alternate text titles. $done_percent = round($translated / $sum * 100, 2); $status = [ 'translated' => [(int) $translated, $done_percent, t('!percent translated')], 'untranslated' => [$sum - $translated, 100 - $done_percent, t('!percent untranslated')], 'translated' => [ $translated, $done_percent, t('!percent translated'), ], 'untranslated' => [ $sum - $translated, 100 - $done_percent, t('!percent untranslated'), ], // suggestions are not in the bar as they overlap with both translated and // untranslated strings, so we cannot display them here. ]; Loading