When running the pot update script, the issues in the attachment are reported. Is it possible these can be addressed?
When running the pot update script, the issues in the attachment are reported. Is it possible these can be addressed?
I answered that last time you asked.
Change to this:Code:translated_string = _("Our friend %s is %s years old.") % ('Abu', '50')
Code:translated_string = _("Our friend %(person)s is %(age)s years old.") % {"person": 'Abu', "age": '50'}
What has caused this change?
Python is still happy with the first format, which exists all over enigma2.
MiracleBox Prem Twin HD - 2@DVB-T2 + Xtrend et8000 - 5(incl. 2 different USBs)@DVB-T2[terrestrial - UK Freeview HD, Sandy Heath] - LAN/USB-stick/HDD
I understand what it means.
However, since the translation files only refer to the text in _() calls, something must have changed to start producing these messages now
As in:If I want to change the order of variable_one and variable_two in the translated output it is impossible in the first case.
The %{colour} %{shape}becoming, in FrenchLe %{shape} ${colour}
Last edited by birdman; 22-11-24 at 22:22.
MiracleBox Prem Twin HD - 2@DVB-T2 + Xtrend et8000 - 5(incl. 2 different USBs)@DVB-T2[terrestrial - UK Freeview HD, Sandy Heath] - LAN/USB-stick/HDD
birdman (22-11-24)
It's occurred to me (overnight) that there are probably few, if any, instances in Vix where having named args (for multiple arg striungs) would matter.
Either these parameters are numbers (where I would expect the same order to obtain) or they are strings, in which case that actual parameter values need to be localized too.
The %{colour} %{shape} example would need to be:
"The %{colour} %{shape}" % { 'colour', _(colour), 'shape': _(shape) }
with the po file containing translations for all potential colours and shapes. Does Vix do that?
MiracleBox Prem Twin HD - 2@DVB-T2 + Xtrend et8000 - 5(incl. 2 different USBs)@DVB-T2[terrestrial - UK Freeview HD, Sandy Heath] - LAN/USB-stick/HDD
It needs to be:
And yes that is valid. Do we use it? Probably not yet.Code:_("The %(colour)s %(shape)s") % { 'colour': _(colour), 'shape': _(shape) }
But here you have a problem:
There you are translating a variable. From where are you going to harvest the value of that variable to populate the pot file?Code:_(shape)
MiracleBox Prem Twin HD - 2@DVB-T2 + Xtrend et8000 - 5(incl. 2 different USBs)@DVB-T2[terrestrial - UK Freeview HD, Sandy Heath] - LAN/USB-stick/HDD
So how are you going to harvest them?
Well what is the point feeding them through gettext if they are not in the po file?
On the other hand...
https://github.com/OpenViX/enigma2/b...ns/Menu.py#L94
Here they are translatable because they are harvested from the xml.
The objective is to be able to update the po files on GitHub so people can work on them from there. Getting them from receiver is not the best option. As an example, I uploaded all the latest ones from an updated image, somebody else worked on the one on his box and took the file back.
An example commit to resolve the issue from PLi is here:
https://github.com/OpenPLi/enigma2/p...f4856067f03afa
It occurs to me that it's a bit worse than that.
French (German, Latin, ...) has gender for adjectives, so you'd need to have a male and female version of blue (bleu, bleue) and the same for all other colours, in all languages, even when they are the same. You'd also need a plural version for each, too (bleus).
MiracleBox Prem Twin HD - 2@DVB-T2 + Xtrend et8000 - 5(incl. 2 different USBs)@DVB-T2[terrestrial - UK Freeview HD, Sandy Heath] - LAN/USB-stick/HDD