Hi!
First of all, thank you for a great Drupal theme. I'm using Solo on a Swedish website and noticed a small translation issue with the custom file upload field.
In templates/form/input--file.html.twig, the strings Choose File and No file chosen are hardcoded:
Choose File
No file chosen
Because of this, they cannot be translated through Drupal's user interface translation system.
Changing them to:
{{ 'Choose File'|t }}
{{ 'No file chosen'|t }}
fixes the issue and allows both strings to be translated normally.
I also noticed that No file chosen is already correctly passed through Drupal.t() in solo-utils.js, so this seems to be just a small omission in the Twig template.
I tested the change on a Swedish Drupal 11 site with Solo 1.0.34, and it works as expected.
Thanks again for Solo!
Comments
Comment #2
flashwebcenterHello,
Thank you for the kind words about the theme, that's very good to hear, and thanks for the clear report.
Confirmed and fixed.
Your suggested change is exactly what I've applied. Good catch on solo-utils.js too: since the JS already uses the same source string, this means both share one translatable string instead of two.
Your report also prompted me to check the rest of the theme, which turned up a few more untranslated strings.
Those are fixed as well. The changes are pushed to the dev branch, so feel free to test, and they'll be in the next release.
Thanks again, and enjoy using Solo!
Best wishes,
Alaa
Comment #3
flashwebcenter