dereuromark/cakephp-calendar

Clean up legacy helper code

Closed this issue · 7 comments

and

  • refactor into either widget or templates for table layout

also:

  • provide a full responsive alternative using divs (instead of table)

Check if we can leverage http://yohan.giarel.li/CalendR/

Hi. Would a part of this be a possibility to translate the calendar? Thanks!

Most of it already is translated via __() right?
Please help out to further improve.

Well, parts of the code are like this:

__(ucfirst($this->monthName($month)))

Which seems like a "dirty" solution - for instance it won't get picked up by the i18n shell extract, as far as I understand. Furthermore, the month names are already defined for translation in cake (datetime widget), so it's sort of redundant having to translate the month names in two separate places.

You are right - Are you able to provide a PR here to leverage the cake ones if they are available?
Otherwise we need to find a more explicit way.

I would be glad to help, however, I only tried making a PR once so far (in CakeDC Users project), and it didn't really work out 😢. Seems like I don't know how to do it properly.

Give it another try. I am sure we can figure it out together.

OK, I'll give it a go tomorrow. Thanks!