luci-app-commands: replace i18n single quotes with double-quotes

Closes #7213

Signed-off-by: Paul Donald <newtwen+github@gmail.com>
This commit is contained in:
Paul Donald 2024-07-27 21:56:02 +02:00
parent 7154efa1be
commit 119fd22ebf
2 changed files with 19 additions and 19 deletions

View File

@ -44,8 +44,8 @@
if (legend && output) if (legend && output)
{ {
output.innerHTML = output.innerHTML =
'<img src="{{ resource }}/icons/loading.gif" alt="{{ _('Loading') }}" style="vertical-align:middle" /> ' + '<img src="{{ resource }}/icons/loading.gif" alt="{{ _("Loading") }}" style="vertical-align:middle" /> ' +
'{{ _('Waiting for command to complete...') }}' '{{ _("Waiting for command to complete...") }}'
; ;
legend.parentNode.style.display = 'block'; legend.parentNode.style.display = 'block';
@ -57,20 +57,20 @@
if (st) if (st)
{ {
if (st.binary) if (st.binary)
st.stdout = '[{{ _('Binary data not displayed, download instead.') }}]'; st.stdout = '[{{ _("Binary data not displayed, download instead.") }}]';
legend.style.display = 'none'; legend.style.display = 'none';
output.innerHTML = String.format( output.innerHTML = String.format(
'<pre><strong># %h\n</strong>%h<span style="color:red">%h</span></pre>' + '<pre><strong># %h\n</strong>%h<span style="color:red">%h</span></pre>' +
'<div class="alert-message warning">%s ({{ _('Code:') }} %d)</div>', '<div class="alert-message warning">%s ({{ _("Code:") }} %d)</div>',
st.command, st.stdout, st.stderr, st.command, st.stdout, st.stderr,
(st.exitcode == 0) ? '{{ _('Command successful') }}' : '{{ _('Command failed') }}', (st.exitcode == 0) ? '{{ _("Command successful") }}' : '{{ _("Command failed") }}',
st.exitcode); st.exitcode);
} }
else else
{ {
legend.style.display = 'none'; legend.style.display = 'none';
output.innerHTML = '<span class="error">{{ _('Failed to execute command!') }}</span>'; output.innerHTML = '<span class="error">{{ _("Failed to execute command!") }}</span>';
} }
location.hash = '#output'; location.hash = '#output';
@ -114,7 +114,7 @@
legend.style.display = 'none'; legend.style.display = 'none';
output.parentNode.style.display = 'block'; output.parentNode.style.display = 'block';
output.innerHTML = String.format( output.innerHTML = String.format(
'<div class="alert-message"><p>{{ _('Download execution result') }} <a href="%s">%s</a></p><p>{{ _('Or display result') }} <a href="%s">%s</a></p></div>', '<div class="alert-message"><p>{{ _("Download execution result") }} <a href="%s">%s</a></p><p>{{ _("Or display result") }} <a href="%s">%s</a></p></div>',
link, link, link_nodownload, link_nodownload link, link, link_nodownload, link_nodownload
); );
@ -134,14 +134,14 @@
<form method="get" action="{{ entityencode(FULL_REQUEST_URI) }}"> <form method="get" action="{{ entityencode(FULL_REQUEST_URI) }}">
<div class="cbi-map"> <div class="cbi-map">
<h2 name="content">{{ _('Custom Commands') }}</h2> <h2 name="content">{{ _("Custom Commands") }}</h2>
{% if (length(commands) == 0): %} {% if (length(commands) == 0): %}
<div class="cbi-section"> <div class="cbi-section">
<div class="table cbi-section-table"> <div class="table cbi-section-table">
<div class="tr cbi-section-table-row"> <div class="tr cbi-section-table-row">
<p> <p>
<em>{{ _('This section contains no values yet') }}</em> <em>{{ _("This section contains no values yet") }}</em>
</p> </p>
</div> </div>
</div> </div>
@ -151,15 +151,15 @@
{% for (let command in commands): %} {% for (let command in commands): %}
<div class="commandbox"> <div class="commandbox">
<h3>{{ entityencode(command.name) }}</h3> <h3>{{ entityencode(command.name) }}</h3>
<p>{{ _('Command:') }} <code>{{ entityencode(command.command) }}</code></p> <p>{{ _("Command:") }} <code>{{ entityencode(command.command) }}</code></p>
{% if (command.param == "1"): %} {% if (command.param == "1"): %}
<p>{{ _('Arguments:') }} <input type="text" id="{{ command['.name'] }}" /></p> <p>{{ _("Arguments:") }} <input type="text" id="{{ command['.name'] }}" /></p>
{% endif %} {% endif %}
<div> <div>
<button class="cbi-button cbi-button-apply" onclick="command_run(event, '{{ command['.name'] }}')">{{ _('Run') }}</button> <button class="cbi-button cbi-button-apply" onclick="command_run(event, '{{ command['.name'] }}')">{{ _("Run") }}</button>
<button class="cbi-button cbi-button-download" onclick="command_download(event, '{{ command['.name'] }}')">{{ _('Download') }}</button> <button class="cbi-button cbi-button-download" onclick="command_download(event, '{{ command['.name'] }}')">{{ _("Download") }}</button>
{% if (command.public == "1"): %} {% if (command.public == "1"): %}
<button class="cbi-button cbi-button-link" onclick="command_link(event, '{{ command['.name'] }}')">{{ _('Link') }}</button> <button class="cbi-button cbi-button-link" onclick="command_link(event, '{{ command['.name'] }}')">{{ _("Link") }}</button>
{% endif %} {% endif %}
</div> </div>
</div> </div>
@ -171,7 +171,7 @@
</div> </div>
<fieldset class="cbi-section" style="display:none"> <fieldset class="cbi-section" style="display:none">
<legend id="command-rc-legend">{{ _('Collecting data...') }}</legend> <legend id="command-rc-legend">{{ _("Collecting data...") }}</legend>
<span id="command-rc-output"></span> <span id="command-rc-output"></span>
</fieldset> </fieldset>
</form> </form>

View File

@ -29,19 +29,19 @@
<div class="alert alert-success" role="alert"> <div class="alert alert-success" role="alert">
{% if (exitcode == 0): %} {% if (exitcode == 0): %}
{{ _('Command executed successfully.') }} {{ _("Command executed successfully.") }}
{% else %} {% else %}
{{ sprintf(_('Command exited with status code %d'), exitcode) }} {{ sprintf(_("Command exited with status code %d"), exitcode) }}
{% endif %} {% endif %}
</div> </div>
{% if (length(stdout)): %} {% if (length(stdout)): %}
<h3>{{ _('Standard Output') }}</h3> <h3>{{ _("Standard Output") }}</h3>
<pre>{{ entityencode(stdout) }}</pre> <pre>{{ entityencode(stdout) }}</pre>
{% endif %} {% endif %}
{% if (length(stderr)): %} {% if (length(stderr)): %}
<h3>{{ _('Standard Error') }}</h3> <h3>{{ _("Standard Error") }}</h3>
<pre>{{ entityencode(stderr) }}</pre> <pre>{{ entityencode(stderr) }}</pre>
{% endif %} {% endif %}