added multilang support to more strings

This commit is contained in:
HB9HIL
2024-06-07 02:35:59 +02:00
parent dc58c20c94
commit 2ea07d610a
61 changed files with 15898 additions and 4391 deletions

View File

@@ -12,7 +12,7 @@
<?php echo $page_title; ?>
</div>
<div class="card-body">
<h5 class="card-title">Editing Description for API Key: <?php echo $api_info['key']; ?></h5>
<h5 class="card-title"><?= __("Editing Description for API Key"); ?>: <?php echo $api_info['key']; ?></h5>
<?php if(validation_errors()) { ?>
<div class="alert alert-warning" role="alert">
@@ -23,14 +23,14 @@
<form method="post" action="<?php echo site_url('api/edit'); ?>/<?php echo $api_info['key']; ?>" name="APIDescription">
<div class="mb-3">
<label for="APIDescription">API Description</label>
<label for="APIDescription"><?= __("API Description"); ?></label>
<input type="text" class="form-control" name="api_desc" id="APIDescription" aria-describedby="APIDescriptionHelp" value="<?php echo $api_info['description']; ?>">
<small id="APIDescriptionHelp" class="form-text text-muted">Simple name to describe what you use this API for.</small>
<small id="APIDescriptionHelp" class="form-text text-muted"><?= __("Simple name to describe what you use this API for."); ?></small>
</div>
<input type="hidden" name="api_key" value="<?php echo $api_info['key']; ?>">
<button type="submit" class="btn btn-primary">Submit</button>
<button type="submit" class="btn btn-primary"><?= __("Save"); ?></button>
</form>
</div>

View File

@@ -11,25 +11,25 @@
<div class="card">
<div class="card-header">
API Keys
<?= __("API Keys"); ?>
</div>
<div class="card-body">
<p class="card-text">The Wavelog API (Application Programming Interface) lets third party systems access Wavelog in a controlled way. Access to the API is managed via API keys.</p>
<p class="card-text">You will need to generate an API key for each tool you wish to use (e.g. WavelogCAT). Generate a read-write key if the application needs to send data to Wavelog. Generate a read-only key if the application only needs to obtain data from Wavelog.</p>
<p class="card-text"><span class="badge text-bg-warning">API URL</span> The API URL for this Wavelog instance is: <span class="api-url" id="apiUrl"><a target="_blank" href="<?php echo base_url(); ?>"><?php echo base_url(); ?></a></span><span data-bs-toggle="tooltip" title="<?= __("Copy to clipboard"); ?>" onClick='copyApiUrl()'><i class="copy-icon fas fa-copy"></i></span></p>
<p class="card-text"><span class="badge text-bg-info">Info</span> It's good practice to delete a key if you are no longer using the associated application.</p>
<p class="card-text"><?= __("The Wavelog API (Application Programming Interface) lets third party systems access Wavelog in a controlled way. Access to the API is managed via API keys."); ?></p>
<p class="card-text"><?= __("You will need to generate an API key for each tool you wish to use (e.g. WavelogCAT). Generate a read-write key if the application needs to send data to Wavelog. Generate a read-only key if the application only needs to obtain data from Wavelog."); ?></p>
<p class="card-text"><span class="badge text-bg-warning"><?= __("API URL"); ?></span> <?= __("The API URL for this Wavelog instance is"); ?>: <span class="api-url" id="apiUrl"><a target="_blank" href="<?php echo base_url(); ?>"><?php echo base_url(); ?></a></span><span data-bs-toggle="tooltip" title="<?= __("Copy to clipboard"); ?>" onClick='copyApiUrl()'><i class="copy-icon fas fa-copy"></i></span></p>
<p class="card-text"><span class="badge text-bg-info"><?= __("Info"); ?></span> <?= __("It's good practice to delete a key if you are no longer using the associated application."); ?></p>
<?php if ($api_keys->num_rows() > 0) { ?>
<table class="table table-striped">
<thead>
<tr>
<th scope="col">API Key</th>
<th scope="col">Description</th>
<th scope="col">Last Used</th>
<th scope="col">Permissions</th>
<th scope="col">Status</th>
<th scope="col">Actions</th>
<th scope="col"><?= __("API Key"); ?></th>
<th scope="col"><?= __("Description"); ?></th>
<th scope="col"><?= __("Last Used"); ?></th>
<th scope="col"><?= __("Permissions"); ?></th>
<th scope="col"><?= __("Status"); ?></th>
<th scope="col"><?= __("Actions"); ?></th>
</tr>
</thead>
<tbody>
@@ -42,11 +42,11 @@
<?php
if($row->rights == "rw") {
echo "<span class=\"badge bg-warning\">Read & Write</span>";
echo "<span class=\"badge bg-warning\">" . __("Read & Write") . "</span>";
} elseif($row->rights == "r") {
echo "<span class=\"badge bg-success\">Read-Only</span>";
echo "<span class=\"badge bg-success\">" . __("Read-Only") . "</span>";
} else {
echo "<span class=\"badge bg-dark\">Unknown</span>";
echo "<span class=\"badge bg-dark\">" . __("Unknown") . "</span>";
}
?>
@@ -54,11 +54,11 @@
</td>
<td><span class="badge rounded-pill text-bg-success"><?php echo ucfirst($row->status); ?></span></td>
<td>
<a href="<?php echo site_url('api/edit'); ?>/<?php echo $row->key; ?>" class="btn btn-outline-primary btn-sm">Edit</a>
<a href="<?php echo site_url('api/edit'); ?>/<?php echo $row->key; ?>" class="btn btn-outline-primary btn-sm"><?= __("Edit"); ?></a>
<a href="<?php echo site_url('api/auth/'.$row->key); ?>" target="_blank" class="btn btn-primary btn-sm">Test</a>
<a href="<?php echo site_url('api/auth/'.$row->key); ?>" target="_blank" class="btn btn-primary btn-sm"><?= __("Test"); ?></a>
<a href="<?php echo site_url('api/delete/'.$row->key); ?>" class="btn btn-danger btn-sm" onclick="return confirm('Are you sure you want delete API Key <?php echo $row->key; ?>?');">Delete</a>
<a href="<?php echo site_url('api/delete/'.$row->key); ?>" class="btn btn-danger btn-sm" onclick="return confirm('Are you sure you want delete API Key <?php echo $row->key; ?>?');"><?= __("Delete"); ?></a>
</td>
</tr>
@@ -68,12 +68,12 @@
</table>
<?php } else { ?>
<p>You have no API Keys.</p>
<p><?= __("You have no API Keys."); ?></p>
<?php } ?>
<p>
<a href="<?php echo site_url('api/generate/rw'); ?>" class="btn btn-primary "><i class="fas fa-plus"></i> Create a read & write key</a>
<a href="<?php echo site_url('api/generate/r'); ?>" class="btn btn-primary"><i class="fas fa-plus"></i> Create a read-only key</a>
<a href="<?php echo site_url('api/generate/rw'); ?>" class="btn btn-primary "><i class="fas fa-plus"></i> <?= __("Create a read & write key"); ?></a>
<a href="<?php echo site_url('api/generate/r'); ?>" class="btn btn-primary"><i class="fas fa-plus"></i> <?= __("Create a read-only key"); ?></a>
</p>
</div>