<commit_before><%#
LuCI - Lua Configuration Interface
Copyright 2008 <NAME> <<EMAIL>>
Copyright 2008 <NAME> <<EMAIL>>

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

	http://www.apache.org/licenses/LICENSE-2.0

$Id$

-%>
<%-
local bit = require "bit"
local rowcnt = 1

function rowstyle()
	rowcnt = rowcnt + 1
	return (rowcnt % 2) + 1
end

function opkg_error(code)
	code = bit.rshift(tonumber(code), 8)
	return translate(
		'a_s_packages_code%i' % code,
		translate(
			'a_s_packages_code%i' % code,
			'%s %i' % { translate('code'), code }
		)
	)
end
-%>
<%+header%>
<h2><a id="content" name="content"><%:system%></a></h2>
<h3><%:a_s_packages%></h3>

<br />

<% if install or remove or update or upgrade then %>
<div class="code"><strong><%:status%>:</strong><br />
<% if update then %>
	<%:a_s_packages_update%>: <% if update == 0 then %><span class="ok"><%:ok%></span><% else %><span class="error"><%:error%> (<%=opkg_error(update)%>)</span><% end %><br />
<% end %>
<% if upgrade then%>
	<%:a_s_packages_upgrade%>: <% if upgrade == 0 then %><span class="ok"><%:ok%></span><% else %><span class="error"><%:error%> (<%=opkg_error(upgrade)%>)</span><% end %><br />
<% end %>
<% if install then for k,v in pairs(install) do %>
	<%:a_s_packages_install%> '<%=k%>': <% if v == 0 then %><span class="ok"><%:ok%></span><% else %><span class="error"><%:error%> (<%=opkg_error(v)%>)</span><% end %><br />
<% end end %>
<% if remove then for k,v in pairs(remove) do %>
	<%:a_s_packages_remove%> '<%=k%>': <% if v == 0 then %><span class="ok"><%:ok%></span><% else %><span class="error"><%:error%> (<%=opkg_error(v)%>)</span><% end %><br />
<% end end %>
</div>
<br />
<% end %>

<form method="post" action="<%=REQUEST_URI%>">
	<div class="cbi-map">
		<fieldset class="cbi-section">
			<ul>
				<li><a href="<%=REQUEST_URI%>/ipkg"><%:a_s_packages_ipkg%></a></li>
				<li><a href="<%=REQUEST_URI%>?update=1"><%:a_s_packages_updatelist%></a></li>
			</ul>
			<br />
			<fieldset class="cbi-section-node">
			<div class="cbi-value">
				<label class="cbi-value-title"><%:a_s_packages_installurl%>:</label>
				<div class="cbi-value-field">
					<input type="text" name="url" size="30" value="" />
					<input class="cbi-input-save" type="submit" name="submit" value="<%:ok%>" />
				</div>
			</div>

			<div class="cbi-value">
				<label class="cbi-value-title"><%:filter%>:</label>
				<div class="cbi-value-field">
					<input type="text" name="query" size="20" value="<%=query%>" />
					<input type="submit" class="cbi-input-find" name="search" value="<%:a_s_packages_search%>" />
				</div>
			</div>

			<table class="cbi-section-table">
				<tr class="cbi-section-table-titles">
					<th class="cbi-section-table-cell"><%:a_s_packages_name%></th>
					<th class="cbi-section-table-cell"><%:version%></th>
					<th class="cbi-section-table-cell"><%:install%></th>
					<th class="cbi-section-table-cell"><%:delete%></th>
					<th class="cbi-section-table-cell"><%:descr%></th>
				</tr>
				<% for k, pkg in pairs(pkgs) do %>
				<tr class="cbi-section-table-row cbi-rowstyle-<%=rowstyle()%>">
					<td><%=luci.util.pcdata(pkg.Package)%></td>
					<td><%=luci.util.pcdata(pkg.Version)%></td>
					<td><% if not pkg.Status or not pkg.Status.installed then %><input type="checkbox" name="install.<%=pkg.Package%>" value="1" /><% else %><%:installed%><% end %></td>
					<td><% if pkg.Status and pkg.Status.installed then %><input type="checkbox" name="remove.<%=pkg.Package%>" value="1" /><% else %><%:notinstalled%><% end %></td>
					<td><%=luci.util.pcdata(pkg.Description)%></td>
				</tr>
				<% end %>
			</table>

			<br />

			<div style="text-align: right">
				<input type="submit" class="cbi-input-apply" name="submit" value="<%:a_s_packages_do%>" />
			</div>
		</fieldset></fieldset>
	</div>
</form>
<%+footer%>
<commit_msg>modules/admin-full: remove duplicate fallback translation in opkg error reporting<commit_after><%#
LuCI - Lua Configuration Interface
Copyright 2008 <NAME> <<EMAIL>>
Copyright 2008 <NAME> <<EMAIL>>

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

	http://www.apache.org/licenses/LICENSE-2.0

$Id$

-%>
<%-
local bit = require "bit"
local rowcnt = 1

function rowstyle()
	rowcnt = rowcnt + 1
	return (rowcnt % 2) + 1
end

function opkg_error(code)
	code = bit.rshift(tonumber(code), 8)
	return translate(
		'a_s_packages_code%i' % code,
		'%s %i' % { translate('code'), code }
	)
end
-%>
<%+header%>
<h2><a id="content" name="content"><%:system%></a></h2>
<h3><%:a_s_packages%></h3>

<br />

<% if install or remove or update or upgrade then %>
<div class="code"><strong><%:status%>:</strong><br />
<% if update then %>
	<%:a_s_packages_update%>: <% if update == 0 then %><span class="ok"><%:ok%></span><% else %><span class="error"><%:error%> (<%=opkg_error(update)%>)</span><% end %><br />
<% end %>
<% if upgrade then%>
	<%:a_s_packages_upgrade%>: <% if upgrade == 0 then %><span class="ok"><%:ok%></span><% else %><span class="error"><%:error%> (<%=opkg_error(upgrade)%>)</span><% end %><br />
<% end %>
<% if install then for k,v in pairs(install) do %>
	<%:a_s_packages_install%> '<%=k%>': <% if v == 0 then %><span class="ok"><%:ok%></span><% else %><span class="error"><%:error%> (<%=opkg_error(v)%>)</span><% end %><br />
<% end end %>
<% if remove then for k,v in pairs(remove) do %>
	<%:a_s_packages_remove%> '<%=k%>': <% if v == 0 then %><span class="ok"><%:ok%></span><% else %><span class="error"><%:error%> (<%=opkg_error(v)%>)</span><% end %><br />
<% end end %>
</div>
<br />
<% end %>

<form method="post" action="<%=REQUEST_URI%>">
	<div class="cbi-map">
		<fieldset class="cbi-section">
			<ul>
				<li><a href="<%=REQUEST_URI%>/ipkg"><%:a_s_packages_ipkg%></a></li>
				<li><a href="<%=REQUEST_URI%>?update=1"><%:a_s_packages_updatelist%></a></li>
			</ul>
			<br />
			<fieldset class="cbi-section-node">
			<div class="cbi-value">
				<label class="cbi-value-title"><%:a_s_packages_installurl%>:</label>
				<div class="cbi-value-field">
					<input type="text" name="url" size="30" value="" />
					<input class="cbi-input-save" type="submit" name="submit" value="<%:ok%>" />
				</div>
			</div>

			<div class="cbi-value">
				<label class="cbi-value-title"><%:filter%>:</label>
				<div class="cbi-value-field">
					<input type="text" name="query" size="20" value="<%=query%>" />
					<input type="submit" class="cbi-input-find" name="search" value="<%:a_s_packages_search%>" />
				</div>
			</div>

			<table class="cbi-section-table">
				<tr class="cbi-section-table-titles">
					<th class="cbi-section-table-cell"><%:a_s_packages_name%></th>
					<th class="cbi-section-table-cell"><%:version%></th>
					<th class="cbi-section-table-cell"><%:install%></th>
					<th class="cbi-section-table-cell"><%:delete%></th>
					<th class="cbi-section-table-cell"><%:descr%></th>
				</tr>
				<% for k, pkg in pairs(pkgs) do %>
				<tr class="cbi-section-table-row cbi-rowstyle-<%=rowstyle()%>">
					<td><%=luci.util.pcdata(pkg.Package)%></td>
					<td><%=luci.util.pcdata(pkg.Version)%></td>
					<td><% if not pkg.Status or not pkg.Status.installed then %><input type="checkbox" name="install.<%=pkg.Package%>" value="1" /><% else %><%:installed%><% end %></td>
					<td><% if pkg.Status and pkg.Status.installed then %><input type="checkbox" name="remove.<%=pkg.Package%>" value="1" /><% else %><%:notinstalled%><% end %></td>
					<td><%=luci.util.pcdata(pkg.Description)%></td>
				</tr>
				<% end %>
			</table>

			<br />

			<div style="text-align: right">
				<input type="submit" class="cbi-input-apply" name="submit" value="<%:a_s_packages_do%>" />
			</div>
		</fieldset></fieldset>
	</div>
</form>
<%+footer%>

{'fraction_non_alphanumeric': 0.2530591648795257, 'fraction_numerical': 0.008073672259366721, 'mean_word_length': 4.5055555555555555, 'pattern_counts': {'":': 0, '<': 373, '<?xml version=': 0, '>': 373, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5625488', 'n_tokens_mistral': 3488, 'n_tokens_neox': 3034, 'n_words': 619}