asaglimbeni / django-datetime-widget

Bootstrap django-datetime-widget is a simple and clean widget for DateField, Timefiled and DateTimeField in Django framework. It is based on Bootstrap datetime picker, supports both Bootstrap 3 and Bootstrap 2
Other
219 stars 125 forks source link

Problem with translation of "Today" #2

Closed GabrielDancause closed 11 years ago

GabrielDancause commented 11 years ago

We have an issue with this line :

https://github.com/asaglimbeni/django-datetime-widget/blob/master/datetimewidget/widgets.py#L118

Since the french word for "Today" is "Aujourd'hui", it has an apostrophe in it which breaks the widget.

We solved it doing that : TODAY = '"%s"'%_("Today")

Not sure if it's an acceptable fix for you. If yes, I could do a pull request or let you code it since I don't want to fork your project and keep everything in the same place. Please advise. Thanks for the great widget by the way.

cc @francisbissonnette

asaglimbeni commented 11 years ago

Hi GabrielDancause, yes it's a bug! for now your solution it's ok, when I'll have time to work I have to make a lot of optimizations in this plugin. I add you as collaborator in this project, so you can fix the problem yourself.

If you translate django-datetime-widget in Franch, please commit the translation here, https://github.com/asaglimbeni/django-datetime-widget/tree/master/datetimewidget/locale. Remember to use django-admin command to build it: 1 - django-admin.py makemessages --locale=fr 2 - edit .po file with your translation
3 - django-admin.py compilemessages --locale=fr 4 - commit and push ;)

Thank you so much for your contribution! Alfredo

asaglimbeni commented 11 years ago

Fixed on develop branch.