Non-latin characters do not show in statistics charts

Bug #913344 reported by Muadh Hamidaddin
14
This bug affects 1 person
Affects Status Importance Assigned to Milestone
webtrees
Triaged
Low
Unassigned

Bug Description

in statistics.php
Others Tab/Sources/Individuals with sources
Lables and numbers in Charts are not translated.

Changed in webtrees:
assignee: nobody → fisharebest (fisharebest)
summary: - Individuals with sources chart translation
+ B13210 Individuals with sources chart translation
Revision history for this message
fisharebest (fisharebest) wrote : Re: B13210 Individuals with sources chart translation

These look translated to me.

Are you looking at the same page, in two different browser tabs, in two different languages?

If so, remember that changing language in one tab will change the language for the *session*. Both browser-tabs will use the same session.

This means that if you load Arabic in one browser-tab, then load English in another browser-tab, then this changes the session language to English.

Now, when you fetch a new in-page-tab (e.g. individual/family/other) in the Arabic page, it will be fetched using the current language settings, which are now English.

Changed in webtrees:
status: New → Incomplete
Revision history for this message
Muadh Hamidaddin (muadhh) wrote :

>If so, remember that changing language in one tab will change the language for the *session*. Both browser-tabs will use the same session.

I am aware of that.

Still look at http://webtrees.net/webtrees-svn/statistics.php?ged=kennedy.ged&lang=ar
You will find both individuals with sources and families with sources charts show boxes, while Media objects chart above them shown correctly.
This also applies to built 13120

wooc (wooc)
Changed in webtrees:
assignee: fisharebest (fisharebest) → nobody
Revision history for this message
fisharebest (fisharebest) wrote :

This screenshot illustrates the problem.

Although we do localise the number, they are displayed as boxes.

Other charts show arabic characters, and it is not immediately obvious what might be different here

Changed in webtrees:
importance: Undecided → Low
status: Incomplete → Triaged
summary: - B13210 Individuals with sources chart translation
+ Non-latin characters do not show in cstatistics charts
summary: - Non-latin characters do not show in cstatistics charts
+ Non-latin characters do not show in statistics charts
Revision history for this message
fisharebest (fisharebest) wrote :

It might be possible that the google-charts server is confused by mixed latin/arabic characters.

I have added a new translation for "%s%%", using the arabic percent symbol "%s٪"

Muadh - please can you review the translation, and confirm that this is the correct character in the correct position.

Revision history for this message
Muadh Hamidaddin (muadhh) wrote :

Greg - the new translation is correct.

Since we can't control how google-charts handle translated numerals, I suggest using Latin numerals only, at least the charts would show with numbers instead of boxes.

Revision history for this message
Muadh Hamidaddin (muadhh) wrote :

Screen capture to show both English and Arabic for the same stats.

English from: http://fisharebest.webtrees.net/statistics.php?ged=genesis&lang=en_US
Arabic from: http://fisharebest.webtrees.net/statistics.php?ged=genesis&lang=ar

Revision history for this message
Muadh Hamidaddin (muadhh) wrote :

Arabic screen

Revision history for this message
Et3rnal (mini-spider-57) wrote :

Hi guys,

Hopefully this is the same bug im after, anyway ill try to explain as its half working!!!

-firstly, in English all fine:
http://oi45.tinypic.com/1o6fsn.jpg

Then when switching to Arabic, 2 works fine and the other 2 doesn't! (green circles = working, red=empty boxes!)
http://oi46.tinypic.com/n5fh4.jpg
And with "Top given names" if you use English, all names printed fine "Arabic names" but if you using Arabic, then empty box!!!

- Others tab has an issue as well, not printing Arabic characters as well "empty boxes only"
http://oi46.tinypic.com/2nb7t3o.jpg

Finally the "Fan chart", its printing the Arabic characters but not connected!
http://oi49.tinypic.com/r1z88o.jpg

Hope this helps :D

thanks

Revision history for this message
fisharebest (fisharebest) wrote :

Fan chart: There are two ways to draw text at an angle.

1) use HTML+CSS. This produces high-quality results, correctly renders RTL characters, etc.
2) use the PHP bitmap graphics library. This produces low-quality results, does not correctly render RTL characters, etc.

Naturally, I would prefer to use technique (1). However, it does not work with Internet Explorer 8. Therefore I do not think we can fix this problem until we stop supporting IE8.

The statistics charts are produced using "google charts". As far as I can tell, we send the same information in the same format. But sometimes, google does not recognise the characters.

I have looked at both problems, and do not have a solution.

Revision history for this message
Et3rnal (mini-spider-57) wrote :

This is my fix(if I can call it fix?) for statistics charts
http://www.webtrees.net/index.php/en/forum/help-for-ver-1-4-1-latest-release/27860-how-i-fixed-statistics-charts-page#37531

I thought posting it here might help

Also for the Fan chart, hopefully I found a way to fix it (still using PHP). Will post it here when I finish.

Thanks

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.