Page MenuHomePhabricator

efl: rename Efl.Ui.Base -> Efl.Ui.I18n as that is really what it does.
ClosedPublic

Authored by cedric on Dec 21 2018, 3:00 PM.

Diff Detail

Repository
rEFL core/efl
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
cedric created this revision.Dec 21 2018, 3:00 PM

At first I thought renaming from Base to I18n was wrong because of the mirrored and mirrored_automatic properties. Then I realized these properties are related to the text direction (RTL or LTR).

Maybe they could be renamed so this is more clear, since ALL widgets inherit I18n and therefore ALL of them have a mirrored property. Maybe mirrored_text, or simply RTL?

At first I thought renaming from Base to I18n was wrong because of the mirrored and mirrored_automatic properties. Then I realized these properties are related to the text direction (RTL or LTR).

It is not just text, but for example the scroller will also change side. Some general widgets layout function also change their behavior.

Maybe they could be renamed so this is more clear, since ALL widgets inherit I18n and therefore ALL of them have a mirrored property. Maybe mirrored_text, or simply RTL?

RTL might be ok, but definitively not mirrored_text. I still like mirrored as it is quite self explanatory, but maybe it is not as you didn't guess its purpose right away. Any idea for a name that would have been easier for you to guess the full scope of this ?

It is not just text, but for example the scroller will also change side. Some general widgets layout function also change their behavior.

Ahhhh, OK, not just the text.

Any idea for a name that would have been easier for you to guess the full scope of this ?

Hmmmm... I think mirrored is fine as a property of Efl.Ui.I18n. However, I have problems when it is inherited by widgets, because it is not clear what a mirrored button is.
How about mirrored_ui, mirrored_layout, rtl_ui or rtl_layout ?
It's not a big problem, since this should be a seldom-used property by EFL users.

Hmmmm... I think mirrored is fine as a property of Efl.Ui.I18n. However, I have problems when it is inherited by widgets, because it is not clear what a mirrored button is.
How about mirrored_ui, mirrored_layout, rtl_ui or rtl_layout ?
It's not a big problem, since this should be a seldom-used property by EFL users.

Hum, in C we would have for example: efl_ui_i18n_rtl_ui. I feel it already express the UI or Layout part once in the namespace, but in other language we wouldn't necessarily have the namespace visible, right ?

segfaultxavi accepted this revision.Dec 30 2018, 8:42 AM

Hum, in C we would have for example: efl_ui_i18n_rtl_ui. I feel it already express the UI or Layout part once in the namespace, but in other language we wouldn't necessarily have the namespace visible, right ?

Yeah, in C# for instance you could have:

var button = new Efl.Ui.Button(...);
button.Mirrored = true;

And then you have no idea what Mirrored means in that context. I am afraid this is going to be a general problem with all bindings that allow you to skip the namespace :(
But you are right efl_ui_i18n_rtl_ui_set() repeats the ui part.

Anyway, we have lost enough time on this already. Users will rarely use this property since most widgets will use mirrored_automatic. Only widget developers will have to deal with it, and they will know what it is.
I have no further objections.

This revision is now accepted and ready to land.Dec 30 2018, 8:42 AM
This revision was automatically updated to reflect the committed changes.