~yerinalexey/public-inbox

1

Re: [PATCH gtranslate 2/3] Replaced language selector.

Kyle Williams
Details
Message ID
<CACn2xWNgnztgCAqjBtvmoU4MrCJJxaxTLBUXrG2OG_vbX3cYTA@mail.gmail.com>
DKIM signature
pass
Download raw message
Your code works, but I can't easily rebase my commits. Are you fine
with a 4th patch?

Kyle Williams


Kyle Williams


On Thu, Feb 4, 2021 at 2:37 AM Alexey Yerin <yyp@disroot.org> wrote:
>
> > I don't know what's going on, but I put in your snippet and the HTML
> > just stops after the first <select> element. This issue originally
> > cropped up yesterday when I tried a similar snippet:
> > <option {{if eq $code, .From}} selected {{end}}></option>
>
> Looks like I found the solution:
>
>     {{range $code, $name := $.Languages}}
>       <option value="{{$code}}"{{if eq $code $.From}} selected{{end}}>
>         {{$name|title}}
>       </option>
>     {{end}}
>
> Main change is I added $ before .From and it suddenly started working.
> html/template is werid...
>
> (Sorry, I forgot to forward this to mailing list)

Re: [PATCH gtranslate 2/3] Replaced language selector.

Details
Message ID
<20210204140223.eyszl27msdy5ykm5@desktop.localdomain>
In-Reply-To
<CACn2xWNgnztgCAqjBtvmoU4MrCJJxaxTLBUXrG2OG_vbX3cYTA@mail.gmail.com> (view parent)
DKIM signature
pass
Download raw message
> Your code works, but I can't easily rebase my commits. Are you fine
> with a 4th patch?

Sure
Reply to thread Export thread (mbox)