Skip to content

Commit

Permalink
Merge branch 'next-release' into release
Browse files Browse the repository at this point in the history
  • Loading branch information
ann0see authored Jul 28, 2024
2 parents 5cda24d + faada8c commit b13603b
Show file tree
Hide file tree
Showing 320 changed files with 6,268 additions and 5,115 deletions.
30 changes: 16 additions & 14 deletions .github/workflows/add-lang.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,34 +17,36 @@ jobs:
ISSUE_TITLE: ${{ github.event.issue.title }}
ISSUE_NUM: ${{ github.event.issue.number }}
run: |
NEW_LANG=$(sed 's/.*\[\([^]]*\)].*/\1/' <<< "$ISSUE_TITLE")
if [[ $NEW_LANG =~ ^[a-z]{2}(_[A-Z]{2})?$ ]]; then
echo "new_lang=$NEW_LANG" >> $GITHUB_ENV
LANG_CODE=$(sed 's/.*\[\([^]]*\)].*/\1/' <<< "$ISSUE_TITLE")
FULL_LANG=$(sed 's/.*<\([^>]*\)>.*/\1/' <<< "$ISSUE_TITLE")
if [[ $LANG_CODE =~ ^[a-z]{2}(-[A-Z]{2})?$ && $ISSUE_TITLE =~ <[^>]+> ]]; then
echo "lang_code=$LANG_CODE" >> $GITHUB_ENV
echo "full_lang=$FULL_LANG" >> $GITHUB_ENV
echo "issue_num=$ISSUE_NUM" >> $GITHUB_ENV
else
echo Error: language code in wrong format.
echo Error: language name/code in wrong format.
exit 1
fi
# Check out repo:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
ref: next-release

# Check if language has been added previously.
- name: Check if language is already present
run: |
if [ -d "_translator-files/po/${{ env.new_lang }}" ] ; then
echo Error: The language [${{ env.new_lang }}] seems to already exist.
if [ -d "_translator-files/po/${{ env.lang_code }}" ] ; then
echo Error: The language [${{ env.lang_code }}] seems to already exist.
exit 1
else
echo Language: [${{ env.new_lang }}] not detected. Proceeding to add [${{ env.new_lang }}].
echo Language: [${{ env.lang_code }}] seems to be new as no Language: [${{ env.lang_code }}] was found. Proceeding to add [${{ env.lang_code }}].
fi
# Check po4a cache. If CACHE_HIT: true, retrieve the cache.
# If not, install po4a and its dependencies and copy them all to a folder (~/po4a/) to be cached:
- name: Check for po4a cache
uses: actions/cache@v3
uses: actions/cache@v4
id: cache-po4a
with:
path: "~/po4a"
Expand All @@ -60,23 +62,23 @@ jobs:

# Push changes to 'next-release':
- name: Push changes to repo
uses: EndBug/add-and-commit@v7
uses: EndBug/add-and-commit@v9
with:
branch: next-release
default_author: github_actions
message: 'AUTO: Add new language: (${{ env.new_lang }}) #${{ env.issue_num }}'
message: 'AUTO: Add new language: ${{ env.lang_code }}: ${{ env.full_lang }} #${{ env.issue_num }}'

# Add comment to issue informing of the creation of the language files:
- name: Add comment to issue
uses: peter-evans/create-or-update-comment@v1
uses: peter-evans/create-or-update-comment@v4
with:
issue-number: ${{ env.issue_num }}
body: |
- The .po files have been created for **${{ env.new_lang }}** and are now available on [Weblate](https://hosted.weblate.org/projects/jamulus/#languages). If you prefer not to use Weblate and intend to submit translations via a Pull Request, your language files can be found on the `next-release` branch in `_translator-files/po/${{ env.new_lang }}/`.
- The .po files have been created for **${{ env.full_lang }}** and are now available on [Weblate](https://hosted.weblate.org/projects/jamulus/#languages). If you prefer not to use Weblate and intend to submit translations via a Pull Request, your language files can be found on the `next-release` branch in `_translator-files/po/${{ env.lang_code }}/`.
- Please consult [this README file](https://github.com/jamulussoftware/jamuluswebsite/tree/next-release/_translator-files#readme) for more information on the translation process.
# Create target translated files. Never pushed to the repo.
- name: Create translated docs and stats
- name: Create translated docs
run: ./_po4a-tools/po4a-create-all-targets.sh

# Build site
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/jekyll.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ jobs:
contents: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

# Paths changes filter. Detects if there's been a change to any files defined in the filter:
- uses: dorny/paths-filter@v2
- uses: dorny/paths-filter@v3
id: filter
with:
base: ${{ github.ref }}
Expand All @@ -26,7 +26,7 @@ jobs:
# Retrieve po4a installation cache or create it if not found:
- name: Check for po4a cache
uses: actions/cache@v3
uses: actions/cache@v4
id: cache-po4a
with:
path: "~/po4a"
Expand All @@ -46,7 +46,7 @@ jobs:
# This step only runs if a PR is merged:
- name: Push changes to repo if action triggered on:push and .po files need updating
if: ${{ ( github.event_name == 'push' && steps.filter.outputs.src_files_changed == 'true' ) || ( github.event_name == 'workflow_dispatch' && steps.filter.outputs.src_files_changed == 'true' ) }}
uses: EndBug/add-and-commit@v7
uses: EndBug/add-and-commit@v9
with:
default_author: github_actions
message: 'AUTO: Updated .po files'
Expand All @@ -66,7 +66,7 @@ jobs:
- name: Zip Website
if: ${{ github.event_name == 'pull_request' }}
run: zip -r ${{ github.workspace }}/website.zip _site/*
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
name: Upload Website
if: ${{ github.event_name == 'pull_request' }}
with:
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
contents: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

# Retrieve po4a installation cache or create it if not found:
- name: Check for po4a cache
Expand All @@ -26,7 +26,7 @@ jobs:
run: ./_po4a-tools/po4a-cache.sh

# Paths changes filter. If there's been a change to any files defined in the filter, the step (update .po files) runs:
- uses: dorny/paths-filter@v2
- uses: dorny/paths-filter@v3
id: filter
with:
base: ${{ github.ref }}
Expand All @@ -40,7 +40,7 @@ jobs:
# This step only runs if a PR is merged:
- name: Push changes to repo if action triggered on:push and .po files need updating
if: ${{ steps.filter.outputs.src_files_changed == 'true' }}
uses: EndBug/add-and-commit@v7
uses: EndBug/add-and-commit@v9
with:
default_author: github_actions
message: 'AUTO: Update .po files'
Expand Down Expand Up @@ -95,7 +95,7 @@ jobs:
### Flags accepted can be found here https://jekyllrb.com/docs/configuration/options/#build-command-options

- name: 🚀 deploy
uses: peaceiris/actions-gh-pages@v3
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./_site
Expand All @@ -109,7 +109,7 @@ jobs:
contents: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: ${{ github.sha }} update from release
uses: devmasx/[email protected]
with:
Expand Down
1 change: 0 additions & 1 deletion 1-de-index.html

This file was deleted.

1 change: 1 addition & 0 deletions 1-de-index.md
1 change: 0 additions & 1 deletion 1-es-index.html

This file was deleted.

1 change: 1 addition & 0 deletions 1-es-index.md
1 change: 0 additions & 1 deletion 1-fr-index.html

This file was deleted.

1 change: 1 addition & 0 deletions 1-fr-index.md
1 change: 0 additions & 1 deletion 1-index.html

This file was deleted.

1 change: 1 addition & 0 deletions 1-index.md
1 change: 0 additions & 1 deletion 1-it-index.html

This file was deleted.

1 change: 1 addition & 0 deletions 1-it-index.md
1 change: 1 addition & 0 deletions 1-ko-KR-index.md
1 change: 0 additions & 1 deletion 1-ko_KR-index.html

This file was deleted.

1 change: 0 additions & 1 deletion 1-nb_NO-index.html

This file was deleted.

1 change: 0 additions & 1 deletion 1-nl-index.html

This file was deleted.

1 change: 1 addition & 0 deletions 1-nl-index.md
1 change: 1 addition & 0 deletions 1-no-NO-index.md
1 change: 1 addition & 0 deletions 1-pt-BR-index.md
1 change: 1 addition & 0 deletions 1-pt-PT-index.md
1 change: 0 additions & 1 deletion 1-pt_BR-index.html

This file was deleted.

1 change: 0 additions & 1 deletion 1-pt_PT-index.html

This file was deleted.

1 change: 1 addition & 0 deletions 1-zh-CN-index.md
1 change: 0 additions & 1 deletion 1-zh_CN-index.html

This file was deleted.

61 changes: 34 additions & 27 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,37 +1,39 @@
GEM
remote: https://rubygems.org/
specs:
addressable (2.8.1)
addressable (2.8.5)
public_suffix (>= 2.0.2, < 6.0)
colorator (1.1.0)
concurrent-ruby (1.1.10)
concurrent-ruby (1.2.2)
cssminify2 (2.0.1)
em-websocket (0.5.3)
eventmachine (>= 0.12.9)
http_parser.rb (~> 0)
eventmachine (1.2.7)
execjs (2.8.1)
ffi (1.15.5)
execjs (2.9.1)
ffi (1.16.3)
forwardable-extended (2.6.0)
google-protobuf (3.24.4)
htmlcompressor (0.4.0)
http_parser.rb (0.8.0)
i18n (1.12.0)
i18n (1.14.1)
concurrent-ruby (~> 1.0)
jekyll (4.2.2)
jekyll (4.3.2)
addressable (~> 2.4)
colorator (~> 1.0)
em-websocket (~> 0.5)
i18n (~> 1.0)
jekyll-sass-converter (~> 2.0)
jekyll-sass-converter (>= 2.0, < 4.0)
jekyll-watch (~> 2.0)
kramdown (~> 2.3)
kramdown (~> 2.3, >= 2.3.1)
kramdown-parser-gfm (~> 1.0)
liquid (~> 4.0)
mercenary (~> 0.4.0)
mercenary (>= 0.3.6, < 0.5)
pathutil (~> 0.9)
rouge (~> 3.0)
rouge (>= 3.0, < 5.0)
safe_yaml (~> 1.0)
terminal-table (~> 2.0)
terminal-table (>= 1.8, < 4.0)
webrick (~> 1.7)
jekyll-minifier (0.1.10)
cssminify2 (~> 2.0)
htmlcompressor (~> 0.4)
Expand All @@ -40,42 +42,47 @@ GEM
uglifier (~> 4.1)
jekyll-paginate-v2 (3.0.0)
jekyll (>= 3.0, < 5.0)
jekyll-polyglot (1.5.1)
jekyll (>= 3.0)
jekyll-sass-converter (2.2.0)
sassc (> 2.0.1, < 3.0)
jekyll-polyglot (1.6.0)
jekyll (>= 4.0, >= 3.0)
jekyll-sass-converter (3.0.0)
sass-embedded (~> 1.54)
jekyll-watch (2.2.1)
listen (~> 3.0)
json (2.6.2)
json (2.6.3)
json-minify (0.0.3)
json (> 0)
kramdown (2.4.0)
rexml
kramdown-parser-gfm (1.1.0)
kramdown (~> 2.0)
liquid (4.0.3)
listen (3.7.1)
liquid (4.0.4)
listen (3.8.0)
rb-fsevent (~> 0.10, >= 0.10.3)
rb-inotify (~> 0.9, >= 0.9.10)
mercenary (0.4.0)
pathutil (0.16.2)
forwardable-extended (~> 2.6)
public_suffix (5.0.0)
public_suffix (5.0.3)
rake (13.0.6)
rb-fsevent (0.11.2)
rb-inotify (0.10.1)
ffi (~> 1.0)
rexml (3.3.2)
strscan
rouge (3.30.0)
safe_yaml (1.0.5)
ffi (~> 1.9)
sassc (2.4.0)
ffi (~> 1.9)
rexml (3.3.2)
strscan (>= 3.0.9)
strscan (3.1.0)
terminal-table (2.0.0)
unicode-display_width (~> 1.1, >= 1.1.1)
rouge (4.1.3)
safe_yaml (1.0.5)
sass-embedded (1.69.4)
google-protobuf (~> 3.23)
rake (>= 13.0.0)
terminal-table (3.0.2)
unicode-display_width (>= 1.1.1, < 3)
uglifier (4.2.0)
execjs (>= 0.3.0, < 3)
unicode-display_width (1.8.0)
unicode-display_width (2.5.0)
webrick (1.8.1)

PLATFORMS
ruby
Expand Down
17 changes: 16 additions & 1 deletion _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,26 @@ plugins:
- jekyll-paginate-v2
- jekyll-polyglot
- jekyll-minifier
languages: ["en", "zh_CN", "nb_NO", "ko_KR", "pt_BR", "pt_PT", "nl", "es", "de", "it", "fr"]
languages: ["en", "zh-CN", "nb-NO", "ko-KR", "pt-BR", "pt-PT", "nl", "es", "de", "it", "fr"]
default_lang: "en"
language_names:
en: English
zh-CN: 简体中文
nb-NO: Norsk (bokmål)
ko-KR: 한국어
pt-PT: Português (Portugal)
pt-BR: Português (Brasil)
nl: Nederlands
es: Español
de: Deutsch
it: Italiano
fr: Français
exclude_from_localization: ["assets", "images", "css", "README.md", "manifest.json", "humans.txt", "sitemap.xml", "robots.txt", "404.html", "CNAME", "LICENSE.md"]
parallel_localization: true
a_rootpage: "https://jamulus.io"
markdown: kramdown
kramdown:
input: GFM

# Jamulus release binary links
download_root_link: "https://github.com/jamulussoftware/jamulus/releases/download/r3_10_0/"
Expand Down
Loading

0 comments on commit b13603b

Please sign in to comment.