How to Localize Prometheus GUI

26 views
Skip to first unread message

Christian Manalo

unread,
Jan 5, 2021, 5:20:22 AM1/5/21
to Prometheus Users
Hi,

Is it possible to localize the texts displayed on the GUI?
Any ideas on how to do it?

Thanks

Julius Volz

unread,
Jan 5, 2021, 9:52:50 AM1/5/21
to Christian Manalo, Prometheus Users
Hi,

Currently there is no localization framework being used anywhere in Prometheus, and the only language available is English (which is hardcoded everywhere).

It's a possibility in the future, but we need to answer the following questions for it:

* Are we ok with the extra maintenance burden? IMO at least it would have to be done in a way that a "normal" change only needs to touch the English texts, and then any translated versions are optional (e.g. display English by default, if no up-to-date translation is available) and can be done by other contributors afterwards. Otherwise it would block too much change. Still, it would slow development as now there's always an indirection between a text and the place where it's used. Might be worth it though, but I wouldn't want to decide that by myself.
* Which framework would we use for that (e.g. https://github.com/i18next/react-i18next)?
* Do we only translate the web UI, or also anything else that's user-visible in the binary?
* Who contributes translations, and how do we verify that they are ok enough if we don't speak those languages ourselves?

Regards,
Julius

--
You received this message because you are subscribed to the Google Groups "Prometheus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to prometheus-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-users/0c5ae83e-a414-4de4-ac6b-5fb6ba60ce3fn%40googlegroups.com.


--
Julius Volz
PromLabs - promlabs.com

Julien Pivotto

unread,
Jan 5, 2021, 10:11:22 AM1/5/21
to Julius Volz, Christian Manalo, Prometheus Users
On 05 Jan 15:52, Julius Volz wrote:
> Hi,
>
> Currently there is no localization framework being used anywhere in
> Prometheus, and the only language available is English (which is hardcoded
> everywhere).
>
> It's a possibility in the future, but we need to answer the following
> questions for it:
>
> * Are we ok with the extra maintenance burden? IMO at least it would have
> to be done in a way that a "normal" change only needs to touch the English
> texts, and then any translated versions are optional (e.g. display English
> by default, if no up-to-date translation is available) and can be done by
> other contributors afterwards. Otherwise it would block too much change.
> Still, it would slow development as now there's always an indirection
> between a text and the place where it's used. Might be worth it though, but
> I wouldn't want to decide that by myself.

It seems complex and I'd like to know more about the use case here. Even
grafana, AFAIK, is not translated.

> * Which framework would we use for that (e.g.
> https://github.com/i18next/react-i18next)?
> * Do we only translate the web UI, or also anything else that's
> user-visible in the binary?

Only the web UI

> * Who contributes translations, and how do we verify that they are ok
> enough if we don't speak those languages ourselves?

We would need a TRANSLATORS.md file

Do we make that policy for all projects (alertmanager, pushgateway,
blackbox_exporter) ?



My 2 cents is that we would better invest in translating the
documentation than the actual web UI, but that maybe translating the web
UI is not a huge burden.

>
> Regards,
> Julius
>
> On Tue, Jan 5, 2021 at 11:20 AM Christian Manalo <chr.m...@gmail.com>
> wrote:
>
> > Hi,
> >
> > Is it possible to localize the texts displayed on the GUI?
> > Any ideas on how to do it?
> >
> > Thanks
> >
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Prometheus Users" group.
> > To unsubscribe from this group and stop receiving emails from it, send an
> > email to prometheus-use...@googlegroups.com.
> > To view this discussion on the web visit
> > https://groups.google.com/d/msgid/prometheus-users/0c5ae83e-a414-4de4-ac6b-5fb6ba60ce3fn%40googlegroups.com
> > <https://groups.google.com/d/msgid/prometheus-users/0c5ae83e-a414-4de4-ac6b-5fb6ba60ce3fn%40googlegroups.com?utm_medium=email&utm_source=footer>
> > .
> >
>
>
> --
> Julius Volz
> PromLabs - promlabs.com
>
> --
> You received this message because you are subscribed to the Google Groups "Prometheus Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to prometheus-use...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-users/CAObpH5xZ-t%2BwfMt621Ey5P3%2BCUKPVXdUzJa_nZf-aYKjon77%3DA%40mail.gmail.com.

--
Julien Pivotto
@roidelapluie
Reply all
Reply to author
Forward
0 new messages