Skip to content

Commit

Permalink
Merge pull request #380 from niccokunzmann/update-translations
Browse files Browse the repository at this point in the history
Update translations
  • Loading branch information
niccokunzmann authored May 25, 2024
2 parents 462a71f + 51ecb1e commit 16a1564
Show file tree
Hide file tree
Showing 5 changed files with 222 additions and 24 deletions.
15 changes: 9 additions & 6 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,12 @@ on: [push]
# cancel builds in progress if a new push has been made to the same ref
# see https://stackoverflow.com/a/70972844/1320237
concurrency:
group: ${{ github.ref }}
cancel-in-progress: true
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref_name != 'master' }}

jobs:
build:
name: "Build & Run Tests"
runs-on: ubuntu-latest
strategy:
matrix:
Expand All @@ -42,13 +43,14 @@ jobs:
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
- name: Install test packages
- name: Install tox
run: pip install tox
- name: Run tests
# Run tox using the version of Python in `PATH`
run: tox -e ${{ matrix.tox_env }}

gh-pages:
name: "Publish GitHub Actions"
runs-on: ubuntu-latest
if: github.ref_name == 'master'
steps:
Expand All @@ -58,15 +60,15 @@ jobs:
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: 3.12
- name: Install test packages
python-version: 3.11
- name: Install tox
run: pip install tox
- name: mkdocs
# Run tox using the version of Python in `PATH`
run: tox -e docs -- gh-deploy

dockerhub:
name: Push Docker image to Docker Hub
name: Publish Docker Image on Docker Hub
runs-on: ubuntu-latest
if: github.ref_name == 'master' || startsWith(github.ref, 'refs/tags/v')
# This environment stores the DOCKERHUB_USERNAME and DOCKERHUB_TOKEN
Expand Down Expand Up @@ -108,6 +110,7 @@ jobs:
labels: ${{ steps.meta.outputs.labels }}

github-release:
name: "Publish GitHub Release"
# only deploy on tags, see https://stackoverflow.com/a/58478262/1320237
if: startsWith(github.ref, 'refs/tags/v')
needs:
Expand Down
39 changes: 39 additions & 0 deletions .github/workflows/update.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# SPDX-FileCopyrightText: 2024 Nicco Kunzmann and Open Web Calendar Contributors <https://open-web-calendar.quelltext.eu/>
#
# SPDX-License-Identifier: GPL-2.0-only
# The purpose of this file is to keep this repository and its dependencies
# up-to-date.
name: "Update Repository"

on: [push]

# cancel builds in progress if a new push has been made to the same ref
# see https://stackoverflow.com/a/70972844/1320237
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
update-translation-po-files:
name: Update Translation PO Files
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: 3.11
- name: Install tox
run: pip install tox
- name: Build the documentation
run: tox -e docs -- build
- name: Check status
run: git status
- name: Push updates translation files
run: |
git config --global user.name 'OWC Github Actions'
git config --global user.email '[email protected]'
git add translations
if git commit -m "Update translation files"; then
git push
fi
32 changes: 30 additions & 2 deletions docs/dev/maintain.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ To release a new version:
```sh
git add docs/changelog.md
git commit -m"log changes"
git push
```

2. Create a tag for the version.
Expand All @@ -64,4 +63,33 @@ To release a new version:
git push origin v1.30
```

3. Notify issues and pull requests about the release.
## Translate Documentation Files

We might add more Markdown documentation files to the [Weblate translation]({{link.weblate}}).
The aim of this section is to have a consistent outcome.

1. Create a new component and copy it from the `documentation-index` component (Getting Started).

- Use the page title as **title** like `Documentation - Getting Started`
- Use file name as **slug** like `documentation-index`

2. Add Flags, example link: https://hosted.weblate.org/settings/open-web-calendar/documentation-index/#translation

- add `md-text,safe-html` as **Translation flags**
- choose **Enforced checks**:

- Markdown links
- Markdown references
- Markdown syntax
- Unsafe HTML

3. Upload a **screenshot** of the page

- Restrict width and height to 2000px

```sh
convert 'Screenshot.png' -resize x2000 'Getting-started.png'
```

- Click on the empty **Search** button
- Add all strings to it
80 changes: 72 additions & 8 deletions translations/de/LC_MESSAGES/dev/maintain.md.po
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,6 @@ msgstr ""
msgid "Create a tag for the version."
msgstr ""

msgid "Notify issues and pull requests about the release."
msgstr ""

msgid "Enter your virtual environment. E.g. wzxhzdk:0"
msgstr ""

Expand All @@ -66,12 +63,79 @@ msgid ""
msgstr ""

msgid ""
"Edit the `docs/changelog.md` file in the Changelog Section and add the "
"changes. ```sh git add docs/changelog.md git commit -m\"log changes\" "
"git push ```"
"Create a tag for the version. ```sh git tag v1.30 git push origin "
"v1.30 ```"
msgstr ""

msgid "Translate Documentation Files"
msgstr ""

msgid ""
"Create a tag for the version. ```sh git tag v1.30 git push origin "
"v1.30 ```"
"We might add more Markdown documentation files to the [Weblate "
"translation](https://hosted.weblate.org/engage/open-web-calendar/). The aim "
"of this section is to have a consistent outcome."
msgstr ""

msgid ""
"Create a new component and copy it from the `documentation-index` component "
"(Getting Started)."
msgstr ""

msgid "Use the page title as **title** like `Documentation - Getting Started`"
msgstr ""

msgid "Use file name as **slug** like `documentation-index`"
msgstr ""

msgid ""
"Add Flags, example link: https://hosted.weblate.org/settings/open-web-"
"calendar/documentation-index/#translation"
msgstr ""

msgid "add `md-text,safe-html` as **Translation flags**"
msgstr ""

msgid "choose **Enforced checks**:"
msgstr ""

msgid "Markdown links"
msgstr ""

msgid "Markdown references"
msgstr ""

msgid "Markdown syntax"
msgstr ""

msgid "Unsafe HTML"
msgstr ""

msgid "Upload a **screenshot** of the page"
msgstr ""

msgid "Restrict width and height to 2000px"
msgstr ""

msgid "Click on the empty **Search** button"
msgstr ""

msgid "Add all strings to it"
msgstr ""

#~ msgid "Notify issues and pull requests about the release."
#~ msgstr ""

#~ msgid ""
#~ "Edit the `docs/changelog.md` file in the Changelog Section and add the "
#~ "changes. ```sh git add docs/changelog.md git commit -m\"log changes\" "
#~ "git push ```"
#~ msgstr ""

#~ msgid ""
#~ "Edit the `docs/changelog.md` file in the Changelog Section and add the "
#~ "changes. ```sh git add docs/changelog.md git commit -m\"log changes\""
#~ " ```"
#~ msgstr ""

#~ msgid "Restrict width and height to 2000px wzxhzdk:2"
#~ msgstr ""
80 changes: 72 additions & 8 deletions translations/en/LC_MESSAGES/dev/maintain.md.po
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,6 @@ msgstr ""
msgid "Create a tag for the version."
msgstr ""

msgid "Notify issues and pull requests about the release."
msgstr ""

msgid "Enter your virtual environment. E.g. wzxhzdk:0"
msgstr ""

Expand All @@ -66,12 +63,79 @@ msgid ""
msgstr ""

msgid ""
"Edit the `docs/changelog.md` file in the Changelog Section and add the "
"changes. ```sh git add docs/changelog.md git commit -m\"log changes\" "
"git push ```"
"Create a tag for the version. ```sh git tag v1.30 git push origin "
"v1.30 ```"
msgstr ""

msgid "Translate Documentation Files"
msgstr ""

msgid ""
"Create a tag for the version. ```sh git tag v1.30 git push origin "
"v1.30 ```"
"We might add more Markdown documentation files to the [Weblate "
"translation](https://hosted.weblate.org/engage/open-web-calendar/). The aim "
"of this section is to have a consistent outcome."
msgstr ""

msgid ""
"Create a new component and copy it from the `documentation-index` component "
"(Getting Started)."
msgstr ""

msgid "Use the page title as **title** like `Documentation - Getting Started`"
msgstr ""

msgid "Use file name as **slug** like `documentation-index`"
msgstr ""

msgid ""
"Add Flags, example link: https://hosted.weblate.org/settings/open-web-"
"calendar/documentation-index/#translation"
msgstr ""

msgid "add `md-text,safe-html` as **Translation flags**"
msgstr ""

msgid "choose **Enforced checks**:"
msgstr ""

msgid "Markdown links"
msgstr ""

msgid "Markdown references"
msgstr ""

msgid "Markdown syntax"
msgstr ""

msgid "Unsafe HTML"
msgstr ""

msgid "Upload a **screenshot** of the page"
msgstr ""

msgid "Restrict width and height to 2000px"
msgstr ""

msgid "Click on the empty **Search** button"
msgstr ""

msgid "Add all strings to it"
msgstr ""

#~ msgid "Notify issues and pull requests about the release."
#~ msgstr ""

#~ msgid ""
#~ "Edit the `docs/changelog.md` file in the Changelog Section and add the "
#~ "changes. ```sh git add docs/changelog.md git commit -m\"log changes\" "
#~ "git push ```"
#~ msgstr ""

#~ msgid ""
#~ "Edit the `docs/changelog.md` file in the Changelog Section and add the "
#~ "changes. ```sh git add docs/changelog.md git commit -m\"log changes\""
#~ " ```"
#~ msgstr ""

#~ msgid "Restrict width and height to 2000px wzxhzdk:2"
#~ msgstr ""

0 comments on commit 16a1564

Please sign in to comment.