Fwd: Proposal: Using update-alternative to switch input method

Marguerite Su <[email protected]> Fri, 25 Feb 2022 21:02:50 +0800
Newsgroups gmane.linux.suse.m17n
Message-ID <CAK0PdAkOsdqxH5qBP_egbbKqE1f7cmUNKRcDxuOsh0Y0Y03EEA@mail.gmail.com>
--0000000000008876ad05d8d7516d
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

sorry I forgot to CC our mailing list.

---------- =E8=BD=AC=E5=8F=91=E7=9A=84=E9=82=AE=E4=BB=B6 ---------
=E5=8F=91=E4=BB=B6=E4=BA=BA=EF=BC=9A Marguerite Su <[email protected]>
=E6=97=A5=E6=9C=9F=EF=BC=9A2022=E5=B9=B42=E6=9C=8825=E6=97=A5 =E5=91=A8=E4=
=BA=9421:00
=E4=B8=BB=E9=A2=98=EF=BC=9ARe: Proposal: Using update-alternative to switch=
 input method
=E6=94=B6=E4=BB=B6=E4=BA=BA=EF=BC=9ATakashi Iwai <[email protected]>


And I can not find any documentation about the $HOME/.i18n usage on
openSUSE, except this slide:

https://www.slideshare.net/ftake/redesigning-inputmethod-launcher-and-manag=
ement-system

So I wonder do we really have any real usage of =E2=80=9C.xim=E2=80=9D or =
=E2=80=9C.i18n=E2=80=9D? It seems
you defined lots of place where we can declare the INPUT_METHOD env. But
which ones should I take it seriously? The sysconfig? the =E2=80=9C.xim=E2=
=80=9D? The
=E2=80=9C.i18n=E2=80=9D? Or the /etc/X11/xim.d? And what=E2=80=99s the prio=
rity if I declare that
nev everywhere?

Marguerite Su <[email protected]>=E4=BA=8E2022=E5=B9=B42=E6=9C=8825=E6=97=A5 =
=E5=91=A8=E4=BA=9420:49=E5=86=99=E9=81=93=EF=BC=9A

> Takashi Iwai <[email protected]>=E4=BA=8E2022=E5=B9=B42=E6=9C=8825=E6=97=A5 =
=E5=91=A8=E4=BA=9420:05=E5=86=99=E9=81=93=EF=BC=9A
>
> I guess this could be simplified if we provide some rpm macro.
>> Basically a similar setup has been done for /etc/X11/xim.d (even
>> manually), and we may combine even both stuff in a single macro
>
>
> I begin to understand your approach now. If you make the generator itself
> as update alternative, the generator script will be very very easy: you
> just need to print INPUT_METHOD=3D<your input method framework name>. But
> since the update alternative approach involves many different files, I
> don=E2=80=99t think any rpm macro is possible. And again, rpm macro for a=
ll IMFs
> needs another new package. I added this new package to automatically
> transfer the existing XIM works to systemd/wayland since Xorg will not go
> away in the foreseeable future. You don=E2=80=99t need to heavily touch o=
ther
> existing IMF packages. I don=E2=80=99t think a new package + heavy modifi=
cations
> for all existing packages works better than my approach.
>
> But still, like the name says, an user environment generator can not work
> as the 100% replacement for the xim script. We still need to write lots o=
f
> systemd stuff (targets and etc) to achieve the goals that were done via t=
he
> LibreOffice/gsettings hacks,  if you want to end up to an IMF systemd
> service
>
> Hm, then the question is whether we want to user leaving without
>> language-specific IM when user installs in CJK locale (or anything
>> else).  Of course, they can install the stuff later at any time, but
>> the point of having lang(x)-Provides or whatever meta data is just to
>> "recommend" the installation of those packages for specific locales.
>> A similar stuff could be implemented in patterns as well, but I feel
>> that locale(x) makes maintenance easier.
>>
>
> OFF TOPIC: where can I find how these Provides are used? In which package=
?
> I used to investigate lots of packages and OBS settings, but I didn=E2=80=
=99t find
> any clue about this mechanism :-( So I wonder maybe these Provides are
> useless, but the person who sees them made it happen by manually adding
> those packages to ISOs :-)
>
>
>>

--0000000000008876ad05d8d7516d
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"auto">sorry I forgot to CC our mailing list.</div><div><br><div=
 class=3D"gmail_quote"><div dir=3D"ltr" class=3D"gmail_attr">---------- =E8=
=BD=AC=E5=8F=91=E7=9A=84=E9=82=AE=E4=BB=B6 ---------<br>=E5=8F=91=E4=BB=B6=
=E4=BA=BA=EF=BC=9A <strong class=3D"gmail_sendername" dir=3D"auto">Margueri=
te Su</strong> <span dir=3D"auto">&lt;<a href=3D"mailto:[email protected]">i@=
marguerite.su</a>&gt;</span><br>=E6=97=A5=E6=9C=9F=EF=BC=9A2022=E5=B9=B42=
=E6=9C=8825=E6=97=A5 =E5=91=A8=E4=BA=9421:00<br>=E4=B8=BB=E9=A2=98=EF=BC=9A=
Re: Proposal: Using update-alternative to switch input method<br>=E6=94=B6=
=E4=BB=B6=E4=BA=BA=EF=BC=9ATakashi Iwai &lt;<a href=3D"mailto:[email protected]=
">[email protected]</a>&gt;<br></div><br><br><div dir=3D"auto">And I can not fi=
nd any documentation about the $HOME/.i18n usage on openSUSE, except this s=
lide:</div><div dir=3D"auto"><br></div><div dir=3D"auto"><div><a href=3D"ht=
tps://www.slideshare.net/ftake/redesigning-inputmethod-launcher-and-managem=
ent-system" target=3D"_blank">https://www.slideshare.net/ftake/redesigning-=
inputmethod-launcher-and-management-system</a></div><br></div><div dir=3D"a=
uto">So I wonder do we really have any real usage of =E2=80=9C.xim=E2=80=9D=
 or =E2=80=9C.i18n=E2=80=9D? It seems you defined lots of place where we ca=
n declare the INPUT_METHOD env. But which ones should I take it seriously? =
The sysconfig? the =E2=80=9C.xim=E2=80=9D? The =E2=80=9C.i18n=E2=80=9D? Or =
the /etc/X11/xim.d? And what=E2=80=99s the priority if I declare that nev e=
verywhere?</div><div><br><div class=3D"gmail_quote"><div dir=3D"ltr" class=
=3D"gmail_attr">Marguerite Su &lt;<a href=3D"mailto:[email protected]" target=
=3D"_blank">[email protected]</a>&gt;=E4=BA=8E2022=E5=B9=B42=E6=9C=8825=E6=97=
=A5 =E5=91=A8=E4=BA=9420:49=E5=86=99=E9=81=93=EF=BC=9A<br></div></div></div=
><div><div class=3D"gmail_quote"><blockquote class=3D"gmail_quote" style=3D=
"margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;pad=
ding-left:1ex;border-left-color:rgb(204,204,204)"><div>Takashi Iwai &lt;<a =
href=3D"mailto:[email protected]" target=3D"_blank">[email protected]</a>&gt;=E4=BA=
=8E2022=E5=B9=B42=E6=9C=8825=E6=97=A5 =E5=91=A8=E4=BA=9420:05=E5=86=99=E9=
=81=93=EF=BC=9A</div><div><br></div><div><div class=3D"gmail_quote"><blockq=
uote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left-wi=
dth:1px;border-left-style:solid;padding-left:1ex;border-left-color:rgb(204,=
204,204)" dir=3D"auto">
I guess this could be simplified if we provide some rpm macro.<br>
Basically a similar setup has been done for /etc/X11/xim.d (even<br>
manually), and we may combine even both stuff in a single macro</blockquote=
><div dir=3D"auto"><br></div><div dir=3D"auto">I begin to understand your a=
pproach now. If you make the generator itself as update alternative, the ge=
nerator script will be very very easy: you just need to print INPUT_METHOD=
=3D&lt;your input method framework name&gt;. But since the update alternati=
ve approach involves many different files, I don=E2=80=99t think any rpm ma=
cro is possible. And again, rpm macro for all IMFs needs another new packag=
e. I added this new package to automatically transfer the existing XIM work=
s to systemd/wayland since Xorg will not go away in the foreseeable future.=
 You don=E2=80=99t need to heavily touch other existing IMF packages. I don=
=E2=80=99t think a new package + heavy modifications for all existing packa=
ges works better than my approach.</div><div dir=3D"auto"><br></div><div di=
r=3D"auto">But still, like the name says, an user environment generator can=
 not work as the 100% replacement for the xim script. We still need to writ=
e lots of systemd stuff (targets and etc) to achieve the goals that were do=
ne via the LibreOffice/gsettings hacks, =C2=A0if you want to end up to an I=
MF systemd service</div><div dir=3D"auto"><br></div><blockquote class=3D"gm=
ail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left-width:1px;border-l=
eft-style:solid;padding-left:1ex;border-left-color:rgb(204,204,204)" dir=3D=
"auto">
Hm, then the question is whether we want to user leaving without<br>
language-specific IM when user installs in CJK locale (or anything<br>
else).=C2=A0 Of course, they can install the stuff later at any time, but<b=
r>
the point of having lang(x)-Provides or whatever meta data is just to<br>
&quot;recommend&quot; the installation of those packages for specific local=
es.<br>
A similar stuff could be implemented in patterns as well, but I feel<br>
that locale(x) makes maintenance easier.<br></blockquote><div dir=3D"auto">=
<br></div><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8=
ex;border-left-width:1px;border-left-style:solid;padding-left:1ex;border-le=
ft-color:rgb(204,204,204)" dir=3D"auto"></blockquote><div dir=3D"auto">OFF =
TOPIC: where can I find how these Provides are used? In which package? I us=
ed to investigate lots of packages and OBS settings, but I didn=E2=80=99t f=
ind any clue about this mechanism :-( So I wonder maybe these Provides are =
useless, but the person who sees them made it happen by manually adding tho=
se packages to ISOs :-)</div><div dir=3D"auto"><br></div><blockquote class=
=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left-width:1px;bo=
rder-left-style:solid;padding-left:1ex;border-left-color:rgb(204,204,204)" =
dir=3D"auto"><br>
</blockquote></div></div>
</blockquote></div></div>
</div></div>

--0000000000008876ad05d8d7516d--