diff --git a/.github/actions/deploy/create-version.sh b/.github/actions/deploy/create-version.sh deleted file mode 100755 index 1ee86d528..000000000 --- a/.github/actions/deploy/create-version.sh +++ /dev/null @@ -1,85 +0,0 @@ -#! /bin/bash -e - -# set -x - -if [ $# -lt 1 ]; then - echo "Please provide the name of a file to read the commit message from" - exit 1 -fi - -deploy_path='.github/actions/deploy' - -stable_branch=$(cat "$deploy_path/stable_name") -master_branch=master - -major=$(cat "$deploy_path/major") -minor=$(cat "$deploy_path/minor") -patch=$(cat "$deploy_path/patch") - -# release -message="$(cat "$1")" - -parse_pre_release () { - echo "$1" | grep -E '%PRE-?RELEASE%' | head -n 1 | sed -E 's@.*%PRE-?RELEASE%([^%]+)%.*@\1@' -} - -if echo "$message" | grep '%MAJOR%' > /dev/null ; then - - echo 'Creating major version' - let major=major+1 - minor=0 - patch=0 - -elif echo "$message" | grep '%MINOR%' > /dev/null; then - - echo 'Creating minor version' - let minor=minor+1 - patch=0 - -else - - echo 'Creating patch version' - let patch=patch+1 - -fi - -prerelease="$(parse_pre_release "$message")" -version="$major.$minor.$patch" - -if [ -n "$prerelease" ]; then - # We want to build a pre-release - echo "Not Updating the version files as we are creating a pre-release." - version="$version-$prerelease" -else - echo "Updating bumped version files" - echo $major > "$deploy_path/major" - echo $minor > "$deploy_path/minor" - echo $patch > "$deploy_path/patch" -fi - -echo "The new version is $version." - -echo "Storing new release version in $deploy_path/last_release" -echo "$version" > "$deploy_path/last_release" - -"$deploy_path/update-data.sh" "$version" "$major" "$minor" "$patch" "$prerelease" - -git add "$deploy_path/major" "$deploy_path/minor" "$deploy_path/patch" "$deploy_path/last_release" - -# exit - -git config user.name 'Github actions bot' -git config user.email 'bot@noreply.github.com' - -git commit -s -m "Bump to version $version" -git tag "v$version" - -git checkout $master_branch -git merge --no-ff $stable_branch - -git remote add tokenized "https://nextcloud-cookbook-bot:$BOT_TOKEN@github.com/nextcloud/cookbook.git" - -git -c "http.https://github.com/.extraheader=" push tokenized $stable_branch $master_branch -git push origin "v$version" - -echo "version=$version" >> $GITHUB_OUTPUT diff --git a/.github/actions/deploy/last_release b/.github/actions/deploy/last_release index 5eef0f10e..a3f5a8ed4 100644 --- a/.github/actions/deploy/last_release +++ b/.github/actions/deploy/last_release @@ -1 +1 @@ -0.10.2 +0.10.3 diff --git a/.github/actions/deploy/patch b/.github/actions/deploy/patch index 0cfbf0888..00750edc0 100644 --- a/.github/actions/deploy/patch +++ b/.github/actions/deploy/patch @@ -1 +1 @@ -2 +3 diff --git a/.github/actions/deploy/stable_name b/.github/actions/deploy/stable_name index 2bf5ad044..1963f8567 100644 --- a/.github/actions/deploy/stable_name +++ b/.github/actions/deploy/stable_name @@ -1 +1 @@ -stable +stable-0.10.x diff --git a/.github/actions/deploy/trunk_name b/.github/actions/deploy/trunk_name new file mode 100644 index 000000000..c47cb79a9 --- /dev/null +++ b/.github/actions/deploy/trunk_name @@ -0,0 +1 @@ +main-0.10.x diff --git a/.github/actions/php-linter/Dockerfile b/.github/actions/php-linter/Dockerfile new file mode 100644 index 000000000..e920ff9c7 --- /dev/null +++ b/.github/actions/php-linter/Dockerfile @@ -0,0 +1,5 @@ +FROM php:7.4 + +COPY tester.sh /tester.sh + +CMD ["/tester.sh", "/work"] diff --git a/.github/actions/php-linter/tester.sh b/.github/actions/php-linter/tester.sh new file mode 100755 index 000000000..4ae0685e4 --- /dev/null +++ b/.github/actions/php-linter/tester.sh @@ -0,0 +1,25 @@ +#!/bin/bash + +cd "$1" + +ret=0 + +while IFS= read -d '' file +do + php -l "$file" > /tmp/msg + retSingle=$? + + if [ $retSingle -eq 0 ] + then + cat /tmp/msg | sed 's@^@::debug::@' + else + ret=1 + msg="$(cat /tmp/msg)" + echo "$msg" | sed 's@^\s*$@@' | grep -v '^$' > /tmp/msg + line=$(cat /tmp/msg | grep -o ' on line [0-9]*' | sed -E 's@ on line ([0-9]*)$@\1@') + prefix="::error file=$file,line=$line,title=PHP linter failed::" + sed "s@^@$prefix@" /tmp/msg + fi +done < <(find lib -type f -name '*.php' -print0) + +exit $ret diff --git a/.github/dependabot.yml b/.github/dependabot.yml index d69bbecb3..918ef7ae0 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -29,3 +29,29 @@ updates: time: "02:50" open-pull-requests-limit: 10 +- package-ecosystem: npm + directory: "/" + target-branch: main-0.10.x + schedule: + interval: daily + time: "03:00" + timezone: Europe/Paris + open-pull-requests-limit: 10 +- package-ecosystem: composer + directory: "/" + target-branch: main-0.10.x + schedule: + interval: daily + time: "03:00" + timezone: Europe/Paris + open-pull-requests-limit: 10 +- package-ecosystem: github-actions + directory: "/" + target-branch: main-0.10.x + schedule: + timezone: Europe/Berlin + interval: daily + time: "02:50" + open-pull-requests-limit: 10 + + diff --git a/.github/workflows/build-appstore.yml b/.github/workflows/build-appstore.yml deleted file mode 100644 index 45eb3ee25..000000000 --- a/.github/workflows/build-appstore.yml +++ /dev/null @@ -1,38 +0,0 @@ - -name: Prepare deployment to app store - -on: - push: - branches: - - stable* - -jobs: - - build: - name: Create tagged release in stable branch - runs-on: ubuntu-22.04 - - defaults: - run: - shell: bash - working-directory: cookbook - - if: github.actor != 'nextcloud-cookbook-bot' - - steps: - - name: Checkout the project - uses: actions/checkout@v4 - with: - path: cookbook - ref: ${{ github.ref }} - fetch-depth: 0 - - - name: Store the merge commit message in file - run: git log HEAD~1...HEAD --max-count=1 --format='%s%n%b' > /tmp/MERGE_COMMIT_MSG - - - name: Bump the version - id: bump - run: ./.github/actions/deploy/create-version.sh /tmp/MERGE_COMMIT_MSG - env: - BOT_TOKEN: ${{ secrets.COOKBOOK_BOT_TOKEN }} - diff --git a/.github/workflows/deploy-appstore.yml b/.github/workflows/deploy-appstore.yml index 5e8edb1ff..f3929d743 100644 --- a/.github/workflows/deploy-appstore.yml +++ b/.github/workflows/deploy-appstore.yml @@ -16,7 +16,7 @@ jobs: shell: bash working-directory: cookbook - if: github.repository != 'christianlupus-nextcloud/cookbook-releases' + if: github.repository == 'christianlupus-nextcloud/cookbook-releases' steps: - name: Checkout the project diff --git a/.github/workflows/pages.yml b/.github/workflows/pages.yml index 86bf62db6..b35188a19 100644 --- a/.github/workflows/pages.yml +++ b/.github/workflows/pages.yml @@ -34,7 +34,7 @@ jobs: - name: Checkout uses: actions/checkout@v4 - name: Setup Pages - uses: actions/configure-pages@v3 + uses: actions/configure-pages@v4 - name: Count number of plantuml files id: count-plantuml @@ -67,9 +67,9 @@ jobs: name: github-pages url: ${{ steps.deployment.outputs.page_url }} runs-on: ubuntu-22.04 - if: github.event.ref == 'refs/heads/master' + if: github.event.ref == 'refs/heads/master' && github.repository == 'nextcloud/cookbook' needs: build steps: - name: Deploy to GitHub Pages id: deployment - uses: actions/deploy-pages@v2 + uses: actions/deploy-pages@v3 diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 3455a8c77..fc42f49c0 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -370,9 +370,6 @@ jobs: source-package: name: Create source code artifacts - needs: - - unit-tests - - code-lint runs-on: ubuntu-22.04 steps: @@ -443,4 +440,30 @@ jobs: path: ${{ github.event_path }} retention-days: 1 + lint-php: + name: "Lint PHP files to be compatible" + runs-on: ubuntu-22.04 + defaults: + run: + shell: bash + steps: + - name: Checkout of the app + uses: actions/checkout@v4 + - name: build docker container image + run: docker build -t php-lint-tester .github/actions/php-linter + - name: Check the code base + run: docker run --rm -v $(pwd):/work:ro php-lint-tester + successful_run: + name: The tests have successfully run + runs-on: ubuntu-22.04 + needs: + - unit-tests + - code-lint + - source-package + - lint-php + - event_file + steps: + - name: Run successfully + shell: bash + run: echo "The tests have been running successfully" diff --git a/.helpers/release/create-release.sh b/.helpers/release/create-release.sh new file mode 100755 index 000000000..34ce60050 --- /dev/null +++ b/.helpers/release/create-release.sh @@ -0,0 +1,141 @@ +#! /bin/bash -e + +# set -x + +cd "$(dirname "$0")/../.." + + +deploy_path='.github/actions/deploy' + +stable_branch=$(cat "$deploy_path/stable_name") +master_branch=$(cat "$deploy_path/trunk_name") +current_branch=$(git branch --show-current) + +major=$(cat "$deploy_path/major") +minor=$(cat "$deploy_path/minor") +patch=$(cat "$deploy_path/patch") + +use_major= +use_minor= +pre_release= +dryrun= +remote=origin +push= + +while [ $# -gt 0 ] +do + case "$1" in + --major) + use_major=Y + ;; + --minor) + use_minor=Y + ;; + --pre-release) + pre_release="$2" + shift + ;; + -n|--dry|--dryrun|--dry-run) + dryrun=Y + ;; + --remote) + remote="$2" + shift + ;; + --push) + push=Y + ;; + *) + echo "Cannot parse argument $1" + exit 1 + ;; + esac + shift +done + +if [ -n "$use_major" ] +then + echo 'Creating major version' + let major=major+1 + minor=0 + patch=0 +elif [ -n "$use_minor" ] +then + echo 'Creating minor version' + let minor=minor+1 + patch=0 +else + echo 'Creating patch version' + let patch=patch+1 +fi + +version="$major.$minor.$patch" + +if [ -n "$pre_release" ]; then + echo "Detecting a pre-release version." + version="$version-$pre_release" +fi + +echo "The new version is $version." + +# Now, all changes need to be carried out +if [ -n "$dryrun" ] +then + echo 'Stopping processing as no changes to the git repo should be done.' + exit 0 +fi + +count=$(git status --porcelain | wc -l) +if [ $count -gt 0 ] +then + echo "You have changes in your working copy. Please commit or stash before the changes are overwritten." + exit 1 +fi + +# As we are going to change the branch and, thus, potentially overwrite this script file, we pack everything into a function +# The function will be read before and thus executed atomically +# See: https://www.baeldung.com/linux/modify-running-script#1-using-functions +update_git() { + echo "Checkout stable branch $stable_branch" + git checkout "$stable_branch" + + echo "Merge release branch $current_branch" + git merge --no-ff "$current_branch" -m "Merging release branch $current_branch into stable branch $stable_branch." + + if [ -n "$pre_release" ]; then + # We want to build a pre-release + echo "Not Updating the version files as we are creating a pre-release." + else + echo "Updating bumped version files" + echo $major > "$deploy_path/major" + echo $minor > "$deploy_path/minor" + echo $patch > "$deploy_path/patch" + fi + + echo "Storing new release version in $deploy_path/last_release" + echo "$version" > "$deploy_path/last_release" + + "$deploy_path/update-data.sh" "$version" "$major" "$minor" "$patch" "$prerelease" + + git add "$deploy_path/major" "$deploy_path/minor" "$deploy_path/patch" "$deploy_path/last_release" + git commit -s -m "Bump to version $version" + + tag_name="v$version" + echo "Creating release tag $tag_name" + git tag "$tag_name" + + echo "Forwarding main branch $master_branch to be on tie with stable branch $stable_branch" + git checkout $master_branch + git merge --no-ff $stable_branch -m "Updating main branch $master_branch with latest stable version information from $stable_branch" --no-verify + + if [ -n "$push" ] + then + echo "Pushing data to remote server called $remote" + git push "$remote" "$stable_branch" "$master_branch" "$tag_name" + else + echo "Not pushing to server, please push manually. Example command:" + echo git push "$remote" "$stable_branch" "$master_branch" "$tag_name" + fi +} + +update_git diff --git a/CHANGELOG.md b/CHANGELOG.md index 4d0c65bf6..60857645f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ ## [Unreleased] +### Maintenance +- Add PHP lint checker to ensure valid (legacy) PHP syntax + [#1931](https://github.com/nextcloud/cookbook/pull/1931) @christianlupus + + +## 0.10.3 - 2023-12-04 + ### Added - Add yield calculator [#1573](https://github.com/nextcloud/cookbook/pull/1573) @j0hannesr0th diff --git a/appinfo/info.xml b/appinfo/info.xml index 85788285f..a6c4f15b2 100644 --- a/appinfo/info.xml +++ b/appinfo/info.xml @@ -6,7 +6,7 @@ Cookbook An integrated cookbook using schema.org JSON files as recipes - 0.10.2 + 0.10.3 agpl Christian Wolf Sebastian Fey diff --git a/composer.lock b/composer.lock index 2d5923b69..b754b82e5 100644 --- a/composer.lock +++ b/composer.lock @@ -972,16 +972,16 @@ }, { "name": "psalm/phar", - "version": "5.16.0", + "version": "5.17.0", "source": { "type": "git", "url": "https://github.com/psalm/phar.git", - "reference": "be4f93e50edf473d60a6e6f9c1d78546a3a32b90" + "reference": "71f6855b18d6de18603511c4d6fa6e0bcefb2b05" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/psalm/phar/zipball/be4f93e50edf473d60a6e6f9c1d78546a3a32b90", - "reference": "be4f93e50edf473d60a6e6f9c1d78546a3a32b90", + "url": "https://api.github.com/repos/psalm/phar/zipball/71f6855b18d6de18603511c4d6fa6e0bcefb2b05", + "reference": "71f6855b18d6de18603511c4d6fa6e0bcefb2b05", "shasum": "" }, "require": { @@ -1001,9 +1001,9 @@ "description": "Composer-based Psalm Phar", "support": { "issues": "https://github.com/psalm/phar/issues", - "source": "https://github.com/psalm/phar/tree/5.16.0" + "source": "https://github.com/psalm/phar/tree/5.17.0" }, - "time": "2023-11-22T22:05:24+00:00" + "time": "2023-12-04T14:36:00+00:00" }, { "name": "psr/clock", diff --git a/docs/dev/api/changelog/0.md b/docs/dev/api/changelog/0.md index 6674fa3ce..52a2130cb 100644 --- a/docs/dev/api/changelog/0.md +++ b/docs/dev/api/changelog/0.md @@ -8,6 +8,9 @@ This serves only for developers to find the changes better. ## Unpublished + +## Version 0.1.2 - cookbook v0.10.3 - 2023-12-04 + ### Deprecation of recipe_id in recipe stubs The current implementation has a minor inconsistenncy that for `Recipe` objects, there is a `id` as string and for `RecipeStub` objects, there is a `recipe_id` as int. diff --git a/docs/dev/deployment.md b/docs/dev/deployment.md index 8b8061c38..c45e99004 100644 --- a/docs/dev/deployment.md +++ b/docs/dev/deployment.md @@ -4,7 +4,7 @@ {:toc} ## Step-by-step guide to create a new release -The deployment of new releases is carried out using github actions. +The deployment of new releases is carried out using a script and github actions. This documentation should serve as a step-by-step basis instructions how to publish a new version. Anyways these steps **do not cover any topics related to testing verification** of the functionality. @@ -37,50 +37,48 @@ as one of the first few lines with `YYYY-mm-dd` the current date. Also check if any pending API change is present. Update the API changelog (in `/docs/dev/api/changelog/*.md`) accordingly. -Commit the changes and push them to github. +Commit the changes. +Pushing them to GitHub is neither needed nor adviced. -### Create pull request +### Run the script to carry out the release preparations -Now, you should create a pull request to merge the changes in the new `release/1.2.4` branch into `stable`. -Do not yet merge the PR. -Here is the last chance to do some testing and verification. +To create all relevant git structures, there is a script located in `.helpers/release/create-release.sh`. +It will while executed change the various git branches involed (the stable branch, the master branch and the release branch). -### Let Github actions create a tag for you +**Please note:** +This script will carry out quite some changes. +Although all can be reversed so far, multiple branches need to get unwinded to do so. +So, be sure you know what you are doing and double-check the command line parameters. +This is especially true, if you enable automatical pushes to the remote. -By merging the PR into `stable`, you trigger the generation of a tag in Github as well as some additional tasks. -This will **not yet** publish a release, just define the version to be used. +The script provides several CLI parameters that control how the script behaves and what will be caried out. +These scipt parameters are: -The important part is the commit message here. -It defines the type and the state of the release created. -For further information, read on. +| Parameter | Description | +|-----------|-------------| +| `--major` | Create a major version instead of a minor or patch version. | +| `--minor` | Create a minor version instead of a patch version. | +| `--pre-release ` | Create a pre-release by appending `` to the version string appended by a dash. | +| `--dry` | Run the script in dry mode. No changes are carried out. | +| `--remote ` | Set the name of the remote to push the branches/tags to. Defaults to `origin` | +| `--push` | If given, the updated branches and tags are pushed automatically to the remote. | #### Regular releases -The version number that is going to be generated **depends on the commit message of the merge commit into `stable`**. -So before clicking on *Merge* be sure you know what you are doing. - By default you will generate a new patch version. So the third part of our version would be incremented. -If you want to generate a different version type like minor (second part incremented) or major version (first part incremented), you need to make this visible. -You have to put a keyword on a line in the commit message to select a version type other than a patch version. -The following table shows the effect of the keywords if the last version was `1.2.3`. +If you want to generate a different version type like minor (second part incremented) or major version (first part incremented), you need to provide the corresponding CLI parameter. +The following table shows the effect of the parameters if the last version was `1.2.3`. -| Keyword | Version type | Generated version | +| parameters | Version type | Generated version | |---|---|---| -| no keyword | patch version | 1.2.4 | -| `%MINOR%` | minor version | 1.3.0 | -| `%MAJOR%` | major version | 2.0.0 | - -The automatic deployment action will take over once you push to the `stable` branch. -The following actions will take place after the merge: - -1. Some fixed parameters will be pre-filled in the codebase with the version number and a commit is generated on the `stable` branch. -1. A new tag `v1.2.4` (or similar) is generated to save the current state in history on the `stable` branch. -1. The changes introduced in the commit are merged back into the `master` branch. -1. A github release is published and the compiled files are uploaded as a tarball. -1. A release in the nextcloud appstore is registered and published. +| _none_ | patch version | 1.2.4 | +| `--minor` | minor version | 1.3.0 | +| `--major` | major version | 2.0.0 | +| `--minor --major` | major version (more precedence) | 2.0.0 | #### Pre-releases + It is also possible to publish a pre-release like `1.4.2-beta1` or `4.0.2-rc1`. The user/developer is responsible to provide a valid suffix for the pre-release. The created pre-release version is **not permanently stored**. @@ -89,20 +87,20 @@ The reasoning of not storing the last pre-release version is that the next regul Also it might be required to change from a patch to minor or from minor to major level updates: ... > `1.2.3` > `1.2.4-rc1` > `1.3.0-rc1` > `1.3.0` > ... . -A pre-release is created by adding additionally to the keywords as described in the [regular releases section](#regular-releases) the additional keyword `%PRE-RELEASE%%`. -The value `` will be used as the suffix of the pre-release. +A pre-release is created by adding additionally to the parameters as described in the [regular releases section](#regular-releases) the additional parameter `--pre-release`. +The only value if this flag will be used as the suffix of the pre-release. Assume, you are on version `1.2.3`, the following table explains the resulting release versions: | Keyword | Generated version | |---|---| -| `%PRE-RELEASE%rc1%` | 1.2.4-rc1 | -| `%MINOR% %PRE-RELEASE%alpha3%` | 1.3.0-alpha3 | -| `%PRE-RELEASE%beta.1% %MAJOR%` | 2.0.0-beta.1 | +| `--pre-release rc1` | 1.2.4-rc1 | +| `--minor --pre-release alpha3` | 1.3.0-alpha3 | +| `--pre-release beta.1 --major` | 2.0.0-beta.1 | -### Fetch the created tag +#### Next steps -After the action has run completely, you need locally to fetch the tags from the remote repository. -The new version should be downloaded as a tag `v1.2.4` automatically. +The script will update the stable and corresponding main branch and create a tag (e.g. `v1.2.4`) as well. +Unless automatic pushes are activated via `--push`, the user is reponsible to push the changes to the server. ### Push the version to the appstore diff --git a/l10n/ar.js b/l10n/ar.js index cddb98d12..d97e4dbe1 100644 --- a/l10n/ar.js +++ b/l10n/ar.js @@ -73,6 +73,7 @@ OC.L10N.register( "Reload recipe" : "اعادة تحميل الوصفة", "Abort editing" : "خروج من التحرير", "Print recipe" : "طباعة الوصفة", + "Clone recipe" : "استنسِخ الوصفة", "Delete recipe" : "حذف الوصفة", "Category" : "التصنيف", "Recipe name" : "اسم الوصفة", @@ -91,10 +92,11 @@ OC.L10N.register( "Rename" : "تغيير تسمية", "Enter new category name" : "أدخِل اسم التصنيف الجديد", "Cookbook settings" : "إعدادات كتاب الطهو", - "Failed to load category {category} recipes" : "فشل تحميل فئة الوصفة {category}", + "Failed to load category {category} recipes" : "تعذّر تحميل تصنيفات الوصفات {category}", + "Failed to update name of category \"{category}\"" : "تعذّر تحديث اسم التصنيف \"{category}\"", "The server reported an error. Please check." : "أبلغ الخادوم عن خطأ. يرجى المراجعة.", "Could not query the server. This might be a network problem." : "لا يمكن الاستعلام عن الخادوم. قد تكون هذه مشكلة في الشبكة.", - "Loading category recipes …" : "جارٍ تحميل فئات الوصفات ...", + "Loading category recipes …" : "جارٍ تحميل تصنيفات الوصفات ...", "Failed to fetch categories" : "فشل في جلب التصنيفات", "Enter URL or select from your Nextcloud instance on the right" : "أدخِل عنوان URL أو إختَر من خادوم نكست كلاود في الجانب", "Pick a local image" : "إختَر صورةً محليّةً", @@ -104,6 +106,8 @@ OC.L10N.register( "Insert entry above" : "إدخال المَدْخَل أعلاه", "Delete entry" : "إحذِف المَدْخَل", "Add" : "إضافة", + "Select option" : "حدِّد خياراً", + "No recipes created or imported." : "لا توجد أي وصفات مُستحدَثة أو مُستورَدة", "To get started, you may use the text box in the left navigation bar to import a new recipe. Click below to create a recipe from scratch." : "للبدء، يمكنك استعمال صندوق النص في شريط التنقل الجانبي لاستيراد وصفة جديدة. إضغط أدناه لإنشاء وصفة جديدة.", "No recipes" : "لا توجد أيّ وصفاتٍ", "Select order" : "إختَر ترتيباً", @@ -145,7 +149,7 @@ OC.L10N.register( "Preparation time (hours:minutes)" : "زمن التحضير (hours:minutes)", "Cooking time (hours:minutes)" : "زمن الطهو (hours:minutes)", "Total time (hours:minutes)" : "الزمن الكُلِّي (hours:minutes)", - "Choose category" : "اختر الفئة", + "Choose category" : "اختر التصنيف", "Keywords" : "الكلمات المفتاحية", "Choose keywords" : "إختر الكلمات الدّلالية", "Servings" : "عدد الأشخاص Servings", @@ -174,6 +178,7 @@ OC.L10N.register( "Unknown answer returned from server. See logs." : "أرجَعَ الخادوم جواباً غير معروفٍ. أنظر سجلات الحركات logs.", "No answer for request was received." : "لم يتم استلام ردّ علي الطلب.", "Could not start request to save recipe." : "تعذر بدء طلب حفظ الوصفة.", + "Clone of {name}" : "استنساخ {name}", "Loading recipe failed" : "فشل تحميل الوصفة", "Recipe image" : "صورة الوصفة", "Cooking time is up!" : "إنتهى وقت الطهو!", diff --git a/l10n/ar.json b/l10n/ar.json index 215d6a160..664596b82 100644 --- a/l10n/ar.json +++ b/l10n/ar.json @@ -71,6 +71,7 @@ "Reload recipe" : "اعادة تحميل الوصفة", "Abort editing" : "خروج من التحرير", "Print recipe" : "طباعة الوصفة", + "Clone recipe" : "استنسِخ الوصفة", "Delete recipe" : "حذف الوصفة", "Category" : "التصنيف", "Recipe name" : "اسم الوصفة", @@ -89,10 +90,11 @@ "Rename" : "تغيير تسمية", "Enter new category name" : "أدخِل اسم التصنيف الجديد", "Cookbook settings" : "إعدادات كتاب الطهو", - "Failed to load category {category} recipes" : "فشل تحميل فئة الوصفة {category}", + "Failed to load category {category} recipes" : "تعذّر تحميل تصنيفات الوصفات {category}", + "Failed to update name of category \"{category}\"" : "تعذّر تحديث اسم التصنيف \"{category}\"", "The server reported an error. Please check." : "أبلغ الخادوم عن خطأ. يرجى المراجعة.", "Could not query the server. This might be a network problem." : "لا يمكن الاستعلام عن الخادوم. قد تكون هذه مشكلة في الشبكة.", - "Loading category recipes …" : "جارٍ تحميل فئات الوصفات ...", + "Loading category recipes …" : "جارٍ تحميل تصنيفات الوصفات ...", "Failed to fetch categories" : "فشل في جلب التصنيفات", "Enter URL or select from your Nextcloud instance on the right" : "أدخِل عنوان URL أو إختَر من خادوم نكست كلاود في الجانب", "Pick a local image" : "إختَر صورةً محليّةً", @@ -102,6 +104,8 @@ "Insert entry above" : "إدخال المَدْخَل أعلاه", "Delete entry" : "إحذِف المَدْخَل", "Add" : "إضافة", + "Select option" : "حدِّد خياراً", + "No recipes created or imported." : "لا توجد أي وصفات مُستحدَثة أو مُستورَدة", "To get started, you may use the text box in the left navigation bar to import a new recipe. Click below to create a recipe from scratch." : "للبدء، يمكنك استعمال صندوق النص في شريط التنقل الجانبي لاستيراد وصفة جديدة. إضغط أدناه لإنشاء وصفة جديدة.", "No recipes" : "لا توجد أيّ وصفاتٍ", "Select order" : "إختَر ترتيباً", @@ -143,7 +147,7 @@ "Preparation time (hours:minutes)" : "زمن التحضير (hours:minutes)", "Cooking time (hours:minutes)" : "زمن الطهو (hours:minutes)", "Total time (hours:minutes)" : "الزمن الكُلِّي (hours:minutes)", - "Choose category" : "اختر الفئة", + "Choose category" : "اختر التصنيف", "Keywords" : "الكلمات المفتاحية", "Choose keywords" : "إختر الكلمات الدّلالية", "Servings" : "عدد الأشخاص Servings", @@ -172,6 +176,7 @@ "Unknown answer returned from server. See logs." : "أرجَعَ الخادوم جواباً غير معروفٍ. أنظر سجلات الحركات logs.", "No answer for request was received." : "لم يتم استلام ردّ علي الطلب.", "Could not start request to save recipe." : "تعذر بدء طلب حفظ الوصفة.", + "Clone of {name}" : "استنساخ {name}", "Loading recipe failed" : "فشل تحميل الوصفة", "Recipe image" : "صورة الوصفة", "Cooking time is up!" : "إنتهى وقت الطهو!", diff --git a/l10n/cs.js b/l10n/cs.js index 43f582d66..a6b28598d 100644 --- a/l10n/cs.js +++ b/l10n/cs.js @@ -73,6 +73,7 @@ OC.L10N.register( "Reload recipe" : "Načíst recept znovu", "Abort editing" : "Přerušit úpravy", "Print recipe" : "Vytisknout recept", + "Clone recipe" : "Klonovat recept", "Delete recipe" : "Smazat recept", "Category" : "Kategorie", "Recipe name" : "Název receptu", @@ -105,6 +106,7 @@ OC.L10N.register( "Insert entry above" : "Vložit položku nad", "Delete entry" : "Smazat položku", "Add" : "Přidat", + "Select option" : "Vyberte možnost", "No recipes created or imported." : "Nevytvořeny nebo neimportovány žádné recepty", "To get started, you may use the text box in the left navigation bar to import a new recipe. Click below to create a recipe from scratch." : "Pro začátek můžete použít textové pole v navigačním panelu vlevo a naimportovat nový recept. Kliknutím níže vytvoříte recept od začátku.", "No recipes" : "Žádné recepty", @@ -176,6 +178,7 @@ OC.L10N.register( "Unknown answer returned from server. See logs." : "Ze serveru byla přijata neznámá odpověď. Prohlédněte si záznamy událostí.", "No answer for request was received." : "Na požadavek nebyla obdržena žádná odpověď", "Could not start request to save recipe." : "Požadavek na uložení receptu nebyl odeslán.", + "Clone of {name}" : "Klon {name}", "Loading recipe failed" : "Načítání receptu se nezdařilo", "Recipe image" : "Obrázek receptu", "Cooking time is up!" : "Tepelná úprava je u konce!", diff --git a/l10n/cs.json b/l10n/cs.json index dcbffecf9..defbd72cf 100644 --- a/l10n/cs.json +++ b/l10n/cs.json @@ -71,6 +71,7 @@ "Reload recipe" : "Načíst recept znovu", "Abort editing" : "Přerušit úpravy", "Print recipe" : "Vytisknout recept", + "Clone recipe" : "Klonovat recept", "Delete recipe" : "Smazat recept", "Category" : "Kategorie", "Recipe name" : "Název receptu", @@ -103,6 +104,7 @@ "Insert entry above" : "Vložit položku nad", "Delete entry" : "Smazat položku", "Add" : "Přidat", + "Select option" : "Vyberte možnost", "No recipes created or imported." : "Nevytvořeny nebo neimportovány žádné recepty", "To get started, you may use the text box in the left navigation bar to import a new recipe. Click below to create a recipe from scratch." : "Pro začátek můžete použít textové pole v navigačním panelu vlevo a naimportovat nový recept. Kliknutím níže vytvoříte recept od začátku.", "No recipes" : "Žádné recepty", @@ -174,6 +176,7 @@ "Unknown answer returned from server. See logs." : "Ze serveru byla přijata neznámá odpověď. Prohlédněte si záznamy událostí.", "No answer for request was received." : "Na požadavek nebyla obdržena žádná odpověď", "Could not start request to save recipe." : "Požadavek na uložení receptu nebyl odeslán.", + "Clone of {name}" : "Klon {name}", "Loading recipe failed" : "Načítání receptu se nezdařilo", "Recipe image" : "Obrázek receptu", "Cooking time is up!" : "Tepelná úprava je u konce!", diff --git a/l10n/de_DE.js b/l10n/de_DE.js index ab47d3147..11066fe61 100644 --- a/l10n/de_DE.js +++ b/l10n/de_DE.js @@ -73,6 +73,7 @@ OC.L10N.register( "Reload recipe" : "Rezept neu laden", "Abort editing" : "Bearbeitung abbrechen", "Print recipe" : "Rezept drucken", + "Clone recipe" : "Rezept duplizieren", "Delete recipe" : "Rezept löschen", "Category" : "Kategorie", "Recipe name" : "Rezept-Name", @@ -92,7 +93,7 @@ OC.L10N.register( "Enter new category name" : "Bitte neuen Kategorienamen eingeben", "Cookbook settings" : "Kochbuch-Einstellungen", "Failed to load category {category} recipes" : "Fehler beim Laden der Rezepte aus Kategorie {category} ", - "Failed to update name of category \"{category}\"" : "Fehler beim Aktualisieren der Kategorie \"{category}\"", + "Failed to update name of category \"{category}\"" : "Fehler beim Aktualisieren des Namens der Kategorie \"{category}\"", "The server reported an error. Please check." : "Der Server meldete einen Fehler. Bitte prüfen.", "Could not query the server. This might be a network problem." : "Server kann nicht erreicht werden. Dies könnte ein Netzwerkproblem sein.", "Loading category recipes …" : "Lade Kategorie-Rezepte …", @@ -105,6 +106,7 @@ OC.L10N.register( "Insert entry above" : "Eintrag oben einfügen", "Delete entry" : "Eintrag löschen", "Add" : "Hinzufügen", + "Select option" : "Option auswählen", "No recipes created or imported." : "Keine Rezepte erstellt oder importiert", "To get started, you may use the text box in the left navigation bar to import a new recipe. Click below to create a recipe from scratch." : "Um zu beginnen, können Sie das Textfeld in der linken Navigationsleiste verwenden, um ein neues Rezept zu importieren. Klicken Sie unten, um ein Rezept von Grund auf neu zu erstellen.", "No recipes" : "Keine Rezepte", @@ -176,6 +178,7 @@ OC.L10N.register( "Unknown answer returned from server. See logs." : "Unbekannte Antwort vom Server zurückgegeben. Siehe Protokolle.", "No answer for request was received." : "Keine Antwort auf die Anfrage erhalten.", "Could not start request to save recipe." : "Die Anforderung zum Speichern des Rezepts konnte nicht gestartet werden.", + "Clone of {name}" : "Klon von{name}", "Loading recipe failed" : "Laden des Rezepts fehlgeschlagen", "Recipe image" : "Rezept-Bild", "Cooking time is up!" : "Die Kochzeit ist vorbei!", diff --git a/l10n/de_DE.json b/l10n/de_DE.json index 54e00936a..09575d406 100644 --- a/l10n/de_DE.json +++ b/l10n/de_DE.json @@ -71,6 +71,7 @@ "Reload recipe" : "Rezept neu laden", "Abort editing" : "Bearbeitung abbrechen", "Print recipe" : "Rezept drucken", + "Clone recipe" : "Rezept duplizieren", "Delete recipe" : "Rezept löschen", "Category" : "Kategorie", "Recipe name" : "Rezept-Name", @@ -90,7 +91,7 @@ "Enter new category name" : "Bitte neuen Kategorienamen eingeben", "Cookbook settings" : "Kochbuch-Einstellungen", "Failed to load category {category} recipes" : "Fehler beim Laden der Rezepte aus Kategorie {category} ", - "Failed to update name of category \"{category}\"" : "Fehler beim Aktualisieren der Kategorie \"{category}\"", + "Failed to update name of category \"{category}\"" : "Fehler beim Aktualisieren des Namens der Kategorie \"{category}\"", "The server reported an error. Please check." : "Der Server meldete einen Fehler. Bitte prüfen.", "Could not query the server. This might be a network problem." : "Server kann nicht erreicht werden. Dies könnte ein Netzwerkproblem sein.", "Loading category recipes …" : "Lade Kategorie-Rezepte …", @@ -103,6 +104,7 @@ "Insert entry above" : "Eintrag oben einfügen", "Delete entry" : "Eintrag löschen", "Add" : "Hinzufügen", + "Select option" : "Option auswählen", "No recipes created or imported." : "Keine Rezepte erstellt oder importiert", "To get started, you may use the text box in the left navigation bar to import a new recipe. Click below to create a recipe from scratch." : "Um zu beginnen, können Sie das Textfeld in der linken Navigationsleiste verwenden, um ein neues Rezept zu importieren. Klicken Sie unten, um ein Rezept von Grund auf neu zu erstellen.", "No recipes" : "Keine Rezepte", @@ -174,6 +176,7 @@ "Unknown answer returned from server. See logs." : "Unbekannte Antwort vom Server zurückgegeben. Siehe Protokolle.", "No answer for request was received." : "Keine Antwort auf die Anfrage erhalten.", "Could not start request to save recipe." : "Die Anforderung zum Speichern des Rezepts konnte nicht gestartet werden.", + "Clone of {name}" : "Klon von{name}", "Loading recipe failed" : "Laden des Rezepts fehlgeschlagen", "Recipe image" : "Rezept-Bild", "Cooking time is up!" : "Die Kochzeit ist vorbei!", diff --git a/l10n/gl.js b/l10n/gl.js index 1ea8d268b..75782a471 100644 --- a/l10n/gl.js +++ b/l10n/gl.js @@ -73,6 +73,7 @@ OC.L10N.register( "Reload recipe" : "Volver cargar receita", "Abort editing" : "Interromper a edición", "Print recipe" : "Imprimir a receita", + "Clone recipe" : "Clonar a receita", "Delete recipe" : "Eliminar a receita", "Category" : "Categoría", "Recipe name" : "Nome da receita", @@ -105,6 +106,7 @@ OC.L10N.register( "Insert entry above" : "Inserir a entrada enriba", "Delete entry" : "Eliminar a entrada", "Add" : "Engadir", + "Select option" : "Seleccionar a opción", "No recipes created or imported." : "Non se crearon nin importaron receitas.", "To get started, you may use the text box in the left navigation bar to import a new recipe. Click below to create a recipe from scratch." : "Para comezar, pode usar a caixa de texto da barra de navegación esquerda para importar unha nova receita. Prema a seguir para crear unha receita dende cero.", "No recipes" : "Non hai receitas", @@ -176,6 +178,7 @@ OC.L10N.register( "Unknown answer returned from server. See logs." : "Resposta descoñecida do servidor. Vexa os rexistros.", "No answer for request was received." : "Non se recibiu resposta á solicitude.", "Could not start request to save recipe." : "Non foi posíbel iniciar a solicitude para gardar a receita.", + "Clone of {name}" : "Clon de {nome}", "Loading recipe failed" : "Produciuse un fallo ao cargar a receita", "Recipe image" : "Imaxe da receita", "Cooking time is up!" : "Rematou o tempo de cociñado!", diff --git a/l10n/gl.json b/l10n/gl.json index 833254e54..2c55f84eb 100644 --- a/l10n/gl.json +++ b/l10n/gl.json @@ -71,6 +71,7 @@ "Reload recipe" : "Volver cargar receita", "Abort editing" : "Interromper a edición", "Print recipe" : "Imprimir a receita", + "Clone recipe" : "Clonar a receita", "Delete recipe" : "Eliminar a receita", "Category" : "Categoría", "Recipe name" : "Nome da receita", @@ -103,6 +104,7 @@ "Insert entry above" : "Inserir a entrada enriba", "Delete entry" : "Eliminar a entrada", "Add" : "Engadir", + "Select option" : "Seleccionar a opción", "No recipes created or imported." : "Non se crearon nin importaron receitas.", "To get started, you may use the text box in the left navigation bar to import a new recipe. Click below to create a recipe from scratch." : "Para comezar, pode usar a caixa de texto da barra de navegación esquerda para importar unha nova receita. Prema a seguir para crear unha receita dende cero.", "No recipes" : "Non hai receitas", @@ -174,6 +176,7 @@ "Unknown answer returned from server. See logs." : "Resposta descoñecida do servidor. Vexa os rexistros.", "No answer for request was received." : "Non se recibiu resposta á solicitude.", "Could not start request to save recipe." : "Non foi posíbel iniciar a solicitude para gardar a receita.", + "Clone of {name}" : "Clon de {nome}", "Loading recipe failed" : "Produciuse un fallo ao cargar a receita", "Recipe image" : "Imaxe da receita", "Cooking time is up!" : "Rematou o tempo de cociñado!", diff --git a/l10n/hy.js b/l10n/hy.js deleted file mode 100644 index 1dca594f3..000000000 --- a/l10n/hy.js +++ /dev/null @@ -1,15 +0,0 @@ -OC.L10N.register( - "cookbook", - { - "Edit" : "մշակել", - "Save" : "Պահպանել", - "Search" : "Search", - "Rename" : "Վերանվանել", - "Add" : "Ավելացնել", - "Name" : "Անուն", - "Cancel" : "ընդհատել", - "OK" : "Լավ", - "Description" : "Նկարագրություն", - "URL" : "URL" -}, -"nplurals=2; plural=(n != 1);"); diff --git a/l10n/hy.json b/l10n/hy.json deleted file mode 100644 index 5d8c91623..000000000 --- a/l10n/hy.json +++ /dev/null @@ -1,13 +0,0 @@ -{ "translations": { - "Edit" : "մշակել", - "Save" : "Պահպանել", - "Search" : "Search", - "Rename" : "Վերանվանել", - "Add" : "Ավելացնել", - "Name" : "Անուն", - "Cancel" : "ընդհատել", - "OK" : "Լավ", - "Description" : "Նկարագրություն", - "URL" : "URL" -},"pluralForm" :"nplurals=2; plural=(n != 1);" -} \ No newline at end of file diff --git a/l10n/kn.js b/l10n/kn.js deleted file mode 100644 index 12ab1de0c..000000000 --- a/l10n/kn.js +++ /dev/null @@ -1,15 +0,0 @@ -OC.L10N.register( - "cookbook", - { - "None" : "ಯಾವುದೂ ಇಲ್ಲ", - "Edit" : "ಸಂಪಾದಿಸು", - "Save" : "ಉಳಿಸಿ", - "Search" : "Search", - "Rename" : "ಮರುಹೆಸರಿಸು", - "Add" : "ಸೇರಿಸಿ", - "Name" : "ಹೆಸರು", - "Cancel" : "ರದ್ದು", - "OK" : "ಸರಿ", - "URL" : "ಜಾಲದ ಕೊಂಡಿ" -}, -"nplurals=2; plural=(n > 1);"); diff --git a/l10n/kn.json b/l10n/kn.json deleted file mode 100644 index 2758f7eda..000000000 --- a/l10n/kn.json +++ /dev/null @@ -1,13 +0,0 @@ -{ "translations": { - "None" : "ಯಾವುದೂ ಇಲ್ಲ", - "Edit" : "ಸಂಪಾದಿಸು", - "Save" : "ಉಳಿಸಿ", - "Search" : "Search", - "Rename" : "ಮರುಹೆಸರಿಸು", - "Add" : "ಸೇರಿಸಿ", - "Name" : "ಹೆಸರು", - "Cancel" : "ರದ್ದು", - "OK" : "ಸರಿ", - "URL" : "ಜಾಲದ ಕೊಂಡಿ" -},"pluralForm" :"nplurals=2; plural=(n > 1);" -} \ No newline at end of file diff --git a/l10n/ur_PK.js b/l10n/ur_PK.js deleted file mode 100644 index 377421262..000000000 --- a/l10n/ur_PK.js +++ /dev/null @@ -1,15 +0,0 @@ -OC.L10N.register( - "cookbook", - { - "Edit" : "تدوین کریں", - "Save" : "حفظ", - "Search" : "Search", - "Rename" : "Rename", - "Add" : "شامل کریں", - "Name" : "اسم", - "Cancel" : "منسوخ کریں", - "OK" : "اوکے", - "Description" : "تصریح", - "URL" : "یو ار ایل" -}, -"nplurals=2; plural=(n != 1);"); diff --git a/l10n/ur_PK.json b/l10n/ur_PK.json deleted file mode 100644 index 488e4cb0f..000000000 --- a/l10n/ur_PK.json +++ /dev/null @@ -1,13 +0,0 @@ -{ "translations": { - "Edit" : "تدوین کریں", - "Save" : "حفظ", - "Search" : "Search", - "Rename" : "Rename", - "Add" : "شامل کریں", - "Name" : "اسم", - "Cancel" : "منسوخ کریں", - "OK" : "اوکے", - "Description" : "تصریح", - "URL" : "یو ار ایل" -},"pluralForm" :"nplurals=2; plural=(n != 1);" -} \ No newline at end of file diff --git a/l10n/zh_HK.js b/l10n/zh_HK.js index 64fc4817a..f452cd0ce 100644 --- a/l10n/zh_HK.js +++ b/l10n/zh_HK.js @@ -73,6 +73,7 @@ OC.L10N.register( "Reload recipe" : "重新加載食譜", "Abort editing" : "中止編輯", "Print recipe" : "打印食譜", + "Clone recipe" : "複製食譜", "Delete recipe" : "刪除食譜", "Category" : "分類", "Recipe name" : "食譜名稱", @@ -105,6 +106,7 @@ OC.L10N.register( "Insert entry above" : "在上方插入", "Delete entry" : "刪除", "Add" : "添加", + "Select option" : "選擇選項", "No recipes created or imported." : "未創建或導入任何食譜。", "To get started, you may use the text box in the left navigation bar to import a new recipe. Click below to create a recipe from scratch." : "要開始,您可以使用左側導覽列中的文字框來匯入新食譜。點擊下方以從零開始創建食譜。", "No recipes" : "沒有食譜", @@ -176,6 +178,7 @@ OC.L10N.register( "Unknown answer returned from server. See logs." : "從伺服器返回的未知答案。請參閱系統記錄。", "No answer for request was received." : "請求沒有答案。", "Could not start request to save recipe." : "無法啟動保存食譜的請求。", + "Clone of {name}" : "{name} 的複本", "Loading recipe failed" : "食譜加載失敗", "Recipe image" : "食譜圖像", "Cooking time is up!" : "烹飪時間已到!", diff --git a/l10n/zh_HK.json b/l10n/zh_HK.json index c3b078631..4e2759f8c 100644 --- a/l10n/zh_HK.json +++ b/l10n/zh_HK.json @@ -71,6 +71,7 @@ "Reload recipe" : "重新加載食譜", "Abort editing" : "中止編輯", "Print recipe" : "打印食譜", + "Clone recipe" : "複製食譜", "Delete recipe" : "刪除食譜", "Category" : "分類", "Recipe name" : "食譜名稱", @@ -103,6 +104,7 @@ "Insert entry above" : "在上方插入", "Delete entry" : "刪除", "Add" : "添加", + "Select option" : "選擇選項", "No recipes created or imported." : "未創建或導入任何食譜。", "To get started, you may use the text box in the left navigation bar to import a new recipe. Click below to create a recipe from scratch." : "要開始,您可以使用左側導覽列中的文字框來匯入新食譜。點擊下方以從零開始創建食譜。", "No recipes" : "沒有食譜", @@ -174,6 +176,7 @@ "Unknown answer returned from server. See logs." : "從伺服器返回的未知答案。請參閱系統記錄。", "No answer for request was received." : "請求沒有答案。", "Could not start request to save recipe." : "無法啟動保存食譜的請求。", + "Clone of {name}" : "{name} 的複本", "Loading recipe failed" : "食譜加載失敗", "Recipe image" : "食譜圖像", "Cooking time is up!" : "烹飪時間已到!", diff --git a/lib/Controller/UtilApiController.php b/lib/Controller/UtilApiController.php index 8582b9653..690e8283b 100644 --- a/lib/Controller/UtilApiController.php +++ b/lib/Controller/UtilApiController.php @@ -19,7 +19,7 @@ public function __construct($AppName, IRequest $request) { */ public function getApiVersion(): JSONResponse { $response = [ - 'cookbook_version' => [0, 10, 2], /* VERSION_TAG do not change this line manually */ + 'cookbook_version' => [0, 10, 3], /* VERSION_TAG do not change this line manually */ 'api_version' => [ 'epoch' => 0, 'major' => 1, diff --git a/lib/Helper/Filter/JSON/AbstractJSONFilter.php b/lib/Helper/Filter/JSON/AbstractJSONFilter.php index 0ffaea89a..352983a7e 100644 --- a/lib/Helper/Filter/JSON/AbstractJSONFilter.php +++ b/lib/Helper/Filter/JSON/AbstractJSONFilter.php @@ -26,7 +26,7 @@ abstract public function apply(array &$json): bool; /** * @param string|int|float|array $value */ - protected function setJSONValue(array &$json, string $key, string|int|float|array $value): bool { + protected function setJSONValue(array &$json, string $key, $value): bool { if (!array_key_exists($key, $json)) { $json[$key] = $value; return true; diff --git a/lib/Helper/Filter/Output/RecipeStubFilter.php b/lib/Helper/Filter/Output/RecipeStubFilter.php index a02df79a2..8e38efcf9 100644 --- a/lib/Helper/Filter/Output/RecipeStubFilter.php +++ b/lib/Helper/Filter/Output/RecipeStubFilter.php @@ -12,7 +12,7 @@ class RecipeStubFilter { public function __construct( RecipeIdTypeFilter $recipeIdTypeFilter, - RecipeIdCopyFilter $recipeIdCopyFilter, + RecipeIdCopyFilter $recipeIdCopyFilter ) { $this->filters = [ $recipeIdCopyFilter, diff --git a/lib/Helper/TimestampHelper.php b/lib/Helper/TimestampHelper.php index 4f19a2287..a9836a3f8 100644 --- a/lib/Helper/TimestampHelper.php +++ b/lib/Helper/TimestampHelper.php @@ -45,7 +45,7 @@ public function parseTimestamp(string $timestamp): string { // For now, we only support the ISO8601 format because it is required in the schema.org standard try { return $this->parseIsoFormat($timestamp); - } catch (InvalidTimestampException) { + } catch (InvalidTimestampException $ex) { // We do nothing here. Check the next format } @@ -65,15 +65,15 @@ public function parseTimestamp(string $timestamp): string { private function parseIsoFormat(string $timestamp): string { try { return $this->parseIsoCalendarDateFormat($timestamp, '-'); - } catch (InvalidTimestampException) { // Check next format + } catch (InvalidTimestampException $ex) { // Check next format } try { return $this->parseIsoCalendarDateFormat($timestamp, ''); - } catch (InvalidTimestampException) { // Check next format + } catch (InvalidTimestampException $ex) { // Check next format } try { return $this->parseIsoWeekDateFormat($timestamp, '-'); - } catch (InvalidTimestampException) { // Check next format + } catch (InvalidTimestampException $ex) { // Check next format } return $this->parseIsoWeekDateFormat($timestamp, ''); diff --git a/package.json b/package.json index 3fe39f710..635d964a6 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "cookbook", - "version": "0.10.2", + "version": "0.10.3", "description": "", "license": "AGPL-3.0-or-later", "author": "",