Skip to content

Commit 02d848c

Browse files
committed
Merge branch 'release/2.5.1'
2 parents 7da94ce + 9a2d88e commit 02d848c

12 files changed

+543
-31
lines changed

genericobject.xml

+4
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@
2222
<author>Walid Nouh</author>
2323
</authors>
2424
<versions>
25+
<version>
26+
<num>2.5.1</num>
27+
<compatibility>9.2</compatibility>
28+
</version>
2529
<version>
2630
<num>2.5.0</num>
2731
<compatibility>9.2</compatibility>

inc/profile.class.php

+10-11
Original file line numberDiff line numberDiff line change
@@ -76,23 +76,22 @@ static function showForItemtype($type) {
7676
echo "</strong></th></tr>";
7777

7878
echo "<tr><td class='genericobject_type_profiles'>";
79-
$rights = [];
8079
foreach (getAllDatasFromTable(getTableForItemtype("Profile")) as $profile) {
8180
$prof = new Profile();
8281
$prof->getFromDB($profile['id']);
83-
$right = self::getProfileforItemtype($profile['id'], $itemtype);
84-
$label = $profile['name'];
85-
$rights[] = [
86-
'label' => $label,
87-
'itemtype' => $itemtype,
88-
'field' => self::getProfileNameForItemtype($itemtype),
89-
'html_field' => "profile_" . $profile['id'],
82+
$rights = [
83+
[
84+
'label' => $profile['name'],
85+
'itemtype' => $itemtype,
86+
'field' => self::getProfileNameForItemtype($itemtype),
87+
'html_field' => "profile_" . $profile['id'],
88+
]
9089
];
90+
$prof->displayRightsChoiceMatrix(
91+
$rights
92+
);
9193
}
9294

93-
$prof->displayRightsChoiceMatrix(
94-
$rights
95-
);
9695
echo "</td></tr>";
9796
echo "<input type='hidden' name='itemtype' value='".$itemtype."'>";
9897

inc/type.class.php

+20-11
Original file line numberDiff line numberDiff line change
@@ -1003,15 +1003,24 @@ public static function addLocales($name, $itemtype) {
10031003
if (!is_dir($locale_dir)) {
10041004
@ mkdir($locale_dir, 0755, true);
10051005
}
1006-
$locale_file = $name.".".$_SESSION['glpilanguage'];
1007-
self::addFileFromTemplate(['NAME' => $name,
1008-
'CLASSNAME' => self::getClassByName($name)],
1009-
self::LOCALE_TEMPLATE, $locale_dir,
1010-
$locale_file);
1006+
1007+
$locale_files = [
1008+
$name . '.' . $_SESSION['glpilanguage'],
1009+
];
10111010
if ($CFG_GLPI['language'] != $_SESSION['glpilanguage']) {
1012-
$locale_file = $name.".".$CFG_GLPI['language'];
1013-
self::addFileFromTemplate(['CLASSNAME' => $name], self::LOCALE_TEMPLATE, $locale_dir,
1014-
$locale_file);
1011+
$locale_files[] = $name . '.' . $CFG_GLPI['language'];
1012+
}
1013+
1014+
foreach ($locale_files as $locale_file) {
1015+
self::addFileFromTemplate(
1016+
[
1017+
'NAME' => $name,
1018+
'CLASSNAME' => self::getClassByName($name),
1019+
],
1020+
self::LOCALE_TEMPLATE,
1021+
$locale_dir,
1022+
$locale_file
1023+
);
10151024
}
10161025
}
10171026

@@ -1947,6 +1956,9 @@ static function install(Migration $migration) {
19471956
$migration->addField($table, "use_plugin_simcard", "bool");
19481957
$migration->migrationOneTable($table);
19491958

1959+
//If files are missing, recreate them!
1960+
self::checkClassAndFilesForItemType();
1961+
19501962
// Migrate notepad data
19511963
$allGenericObjectTypes = PluginGenericobjectType::getTypes(true);
19521964

@@ -2003,9 +2015,6 @@ static function install(Migration $migration) {
20032015
}
20042016

20052017
self::singularTypes();
2006-
2007-
//If files are missing, recreate them!
2008-
self::checkClassAndFilesForItemType();
20092018
}
20102019

20112020

locales/cs_CZ.mo

3.21 KB
Binary file not shown.

locales/cs_CZ.po

+167
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,167 @@
1+
# SOME DESCRIPTIVE TITLE.
2+
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
3+
# This file is distributed under the same license as the PACKAGE package.
4+
#
5+
# Translators:
6+
# Pavel Borecki <[email protected]>, 2018
7+
# Walid Nouh, 2015
8+
msgid ""
9+
msgstr ""
10+
"Project-Id-Version: GLPI Plugin - Genericobject\n"
11+
"Report-Msgid-Bugs-To: \n"
12+
"POT-Creation-Date: 2017-12-13 14:17+0100\n"
13+
"PO-Revision-Date: 2018-03-27 05:51+0000\n"
14+
"Last-Translator: Pavel Borecki <[email protected]>\n"
15+
"Language-Team: Czech (Czech Republic) (http://www.transifex.com/teclib/glpi-project-plugin-genericobject/language/cs_CZ/)\n"
16+
"MIME-Version: 1.0\n"
17+
"Content-Type: text/plain; charset=UTF-8\n"
18+
"Content-Transfer-Encoding: 8bit\n"
19+
"Language: cs_CZ\n"
20+
"Plural-Forms: nplurals=4; plural=(n == 1 && n % 1 == 0) ? 0 : (n >= 2 && n <= 4 && n % 1 == 0) ? 1: (n % 1 != 0 ) ? 2 : 3;\n"
21+
22+
#: setup.php:188 index.php:58 front/type.form.php:73 front/familylist.php:33
23+
#: front/familylist.php:41 inc/profile.class.php:39
24+
#: inc/object_item.class.php:109 inc/type.class.php:285 inc/type.class.php:368
25+
msgid "Objects management"
26+
msgstr "Správa objektů"
27+
28+
#: index.php:68 front/familylist.php:37
29+
msgid "Empty family"
30+
msgstr "Prázdná rodina"
31+
32+
#: front/commontreedropdown.form.php:36 front/commondropdown.php:11
33+
#: front/commondropdown.form.php:36
34+
msgid "The requested dropdown does not exists"
35+
msgstr "Požadovaná rozbalovací nabídka neexistuje"
36+
37+
#: front/type.php:38 front/object.php:33 inc/profile.class.php:288
38+
#: inc/type.class.php:66
39+
msgid "Type of objects"
40+
msgstr "Typ objektů"
41+
42+
#: front/field.form.php:41
43+
msgid "Field(s) deleted successfully"
44+
msgstr "Kolonky úspěšně smazány"
45+
46+
#: front/field.form.php:51
47+
msgid "Field added successfully"
48+
msgstr "Kolonka úspěšně přidána"
49+
50+
#: inc/field.class.php:64
51+
msgid "Fields associated with the object"
52+
msgstr "Kolonky přiřazené k objektu"
53+
54+
#: inc/field.class.php:70
55+
msgid "Label"
56+
msgstr "Štítek"
57+
58+
#: inc/field.class.php:71
59+
msgid "Name in DB"
60+
msgstr "Název v databázi"
61+
62+
#: inc/field.class.php:126
63+
msgid "Add new field"
64+
msgstr "Přidat novou kolonku"
65+
66+
#: inc/field.class.php:317
67+
msgid "Read-only field"
68+
msgstr "Kolonka pouze pro čtení"
69+
70+
#: inc/typefamily.class.php:36 inc/type.class.php:339 inc/type.class.php:458
71+
msgid "Family of type of objects"
72+
msgstr "Rodina typu objektů"
73+
74+
#: inc/profile.class.php:142
75+
msgid "General"
76+
msgstr "Obecné"
77+
78+
#: inc/profile.class.php:148
79+
msgid "Objects"
80+
msgstr "Objekty"
81+
82+
#: inc/profile.class.php:150
83+
msgid "(No types defined yet)"
84+
msgstr "(Doposud nebyly určené žádné typy)"
85+
86+
#: inc/object.class.php:471
87+
msgid "Object preview"
88+
msgstr "Náhled objektu"
89+
90+
#: inc/object.class.php:751
91+
msgid "You must configure rights to enable the preview"
92+
msgstr "Pro zapnutí náhledu je třeba nastavit oprávnění"
93+
94+
#: inc/type.class.php:153
95+
msgid "Type name is missing"
96+
msgstr "Název typu chybí"
97+
98+
#: inc/type.class.php:159
99+
msgid "Type name must be longer"
100+
msgstr "Je třeba, aby název typu byl delší"
101+
102+
#: inc/type.class.php:165
103+
msgid ""
104+
"Types 'field', 'object' and 'type' are reserved. Please choose another one"
105+
msgstr "Typy „field“ (kolonka), „object“ (objekt) a „type“ (typ) jsou vyhrazené (už je nemůžete použít). Zvolte jiný"
106+
107+
#: inc/type.class.php:172
108+
msgid "Type must start with a letter"
109+
msgstr "Je třeba, aby typ začínal písmenem"
110+
111+
#: inc/type.class.php:179
112+
msgid "A type already exists with the same name"
113+
msgstr "Typ se stejným názvem už existuje"
114+
115+
#: inc/type.class.php:419
116+
msgid "Internal identifier"
117+
msgstr "Vnitřní identifikátor"
118+
119+
#: inc/type.class.php:473
120+
msgid "Behaviour"
121+
msgstr "Chování"
122+
123+
#: inc/type.class.php:492
124+
msgid "Network connections"
125+
msgstr "Síťová připojení"
126+
127+
#: inc/type.class.php:496
128+
msgid "injection file plugin"
129+
msgstr "zásuvný modul vkládání souborů"
130+
131+
#: inc/type.class.php:498
132+
msgid "geninventorynumber plugin"
133+
msgstr "zásuvný modul vytváření inventárních čísel"
134+
135+
#: inc/type.class.php:499
136+
msgid "order plugin"
137+
msgstr "zásuvný modul správa objednávek"
138+
139+
#: inc/type.class.php:500
140+
msgid "item's uninstallation plugin"
141+
msgstr "zásuvný modul odinstalace položek"
142+
143+
#: inc/type.class.php:501
144+
msgid "simcard plugin"
145+
msgstr "zásuvný modul sim karty"
146+
147+
#: inc/type.class.php:653
148+
msgid "Regenerate files"
149+
msgstr "Znovu vytvořit soubory"
150+
151+
#: inc/type.class.php:666
152+
msgid "Link to other objects"
153+
msgstr "Propojit s ostatními objekty"
154+
155+
#. TRANS: %1$s is itemtype name
156+
#: inc/type.class.php:1958
157+
#, php-format
158+
msgid "Unable to load the class %1$s."
159+
msgstr "Nedaří se načíst třídu %1$s."
160+
161+
#. TRANS: %1$s is itemtype name
162+
#: inc/type.class.php:1960
163+
#, php-format
164+
msgid ""
165+
"You probably have garbage data in your database for this plugin and missing "
166+
"files in %1$s"
167+
msgstr "Nejspíš ve své databázi máte pro tento modul v nepořádku data a chybí soubory v %1$s"

locales/pl_PL.mo

1.7 KB
Binary file not shown.

0 commit comments

Comments
 (0)