Forgot some French (and for all others contries) translations (I18n extension)

Forgot some French (and for all others contries) translations (I18n extension)

sloloslolo Posts: 101Questions: 19Answers: 2

Link to test case: https://live.datatables.net/geridesi/1
Debugger code (debug.datatables.net): NA
Error messages shown: NA
Description of problem: Hello,

1./ Select component and strange behavior in french
As you can see on the image below (and in the test case), I have to add 3 entries in fr_FR.json file in order not to see appear these 3 informations. Do you know why the behavior does not exists with english language?

2./ SearchBuilder (missing translation)
Also, if I use "liveSearch": false, for the SearchBuilder extension, the button "Search" is notr tranlatable.
I have had it to:

"searchBuilder": {
    "search" : "Rechercher"
}

But can you add it to the official i18n plugin please?
https://datatables.net/plug-ins/i18n/

3./ Show All (missing translation)

I also added it into fr_FR.json for my own purpose.

"lengthLabels": {
    "-1": "Afficher tout"
}

I don't know if this is a duplicate of this information, but it would be good to have it by default in the language file and to be able to override it eventually via this option.
See: https://datatables.net/reference/feature/pageLength.menu

4./ SearchPane (missing translation)

Can you add "emptyMessage" then the SearchPane i18n plugin please.

For my own purpose I initialized it with: "emptyMessage": "<em>vide</em>"

5./ Clear all button missing translation

Can you add "emptyMessage" then the SearchPane i18n plugin please.

As the point 3, I don't know if this is a duplicate of this information, but it would be good to have it by default in the language file and to be able to override it eventually via this option.
See: https://datatables.net/reference/button/ccSearchClear

6./ Clear Sort menu entry missing translation

Can you add columnControl.orderClear missing translation please

7./ French translation and 99%

To finish, can you tell me why the french translation is about 99% instead of 100%
It is probably due to something that exists in English but not in French?

Sorry for this long post but as you can see I really love and want to use all the great functionnalities of DataTables :smile:

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 64,594Questions: 1Answers: 10,683 Site admin

    Hi,

    A quick post back here to say that I haven't missed this - just a bit of a backlog at the moment. I'll look into the points and respond properly on Friday :)

    Allan

  • allanallan Posts: 64,594Questions: 1Answers: 10,683 Site admin
    Answer ✓

    1./ Select component and strange behavior in french

    That behaviour does happen in English if you don't have the 0 property set to be an empty string - that is commented out in your example. The default is defined here, as you'll see it has 0: ''.

    I've just committed a change to how the JSON files are built to address this. If a string is empty by default, then it should also be empty in the translation. Things like placeholder can be set, but not by default.

    2./ SearchBuilder (missing translation)

    Added searchBuilder.search.

    3./ Show All (missing translation)

    Also added lengthLabels.-1.

    4./ SearchPane (missing translation)

    I've added searchPanes.emptyMessage for this. I've also changed the default to be <em>Empty</em> which I think is more appropriate.

    5./ Clear all button missing translation

    Added columnControl.buttons.searchClear which needs this change in ColumnControl to be able to work. It will be in the next release.

    6./ Clear Sort menu entry missing translation

    Added columnControl.orderClear.

    7./ French translation and 99%

    I think it is an error in how the calculation handles empty strings. I think (hope) I've corrected it now, although it is possible it might be a rounding error. If you are able to update the new strings I can check this one!

    Many thanks for your help in getting this sorted out.

    Allan

  • sloloslolo Posts: 101Questions: 19Answers: 2

    Hi @allan,

    Thanks a lot for your answer and also for adding all missing strings to translate.

    I have completed the French translation.
    I will test it once it will be released.

    Have a nice week end.

  • allanallan Posts: 64,594Questions: 1Answers: 10,683 Site admin

    Super - thank you! It is now committed in and will be included in the next release. The French translation is showing as 100%. Many thanks!

    Allan

  • sloloslolo Posts: 101Questions: 19Answers: 2

    Hi @allan,

    Really strange, the state of the French translation is at 98% and I don't see what I missed (apart from sentences with an empty default value and the decimal separator which does not exist in French)

    Also, can you add also this missing entry please:

    "buttons": {
        "pageLength": {
            "1": "Afficher 1 ligne"
    },
    
  • allanallan Posts: 64,594Questions: 1Answers: 10,683 Site admin

    I've been doing some work on the translations this morning (the pagination keys now reflect the DataTables defaults, with the text for the paging buttons used for the labels), so possibly you encountered it while I was doing that? It is showing as 100% for me at the moment.

    Thanks for the extra translation - I've added that now.

    Allan

  • allanallan Posts: 64,594Questions: 1Answers: 10,683 Site admin

    I've also added a new i18n example to help me with this sort of thing. That will be published to the site in the next day or two.

    Allan

Sign In or Register to comment.