Translate legend item labels (small legend switcher)
Version 2.2.6
Hi Raruto,
I translated all strings. But I can't change this one: 
No matter whether Altitude, Slope, Speed or Acceleration appears.
Can you please fix this? Thank you very much.
Hi hupe,
the problem should be near to these lines:
https://github.com/Raruto/leaflet-elevation/blob/2589a937188792eae88c9822a5627845aed2027d/src/components/d3.js#L271
https://github.com/Raruto/leaflet-elevation/blob/46918ce42f27cc438e969407ae0a85bc56801132/src/components/chart.js#L573-L581
To understand how you can make a string translatable you can take look at: yohanboniface/Leaflet.i18n
courtesy of leaflet-ui >= 0.5.4 😄
After I found the solution, it's very simple:
label.text(items.length ? L._((items[idx][0].toUpperCase() + items[idx].slice(1))) : '');