• Resolved Argentum

    (@argentum)


    Hi,
    I am trying to translate ‘Altitude’, ‘Max Elevation’, ‘Min Elevation’ and ‘Total Length’ on the elevation curve graphics. I go about as I usually do, by installing Loco Translate and adding my language. Should it be possible to translate the mentioned attributes? My translations doesn’t show.

    • This topic was modified 2 years, 11 months ago by Argentum.
Viewing 15 replies - 1 through 15 (of 25 total)
  • Plugin Author hupe13

    (@hupe13)

    It should be displayed to you. translate.www.ads-software.com detects it and Loco Translate also.
    German site in action.
    Or did I miss something?

    Thread Starter Argentum

    (@argentum)

    No you probably didn’t miss anything. I’ll give it another go importing the pot file and start over.

    Another question, I’ve searched the support forum, and I feel terribly stupid, but how do I give color to a gpx track? I have tried color=red and color=#ff0000. The tracks are hoverable, is that what conflicts with the color option?

    Plugin Author hupe13

    (@hupe13)

    The code for elevation comes from leaflet-elevation and it uses the theme parameter for colors:
    https://leafext.de/en/elevation/liste/?testing=theme

    • This reply was modified 2 years, 11 months ago by hupe13.
    Plugin Author hupe13

    (@hupe13)

    I know translation takes a lot of work and it is not considered by translate.www.ads-software.com until a certain percentage has been translated. If you translate only the strings from the frontend, you could send me the files and I could take that into the plugin.

    Thread Starter Argentum

    (@argentum)

    I changed the po-file placement from
    languages/loco/plugins/extensions-leaflet-map-sv_SE.po
    to
    languages/plugins/extensions-leaflet-map-sv_SE.po
    and now the translations show!

    Ok, I will enable every setting on the elevation settings pace and translate the frontend strings.

    Plugin Author hupe13

    (@hupe13)

    You can see here the strings for elevation.

    Thread Starter Argentum

    (@argentum)

    I think that the Download link string showing under the elevation chart is non-translatable.

    Other than that, I think I am done. I am a firm believer in that translating the backend only makes it harder to read and understand a plugin’s documentation.

    No hint how to color a gpx track in Leaflet Map plugin? Seems the https://www.ads-software.com/plugins/leaflet-map/
    is if not forgotten so not a very high priority for the devs.

    Translations that are consumed by PHP need to be distributed via .mo (which is a compiled version of the text-based .po format).
    But if a translation is consumed by Javascript, then it needs to be distributed in .json format. I don’t know if Loco is able to generate those files.

    translate.www.ads-software.com definitely can do it, but in order to benefit from that, you’ll need to reach at least 90% of the strings in the plugin translated and approved in order to have an initial language pack generated.

    Thread Starter Argentum

    (@argentum)

    @tobifjellner Well, I don’t need or want that translation myself. Since geo data and nomenclature is not my expertise, I would produce a lousy home-cooked translation (at best) of the backend. I have translated the few strings that show frontend only.

    If the plugin owner want my (tiny frontend) translation, I will of course offer it. But I think it would be a better solution to add a frontend string translation section in the plugins setting.

    • This reply was modified 2 years, 11 months ago by Argentum.
    Plugin Author hupe13

    (@hupe13)

    I think that the Download link string showing under the elevation chart is non-translatable.

    Yes, you are right. I will fix it.

    how to color a gpx track

    Notice: If you want to display a track only, use [leaflet-...] functions. If you want to display a track with an elevation profile use [elevation].

    [leaflet-gpx color=...]
    [elevateion theme=...]

    Plugin Author hupe13

    (@hupe13)

    @tobifjellner: The Javascript is generated depending on the parameters of the shortcode and therefore I’m using the WordPress functions.

    Thread Starter Argentum

    (@argentum)

    Hm, am I correct in assuming that if I add a theme to the elevation shortcode, that takes precedence over any value I add to the color= om the leaflet-gpx shortcode?

    I have this
    [leaflet-gpx src=”https://domain.se/wp-content/uploads/sparet1.GPX” color=#f15a22] *This color is the track’s orange identification color on signs in the terrain and on map materials.*

    [elevation gpx=”https://domain.se/wp-content/uploads/sparet2.GPX” theme=lime]

    I can actually see the orange track before extensions adds a black line with a white shadow

    I see this in dev console.
    .elevation-polyline {
    filter: drop-shadow(1px 1px 0 #FFF) drop-shadow(-1px -1px 0 #FFF) drop-shadow(1px -1px 0 #FFF) drop-shadow(-1px 1px 0 #FFF);
    }

    And the source code for the track.
    <path class="elevation-polyline lime leaflet-interactive" <strong>stroke="#000</strong>" stroke-opacity="0.75" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" fill="none" d="M525 310L508 305L497 299L494 </path>

    So I end up with a track that blinks orange and goes to a black track with white shadows and a green elevation graph. ?? Is there a way to tell the plugin to stop messing with the gpx-track if it got a color= option?

    • This reply was modified 2 years, 11 months ago by Argentum.
    • This reply was modified 2 years, 11 months ago by Argentum.
    • This reply was modified 2 years, 11 months ago by Argentum.
    Plugin Author hupe13

    (@hupe13)

    Oh, leaflet-gpx and elevation on the same map! I didn’t have tested this before. But my tests work as expected. But:

    [elevation gpx=”https://domain.se/wp-content/uploads/sparet2.GPX” theme=lime]

    It must be:
    [elevation gpx=”https://domain.se/wp-content/uploads/sparet2.GPX” theme=lime-theme]

    Thread Starter Argentum

    (@argentum)

    Well, I hate to have to tell you, ?? but if I have theme=lime in the shortcode, the elevation curve fill is green, but the graph area around it is light blue. If I use theme=lime-theme, the light blue gets light green.

    • This reply was modified 2 years, 11 months ago by Argentum.
    Plugin Author hupe13

    (@hupe13)

    If I use theme=lime-theme, the light blue gets light green.

    That’s how it should be. Example.

Viewing 15 replies - 1 through 15 (of 25 total)
  • The topic ‘Translate attributes on elevation curve’ is closed to new replies.