hyperform / hyperform

Capture form validation back from the browser

Home Page:https://hyperform.js.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Translations for "TextTooLong" and "TextTooShort" not working

samgarg86 opened this issue · comments

The translations for TextTooLong and TextTooShort don't seem to work. They are always showing in english.

addtranslation

wrongtranslation

Thanks for the report! That's a strange error, given that the loaded translation looks just fine. I'll take a look into it.

Thanks Boldewyn. I'll keep an eye on this issue.
Do you think this could be fixed anytime soon?

Hi there, we have a task in this sprint to fix this specific bug in our checkout form. Just checking in you again, if there is any chance you might be able to fix this bug soon?

Oh, I've looked way too long at my own code to finally realize, what the problem is... 🤦‍♂️

The TextTooShort identifier is never used but the phrase

"Please lengthen this text to %l characters or more (you are currently using %l characters)."

If you attach your translation to that phrase it should work like a charm. (Similar with TextTooLong and a couple others)

Explanation: The TextTooShort identifier is pulled automatically from Mozilla's repository, but there are other strings, that are not or not yet translated by them. This is one of them. If you compare the French translation with the German one,

https://github.com/hyperform/hyperform-l10n/blob/master/src/fr.js

https://github.com/hyperform/hyperform-l10n/blob/master/src/de.js

you see that the lower part is missing.

If you'd like to translate them (my French is close to non-existent unfortunately), I'd be very happy to merge them into the hyperform-l10n repo.

That worked like a charm, thank you!