Bug 206439 - [indic] [cal] Abbreviated day names are in english for month view, while they appear in indic lang chars when seen in print-preview/actual-print.
Summary: [indic] [cal] Abbreviated day names are in english for month view, while they...
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Fedora
Classification: Fedora
Component: evolution
Version: 8
Hardware: All
OS: Linux
high
medium
Target Milestone: ---
Assignee: Matthew Barnes
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks: 221244 F8Target
TreeView+ depends on / blocked
 
Reported: 2006-09-14 13:36 UTC by A S Alam
Modified: 2013-07-03 00:40 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2007-12-04 17:06:13 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
month view (118.47 KB, image/png)
2006-09-26 08:52 UTC, Mayank Jain
no flags Details
print preview (104.47 KB, image/png)
2006-09-26 08:54 UTC, Mayank Jain
no flags Details
Screenshot - basis for reopening the bug. (90.69 KB, image/png)
2007-01-03 06:55 UTC, Mayank Jain
no flags Details
Print-preview screenshot with correct indic translations from the locale. (48.20 KB, image/png)
2007-01-03 07:20 UTC, Mayank Jain
no flags Details
Buggy Screenshot (101.78 KB, image/png)
2007-01-05 09:35 UTC, Mayank Jain
no flags Details
Patch to solve the problem (4.31 KB, patch)
2007-01-05 14:35 UTC, Mayank Jain
no flags Details | Diff
Screenshot with modified code. (109.80 KB, image/png)
2007-01-05 14:37 UTC, Mayank Jain
no flags Details
Fixes the weekday-picker.c file also (5.76 KB, patch)
2007-01-05 15:08 UTC, Mayank Jain
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
GNOME Bugzilla 392747 0 None None None Never

Description A S Alam 2006-09-14 13:36:37 UTC
Description of problem:
during printing from Cal's Month View (Indic Interface), Calendar is showing
Day's Name in English, but during Printing it shows Day's name in Local language
(like Hindi Punjabi etc)

Version-Release number of selected component (if applicable):
evolution-2.8.0-1.fc6

How reproducible:
Everytime during printing

Steps to Reproduce:
1. Open Evoluton with pa_IN.UTF-8 evolution
2. Goto Calender-Month View
3. Print
  
Actual results:
Month's View Cal's Day in Local Lang

Expected results:
Month's View Cal's Day in should be in Lang in Print or Window should show in
Locale Lang

Additional info:

Comment 1 Akira TAGOH 2006-09-25 10:24:37 UTC
Well, numeral characters should uses the native one?

Comment 2 Mayank Jain 2006-09-26 08:52:46 UTC
Created attachment 137119 [details]
month view

Comment 3 Mayank Jain 2006-09-26 08:54:39 UTC
Created attachment 137120 [details]
print preview

Everything seems working fine here...

Comment 7 Matthew Barnes 2007-01-02 17:17:51 UTC
Closing as NOTABUG since neither Mayank nor I could reproduce the problem.  Feel
free to re-open this if you still encounter the problem in Fedora Core 6 or later.

Comment 8 Mayank Jain 2007-01-03 06:55:48 UTC
Created attachment 144686 [details]
Screenshot - basis for reopening the bug.

Comment 9 Mayank Jain 2007-01-03 07:06:32 UTC
Matthew, the original bug report was misleading. I just discussed this bug with
Aalam. 

The bug is... while print-preview for a month view shows days (top right
calendar in print-view) shows chars in the locale with which evo was run, the
month view shows day names (abbreviations) in english (check screenshot).

Another interesting fact is that is that this bug is not for eastern locales
(ja, chinese) but for indic locales (I tested with pa_IN, hi_IN, gu_IN -
languages with highest translations).

Hence, reopening the bug.

Comment 10 Mayank Jain 2007-01-03 07:20:59 UTC
Created attachment 144688 [details]
Print-preview screenshot with correct indic translations from the locale.

Comment 11 Mayank Jain 2007-01-03 07:25:10 UTC
Changing the bug summary to be more apt.

Comment 12 Mayank Jain 2007-01-05 07:01:45 UTC
The date navigator in question is an ECalendar and is initiated via e-calendar.[ch]

ECalendarItem is the actual navigatable widget in ECalendar.

And this bug originates from this code in e_calendar_item_init in e-calendar-item.c

---------------------
	/* Translators: These are the first characters of each day of the
	   week, 'M' for 'Monday', 'T' for Tuesday etc. */
	calitem->days = _("MTWTFSS");
---------------------


The _("MTWTFSS") is set in the UI using 

-------
for (day = 0; day < 7; day++) {
		layout_set_day_text (calitem, layout, day_index);
-------

and layout_set_day_text simply picks up one char at the day_index value & add it
to pango layout.

One possible fix is that the code can be modified to pick up values of
abbriviated day names from glibc.

I would not recommend translating  _("MTWTFSS") as in almost all indic langs,
day's 1st char would make no sense. Moreover, if this string is picked up from
locale data, it would be always correct... as compared to be depending upon
translator's translation.


Comment 13 Mayank Jain 2007-01-05 07:34:49 UTC
Comment #5 From A S Alam (aalam)  	 on 2007-01-05 01:45 EST  
[reply]  	 Private

1-Ok not translate, then in Printout there should be only English, as for most
(not all)
3 characters are used to represent the Day's name (In print), where there is
space is only for 2 character, so those are interMixed

2- otherwise in GUI, only first character should translate (most Indic
translation, they use English so that is TOTALLY Translation issue).



Comment 14 Mayank Jain 2007-01-05 09:35:03 UTC
Created attachment 144893 [details]
Buggy Screenshot

The screenshot clealy shows that the current code is not suitable to handle a
utf-8 translation for _("MTWTFSS") string.

Comment 15 Mayank Jain 2007-01-05 09:36:05 UTC
Following translation was used in Comment 14's screenshot.

#. Translators: These are the first characters of each day of the
#. week, 'M' for 'Monday', 'T' for Tuesday etc.
#: ../widgets/misc/e-calendar-item.c:416
msgid "MTWTFSS"
msgstr "सोमंबुगुशुशर"

Comment 16 Mayank Jain 2007-01-05 13:22:19 UTC
Following a different strategy to use different strings for day names.

Comment 17 Mayank Jain 2007-01-05 14:35:48 UTC
Created attachment 144904 [details]
Patch to solve the problem

Comment 18 Mayank Jain 2007-01-05 14:37:18 UTC
Created attachment 144905 [details]
Screenshot with modified code.

Comment 19 Mayank Jain 2007-01-05 14:39:02 UTC
Matthew, please dont build the patch yet as I can see that there's another
string marked as 

#. The first letter of each day of the week starting with Sunday
#: ../calendar/gui/weekday-picker.c:319
msgid "SMTWTFS"
msgstr "SMTWTFS"

So even this might need some work. Also, letme see if I can fix the printing
issue as well.

Thanks,
Mayank

Comment 20 Mayank Jain 2007-01-05 14:40:11 UTC
If you happen to know how can I activate the weekday-picker in UI... please do
share.

:)
Mayank

Comment 21 Mayank Jain 2007-01-05 15:08:03 UTC
Created attachment 144907 [details]
Fixes the weekday-picker.c file also

This patch fixes another string translation issue mentioned in previous
comment, marking them in such a way that they use the same translation as in
e-calendar-item.c file.

Comment 22 Mayank Jain 2007-02-23 10:00:24 UTC
Matthew, can you please have a look at the patch in Comment 21?

Thanks,
Mayank

Comment 23 Christopher Aillon 2007-04-17 19:33:02 UTC
Since there's a patch, we can try to get this for FC7....

Comment 24 Matthew Barnes 2007-10-04 16:25:53 UTC
Moving to F8Target

Comment 25 Matthias Clasen 2007-10-05 02:01:30 UTC
The patch in comment #21 looks reasonable to me, apart from one typo 
("abbriviated" should be "abbreviated"), but it is of course a string change,
and should be accompanied by a script to convert po files, as far as possible.

Comment 26 Milan Crha 2007-10-19 13:59:31 UTC
I added changed patch to upstream bug.

Comment 27 Hu Zheng 2007-11-19 08:57:56 UTC
I have created a new patch which get weekday name from glibc.
See: https://bugzilla.redhat.com/show_bug.cgi?id=221244

Milan Crha, can you send this patch to the upstream bug which created by you?

Comment 28 Milan Crha 2007-11-19 09:21:54 UTC
I added other patch to upstream bugzilla (see bugzilla reference below) a month
ago, but it wasn't reviewed yet. Also the bug there wasn't created by me, it's
there for more than 10 months. My patch fixes some issues in a11y as well. You
can see that patch and say what can be improved, if you wish, but I'm sorry, I
don't think we will use your patch. (Maybe neither my, it depends on upstream.)

Comment 29 Matthew Barnes 2007-12-04 17:06:13 UTC
This has been fixed upstream so closing as UPSTREAM.

It missed the 2.21.3 release by a hair, but should trickle down to Fedora in
subsequent releases.


Note You need to log in before you can comment on or make changes to this bug.