Events Made Easy › Forums › Bug fixed or feature request implemented › Calendar date format
- This topic has 19 replies, 2 voices, and was last updated 11 years, 8 months ago by Franky.
-
AuthorPosts
-
Wed 10 Apr 2013 at 01:42 #43983AnonymousInactive
How to change the date format on top of the Event Calendar? The default doesn’t look right to me since I’m using Chinese word press. Thanks!
Wed 10 Apr 2013 at 09:18 #50409FrankyKeymasterCan you explain what’s wrong with the format? A jpg indicating the thing that’s wrong or so?
Also, what is your locale in wp-config.php?
Thu 11 Apr 2013 at 00:53 #50410AnonymousInactivehttps://www.dropbox.com/s/mr6w1gfmwrzqcoq/ScreenClip.png
The month is translated into Chinese, but need to followed by “月” after 2013 followed by “年”, such as 2013年4月 or 2013年四月
locale in wp-config.php, do you mean define(‘WPLANG’, ‘zh_CN’);?
Thu 11 Apr 2013 at 12:13 #50411FrankyKeymasterBased on https://github.com/jquery/jquery-ui/commit/a922d4d5b659cb2fac8f5e0d6d875db81595b17b
there seem to be new versions, so I’ll update this evening and let you try again, ok?
Thu 11 Apr 2013 at 22:41 #50412FrankyKeymasterThese 2 changes should fix it:
Thu 11 Apr 2013 at 23:35 #50413AnonymousInactiveThank you for your effort Franky!
I guess I need to replace jquery.ui.datepicker-zh-CN.js and modify eme_events.php?
Fri 12 Apr 2013 at 00:51 #50414AnonymousInactiveMade change to eme_events.php, uploaded jquery.ui.datepicker-zh-CN.js and restarted EME, but it didn’t happen. I don’t know what I missed.
Fri 12 Apr 2013 at 08:06 #50415FrankyKeymasterHmm … I think I misinterpreted your image: this is not a datepicker issue, but a regular calendar issue. Indeed for now I print “$month $year” at the top there. I need to figure out how to let php handle that so it is correctly printed in Chinese (and any other language)
Fri 12 Apr 2013 at 15:56 #50416AnonymousInactiveThanks Franky. It’s not a rush. It is still understandable. If you can tell me which php, I might be able to do a temp fix for myself.
Fri 12 Apr 2013 at 21:26 #50417FrankyKeymasterWell … if I knew that, it would have been in the code already 🙂
Any suggestion is welcome, but I think the easiest would be to add a format option for the calendar.
Fri 12 Apr 2013 at 23:05 #50418FrankyKeymasterConcerning the month names: it’s a WP translation issue, see:
http://svn.automattic.com/wordpress-i18n/zh_CN/branches/3.3/messages/zh_CN.po
As you can see there (search for January), the short name of the month (Jan_January_abbreviation) doesn’t contain the character 月, while the full name (January) does contain it. For this you should file a bug report with wordpress.
Now, for the year suffix and the month following the year, try this change:
Sat 13 Apr 2013 at 14:26 #50419AnonymousInactiveThanks Franky
Sat 13 Apr 2013 at 22:42 #50420FrankyKeymasterFor now I changed the code to always show the “full” month name for some locales, see:
http://plugins.trac.wordpress.org/changeset/697096
This should completely solve your issue.
Btw: if you’re willing to help translate EME to Chinese, just let me know!
Tue 16 Apr 2013 at 02:30 #50421AnonymousInactiveSorry Franky. Didn’t check into this for two days. Sure I would love to help for translation. Just let me know what needs to be done. Send me an email.
I made change as you mentioned above, but somehow “年” couldn’t show up correctly. Turned into two special characters. Now I just set it as space so at lease the year and month are in the right order. Thanks!
Tue 16 Apr 2013 at 08:31 #50422FrankyKeymaster2 special characters? This means either the file is not in UTF-8: I tried it here, and it seemed to work fine. Let me check again.
For the translation: see http://www.e-dynamics.be/bbpress/topic.php?id=388 , we’re on launchpad now.
Tue 16 Apr 2013 at 22:05 #50423FrankyKeymasterJust tried it again here, this is what I have: “2013年 四月”
Seems ok, no?
Thu 18 Apr 2013 at 15:15 #50424AnonymousInactiveWe are having problem with the hosting server so I can’t try it now. I’ll let you know.
For translation, I didn’t quite get it. Do I need to join the launchpad team to work on it?
Thu 18 Apr 2013 at 21:46 #50425FrankyKeymasterWell, yes 🙂
But if you don’t like that:
download and install poedit. Then open the po file you want to change, and open as “template file” the eme.pot file. Then you’ll see all strings not (correctly translated). It’s very easy. Once you press save (after you finished editing), poedit compiles the mo file for you, so you can then send me the po and mo file.
See also
http://weblogtoolscollection.com/archives/2007/08/27/localizing-a-wordpress-plugin-using-poedit/
Fri 19 Apr 2013 at 17:45 #50426AnonymousInactiveStill two squares for me. I guess it’s my page? The other Chinese characters are showing all right though.
Sun 21 Apr 2013 at 22:00 #50427FrankyKeymasterMake sure the file eme_calendar.php is in UTF-8 character set format and set ‘binary’ if using ftp to upload files.
-
AuthorPosts
- The forum ‘Bug fixed or feature request implemented’ is closed to new topics and replies.