thomersch / openstreetmap-calendar

osmcal, a Collaborative Calendar for OpenStreetMap-related Events
https://osmcal.org
Apache License 2.0
33 stars 9 forks source link

Internationalization (i18n) ? #53

Open pyrog opened 3 years ago

pyrog commented 3 years ago

Could you give some guidelines to help i18n of OSMCAL ?

There is only few entries in django.po 😢.

thomersch commented 3 years ago

Thanks for raising an issue. That's a big one.

Currently I am working on some l10n tasks, e.g. date formatting and time zone-awareness, but as for translations, that is much more complex and is not on the very top of my priorities. While I think that i18n is important, I don't think the community is large enough to sustain translations at the moment.

While it doesn't help for e.g. adding events, for displaying purposes the integrations might help. E.g. the Belgian community integrates the osmcal widget to display events in multiple languages:

Screenshot 2020-12-10 at 17 18 59
pyrog commented 3 years ago

that is much more complex

I know 😃 I just need an example to start i18n correctly in osmcal (I done this in the past in HOT Task Manager).

cf. https://docs.djangoproject.com/fr/2.2/topics/i18n/translation/#internationalization-in-python-code

I don't think the community is large enough to sustain translations at the moment.

I could add the code (cf. below) and translate the french .po file 😃

from django.utils.translation import gettext as _ 

def my_view(request):
    output = _("Welcome to my site.")
    return HttpResponse(output)
    <header class="header-bar">
        <a href="/" class="header-home-area">
            <img class="header-home-icon" src="{% static 'osmcal/osm_logo.png' %}" height="100%">
            <span class="hide-slim">{% trans "OpenStreetMap Calendar" %}</span>
            <span class="hide-wide">Calendar</span>
        </a>

the Belgian community integrates the osmcal widget to display events in multiple languages:

Do you have a link please ?

thomersch commented 3 years ago

the Belgian community integrates the osmcal widget to display events in multiple languages:

Do you have a link please ?

https://openstreetmap.be/fr/news.html

pyrog commented 3 years ago

Thanks for the link 😃

The date are not translated in the french wiki.

Screen copy

Is it related to openstreetmap-calendar or to the wiki template ? Where is the wiki template code ?

This message in France page is not translated too:

Add your event to OpenStreetMap Calendar

Or in the german page:

German page