Technical problem when translating

Started by bennetfabian, February 13, 2024, 02:32:29 PM

Previous topic - Next topic

bennetfabian

Hey Phil,
after you helped me that great I wanted to give back to you and your project by translating a few more missing strings to German.

I noticed that the value of FocalLength35efl is not translated and wanted to do it but I'm not sure how.

In English it shows as:
"16.0 mm (35 mm equivalent: 16.0 mm)"

In German it should be:
"16.0 mm (35 mm Äquivalent: 16.0 mm)"

I tried to just copy and modify the original PrintConv like this:

FocalLength35efl => {
        Description => 'Brennweite',
        PrintConv => '$val[1] ? sprintf("%.1f mm (35 mm Äquivalent: %.1f mm)", $val[0], $val) : sprintf("%.1f mm", $val)',
},


That didn't work. Is it not possible to translate this part or how would I do it?

Phil Harvey

Unfortunately, I haven't yet implemented a mechanism to allow translation of sprintf output values.  Currently this is done with a simple string lookup, so variable values don't work.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

bennetfabian

Ahhh, that explains it. If I may ask, is implementing it on your roadmap?

Phil Harvey

There really isn't much demand for this, and it would be a lot of work to implement properly, so it isn't on the roadmap yet.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).