Skip to content

Commit

Permalink
Fix translation of strings (#526)
Browse files Browse the repository at this point in the history
* Fix translation of "Tasks" word in home page

It isn't being translated on PT-BR language.

* Add translation to "%s inventoried"

* Update timeslotentry.class.php

* Add taskjobs.js translation when no target is available for NetInventory tasks

* Fix CS

---------

Co-authored-by: Johan Cwiklinski <[email protected]>
  • Loading branch information
eduardomozart and trasher authored Jul 29, 2024
1 parent 708629c commit 247d23c
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
10 changes: 5 additions & 5 deletions hook.php
Original file line number Diff line number Diff line change
Expand Up @@ -117,15 +117,15 @@ function plugin_glpiinventory_hook_dashboard_cards($cards)
],
'task' => [
'itemtype' => PluginGlpiinventoryTask::getType(),
'label' => sprintf(__("Number of %s"), __('Tasks')),
'label' => sprintf(__("Number of %s"), __('Tasks', 'glpiinventory')),
],
'unmanaged' => [
'itemtype' => Unmanaged::getType(),
'label' => sprintf(__("Number of %s"), Unmanaged::getTypeName(2)),
],
'computer' => [
'itemtype' => Computer::getType(),
'label' => sprintf(__("%s inventoried"), Computer::getTypeName(2)),
'label' => sprintf(__("%s inventoried", "glpiinventory"), Computer::getTypeName(2)),
'apply_filters' => [
'link' => 'AND',
'field' => 42,
Expand All @@ -135,7 +135,7 @@ function plugin_glpiinventory_hook_dashboard_cards($cards)
],
'printer' => [
'itemtype' => Printer::getType(),
'label' => sprintf(__("%s inventoried"), Printer::getTypeName(2)),
'label' => sprintf(__("%s inventoried", "glpiinventory"), Printer::getTypeName(2)),
'apply_filters' => [
'link' => 'AND',
'field' => 72,
Expand All @@ -145,7 +145,7 @@ function plugin_glpiinventory_hook_dashboard_cards($cards)
],
'networkequipement' => [
'itemtype' => NetworkEquipment::getType(),
'label' => sprintf(__("%s inventoried"), NetworkEquipment::getTypeName(2)),
'label' => sprintf(__("%s inventoried", "glpiinventory"), NetworkEquipment::getTypeName(2)),
'apply_filters' => [
'link' => 'AND',
'field' => 72,
Expand All @@ -155,7 +155,7 @@ function plugin_glpiinventory_hook_dashboard_cards($cards)
],
'phone' => [
'itemtype' => Phone::getType(),
'label' => sprintf(__("%s inventoried"), Phone::getTypeName(2)),
'label' => sprintf(__("%s inventoried", "glpiinventory"), Phone::getTypeName(2)),
'apply_filters' => [
'link' => 'AND',
'field' => 72,
Expand Down
2 changes: 1 addition & 1 deletion inc/timeslotentry.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ public function formDeleteEntry($timeslots_id)
echo "</td>";
echo "<td colspan='2'>";
if ($canedit) {
echo "<input type='submit' class='submit' name='purge-" . $dbentry['id'] . "' value='delete' />";
echo "<input type='submit' class='submit' name='purge-" . $dbentry['id'] . "' value='" . __('Delete') . "' />";
}
echo "</td>";
echo "</tr>";
Expand Down
2 changes: 1 addition & 1 deletion js/taskjobs.js
Original file line number Diff line number Diff line change
Expand Up @@ -712,7 +712,7 @@ taskjobs.update_logs = function (data) {
var targets_cpt = 0;

if(job_v.targets.length === 0) {
$(targets_selector).html('The preparation of the task did not return any targets');
$(targets_selector).html(__('The preparation of the task did not return any targets', 'glpiinventory'));
}

$.each( job_v.targets, function( target_i, target_v) {
Expand Down

0 comments on commit 247d23c

Please sign in to comment.