Translation of the "hint texts"

6 views
Skip to first unread message

Marta Anducas

unread,
Jun 25, 2024, 1:49:31 PMJun 25
to FixMyStreet

Hi,
I hope this messages finds you well. 

We are developing a platform based on FixMyStreet for a municipality in Lithuania and we would like to have the platform in English and Lithuanian. We already achieved it except for the "Hint texts" that are associated to each category. However, I've seen that in the Welsh FMS instance  (https://cy.fixmystreet.com/report/new?longitude=-3.987493&latitude=51.642285#details) the hint texts have also been translated. Could anyone give me some tips on how to translate these texts?

Thank you in advance! 

Best,

Marta

Matthew Somerville

unread,
Jul 8, 2024, 12:43:46 PMJul 8
to FixMyStreet, Marta Anducas
Hi,

Glad to hear it's going well. Sorry for the delay in replying, I had this in my drafts!

I'm guessing by "hint texts", you mean in the admin the text you can provide for a particular category?
Yes, I'm afraid it looks like that text is not marked as available for the translation in the admin.

In the Welsh instance you mention, that is the default hint text, from the template report/new/_form_labels.html - which is marked for translation.
So translations of that default text will be used in the interface.
But if you had specified a hint in the admin to use, it would override that, and then not be translated.

It looks like your cobrand .pm file can specify a hint to use as a fallback from the admin, but that doesn't appear to have access to the category or language at that point, and is only a single string fallback.

So I'm not sure of the best thing to suggest, sorry. If you're comfortable with the codebase, I could potentially see a number of different hacky ways you could do it, but none particularly nice. As the category change in the front end can pull data from the server to update the fields, it's not as straightforward as updating a template manually.

ATB,
Matthew
Reply all
Reply to author
Forward
0 new messages