Scroll Viewport - Translating the word 'latest' in the viewport version picker

Comments

3 comments

  • Avatar
    Martin Muzatko

    Hello Philipp.

    Sorry I didn't see your request in time. Hopefully this comment will help you to resolve your issue.

    I have browsed the source code for scroll versions to see if there are any I18n labels you can easily implement. It doesn't look that good unfortunately. There are two options you have.

    You could translate your theme using another add-on (as described here: https://developer.atlassian.com/docs/common-coding-tasks/internationalising-your-plugin and https://help.k15t.com/scroll-viewport/i18n-99878245.html)

    and use the label you defined there in your theme (include/include-sidebar.vm) on line ~40. 

    <option value="$version.value"
    #if($version.name == $versions.current.name) selected="selected" #end
    data-version-accessible="$version.isAccessible">#if($version.name == "latest") $I18n.getText("com.your.label.path.for.latest") #else $version.name #end #*
    *##if($version.value == 'latest' && $version.original) ($version.original.name) #end#*
    *#</option>

    However, if that is too complex and you need an easier solution, you could directly translate the value depending on selected language:

    <option value="$version.value"
    #if($version.name == $versions.current.name) selected="selected" #end
    data-version-accessible="$version.isAccessible">#if($version.name == "latest") #if($languages.current.name == "de") Letzte #end #if($languages.current.name == "en") Latest #end #else $version.name #end#*
    *##if($version.value == 'latest' && $version.original) ($version.original.name) #end#*
    *#</option>

    I created a little demo here of how it looks in action:

    I documented that also here: https://help.k15t.com/scroll-viewport/integrate-with-scroll-versions-120653945.html#IntegratewithScrollVersions-TranslateLatestversion

    I hope this helps!

    Best,

    Martin

    1
    Comment actions Permalink
  • Avatar
    Philipp Michalzik

    Hello Martin.

    Thank you again for the quick and useful help. Your solution works perfect.

    Great praise to your Support department, I already wrote several problems here and I was helped quickly every time.

    Greetings,

    Philipp

    0
    Comment actions Permalink
  • Avatar
    Nils Bier

    Hi Philipp,

    Glad that this works for you and sorry again for the late reply.

    If there are any other open questions at the moment, please feel free to get in touch with us either here or directly reach out to us via our Scroll Viewport Google Group.

    If you're satisfied with Scroll Viewport so far, it would be great if you could leave a review in the Atlassian Marketplace.

    Best,
    Nils

    0
    Comment actions Permalink

Please sign in to leave a comment.

Powered by Zendesk