Changeset 26 in code for trunk/web/views


Ignore:
Timestamp:
Sep 2, 2023, 5:54:22 PM (21 months ago)
Author:
manerakai
Message:

Small tweaks

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/web/views/index.html

    r22 r26  
    3535                <select name="from" aria-label="Source language">
    3636                    {{range $code, $name := .SourceLanguages}}
     37                    {{if and (eq $code "auto") $.SourceLanguage}}
     38                    <option value="{{ $code }}" {{if eq $code $.From}}selected{{end}}>{{ $name }} ({{index $.SourceLanguages $.SourceLanguage}})</option>
     39                    {{else }}
    3740                    <option value="{{ $code }}" {{if eq $code $.From}}selected{{end}}>{{ $name }}</option>
     41                    {{end}}
    3842                    {{end}}
    3943                </select>
     
    7983
    8084        <div class="center">
    81             <button type="submit">Translate with {{ .Engine }}!</button>
     85            <button type="submit">Translate with {{ index .enginesNames .Engine }}!</button>
    8286        </div>
    8387
Note: See TracChangeset for help on using the changeset viewer.