Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#1003 closed Bug (fixed)

empty translations string should default to english (Catalan translation is partially broken)

Reported by: matt Owned by:
Priority: critical Milestone: Piwik 0.4.4
Component: UI - UX (AngularJS, twig, less) Keywords:
Cc: Sensitive: no

Description

From email:

If you go to piwik online demo and choose catalan language, piwik does not work correctly. Try to go , for exemple, to "referers" tab... You cannot.

I think the translation is bad-formed, I think some errors like characters like Ç which are escaped ç , and that's because it doesn't work.

Change History (12)

comment:1 Changed 5 years ago by vipsoft (robocoder)

latest rev in svn worksforme.

matt: can you svn up piwik.org/demo-trunk ?

comment:2 Changed 5 years ago by matt (mattab)

I updated demo-trunk and is broken too (look at Referers>Overview which doesn't load)

Note: we should update unit test to detect this broken use case.

comment:3 Changed 5 years ago by vipsoft (robocoder)

In [1493], Add missing widget category name.

comment:4 Changed 5 years ago by vipsoft (robocoder)

I think the proper fix is to eliminate the translation of the widget category name in Piwik_Add():

		$widgetCategory = Piwik_Translate($widgetCategory);

because many of the widget category names are neither translated nor translateable:

'Actions_Actions'
'Example Widgets'
'General_Visitors'
'GeoIP'
'Live!'
'Referers'
'UserSettings_VisitorSettings'
'Visits Summary'
'VisitTime_SubmenuTimes'

comment:5 Changed 5 years ago by vipsoft (robocoder)

scratch that... I forgot category names are used in Widgetize.

comment:6 Changed 5 years ago by vipsoft (robocoder)

p.s. to explain the bug/fix: because the translated string was "", json_encode (on piwik.org) discarded the UserSettings widgets when serializing. On my server, json_encode used "" for the widget category name.

comment:7 Changed 5 years ago by vipsoft (robocoder)

  • Resolution set to fixed
  • Status changed from new to closed

In [1495], refs #1003; use translation strings for consistency

comment:8 Changed 5 years ago by matt (mattab)

The translation manager should have used the english translation if the original translation string was "empty" - does your comment mean that this is not working as expected?

comment:9 Changed 5 years ago by vipsoft (robocoder)

The translation manager uses the English string if the translation string is not defined (see array_merge). In the Catalan translation, it was defined as an empty string.

comment:10 Changed 5 years ago by matt (mattab)

  • Resolution fixed deleted
  • Status changed from closed to reopened
  • Summary changed from Catalan translation is partially broken to empty translations string should default to english (Catalan translation is partially broken)

reopening it's a quick fix

comment:11 Changed 5 years ago by vipsoft (robocoder)

  • Resolution set to fixed
  • Status changed from reopened to closed

In [1501], fixes #1003 - filter empty translations

comment:12 Changed 5 years ago by vipsoft (robocoder)

In [1502], refix #1003

In [1503], refs #1003 - filter empty translations when counting percentage translated

Note: See TracTickets for help on using tickets.