Less words, more work. See the patch file please. Instead count of aviable new strings the module output Array word.

CommentFileSizeAuthor
array_count.patch683 bytesterryprogetto

Comments

PatchRanger’s picture

I have the same issue. I had ;) But your patch doesn't work correctly: total count of each module's untranslated strings is definitely equals 2. When you print_r($module['strings']) you discover that this array always contains only 2 elements: 'new' and 'un'. What we seek is in the 'new'. Your decision doesn't solve the issue. Though your slogan "Less words, more work." sounds great!)))
I don't know how to produce patches yet - so I will try to explain what I did:
1) in live_translation.admin.inc on line 43:
- 'strings' => isset($import_status[$langcode][$mod]) ? $import_status[$langcode][$mod] : 0,
+ 'strings' => isset($import_status[$langcode][$mod]['new']) ? $import_status[$langcode][$mod]['new'] : 0,
2) in live_translation.inc on line 41:
- elseif (!empty($import_status[$langcode][$mod]) and $import_status[$langcode][$mod] > 0) {
+ elseif (!empty($import_status[$langcode][$mod]['new']) and $import_status[$langcode][$mod]['new'] > 0) {
That's all what I did. It solves 2 problems:
* Wrong message of total strings: instead of integer it shows the word 'Array' and display notice (it is the subject of this issue);
* Wrong status of updatings: even when there are 0 new strings it shows table rows in red where written 'Outdate: 0 strings'. If you do as I've written above this problem escapes.
Maintainers! Please make a patch from this instruction and commit to CVS.
If you notice something wrong with my decision - please don't have scruples to say :)

andrew answer’s picture

Issue summary: View changes
Status: Active » Fixed

I think what this issue was fixed by this commit, live_translation.update.inc:156:

        if (is_array($pending_translations[$mod])) {
          $import_status[$langcode][$mod] = $pending_translations[$mod]['new'];
          $untranslated[$langcode][$mod]  = $pending_translations[$mod]['un'];
        }

Please check it.

Status: Fixed » Closed (fixed)

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