From 9e6c6b095607ac5b822968231bac65f720a8f0fc Mon Sep 17 00:00:00 2001 From: Stefano Ceccherini Date: Tue, 30 Jun 2020 17:51:26 +0200 Subject: [PATCH 01/11] Add php cs fixer (test) --- .github/workflows/main.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..c09b1ba --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,10 @@ +on: [push, pull_request] +name: Main +jobs: + php-cs-fixer: + name: PHP-CS-Fixer + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: PHP-CS-Fixer + uses: docker://oskarstark/php-cs-fixer-ga From fbb03661fd5a34cd752cf874b679dbf0422a72ea Mon Sep 17 00:00:00 2001 From: Stefano Ceccherini Date: Tue, 30 Jun 2020 18:09:47 +0200 Subject: [PATCH 02/11] Delete main.yml --- .github/workflows/main.yml | 10 ---------- 1 file changed, 10 deletions(-) delete mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml deleted file mode 100644 index c09b1ba..0000000 --- a/.github/workflows/main.yml +++ /dev/null @@ -1,10 +0,0 @@ -on: [push, pull_request] -name: Main -jobs: - php-cs-fixer: - name: PHP-CS-Fixer - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - name: PHP-CS-Fixer - uses: docker://oskarstark/php-cs-fixer-ga From afe42667a7c2e1ec2b830de24af858c7d85273a4 Mon Sep 17 00:00:00 2001 From: Stefano Ceccherini Date: Sat, 23 Oct 2021 12:14:45 +0200 Subject: [PATCH 03/11] Rename .php_cs.dist to .php-cs-fixer.dist.php --- .php_cs.dist => .php-cs-fixer.dist.php | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .php_cs.dist => .php-cs-fixer.dist.php (100%) diff --git a/.php_cs.dist b/.php-cs-fixer.dist.php similarity index 100% rename from .php_cs.dist rename to .php-cs-fixer.dist.php From 2792d7bc0549c91264f97cb95937951d07fd0fdf Mon Sep 17 00:00:00 2001 From: JackBurton79 Date: Mon, 25 Oct 2021 09:59:37 +0200 Subject: [PATCH 04/11] README: Removed comment added in fork --- README.md | 3 --- 1 file changed, 3 deletions(-) diff --git a/README.md b/README.md index ca791cd..f7670ec 100644 --- a/README.md +++ b/README.md @@ -11,9 +11,6 @@ This plugin allows you to manage the rooms and the elements that are included in. A room is not the same as a location that already exists in GLPI because it can not contain items nor be loaned (which a room can be). -GLPI 9.5.1 compatibility added and tested. Translation fixed (gettext domain). -I also added a basic hungarian translation :) - Installation ------------ From 7960efcb557602ab291d2467fa4ea83b0fde738f Mon Sep 17 00:00:00 2001 From: JackBurton79 Date: Mon, 25 Oct 2021 10:03:04 +0200 Subject: [PATCH 05/11] Revert "Rename .php_cs.dist to .php-cs-fixer.dist.php" This reverts commit afe42667a7c2e1ec2b830de24af858c7d85273a4. --- .php-cs-fixer.dist.php => .php_cs.dist | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .php-cs-fixer.dist.php => .php_cs.dist (100%) diff --git a/.php-cs-fixer.dist.php b/.php_cs.dist similarity index 100% rename from .php-cs-fixer.dist.php rename to .php_cs.dist From d6b1ad8681e92c8298c5d98ad44392c0b1cbaf6d Mon Sep 17 00:00:00 2001 From: Jackburton79 Date: Thu, 7 Apr 2022 22:53:11 +0200 Subject: [PATCH 06/11] Remove automatic actions They were there only for testing and were failing, anyway. --- .github/workflows/main.yml | 10 ---------- .github/workflows/php-lint.yml | 8 -------- 2 files changed, 18 deletions(-) delete mode 100644 .github/workflows/main.yml delete mode 100644 .github/workflows/php-lint.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml deleted file mode 100644 index c09b1ba..0000000 --- a/.github/workflows/main.yml +++ /dev/null @@ -1,10 +0,0 @@ -on: [push, pull_request] -name: Main -jobs: - php-cs-fixer: - name: PHP-CS-Fixer - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - name: PHP-CS-Fixer - uses: docker://oskarstark/php-cs-fixer-ga diff --git a/.github/workflows/php-lint.yml b/.github/workflows/php-lint.yml deleted file mode 100644 index 3abbc65..0000000 --- a/.github/workflows/php-lint.yml +++ /dev/null @@ -1,8 +0,0 @@ -name: PHP Linting -on: pull_request -jobs: - phplint: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v1 - - uses: michaelw90/PHP-Lint@master From 8e2e4f957917b6afec4bcd50e8e75e6308a28b00 Mon Sep 17 00:00:00 2001 From: Jackburton79 Date: Thu, 7 Apr 2022 23:06:55 +0200 Subject: [PATCH 07/11] Add actions to update mo/pot (taken from metademands) --- .github/workflows/generatemo.yml | 37 ++++++++++++++++++++++++++++++++ .github/workflows/updatepot.yml | 34 +++++++++++++++++++++++++++++ 2 files changed, 71 insertions(+) create mode 100644 .github/workflows/generatemo.yml create mode 100644 .github/workflows/updatepot.yml diff --git a/.github/workflows/generatemo.yml b/.github/workflows/generatemo.yml new file mode 100644 index 0000000..9fbb377 --- /dev/null +++ b/.github/workflows/generatemo.yml @@ -0,0 +1,37 @@ +name: Generate MO +on: + push: + branches: [ master ] + paths: + - '**.po' +env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} +jobs: + run: + + name: Generate mo + runs-on: ubuntu-latest + steps: + - name: Checkout repo + uses: actions/checkout@v2 + + - name: Setup Perl environment + # You may pin to the exact commit or the version. + # uses: shogo82148/actions-setup-perl@8d2e3d59a9516b785ed32169d48a4888eaa9b514 + uses: shogo82148/actions-setup-perl@v1.7.2 + - name: msgfmt + # You may pin to the exact commit or the version. + # uses: whtsky/msgfmt-action@6b2181f051b002182d01a1e1f1aff216230c5a4d + uses: whtsky/msgfmt-action@20190305 + - name: Generate mo + run: perl tools/update_mo.pl; + + - name: Commit changes + uses: EndBug/add-and-commit@v5.1.0 + with: + + message: "Generate mo" + - name: Push changes + + uses: actions-go/push@v1 + diff --git a/.github/workflows/updatepot.yml b/.github/workflows/updatepot.yml new file mode 100644 index 0000000..982c459 --- /dev/null +++ b/.github/workflows/updatepot.yml @@ -0,0 +1,34 @@ +name: Update POT +on: + push: + branches: [ master ] + paths-ignore: + - 'locales/**' + +env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} +jobs: + run: + + name: Update POT + + runs-on: ubuntu-latest + steps: + - name: Checkout repo + uses: actions/checkout@v2 + + - name: install xgettext + + run: sudo apt-get install gettext; + - name: Update POT + run: sh tools/extract_template.sh; + + + - name: Commit changes + uses: EndBug/add-and-commit@v5.1.0 + with: + message: "Update POT" + - name: Push changes + + uses: actions-go/push@v1 + From ba987d3747ee370567b549ce1d3f9ea369c2c789 Mon Sep 17 00:00:00 2001 From: Jackburton79 Date: Thu, 7 Apr 2022 23:14:13 +0200 Subject: [PATCH 08/11] add extract_template.sh (taken from metademands) --- tools/extract_template.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100755 tools/extract_template.sh diff --git a/tools/extract_template.sh b/tools/extract_template.sh new file mode 100755 index 0000000..20e0457 --- /dev/null +++ b/tools/extract_template.sh @@ -0,0 +1,10 @@ +#!/bin/bash + +# Only strings with domain specified are extracted (use Xt args of keyword param to set number of args needed) + +xgettext *.php */*.php */*.php --copyright-holder='Rooms Development Team' --package-name='GLPI - Rooms plugin' -o locales/room.pot -L PHP --add-comments=TRANS --from-code=UTF-8 --force-po \ + --keyword=_n:1,2,4t --keyword=__s:1,2t --keyword=__:1,2t --keyword=_e:1,2t --keyword=_x:1c,2,3t \ + --keyword=_ex:1c,2,3t --keyword=_nx:1c,2,3,5t --keyword=_sx:1c,2,3t + + + From 7c0a173469d26d776e6dcf561b1449eeb2e1d6eb Mon Sep 17 00:00:00 2001 From: Jackburton79 Date: Thu, 7 Apr 2022 21:15:05 +0000 Subject: [PATCH 09/11] Update POT --- locales/room.pot | 29 ++++++++++++++++------------- 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/locales/room.pot b/locales/room.pot index 9fb3db5..11aad3a 100644 --- a/locales/room.pot +++ b/locales/room.pot @@ -1,13 +1,14 @@ -# GLPI - Room Management plugin -# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER -# This file is distributed under the same license as the PACKAGE package. +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR Rooms Development Team +# This file is distributed under the same license as the GLPI - Rooms plugin package. # FIRST AUTHOR , YEAR. # +#, fuzzy msgid "" msgstr "" -"Project-Id-Version: GLPI - Room plugin 3.2.0-jb\n\n" +"Project-Id-Version: GLPI - Rooms plugin\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-06-30 18:48+0200\n" +"POT-Creation-Date: 2022-04-07 21:15+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -21,7 +22,7 @@ msgstr "" msgid "Error during the database update" msgstr "" -#: hook.php:276 hook.php:284 hook.php:362 front/room.form.php:82 +#: hook.php:276 hook.php:284 hook.php:362 index.php:11 front/room.form.php:82 #: front/room.php:11 inc/profile.class.php:145 msgid "Room Management" msgstr "" @@ -57,14 +58,11 @@ msgstr "" msgid "General" msgstr "" -#: inc/roomaccesscond.class.php:14 inc/room.class.php:113 -#: inc/room.class.php:330 -msgid "Conditions of Access" -msgstr "" - -#: inc/room.class.php:61 inc/room.class.php:318 +#: inc/room.class.php:61 inc/room.class.php:318 inc/roomtype.class.php:14 msgid "Type" -msgstr "" +msgid_plural "Types" +msgstr[0] "" +msgstr[1] "" #: inc/room.class.php:69 inc/room.class.php:377 msgid "Group in charge of the hardware" @@ -86,6 +84,11 @@ msgstr "" msgid "Seating" msgstr "" +#: inc/room.class.php:113 inc/room.class.php:330 +#: inc/roomaccesscond.class.php:14 +msgid "Conditions of Access" +msgstr "" + #: inc/room.class.php:121 inc/room.class.php:387 msgid "Date of purchase" msgstr "" From 480ee569dc1bb8c849a924f892a79c0572ea2293 Mon Sep 17 00:00:00 2001 From: Stefano Ceccherini Date: Mon, 11 Apr 2022 12:32:31 +0200 Subject: [PATCH 10/11] Update README.md --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index f7670ec..71b64d6 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,7 @@ Room Management plugin for [GLPI](www.glpi-project.org) + +This is a fork of the official plugin, fixed for glpi 9.5 and glpi 10 (glpi_9.5-fixes and glpi-10 branches, respectively) + ======================================================= This is a plugin to add room management feature to [**GLPI** assets inventory From 1af0e89037448a46ca2ca5a5e56357d1daee61a6 Mon Sep 17 00:00:00 2001 From: Stefano Ceccherini Date: Mon, 11 Apr 2022 10:32:58 +0000 Subject: [PATCH 11/11] Update POT --- locales/room.pot | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/locales/room.pot b/locales/room.pot index 11aad3a..a2b861a 100644 --- a/locales/room.pot +++ b/locales/room.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: GLPI - Rooms plugin\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-04-07 21:15+0000\n" +"POT-Creation-Date: 2022-04-11 10:32+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n"