Okay
  Public Ticket #3209693
Milestone
Closed

Comments

  •  2
    ksdata started the conversation

    Hi,
    How can I set the "Milestone number" so that the dot is displayed as a spacer for the thousands instead of the comma, i.e. 10.000 in Italian style and not 10,000 in American format?

    Can I act on any statement in the wp-content/themes/salient/js/src/init.js file?

    Thanks a lot,
    Emanuela

  •  1,643
    Judith replied

    Hi Emanuela,

    Thanks for choosing Salient.

    You can add on the figure as shown here:

    3814630436.png

    Thanks.

  •  2
    ksdata replied

    Hi Judith,
    if I enter 4.860 in the field Milestone Number, only 4 is displayed in the counter on the website, I assume because it reads the point as a decimal divisor (as it is in the American format) and consequently truncates 860.

    In fact, if I put 4,860 it is interpreted correctly (like when I put 4860) and the counter on the website shows 4,860 naturally with the comma, i.e. in American format.

    My WordPress is set on the Italian localization and therefore all the website numbers, except in the Milestone, are displayed correctly in European format (as are the dates).

    Any other ideas, even getting your hands on the code?

    Thanks,
    Emanuela


  •  1,643
    Judith replied

    Hi Emanuela,

    Please send in your admin login credentials so that we may check this out further.

    Thanks.

  •   ksdata replied privately
  •  8,403
    Tahir replied

    Hey Again,

    At the moment you will have to use the "Motion Blur Slide In" Animation Effect if you wish to have dots or commas: 

    6747421094.pngClick on Image to View Larger

    Thanks 


    ThemeNectar Support Team 

  •  2
    ksdata replied

    Hi Tahir,
    eh it's not quite the same, so it becomes a text string with an animated effect, not a counter.

    But it shouldn't be that hard to make him understand the location for the counter and make all Europeans happy :)

    I found this thread of yours from 2015/2018 which provides some guidance: https://themenectar.ticksy.com/ticket/144592

    I think it would be enough to know where to add a javascript .toLocaleString() output in a file like wp-content/themes/salient/js/src/init.js without any guarantee of its working on your part you mean...

    But maybe I'm making it too simple, you tell me.

    Thanks,
    Emanuela

  •  8,403
  •  2
    ksdata replied

    Hi Tahir,
    done the update to Salient Version 15.0.7+, we're almost there.

    If there was a way to put 3 decimals instead of 2 you could work around the problem by entering 9.999 instead of 10000 (and 49.999 instead 50000) and, in my case, it would be displayed just in European format.

    Unfortunately, however, since there are only 2 decimals, even by inserting 9.999 and 49.999 it comes as in the attached image.

    How can I fix it?

    Thanks,
    Emanuela

    Attached files:  Salient.JPG

  •  8,403
    Tahir replied

    Escalating this to the developer to check for a quick fix. 

    Thanks


    ThemeNectar Support Team 

  •   ThemeNectar replied privately
  •  2
    ksdata replied

    Hey ThemeNectar,
    almost perfect, almost... smile.png

    In this way it is not possible to obtain 10.000 on the website but only 10.001 or 9.999 because by entering 10.000 in the Milestone Number field the decimals are not detected and only 10 is displayed on the website.

    To make Europeans fully happy, just edit line 4838 of the wp-content/themes/salient/js/src/init.js file like this:

        if( userDecimals > 2 && userDecimals < 5) {
                     decimalPlaces = 3; 
        }

    With this change it will be enough to enter 9.9999 (with 4 decimals) in the Milestone Number field and the number 10.000 will appear on the website because it is rounded to 3 decimals!

    Of course I tried to make the change myself but it didn't work, I guess because the code is recompiled in the same file of wp-content/themes/salient/js/build/ folder.
     
    Can you tell me how to fix it?

    Thank you very much for the great availability,
    Emanuela



  •   ThemeNectar replied privately
  •  2
    ksdata replied

    Great!

    So, summarizing the solution for those who will read this online post.

    Starting from the Salient version subsequent to the current 15.0.8, to have the Milestone counter in European format it is sufficient to enter the desired number separated by a point in the Milestone Number field (of the Milestone Settings popup).

    For example, to obtain on the website the counter that increases up to the number 10.000 (written with a divisor point instead of a comma) it is sufficient to write 10.000 in the Milestone Number field.

    Thank you so much for your wonderful assistance,
    Emanuela