From c094876c6d8be89e1c5e461f5451e04a0bc6b997 Mon Sep 17 00:00:00 2001 From: Mathias Huth Date: Tue, 24 Jun 2025 21:41:43 +0200 Subject: [PATCH 01/20] Refactor sorting logic in sort_en_xml.py to filter and sort elements explicitly --- .github/scripts/sort_en_xml.py | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/.github/scripts/sort_en_xml.py b/.github/scripts/sort_en_xml.py index e6b005c..fb7bc84 100644 --- a/.github/scripts/sort_en_xml.py +++ b/.github/scripts/sort_en_xml.py @@ -3,7 +3,22 @@ file = 'languages/en.xml' tree = ET.parse(file) root = tree.getroot() -root[:] = sorted(root, key=lambda e: e.attrib.get('name','')) -ET.indent(tree, space=" ") + +# Filter only elements +string_elements = [e for e in root.findall('string')] + +# Sort them by name attribute +sorted_strings = sorted(string_elements, key=lambda e: e.attrib.get('name', '')) + +# Remove all elements +for e in string_elements: + root.remove(e) + +# Append sorted elements back +for e in sorted_strings: + root.append(e) + +# Write back to file +ET.indent(tree, space=" ", level=0) tree.write(file, encoding='utf-8', xml_declaration=True) -print("en.xml successfully sorted.") +print("en.xml successfully sorted.") \ No newline at end of file From 0e1778edff09ef0c48931e76b62ac93066c23645 Mon Sep 17 00:00:00 2001 From: Mathias Huth Date: Tue, 24 Jun 2025 21:52:53 +0200 Subject: [PATCH 02/20] Refactor XML sorting logic to preserve comments and improve buffer handling --- .github/scripts/sort_en_xml.py | 57 ++++++++++++++++++++++--------- .github/workflows/sort-en-xml.yml | 15 +++++--- 2 files changed, 51 insertions(+), 21 deletions(-) diff --git a/.github/scripts/sort_en_xml.py b/.github/scripts/sort_en_xml.py index fb7bc84..d691184 100644 --- a/.github/scripts/sort_en_xml.py +++ b/.github/scripts/sort_en_xml.py @@ -1,24 +1,49 @@ -import xml.etree.ElementTree as ET +from lxml import etree file = 'languages/en.xml' -tree = ET.parse(file) + +# Parse XML with comments preserved +parser = etree.XMLParser(remove_blank_text=False) +tree = etree.parse(file, parser) root = tree.getroot() -# Filter only elements -string_elements = [e for e in root.findall('string')] +new_children = [] +buffer = [] +inside_block = False -# Sort them by name attribute -sorted_strings = sorted(string_elements, key=lambda e: e.attrib.get('name', '')) +for elem in root.iterchildren(): + if isinstance(elem, etree._Comment): + # Flush previous block + if buffer: + # Sort buffer by name attribute + sorted_buffer = sorted(buffer, key=lambda e: e.attrib.get('name', '')) + new_children.extend(sorted_buffer) + buffer.clear() + # Add the comment itself + new_children.append(elem) + inside_block = True # Next strings are considered a new block + elif elem.tag == 'string': + if inside_block: + buffer.append(elem) + else: + new_children.append(elem) + else: + # Flush buffer before non-string non-comment + if buffer: + sorted_buffer = sorted(buffer, key=lambda e: e.attrib.get('name', '')) + new_children.extend(sorted_buffer) + buffer.clear() + new_children.append(elem) + inside_block = False -# Remove all elements -for e in string_elements: - root.remove(e) +# Flush any remaining buffer +if buffer: + sorted_buffer = sorted(buffer, key=lambda e: e.attrib.get('name', '')) + new_children.extend(sorted_buffer) -# Append sorted elements back -for e in sorted_strings: - root.append(e) +# Replace children in root +root[:] = new_children -# Write back to file -ET.indent(tree, space=" ", level=0) -tree.write(file, encoding='utf-8', xml_declaration=True) -print("en.xml successfully sorted.") \ No newline at end of file +# Write back +tree.write(file, encoding='utf-8', xml_declaration=True, pretty_print=True) +print("en.xml successfully sorted.") diff --git a/.github/workflows/sort-en-xml.yml b/.github/workflows/sort-en-xml.yml index 4e553a3..5073073 100644 --- a/.github/workflows/sort-en-xml.yml +++ b/.github/workflows/sort-en-xml.yml @@ -15,15 +15,20 @@ jobs: with: python-version: '3.x' + - name: Install lxml + run: pip install lxml + - name: Sort en.xml run: python .github/scripts/sort_en_xml.py - name: Commit sorted file run: | - git config user.name "github-actions" - git config user.email "actions@users.noreply.github.com" - git add languages/en.xml - if ! git diff --quiet; then + if git diff --name-only | grep -q 'languages/en.xml'; then + git config user.name "github-actions" + git config user.email "actions@users.noreply.github.com" + git add languages/en.xml git commit -m "chore: sort en.xml alphabetically" git push - fi + else + echo "No changes to commit." + fi \ No newline at end of file From b27a5fde52f6efbd526faf0de44f4d31c191ba81 Mon Sep 17 00:00:00 2001 From: Mathias Huth Date: Tue, 24 Jun 2025 22:04:31 +0200 Subject: [PATCH 03/20] Refactor commit logic in sort-en-xml.yml to streamline file handling and ensure proper push of sorted en.xml --- .github/workflows/sort-en-xml.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/sort-en-xml.yml b/.github/workflows/sort-en-xml.yml index 5073073..2e291ad 100644 --- a/.github/workflows/sort-en-xml.yml +++ b/.github/workflows/sort-en-xml.yml @@ -23,12 +23,12 @@ jobs: - name: Commit sorted file run: | - if git diff --name-only | grep -q 'languages/en.xml'; then - git config user.name "github-actions" - git config user.email "actions@users.noreply.github.com" - git add languages/en.xml - git commit -m "chore: sort en.xml alphabetically" - git push - else + git config user.name "github-actions" + git config user.email "actions@users.noreply.github.com" + git add languages/en.xml + if git diff --cached --quiet; then echo "No changes to commit." + else + git commit -m "chore: alphabetically sort en.xml" + git push https://x-access-token:${{ secrets.WORKFLOW_TOKEN }}@github.com/${{ github.repository }}.git HEAD:${{ github.ref }} fi \ No newline at end of file From 2665c7b811101d0c78b6781849db226ab7b938b7 Mon Sep 17 00:00:00 2001 From: Mathias Huth Date: Tue, 24 Jun 2025 22:12:51 +0200 Subject: [PATCH 04/20] Refactor workflow steps in sort-en-xml.yml to clarify script execution and improve commit logic --- .github/workflows/sort-en-xml.yml | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/.github/workflows/sort-en-xml.yml b/.github/workflows/sort-en-xml.yml index 2e291ad..d8a2a0e 100644 --- a/.github/workflows/sort-en-xml.yml +++ b/.github/workflows/sort-en-xml.yml @@ -18,17 +18,20 @@ jobs: - name: Install lxml run: pip install lxml - - name: Sort en.xml + - name: Run sort script run: python .github/scripts/sort_en_xml.py - - name: Commit sorted file + - name: Commit and push changes + env: + WORKFLOW_TOKEN: ${{ secrets.WORKFLOW_TOKEN }} run: | git config user.name "github-actions" git config user.email "actions@users.noreply.github.com" - git add languages/en.xml - if git diff --cached --quiet; then - echo "No changes to commit." + + if git diff --quiet; then + echo "No changes detected." else - git commit -m "chore: alphabetically sort en.xml" - git push https://x-access-token:${{ secrets.WORKFLOW_TOKEN }}@github.com/${{ github.repository }}.git HEAD:${{ github.ref }} - fi \ No newline at end of file + git add languages/en.xml + git commit -m "chore: sort en.xml alphabetically" + git push https://x-access-token:${WORKFLOW_TOKEN}@github.com/${{ github.repository }}.git HEAD:$(echo "${{ github.ref }}" | sed 's|refs/heads/||') + fi From 99ac8c7868c6cc4400db32980756c1a02a5b7c29 Mon Sep 17 00:00:00 2001 From: github-actions Date: Tue, 24 Jun 2025 20:22:08 +0000 Subject: [PATCH 05/20] chore: sort en.xml alphabetically --- languages/en.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/languages/en.xml b/languages/en.xml index 251e504..8d3815c 100644 --- a/languages/en.xml +++ b/languages/en.xml @@ -1,4 +1,4 @@ - + Access permission for plugin preferences Here, in addition to the role "Administrator", you can authorize additional roles for access to the plugin preferences. @@ -80,7 +80,7 @@ Keeper You can reintegrate the item into the inventory management. This has the advantage that the data is preserved and you can later always see who has borrowed this item.\n\nIf you want to delete the item, please contact an administrator or the manager of the inventory management! You can reintegrate the item into the inventory management.\n\nIf you want to delete the item, please contact an administrator or the manager of the inventory management! - The authorization check of the plugin failed. There is more than one menu item with the same URL defined.\n\n=> #VAR1_BOLD# + The authorization check of the plugin failed. There is more than one menu item with the same URL defined.\n\n=> #VAR1_BOLD# InventoryManager New There was no new data in the import file! @@ -136,4 +136,4 @@ The date the item was returned to the keeper lent on The lending date of the item to the last recipient - \ No newline at end of file + From 39fd6386a2edeb07f8491331988e260de2b46b39 Mon Sep 17 00:00:00 2001 From: Mathias Huth Date: Tue, 24 Jun 2025 22:27:45 +0200 Subject: [PATCH 06/20] Refactor sorting logic in sort_en_xml.py to simplify buffer handling and improve clarity --- .github/scripts/sort_en_xml.py | 41 +++++++++++++--------------------- 1 file changed, 15 insertions(+), 26 deletions(-) diff --git a/.github/scripts/sort_en_xml.py b/.github/scripts/sort_en_xml.py index d691184..814c435 100644 --- a/.github/scripts/sort_en_xml.py +++ b/.github/scripts/sort_en_xml.py @@ -2,48 +2,37 @@ file = 'languages/en.xml' -# Parse XML with comments preserved +# Load XML with comments preserved parser = etree.XMLParser(remove_blank_text=False) tree = etree.parse(file, parser) root = tree.getroot() new_children = [] buffer = [] -inside_block = False + +def flush_buffer(): + """Sort and add all elements in the buffer.""" + if buffer: + sorted_strings = sorted(buffer, key=lambda e: e.attrib.get('name', '')) + new_children.extend(sorted_strings) + buffer.clear() for elem in root.iterchildren(): if isinstance(elem, etree._Comment): - # Flush previous block - if buffer: - # Sort buffer by name attribute - sorted_buffer = sorted(buffer, key=lambda e: e.attrib.get('name', '')) - new_children.extend(sorted_buffer) - buffer.clear() - # Add the comment itself + flush_buffer() new_children.append(elem) - inside_block = True # Next strings are considered a new block elif elem.tag == 'string': - if inside_block: - buffer.append(elem) - else: - new_children.append(elem) + buffer.append(elem) else: - # Flush buffer before non-string non-comment - if buffer: - sorted_buffer = sorted(buffer, key=lambda e: e.attrib.get('name', '')) - new_children.extend(sorted_buffer) - buffer.clear() + flush_buffer() new_children.append(elem) - inside_block = False -# Flush any remaining buffer -if buffer: - sorted_buffer = sorted(buffer, key=lambda e: e.attrib.get('name', '')) - new_children.extend(sorted_buffer) +# Flush anything left at the end +flush_buffer() -# Replace children in root +# Replace root content root[:] = new_children -# Write back +# Save result tree.write(file, encoding='utf-8', xml_declaration=True, pretty_print=True) print("en.xml successfully sorted.") From d7c742c97f41f00aa39829045e0db0fa0df0440a Mon Sep 17 00:00:00 2001 From: github-actions Date: Tue, 24 Jun 2025 20:28:06 +0000 Subject: [PATCH 07/20] chore: sort en.xml alphabetically --- languages/en.xml | 54 ++++++++++++++++++++++++------------------------ 1 file changed, 27 insertions(+), 27 deletions(-) diff --git a/languages/en.xml b/languages/en.xml index 8d3815c..71b7a9f 100644 --- a/languages/en.xml +++ b/languages/en.xml @@ -1,15 +1,15 @@ - Access permission for plugin preferences - Here, in addition to the role "Administrator", you can authorize additional roles for access to the plugin preferences. Edit permission for the keeper Here you can allow the keeper to edit specific property fields of an item. editable fields by the keeper Here you can specify the specific property fields that can be edited by the keeper of the item. - Append date - If a date in the format YYYY-MM-DD is to be added to an export file, the checkmark must be set. + Access permission for plugin preferences + Here, in addition to the role "Administrator", you can authorize additional roles for access to the plugin preferences. This table shows the items managed by you: This table shows the items lent to you: + Append date + If a date in the format YYYY-MM-DD is to be added to an export file, the checkmark must be set. Allow negative numbers If it should be possible to enter negative numbers for fields of type "Number" or "Decimal number", the checkbox must be checked. (based on #VAR1#) @@ -21,6 +21,10 @@ Date representation Decimal steps The specification of the decimal steps for fields of type "Decimal number". + General + Uninstall + About the uninstall generated by the plugin entries can be deleted from the database. + Choose from the scope of the installation.\n\n***ATTENTION: This routine deletes only the entries in the Admidio database. Program files and the link in the menu will not be deleted! *** Delete only data of the current organization. Delete data in all organizations. - The table #VAR1_BOLD# could not be deleted because it still contains data from another organization or another plug-in.\n @@ -28,12 +32,11 @@ - An error occurred while deleting the data in table #VAR1_BOLD#.\n \nTo completely remove the plugin the program files and the menu entry must be removed. The following deletions were performed:\n\n + - Table #VAR1_BOLD# deleted.\n - An error occurred while deleting table #VAR1_BOLD#.\n - The table #VAR1_BOLD# could not be deleted because it still contains data from another organization.\n - - Table #VAR1_BOLD# deleted.\n - Uninstall - About the uninstall generated by the plugin entries can be deleted from the database. - Choose from the scope of the installation.\n\n***ATTENTION: This routine deletes only the entries in the Admidio database. Program files and the link in the menu will not be deleted! *** + Deactivate borrowing options + Deactivate the fields and their functions that represent the borrowing and returning of items. Documentation Open documentation Allows the documentation of the plugin can be opened (An existing Internet connection is required because the data is located on admidio.org). @@ -48,52 +51,52 @@ You can make the item to former. This has the advantage that the data is preserved and you can later always see who has borrowed this item.\n\nIf you select Delete, the record is irrevocably removed from the database and it is no longer possible to view the data of this item. General filter - Multiple filter terms are to be separated by commas. To exclude words, a - must be placed in front of them. Example: Meier, Huber, -Item case Import - Here you can import items from a previous export file or your own file. In the left column of the following table all item fields are displayed. In the right column the columns from the file to be imported are displayed in a selection list. You should now assign all columns from the file you want to import to a item field. + Here you can import items from a previous export file or your own file. Import items The item #VAR1_BOLD# was imported #VAR2_BOLD#. The following columns of the import file are not assigned to any item fields in InventoryManager: InventoryManager Item + Item field + Item fields + Maintain itemfields + Item fields can be created and edited in item field maintenance. + Create a item field + Delete the item field + Item field deleted + Should this item field and the associated item data be deleted? + Change the item field + Item list + Item name Copy the item Create a item Individual items can be generated here.\n\nNote: In the "Change the item" view, you can use the "Copy the item" menu item to copy an existing item once or several times. Delete the item - Should this item be deleted? Item deleted + Should this item be deleted? Change the item Item was made to former Print the item Undo item made to former You can reintegrate the item into the inventory management.\n\nIf you select Delete, the record will be irrevocably removed from the database and it will no longer be possible to view the data of this item. - Item field - Create a item field - Delete the item field - Should this item field and the associated item data be deleted? - Item field deleted - Change the item field - Item fields - Maintain itemfields - Item fields can be created and edited in item field maintenance. - Item list - Item name Keeper You can reintegrate the item into the inventory management. This has the advantage that the data is preserved and you can later always see who has borrowed this item.\n\nIf you want to delete the item, please contact an administrator or the manager of the inventory management! You can reintegrate the item into the inventory management.\n\nIf you want to delete the item, please contact an administrator or the manager of the inventory management! The authorization check of the plugin failed. There is more than one menu item with the same URL defined.\n\n=> #VAR1_BOLD# InventoryManager New - There was no new data in the import file! + The following items were imported by #VAR1_BOLD#: The item #VAR1_BOLD# was changed by #VAR2_BOLD#: The item #VAR1_BOLD# was created by #VAR2_BOLD#: An item was deleted: An item was made to former: - The following items were imported by #VAR1_BOLD#: + Items have been imported into the inventory An item in the inventory has been changed An item has been added to the inventory An item in the inventory has been deleted An item in the inventory has been made to former - Items have been imported into the inventory + There was no new data in the import file! Number Number of items to be added Number of items @@ -118,9 +121,6 @@ Current user as default selection If the current user is to be preset as the keeper when adding new items, the checkbox must be checked. You are using the current #VAR1# version of InventoryManager! - Deactivate borrowing options - Deactivate the fields and their functions that represent the borrowing and returning of items. - General Category Category of the item From d036934030b3c9b19958d4646ee8c1e36808150d Mon Sep 17 00:00:00 2001 From: Mathias Huth Date: Tue, 24 Jun 2025 22:38:21 +0200 Subject: [PATCH 08/20] fix language file sorting workflow --- .github/workflows/sort-en-xml.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/sort-en-xml.yml b/.github/workflows/sort-en-xml.yml index d8a2a0e..8b473f7 100644 --- a/.github/workflows/sort-en-xml.yml +++ b/.github/workflows/sort-en-xml.yml @@ -22,8 +22,6 @@ jobs: run: python .github/scripts/sort_en_xml.py - name: Commit and push changes - env: - WORKFLOW_TOKEN: ${{ secrets.WORKFLOW_TOKEN }} run: | git config user.name "github-actions" git config user.email "actions@users.noreply.github.com" @@ -33,5 +31,5 @@ jobs: else git add languages/en.xml git commit -m "chore: sort en.xml alphabetically" - git push https://x-access-token:${WORKFLOW_TOKEN}@github.com/${{ github.repository }}.git HEAD:$(echo "${{ github.ref }}" | sed 's|refs/heads/||') + git push fi From ad1fbc39367d2eb4f3d2b73266fb73e435358254 Mon Sep 17 00:00:00 2001 From: Mathias Huth Date: Tue, 24 Jun 2025 22:43:52 +0200 Subject: [PATCH 09/20] feat: add workflow and script to check for unused translation keys --- .github/scripts/check_unused_strings.py | 30 ++++++++++++++++++++++ .github/workflows/check-unused-strings.yml | 30 ++++++++++++++++++++++ 2 files changed, 60 insertions(+) create mode 100644 .github/scripts/check_unused_strings.py create mode 100644 .github/workflows/check-unused-strings.yml diff --git a/.github/scripts/check_unused_strings.py b/.github/scripts/check_unused_strings.py new file mode 100644 index 0000000..09e51ee --- /dev/null +++ b/.github/scripts/check_unused_strings.py @@ -0,0 +1,30 @@ +import os, re, xml.etree.ElementTree as ET +import argparse + +p = argparse.ArgumentParser() +p.add_argument('--exclude', default='', help='Comma‑separated dirs to skip') +args = p.parse_args() +excl = {d.strip() for d in args.exclude.split(',') if d.strip()} + +root = ET.parse('languages/en.xml').getroot() +keys = [e.attrib['name'] for e in root.findall('.//string') + if re.fullmatch(r'[A-Z0-9_]+', e.attrib['name'])] + +unused = [] +for k in keys: + used = False + for dp, _, fs in os.walk('.'): + if any(part in excl for part in dp.split(os.sep)): + continue + for f in fs: + if f.endswith(('.php','.js','.html','.tpl')): + if k in open(os.path.join(dp, f), 'r', errors='ignore').read(): + used = True; break + if used: break + if not used: + unused.append(k) + +if unused: + for k in unused: + print(f"UNUSED: {k}") + exit(1) # triggers warning via continue-on-error diff --git a/.github/workflows/check-unused-strings.yml b/.github/workflows/check-unused-strings.yml new file mode 100644 index 0000000..8eac072 --- /dev/null +++ b/.github/workflows/check-unused-strings.yml @@ -0,0 +1,30 @@ +name: Check Unused Strings + +on: + pull_request: + push: + workflow_dispatch: + +jobs: + unused-strings: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + with: + fetch-depth: 0 + + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: '3.x' + + - name: Run unused‑string checker + id: check + continue-on-error: true + run: | + python scripts/check_unused_strings.py --exclude .github + + - name: Annotate warning if unused + if: steps.check.outcome == 'failure' + run: | + echo "::warning file=en.xml::Detected unused translation keys. Please review." From b404f0140e492673a4a3ba923171e9f55ac1fd34 Mon Sep 17 00:00:00 2001 From: Mathias Huth Date: Tue, 24 Jun 2025 22:45:30 +0200 Subject: [PATCH 10/20] fix: correct script path in unused string checker workflow --- .github/workflows/check-unused-strings.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/check-unused-strings.yml b/.github/workflows/check-unused-strings.yml index 8eac072..9ebc7d0 100644 --- a/.github/workflows/check-unused-strings.yml +++ b/.github/workflows/check-unused-strings.yml @@ -22,7 +22,7 @@ jobs: id: check continue-on-error: true run: | - python scripts/check_unused_strings.py --exclude .github + python .github/scripts/check_unused_strings.py --exclude .github - name: Annotate warning if unused if: steps.check.outcome == 'failure' From 6851f4d4c887f9d12f64c21d29320ed214477307 Mon Sep 17 00:00:00 2001 From: Mathias Huth Date: Tue, 24 Jun 2025 22:51:54 +0200 Subject: [PATCH 11/20] fix: update unused string checker workflow to handle errors correctly --- .github/workflows/check-unused-strings.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/check-unused-strings.yml b/.github/workflows/check-unused-strings.yml index 9ebc7d0..5f8cd21 100644 --- a/.github/workflows/check-unused-strings.yml +++ b/.github/workflows/check-unused-strings.yml @@ -20,11 +20,11 @@ jobs: - name: Run unused‑string checker id: check - continue-on-error: true run: | python .github/scripts/check_unused_strings.py --exclude .github - name: Annotate warning if unused - if: steps.check.outcome == 'failure' + if: failure() + continue-on-error: true run: | echo "::warning file=en.xml::Detected unused translation keys. Please review." From ed972bfde8739cfc92479ac55a00a9e248d96cbc Mon Sep 17 00:00:00 2001 From: Mathias Huth Date: Tue, 24 Jun 2025 23:19:17 +0200 Subject: [PATCH 12/20] fix: update workflows to ensure proper handling of unused strings and sorting of en.xml --- .github/workflows/check-unused-strings.yml | 31 +++++++++++++++++----- .github/workflows/sort-en-xml.yml | 5 ++++ 2 files changed, 30 insertions(+), 6 deletions(-) diff --git a/.github/workflows/check-unused-strings.yml b/.github/workflows/check-unused-strings.yml index 5f8cd21..93c2430 100644 --- a/.github/workflows/check-unused-strings.yml +++ b/.github/workflows/check-unused-strings.yml @@ -1,10 +1,22 @@ name: Check Unused Strings on: - pull_request: push: + branches: + - master + paths: + - languages/en.xml + pull_request: + branches: + - master + paths: + - languages/en.xml workflow_dispatch: +permissions: + contents: read + pull-requests: write + jobs: unused-strings: runs-on: ubuntu-latest @@ -21,10 +33,17 @@ jobs: - name: Run unused‑string checker id: check run: | - python .github/scripts/check_unused_strings.py --exclude .github + python .github/scripts/check_unused_strings.py --exclude .github > unused_keys.txt || echo "Unused keys found" - - name: Annotate warning if unused - if: failure() - continue-on-error: true + - name: Post PR review with unused keys + if: ${{ github.event_name == 'pull_request' && steps.check.outcome == 'failure' }} + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | - echo "::warning file=en.xml::Detected unused translation keys. Please review." + PR_NUMBER=$(jq --raw-output .number "$GITHUB_EVENT_PATH") + BODY=$(echo -e "**WARNING: Unused translation keys detected**\n\n\`\`\`\n$(cat unused_keys.txt)\n\`\`\`\nPlease consider removing or using these keys." | jq -Rs .) + + curl -s -X POST -H "Authorization: Bearer $GITHUB_TOKEN" \ + -H "Content-Type: application/json" \ + https://api.github.com/repos/${{ github.repository }}/pulls/$PR_NUMBER/reviews \ + -d "{\"body\": $BODY, \"event\": \"REQUEST_CHANGES\"}" \ No newline at end of file diff --git a/.github/workflows/sort-en-xml.yml b/.github/workflows/sort-en-xml.yml index 8b473f7..1ff77a0 100644 --- a/.github/workflows/sort-en-xml.yml +++ b/.github/workflows/sort-en-xml.yml @@ -1,6 +1,11 @@ name: Sort en.xml on: + push: + branches: + - master + paths: + - languages/en.xml workflow_dispatch: jobs: From 9350965c37321973dac58630b1833b78ace61b53 Mon Sep 17 00:00:00 2001 From: Mathias Huth Date: Tue, 24 Jun 2025 23:25:19 +0200 Subject: [PATCH 13/20] fix: remove error message from unused string checker command --- .github/workflows/check-unused-strings.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/check-unused-strings.yml b/.github/workflows/check-unused-strings.yml index 93c2430..ccafb18 100644 --- a/.github/workflows/check-unused-strings.yml +++ b/.github/workflows/check-unused-strings.yml @@ -33,7 +33,7 @@ jobs: - name: Run unused‑string checker id: check run: | - python .github/scripts/check_unused_strings.py --exclude .github > unused_keys.txt || echo "Unused keys found" + python .github/scripts/check_unused_strings.py --exclude .github > unused_keys.txt - name: Post PR review with unused keys if: ${{ github.event_name == 'pull_request' && steps.check.outcome == 'failure' }} From 7fddc8534ef46d9ef95b6686f1f06430060396d9 Mon Sep 17 00:00:00 2001 From: Mathias Huth Date: Tue, 24 Jun 2025 23:28:29 +0200 Subject: [PATCH 14/20] fix: add debug output for event name and check outcome in unused strings workflow --- .github/workflows/check-unused-strings.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/check-unused-strings.yml b/.github/workflows/check-unused-strings.yml index ccafb18..c5d15f0 100644 --- a/.github/workflows/check-unused-strings.yml +++ b/.github/workflows/check-unused-strings.yml @@ -35,6 +35,11 @@ jobs: run: | python .github/scripts/check_unused_strings.py --exclude .github > unused_keys.txt + - name: Debug outcomes + run: | + echo "EVENT: ${{ github.event_name }}" + echo "CHECK OUTCOME: ${{ steps.check.outcome }}" + - name: Post PR review with unused keys if: ${{ github.event_name == 'pull_request' && steps.check.outcome == 'failure' }} env: From f92f52fe0a31b644cbabed326ab7d3ca25f56d5c Mon Sep 17 00:00:00 2001 From: Mathias Huth Date: Tue, 24 Jun 2025 23:34:40 +0200 Subject: [PATCH 15/20] fix: update unused string checker workflow to annotate warnings for unused translation keys --- .github/workflows/check-unused-strings.yml | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/.github/workflows/check-unused-strings.yml b/.github/workflows/check-unused-strings.yml index c5d15f0..c1f5e9c 100644 --- a/.github/workflows/check-unused-strings.yml +++ b/.github/workflows/check-unused-strings.yml @@ -35,15 +35,19 @@ jobs: run: | python .github/scripts/check_unused_strings.py --exclude .github > unused_keys.txt - - name: Debug outcomes + - name: Annotate warning if unused + if: failure() + continue-on-error: true run: | - echo "EVENT: ${{ github.event_name }}" - echo "CHECK OUTCOME: ${{ steps.check.outcome }}" + echo "::warning file=en.xml::Detected unused translation keys. Please review." + + - name: Ensure jq is installed + run: sudo apt-get update && sudo apt-get install -y jq - name: Post PR review with unused keys if: ${{ github.event_name == 'pull_request' && steps.check.outcome == 'failure' }} env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GITHUB_TOKEN: ${{ github.token }} run: | PR_NUMBER=$(jq --raw-output .number "$GITHUB_EVENT_PATH") BODY=$(echo -e "**WARNING: Unused translation keys detected**\n\n\`\`\`\n$(cat unused_keys.txt)\n\`\`\`\nPlease consider removing or using these keys." | jq -Rs .) From abca4a27de92e151dba75b927fe6c465590a577a Mon Sep 17 00:00:00 2001 From: Mathias Huth Date: Tue, 24 Jun 2025 23:36:10 +0200 Subject: [PATCH 16/20] fix: update conditions for jq installation and PR review in unused string checker workflow --- .github/workflows/check-unused-strings.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/check-unused-strings.yml b/.github/workflows/check-unused-strings.yml index c1f5e9c..050889f 100644 --- a/.github/workflows/check-unused-strings.yml +++ b/.github/workflows/check-unused-strings.yml @@ -42,10 +42,13 @@ jobs: echo "::warning file=en.xml::Detected unused translation keys. Please review." - name: Ensure jq is installed + if: failure() + continue-on-error: true run: sudo apt-get update && sudo apt-get install -y jq - name: Post PR review with unused keys - if: ${{ github.event_name == 'pull_request' && steps.check.outcome == 'failure' }} + if: ${{ github.event_name == 'pull_request' && failure() }} + continue-on-error: true env: GITHUB_TOKEN: ${{ github.token }} run: | From ed54d69f791651e7299618464f20046f8f7f0f4b Mon Sep 17 00:00:00 2001 From: Mathias Huth Date: Tue, 24 Jun 2025 23:38:27 +0200 Subject: [PATCH 17/20] fix: remove jq installation step from unused string checker workflow --- .github/workflows/check-unused-strings.yml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/.github/workflows/check-unused-strings.yml b/.github/workflows/check-unused-strings.yml index 050889f..abaea87 100644 --- a/.github/workflows/check-unused-strings.yml +++ b/.github/workflows/check-unused-strings.yml @@ -41,11 +41,6 @@ jobs: run: | echo "::warning file=en.xml::Detected unused translation keys. Please review." - - name: Ensure jq is installed - if: failure() - continue-on-error: true - run: sudo apt-get update && sudo apt-get install -y jq - - name: Post PR review with unused keys if: ${{ github.event_name == 'pull_request' && failure() }} continue-on-error: true From 247c5f6aee0adcc08c8040737bbc81de8095656a Mon Sep 17 00:00:00 2001 From: Mathias Huth Date: Tue, 24 Jun 2025 23:43:31 +0200 Subject: [PATCH 18/20] fix: remove unused strings from language files --- languages/de-DE.xml | 16 ---------------- languages/de.xml | 16 ---------------- languages/en.xml | 16 ---------------- languages/fr.xml | 16 ---------------- 4 files changed, 64 deletions(-) diff --git a/languages/de-DE.xml b/languages/de-DE.xml index 80e2052..560b4c6 100644 --- a/languages/de-DE.xml +++ b/languages/de-DE.xml @@ -14,7 +14,6 @@ Soll es möglich sein, negative Zahlen für Felder des Types "Zahl" oder "Dezimalzahl" einzugeben, so ist der Haken zu setzen. (basierend auf #VAR1#) Kategorie - Konfiguration Es konnte keine Verbindung zur GitHub-Relaseseite hergestellt werden! Bitte prüfen Sie Ihre Internetverbindung oder versuchen Sie es zu einem späteren Zeitpunkt nocheinmal. Alternativ können Sie auch manuell auf der Webseite von #VAR1# prüfen ob ein Update vorliegt. Einstellungen für das Kopieren eines Gegenstandes: erstellt mit dem Plugin InventoryManager der Online-Mitgliederverwaltung Admidio @@ -39,7 +38,6 @@ Hiermit können Sie die Dokumentation zum Plugin öffnen (Eine bestehende Internetverbindung wird vorausgesetzt, da sich die Daten auf GitHub befinden). Gehe zur GitHub-Relaseseite Export - Export und Filter Feld einer lfd. Nr. Hier können Sie ein Feld mit einer laufenden Nummer auswählen. Bei einer Auswahl wird die aktuelle Nummer ausgelesen und entsprechend der angegebenen Anzahl erhöht.\n\nHINWEIS: InventoryManager kann nur erkennen, ob ein Datenfeld vom Typ "Zahl" ist. Ob in diesem Datenfeld eine laufende Nummer gespeichert ist, kann nicht erkannt werden. Dateiname @@ -50,20 +48,16 @@ Import Hier können Sie Gegenstände aus einer vorherigen Exportdatei oder einer eigenen Datei importieren. In der linken Spalte der nachfolgenden Tabelle werden alle Eigenschaftsfelder angezeigt. In der rechten Spalte werden in einer Auswahlliste die Spalten aus der zu importierenden Datei angezeigt. Alle Spalten aus der Datei, die Sie importieren möchten, sollten Sie nun einem Eigenschaftsfeld zuordnen. - Gegenstände importieren - Der Gegenstand #VAR1_BOLD# wurde #VAR2_BOLD# importiert. Folgenden Spalten der Importdatei sind keine Felder im InventoryManager zugeordnet: Inventarverwaltung Gegenstand Gegenstand kopieren Neuen Gegenstand anlegen - Hier können Sie einzelne Gegenstände dem Inventar hinzufügen.\n\nHinweis: In der Ansicht "Gegenstand ändern" ist es über den Menüpunkt "Gegenstand kopieren" möglich, einen vorhandenen Gegenstand einfach oder mehrfach zu kopieren. Gegenstand löschen Soll dieser Gegenstand gelöscht werden? Gegenstand gelöscht Gegenstand ändern Gegenstand ausgesondert - Gegenstandsdaten drucken Aussonderung des Gegenstandes rückgängig gemacht Sie könnent den Gegenstand wieder in die Inventarverwaltung aufnehmen.\n\nWenn Sie Löschen auswählen, wird der Datensatz unwiderruflich aus der Datenbank entfernt und es ist später nicht mehr möglich Daten dieses Gegenstandes einzusehen. Eigenschaftsfeld @@ -76,13 +70,11 @@ Felder pflegen In der Felderpflege können Sie Eigenschaftsfelder für Gegenstände anlegen und bearbeiten. Gegenstandsliste - Gegenstandsname Verwalter Sie können den Gegenstand als ausgesondert markieren. Dies hat den Vorteil, dass die Daten erhalten bleiben und Sie später immer wieder sehen können, wer diesen Gegenstand ausgeliehen hat.\n\nWenn Sie den Gegenstand löschen möchten, wenden Sie sich an einen Administrator oder den Verwalter der Inventarverwaltung! Sie können den Gegenstand wieder in die Inventarverwaltung aufnehmen.\n\nWenn Sie den Gegenstand löschen möchten, wenden Sie sich an einen Administrator oder den Verwalter der Inventarverwaltung! Die Authorisierungsprüfung des Plugins ist fehlgeschlagen. Es ist mehr als ein Menüpunkt mit derselben URL definiert.\n\n=> #VAR1_BOLD# InventoryManager - Neu In der Importdatei waren keine neuen Daten vorhanden! Der Gegenstand #VAR1_BOLD# wurde von #VAR2_BOLD# geändert: Der Gegenstand #VAR1_BOLD# wurde von #VAR2_BOLD# angelegt: @@ -96,7 +88,6 @@ Im Inventar wurden Gegenstände importiert Anzahl Anzahl der anzufügenden Gegenstände - Anzahl der Gegenstände Organisationswahl Stand Plugininformationen @@ -107,13 +98,6 @@ Damit in der Profilansicht Gegenstände angezeigt werden, müssen Sie folgende Zeile in die profile.php einfügen: "require_once(ADMIDIO_PATH . FOLDER_PLUGINS .'/InventoryManager/inventory_manager_profile_addin.php');".\n\nWeitere Informationen hierzu finden Sie in der #VAR1#. Bei gesetzter Einstellung werden neben den aktuellen Gegenständen dieser Organisation auch ausgesonderte Gegenstände angezeigt. Alle anzeigen - Sonderfall: Aktueller Benutzer oder Administrator - Benutzer mit Empfänger abgleichen - Hierüber können Sie Benutzer ohne ausgeliehene Gegenstände zu Ehemaligen Mitgliedern machen.\n\n V O R S I C H T\n\n Diese Funktion sollte nur verwendet werden, wenn InventoryManager in einer eigenen Organisation betrieben wird. - Es ist ein Fehler passiert! Benutzer mit #VAR1# konnten nicht gelöscht werden. - Alle Benutzer sind Empfänger eines Gegenstandes, es kann kein Abgleich durchgeführt werden. - Dies ist nur eine Übersicht des Abgleichs, es wurde noch nichts gespeichert.\n\n Benutzer können nur zu Ehemaligen gemacht werden, wenn die Anzahl der Gegenstände 0 beträgt und sie nicht Administrator oder der aktuelle Benutzer sind. - Die aufgelisteten Benutzer sind jetzt Ehemalige. Aussondern rückgängig machen aktueller Benutzer als Standardauswahl Soll der aktuelle Benutzer beim Hinzufügen neuer Gegenstände standardmäßig als Verwalter voreingestellt werden, so ist der Haken zu setzen. diff --git a/languages/de.xml b/languages/de.xml index 7aac545..692b0b1 100644 --- a/languages/de.xml +++ b/languages/de.xml @@ -14,7 +14,6 @@ Soll es möglich sein, negative Zahlen für Felder des Types "Zahl" oder "Dezimalzahl" einzugeben, so ist der Haken zu setzen. (basierend auf #VAR1#) Kategorie - Konfiguration Es konnte keine Verbindung zur GitHub-Relaseseite hergestellt werden! Bitte prüfe deine Internetverbindung oder versuche es zu einem späteren Zeitpunkt nocheinmal. Alternativ kannst du auch manuell auf der Webseite von #VAR1# prüfen ob ein Update vorliegt. Einstellungen für das Kopieren eines Gegenstandes: erstellt mit dem Plugin InventoryManager der Online-Mitgliederverwaltung Admidio @@ -39,7 +38,6 @@ Hiermit kannst du die Dokumentation zum Plugin öffnen (Eine bestehende Internetverbindung wird vorausgesetzt, da sich die Daten auf GitHub befinden). Gehe zur GitHub-Relaseseite Export - Export und Filter Feld einer lfd. Nr. Hier kannst du ein Feld mit einer laufenden Nummer auswählen. Bei einer Auswahl wird die aktuelle Nummer ausgelesen und entsprechend der angegebenen Anzahl erhöht.\n\nHINWEIS: InventoryManager kann nur erkennen, ob ein Datenfeld vom Typ "Zahl" ist. Ob in diesem Datenfeld eine laufende Nummer gespeichert ist, kann nicht erkannt werden. Dateiname @@ -50,20 +48,16 @@ Import Hier kannst du Gegenstände aus einer vorherigen Exportdatei oder einer eigenen Datei importieren. In der linken Spalte der nachfolgenden Tabelle werden alle Eigenschaftsfelder angezeigt. In der rechten Spalte werden in einer Auswahlliste die Spalten aus der zu importierenden Datei angezeigt. Alle Spalten aus der Datei, die du importieren möchtest, solltest du nun einem Eigenschaftsfeld zuordnen. - Gegenstände importieren - Der Gegenstand #VAR1_BOLD# wurde #VAR2_BOLD# importiert. Folgenden Spalten der Importdatei sind keine Felder im InventoryManager zugeordnet: Inventarverwaltung Gegenstand Gegenstand kopieren Neuen Gegenstand anlegen - Hier kannst du einzelne Gegenstände dem Inventar hinzufügen.\n\nHinweis: In der Ansicht "Gegenstand ändern" ist es über den Menüpunkt "Gegenstand kopieren" möglich, einen vorhandenen Gegenstand einfach oder mehrfach zu kopieren. Gegenstand löschen Soll dieser Gegenstand gelöscht werden? Gegenstand gelöscht Gegenstand ändern Gegenstand ausgesondert - Gegenstandsdaten drucken Aussonderung des Gegenstandes rückgängig gemacht Du kannst den Gegenstand wieder in die Inventarverwaltung aufnehmen.\n\nWenn du Löschen auswählst, wird der Datensatz unwiderruflich aus der Datenbank entfernt und es ist später nicht mehr möglich Daten dieses Gegenstandes einzusehen. Eigenschaftsfeld @@ -76,13 +70,11 @@ Felder pflegen In der Felderpflege kannst du Eigenschaftsfelder für Gegenstände anlegen und bearbeiten. Gegenstandsliste - Gegenstandsname Verwalter Du kannst den Gegenstand als ausgesondert markieren. Dies hat den Vorteil, dass die Daten erhalten bleiben und du später immer wieder sehen kannst, wer diesen Gegenstand ausgeliehen hat.\n\nWenn du den Gegenstand löschen möchtest, wende dich an einen Administrator oder den Verwalter der Inventarverwaltung! Du kannst den Gegenstand wieder in die Inventarverwaltung aufnehmen.\n\nWenn du den Gegenstand löschen möchtest, wende dich an einen Administrator oder den Verwalter der Inventarverwaltung! Die Authorisierungsprüfung des Plugins ist fehlgeschlagen. Es ist mehr als ein Menüpunkt mit derselben URL definiert.\n\n=> #VAR1_BOLD# InventoryManager - Neu In der Importdatei waren keine neuen Daten vorhanden! Der Gegenstand #VAR1_BOLD# wurde von #VAR2_BOLD# geändert: Der Gegenstand #VAR1_BOLD# wurde von #VAR2_BOLD# angelegt: @@ -96,7 +88,6 @@ Im Inventar wurden Gegenstände importiert Anzahl Anzahl der anzufügenden Gegenstände - Anzahl der Gegenstände Organisationswahl Stand Plugininformationen @@ -107,13 +98,6 @@ Damit in der Profilansicht Gegenstände angezeigt werden, musst du folgende Zeile in die profile.php einfügen: "require_once(ADMIDIO_PATH . FOLDER_PLUGINS .'/InventoryManager/inventory_manager_profile_addin.php');".\n\nWeitere Informationen hierzu findest du in der #VAR1#. Bei gesetzter Einstellung werden neben den aktuellen Gegenständen dieser Organisation auch ausgesonderte Gegenstände angezeigt. Alle anzeigen - Sonderfall: Aktueller Benutzer oder Administrator - Benutzer mit Empfänger abgleichen - Hierüber kannst du Benutzer ohne ausgeliehene Gegenstände zu Ehemaligen Mitgliedern machen.\n\n V O R S I C H T\n\n Diese Funktion sollte nur verwendet werden, wenn InventoryManager in einer eigenen Organisation betrieben wird. - Es ist ein Fehler passiert! Benutzer mit #VAR1# konnten nicht gelöscht werden. - Alle Benutzer sind Empfänger eines Gegenstandes, es kann kein Abgleich durchgeführt werden. - Dies ist nur eine Übersicht des Abgleichs, es wurde noch nichts gespeichert.\n\n Benutzer können nur zu Ehemaligen gemacht werden, wenn die Anzahl der Gegenstände 0 beträgt und sie nicht Administrator oder der aktuelle Benutzer sind. - Die aufgelisteten Benutzer sind jetzt Ehemalige. Aussondern rückgängig machen aktueller Benutzer als Standardauswahl Soll der aktuelle Benutzer beim Hinzufügen neuer Gegenstände standardmäßig als Verwalter voreingestellt werden, so ist der Haken zu setzen. diff --git a/languages/en.xml b/languages/en.xml index 71b7a9f..7317fa2 100644 --- a/languages/en.xml +++ b/languages/en.xml @@ -14,7 +14,6 @@ If it should be possible to enter negative numbers for fields of type "Number" or "Decimal number", the checkbox must be checked. (based on #VAR1#) Category - Configuration Could not connect to the GitHub release page! Please check your internet connection or try again later. Alternatively, you can manually check on the #VAR1# website if an update is available. Settings for copying a item: created with the Plugin InventoryManager of the online member administration Admidio @@ -42,7 +41,6 @@ Allows the documentation of the plugin can be opened (An existing Internet connection is required because the data is located on admidio.org). Go to GitHub release page Export - Export and filter Field of a running no. Here a field of a consecutive number can be selected. In a selection, the current number is read out and increased according to the specified number.\n\nNOTE: InventoryManager can only tell if a data field is of type "number". Whether a serial number is stored in this data field can not be recognized. Filename @@ -53,8 +51,6 @@ Import In the left column of the following table all item fields are displayed. In the right column the columns from the file to be imported are displayed in a selection list. You should now assign all columns from the file you want to import to a item field. Here you can import items from a previous export file or your own file. - Import items - The item #VAR1_BOLD# was imported #VAR2_BOLD#. The following columns of the import file are not assigned to any item fields in InventoryManager: InventoryManager Item @@ -68,16 +64,13 @@ Should this item field and the associated item data be deleted? Change the item field Item list - Item name Copy the item Create a item - Individual items can be generated here.\n\nNote: In the "Change the item" view, you can use the "Copy the item" menu item to copy an existing item once or several times. Delete the item Item deleted Should this item be deleted? Change the item Item was made to former - Print the item Undo item made to former You can reintegrate the item into the inventory management.\n\nIf you select Delete, the record will be irrevocably removed from the database and it will no longer be possible to view the data of this item. Keeper @@ -85,7 +78,6 @@ You can reintegrate the item into the inventory management.\n\nIf you want to delete the item, please contact an administrator or the manager of the inventory management! The authorization check of the plugin failed. There is more than one menu item with the same URL defined.\n\n=> #VAR1_BOLD# InventoryManager - New The following items were imported by #VAR1_BOLD#: The item #VAR1_BOLD# was changed by #VAR2_BOLD#: The item #VAR1_BOLD# was created by #VAR2_BOLD#: @@ -99,7 +91,6 @@ There was no new data in the import file! Number Number of items to be added - Number of items Organizational choice Situation Plug-in informations @@ -110,13 +101,6 @@ In order for items to be displayed in the profile view, the following line must be added to profile.php: "require_once(ADMIDIO_PATH . FOLDER_PLUGINS .'/InventoryManager/inventory_manager_profile_addin.php');".\n\nFurther information can be found on the #VAR1#. If this setting is enabled, former items of this organization will also be displayed in addition to the current items. Display all - Special case: current user or administrator - Synchronize users with recipients - This allows users to be made without a item to a former user.\n\n A T T E N T I O N\n\n This feature should only be used if InventoryManager is operated in its own organization. - A mistake happened! Users with #VAR1# could not be deleted. - All users are recipients of a item, no reconciliation can be performed. - This is just an overview of the comparison, nothing has been saved yet.\n\n Users can only be made to a former if the number of items is 0 and they are not administrator or the current user. - The listed users are now former. Undo made to former Current user as default selection If the current user is to be preset as the keeper when adding new items, the checkbox must be checked. diff --git a/languages/fr.xml b/languages/fr.xml index 740e4dc..fb729de 100644 --- a/languages/fr.xml +++ b/languages/fr.xml @@ -14,7 +14,6 @@ Si vous souhaitez autoriser les nombres négatifs pour les champs de type "Nombre" ou "Décimale", cochez cette case. (basé sur #VAR1#) Catégorie - Configuration Impossible de se connecter à la page de publication GitHub! Veuillez vérifier votre connexion Internet ou réessayer plus tard. Alternativement, vous pouvez vérifier manuellement sur le site Web de #VAR1# s'il y a une mise à jour. Paramètres de copie d'une objet: créé avec le Plugin InventoryManager de l'administration des membres en ligne Admidio @@ -39,7 +38,6 @@ Cela ouvre la documentation pour le plugin (une connexion Internet existante est nécessaire, car les données se trouvent sur admidio.org). Aller à la page de publication GitHub Exporter - Exporter et filtrer Champ de course non. Ici, un champ d'un nombre consécutif peut être sélectionné. Dans une sélection, le numéro actuel est lu et augmenté en fonction du nombre spécifié.\n\nREMARQUE: InventoryManager peut seulement dire si un champ de données est de type "numéro". Si un numéro de série est stocké dans ce champ de données ne peut pas être reconnu. Nom de fichier @@ -50,20 +48,16 @@ Importer Ici, vous pouvez importer des objets à partir d'un fichier d'exportation précédent ou d'un fichier personnalisé. Dans la colonne de gauche du tableau suivant, tous les champs de propriétés sont affichés. Dans la colonne de droite, les colonnes du fichier à importer sont affichées dans une liste déroulante. Toutes les colonnes du fichier que vous souhaitez importer doivent maintenant être associées à un champ de propriété. - Importer des objets - L'objet #VAR1_BOLD# a été importé #VAR2_BOLD#. Les colonnes suivantes du fichier d'importation ne sont associées à aucun champ dans InventoryManager : InventoryManager Objet Copier l'objet Générer l'objet - Des objets individuelles peuvent être générées ici.\n\nRemarque: Dans la vue "Modifier l'objet", vous pouvez utiliser l'élément de menu "Copier l'objet" pour copier une ou plusieurs fois une objet existante. Supprimer l'objet Cette objet doit-elle être effacée ? Objet effacée Modifier l'objet Objet retirée - Imprimer l'objet Annuler le retrait de l'objet Vous pouvez réintégrer l'objet dans la gestion de l'inventaire.\n\nSi vous sélectionnez Supprimer, l'enregistrement sera définitivement supprimé de la base de données et il ne sera plus possible de consulter les données de cet objet ultérieurement. Champ objet @@ -76,13 +70,11 @@ Gérer les champs objets Les champs objets peuvent être créées et traitées dans la gestion des champs objets. Liste des objets - Nom objet Propriétaire Vous pouvez marquer l'objet comme retiré. Cela a l'avantage de conserver les données et vous pouvez toujours voir plus tard qui a emprunté cet objet.\n\nSi vous souhaitez supprimer l'objet, veuillez contacter un administrateur ou le gestionnaire de l'inventaire! Vous pouvez réintégrer l'objet dans la gestion de l'inventaire.\n\nSi vous souhaitez supprimer l'objet, veuillez contacter un administrateur ou le gestionnaire de l'inventaire! Le contrôle d\'autorisation du plug-in a échoué. Plus d\'un élément de menu est défini avec la même URL.\n\n=> #VAR1_BOLD# InventoryManager - Nouveau Aucune nouvelle donnée n'était présente dans le fichier d'importation! L'objet #VAR1_BOLD# a été modifié par #VAR2_BOLD#: L'objet #VAR1_BOLD# a été créé par #VAR2_BOLD#: @@ -96,7 +88,6 @@ Des objets ont été importés dans l'inventaire Nombre Nombre de objets à ajouter - Nombre de objets Choix de l\'organisation État Informations sur le plug-in @@ -107,13 +98,6 @@ Pour que les objets soient affichées dans la vue de profil, la ligne suivante doit être ajoutée à profile.php: "require_once(ADMIDIO_PATH . FOLDER_PLUGINS .'/InventoryManager/inventory_manager_profile_addin.php');".\n\nDe plus amples informations peuvent être trouvées dans le #VAR1#. Si cette option est activée, les objets retirés de cette organisation seront également affichés en plus des objets actuels. Afficher tout - Cas particulier: utilisateur actuel ou administrateur - Synchroniser les utilisateurs avec les destinataires - Cela permet aux utilisateurs d'être créés sans objet pour un ancien utilisateur.\n\n M I S E E N G A R D E\n\n Cette fonctionnalité ne doit être utilisée que si InventoryManager est utilisé dans sa propre organisation. - Une erreur s'est produite! Les utilisateurs avec #VAR1# n'ont pas pu être supprimés. - Tous les utilisateurs sont les destinataires d'une objet, aucune réconciliation ne peut être effectuée. - Ceci est juste un aperçu de la comparaison, rien n'a encore été enregistré.\n\n Les utilisateurs ne peuvent devenir des anciens que si le nombre de objets est 0 et qu'il ne s'agit ni de l'administrateur ni de l'utilisateur actuel. - Les utilisateurs listés sont maintenant des anciens. Annuler le retrait de l'objet Utilisateur actuel comme sélection par défaut Si l'utilisateur actuel doit être défini par défaut comme gestionnaire lors de l'ajout de nouveaux objets, cochez cette case. From 08ab037212370ab6158fb8dd6d1f5f0edcd01e5e Mon Sep 17 00:00:00 2001 From: Mathias Huth Date: Tue, 24 Jun 2025 23:49:27 +0200 Subject: [PATCH 19/20] fix: add approval step for PRs with no unused translation keys --- .github/workflows/check-unused-strings.yml | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/.github/workflows/check-unused-strings.yml b/.github/workflows/check-unused-strings.yml index abaea87..d482f15 100644 --- a/.github/workflows/check-unused-strings.yml +++ b/.github/workflows/check-unused-strings.yml @@ -53,4 +53,17 @@ jobs: curl -s -X POST -H "Authorization: Bearer $GITHUB_TOKEN" \ -H "Content-Type: application/json" \ https://api.github.com/repos/${{ github.repository }}/pulls/$PR_NUMBER/reviews \ - -d "{\"body\": $BODY, \"event\": \"REQUEST_CHANGES\"}" \ No newline at end of file + -d "{\"body\": $BODY, \"event\": \"REQUEST_CHANGES\"}" + + - name: Approve PR (undo previous changes request) + if: ${{ github.event_name == 'pull_request' && success() }} + env: + GITHUB_TOKEN: ${{ github.token }} + run: | + PR_NUMBER=$(jq --raw-output .number "$GITHUB_EVENT_PATH") + BODY=$(echo -e "No unused translation keys found. Good to go!" | jq -Rs .) + + curl -s -X POST -H "Authorization: Bearer $GITHUB_TOKEN" \ + -H "Content-Type: application/json" \ + https://api.github.com/repos/${{ github.repository }}/pulls/$PR_NUMBER/reviews \ + -d "{\"body\": $BODY, \"event\": \"APPROVE\"}" From 1e067b4c82c11ad70c3c47f435812df1ce58d862 Mon Sep 17 00:00:00 2001 From: Mathias Huth Date: Tue, 24 Jun 2025 23:51:42 +0200 Subject: [PATCH 20/20] Revert "fix: add approval step for PRs with no unused translation keys" This reverts commit 08ab037212370ab6158fb8dd6d1f5f0edcd01e5e. --- .github/workflows/check-unused-strings.yml | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/.github/workflows/check-unused-strings.yml b/.github/workflows/check-unused-strings.yml index d482f15..abaea87 100644 --- a/.github/workflows/check-unused-strings.yml +++ b/.github/workflows/check-unused-strings.yml @@ -53,17 +53,4 @@ jobs: curl -s -X POST -H "Authorization: Bearer $GITHUB_TOKEN" \ -H "Content-Type: application/json" \ https://api.github.com/repos/${{ github.repository }}/pulls/$PR_NUMBER/reviews \ - -d "{\"body\": $BODY, \"event\": \"REQUEST_CHANGES\"}" - - - name: Approve PR (undo previous changes request) - if: ${{ github.event_name == 'pull_request' && success() }} - env: - GITHUB_TOKEN: ${{ github.token }} - run: | - PR_NUMBER=$(jq --raw-output .number "$GITHUB_EVENT_PATH") - BODY=$(echo -e "No unused translation keys found. Good to go!" | jq -Rs .) - - curl -s -X POST -H "Authorization: Bearer $GITHUB_TOKEN" \ - -H "Content-Type: application/json" \ - https://api.github.com/repos/${{ github.repository }}/pulls/$PR_NUMBER/reviews \ - -d "{\"body\": $BODY, \"event\": \"APPROVE\"}" + -d "{\"body\": $BODY, \"event\": \"REQUEST_CHANGES\"}" \ No newline at end of file