mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-12-21 02:19:30 +00:00
Fixed duplicate check
This commit is contained in:
parent
ac8b119414
commit
181658501b
2 changed files with 12 additions and 4 deletions
|
|
@ -88,6 +88,8 @@ class TypeSynonymsCollectionType extends AbstractType
|
||||||
function (array $viewValue) {
|
function (array $viewValue) {
|
||||||
//Turn our flat list back into the structured array
|
//Turn our flat list back into the structured array
|
||||||
|
|
||||||
|
$out = [];
|
||||||
|
|
||||||
foreach ($viewValue as $row) {
|
foreach ($viewValue as $row) {
|
||||||
if (!is_array($row)) {
|
if (!is_array($row)) {
|
||||||
continue;
|
continue;
|
||||||
|
|
@ -133,8 +135,8 @@ class TypeSynonymsCollectionType extends AbstractType
|
||||||
$ds = $row['dataSource'] ?? null;
|
$ds = $row['dataSource'] ?? null;
|
||||||
$loc = $row['locale'] ?? null;
|
$loc = $row['locale'] ?? null;
|
||||||
|
|
||||||
if (is_string($ds) && $ds !== '' && is_string($loc) && $loc !== '') {
|
if ($ds !== null && is_string($loc) && $loc !== '') {
|
||||||
$key = $ds . '|' . $loc;
|
$key = $ds->value . '|' . $loc;
|
||||||
if (isset($seen[$key])) {
|
if (isset($seen[$key])) {
|
||||||
$hasDuplicate = true;
|
$hasDuplicate = true;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -347,13 +347,13 @@
|
||||||
<target>Due to technical limitations, it is not possible to select dates after the 2038-01-19 on 32-bit systems!</target>
|
<target>Due to technical limitations, it is not possible to select dates after the 2038-01-19 on 32-bit systems!</target>
|
||||||
</segment>
|
</segment>
|
||||||
</unit>
|
</unit>
|
||||||
<unit id="89nojXY" name="validator.fileSize.invalidFormat">
|
<unit id="iM9yb_p" name="validator.fileSize.invalidFormat">
|
||||||
<segment state="translated">
|
<segment state="translated">
|
||||||
<source>validator.fileSize.invalidFormat</source>
|
<source>validator.fileSize.invalidFormat</source>
|
||||||
<target>Invalid file size format. Use an integer number plus K, M, G as suffix for Kilo, Mega or Gigabytes.</target>
|
<target>Invalid file size format. Use an integer number plus K, M, G as suffix for Kilo, Mega or Gigabytes.</target>
|
||||||
</segment>
|
</segment>
|
||||||
</unit>
|
</unit>
|
||||||
<unit id="iXcU7ce" name="validator.invalid_range">
|
<unit id="ZFxQ0BZ" name="validator.invalid_range">
|
||||||
<segment state="translated">
|
<segment state="translated">
|
||||||
<source>validator.invalid_range</source>
|
<source>validator.invalid_range</source>
|
||||||
<target>The given range is not valid!</target>
|
<target>The given range is not valid!</target>
|
||||||
|
|
@ -365,5 +365,11 @@
|
||||||
<target>Invalid code. Check that your authenticator app is set up correctly and that both the server and authentication device has the time set correctly.</target>
|
<target>Invalid code. Check that your authenticator app is set up correctly and that both the server and authentication device has the time set correctly.</target>
|
||||||
</segment>
|
</segment>
|
||||||
</unit>
|
</unit>
|
||||||
|
<unit id="I330cr5" name="settings.synonyms.type_synonyms.collection_type.duplicate">
|
||||||
|
<segment>
|
||||||
|
<source>settings.synonyms.type_synonyms.collection_type.duplicate</source>
|
||||||
|
<target>There is already a translation defined for this type and language!</target>
|
||||||
|
</segment>
|
||||||
|
</unit>
|
||||||
</file>
|
</file>
|
||||||
</xliff>
|
</xliff>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue