Giampiero

Results 25 comments of Giampiero

I re-edited the message above, now it should work, without making it too complex

In the documentation provided (https://github.com/EDCD/EDMarketConnector/blob/main/PLUGINS.md#localisation) the "forced" translation system is managed statically and not dynamically, so my choice is quite good... at least I think so

we can use this structure ```py __ = functools.partial(l10n.Translations.translate, context=__file__, lang=lang) ``` but `lang` must be defined or taken from somewhere, this means that it must update with the config...

I should study better how languages ​​are managed in the config for example, provided that you only use it in webooks... otherwise I would leave the very simple def __(...)

During my research on `functools.partial`, I understood that this function allows you to preset some parameters of an original function. The parameters not specified when creating the partial function can...

To keep this in mind, I also submitted a possible solution to the problem encountered in EDMC - https://github.com/EDCD/EDMarketConnector/issues/2437#issuecomment-2914564558

@aussig what do you think about just putting the English language as a file? Simply rename the `en.template` to `en.strings`, then we might not have to handle the exception! What...

@aussig Could we have both the tamplete file and the English one so as not to bother crowdin, what do you think? But in general I don't think that crowdin...

To properly rename the source file `en.template.strings` to `en.strings` in Crowdin **without losing existing translations**, it's essential to follow a specific sequence of steps. Below is a clear and linear...

I tested the direct approach using a tuple, but it turned out to be significantly more complex to manage: the `KeyError` is raised again, this time by the `available_langs()` function....