[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Limited translation options


On Saturday, October 17th, 2026 at 13:35, Benoît Minisini <benoit.minisini@xxxxxxxxxxxxxxxx> wrote:

> Le 16/10/2026 à 20:33, gbWilly a écrit :
> > If I look at the code for MyLanguage.module and Language.Class they seem to serve a different goal.
> > I didn't go serach how they are integrated into the rest, just purely comparing both.
> >
> > So, with the Language.class 'cleaned up and sorted out', do you want to sync it with the MyLanguage.module?
> > Or are you first going to investigate why the MyLanguage.module was created in the first place.
> >
> > Just let me know and I'll make it all sync with each other if needed.
> >
> >
> > gbWilly
> >
> > ...there is always a Catch if things go wrong!
> >
> > P.S. My excuses if my logs weren't correct..
> 
> Yes. It's just a matter of avoiding duplicated code between
> 'Language.class' and 'MyLanguage.class'. But 'MyLanguage' has
> IDE-specific methods that must be kept.
> 
> So, concretely:
> 
> 1) Remove the 'Name' and 'EnglishName' private variables of
> 'MyLanguage', and replace them by calls to 'Language'.
> 
> 2) Replace the 'Find()' method by 'Language.Find()', or call
> 'Language.Find()' from 'Find()' if you don't want to touche other parts
> of the source code. The second argument of 'Find()' will be removed as
> it is used by 'MyLanguage' only.
> 
> Regards,
> 
> --

Hi,

I did discover a few mistakes in the Language.class that I corrected.
I then discovered that the order in the Translation dialog is based on sorting by language name (logical).
This does create situations as:
Spanish (Argentina)
Spanish (common)
Spanish (Spain)

I would prefer the common as first so I removed all common for languages with multiple options.
This will sort as:
Spanish
Spanish (Argentina)
Spanish (Spain)

I think thus is better as now the common denominator is as first with it's language variants.
So, these changes where made and I created a merge request for them.


The earlier Language.class changes are not applied in current master on OSB, because the MyLanguage.module is not in sync.
It is clear that the Translation dialog to pick your translation languages is NOT based on Language.class, but created from the data in MyLanguage.module.

I did a second merge request with the simple solution to keep it in sync, as posted here in a previous post.
This will ensure Language.class is used and all data on languages that is in there.

I hope you can do something with this (either accept or deny) so I can either backport it or forget about is if you don't like it.
Reason being that I am writing a part on translating in the Gambas Learning guides and want to explain it properly with proper added screens.
Will these screens be with or without common added after the language is what I'm waiting for, so I can finish writing the chapter.

Thank you,

gbWilly




References:
Limited translation optionsgbWilly <gbWilly@xxxxxxxxxxxxxx>
Re: Limited translation optionsBenoît Minisini <benoit.minisini@xxxxxxxxxxxxxxxx>
Re: Limited translation optionsgbWilly <gbWilly@xxxxxxxxxxxxxx>
Re: Limited translation optionsBenoît Minisini <benoit.minisini@xxxxxxxxxxxxxxxx>
Re: Limited translation optionsgbWilly <gbWilly@xxxxxxxxxxxxxx>
Re: Limited translation optionsgbWilly <gbWilly@xxxxxxxxxxxxxx>
Re: Limited translation optionsgbWilly <gbWilly@xxxxxxxxxxxxxx>
Re: Limited translation optionsBenoît Minisini <benoit.minisini@xxxxxxxxxxxxxxxx>
Re: Limited translation optionsgbWilly <gbWilly@xxxxxxxxxxxxxx>
Re: Limited translation optionsBenoît Minisini <benoit.minisini@xxxxxxxxxxxxxxxx>