Skip to content

Commit

Permalink
Update to symlink version
Browse files Browse the repository at this point in the history
  • Loading branch information
ignotus666 committed Oct 23, 2021
1 parent b712d87 commit 0ee3676
Show file tree
Hide file tree
Showing 59 changed files with 3,137 additions and 899 deletions.
33 changes: 20 additions & 13 deletions .github/workflows/add-lang.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
echo "new_lang=$NEW_LANG" >> $GITHUB_ENV
echo "issue_num=$ISSUE_NUM" >> $GITHUB_ENV
else
echo Language code in wrong format
echo Error: language code in wrong format.
exit 1
fi
Expand All @@ -31,25 +31,32 @@ jobs:
with:
ref: next-release

# Check po4a cache:
# 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.
exit 1
else
echo Language: [${{ env.new_lang }}] not detected. Proceeding to add [${{ env.new_lang }}].
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/[email protected]
id: cache-po4a
with:
path: "~/po4a"
key: ${{ runner.os }}-po4a
- name: Install or retrieve po4a from cache
- name: Install/retrieve po4a from cache
env:
CACHE_HIT: ${{ steps.cache-po4a.outputs.cache-hit }}
run: ./_po4a-tools/po4a-cache.sh

# Create new lang dir. 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:
run: |
mkdir _translator-files/po/${{ env.new_lang }}
./_po4a-tools/po4a-cache.sh
# Create .po files for new language:
- name: Create .po files
run: ./_po4a-tools/po4a-update-templates.sh
# Create dirs and files for new language:
- name: Create po files, non-wiki dirs, screenshots and symlinks for new lang
run: ./_po4a-tools/po4a-add-language.sh

# Push changes to 'next-release':
- name: Push changes to repo
Expand All @@ -69,8 +76,8 @@ jobs:
- They can be found in `_translator-files/po/${{ env.new_lang }}/`.
- Please consult the README file in `_translator-files/` for information on the translation process.
# Create translated .md files. Never pushed to the repo.
- name: Create translated .md docs and stats
# Create target translated files. Never pushed to the repo.
- name: Create translated docs and stats
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 @@ -5,7 +5,7 @@ on:
push:
branches: [ next-release ]
paths:
- 'wiki/en/*.md'
- 'wiki/en/**'
jobs:
jekyll_site_ci:
permissions:
Expand All @@ -21,7 +21,7 @@ jobs:
base: ${{ github.ref }}
filters: |
src_files_changed:
- 'wiki/en/*.md'
- 'wiki/en/**'
# Retrieve po4a installation cache or create it if not found:
- name: Check for po4a cache
Expand All @@ -37,7 +37,7 @@ jobs:
# 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:
run: ./_po4a-tools/po4a-cache.sh

# If there have been changes to English .md files in /wiki, run po4a-update-templates:
# If there have been changes to English source files in /wiki, run po4a-update-templates:
- name: Update .po files
if: ${{ steps.filter.outputs.src_files_changed == 'true' }}
run: ./_po4a-tools/po4a-update-templates.sh
Expand All @@ -50,8 +50,8 @@ jobs:
default_author: github_actions
message: 'AUTO: Updated .po files'

# Create translated .md files. Never pushed to the repo.
- name: Create translated .md docs and stats
# Create target translated files. Never pushed to the repo.
- name: Create translated docs and stats
if: ${{ github.event_name == 'pull_request' }}
run: ./_po4a-tools/po4a-create-all-targets.sh

Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build and deploy jekyll site
name: Build/deploy jekyll site and sync release to next-release
on:
push:
branches:
Expand Down Expand Up @@ -32,7 +32,7 @@ jobs:
base: ${{ github.ref }}
filters: |
src_files_changed:
- 'wiki/en/*.md'
- 'wiki/en/**'
- name: Update .po files
if: steps.filter.outputs.src_files_changed == 'true'
run: ./_po4a-tools/po4a-update-templates.sh
Expand All @@ -45,8 +45,8 @@ jobs:
default_author: github_actions
message: 'AUTO: Update .po files'

# Create translated .md files. Never pushed to the repo.
- name: Create translated .md docs and stats
# Create target translated files. Never pushed to the repo.
- name: Create translated docs and stats
run: ./_po4a-tools/po4a-create-all-targets.sh

# Build and deploy site
Expand Down
55 changes: 0 additions & 55 deletions 1-de-index.html

This file was deleted.

1 change: 1 addition & 0 deletions 1-de-index.html
57 changes: 0 additions & 57 deletions 1-es-index.html

This file was deleted.

1 change: 1 addition & 0 deletions 1-es-index.html
56 changes: 0 additions & 56 deletions 1-fr-index.html

This file was deleted.

1 change: 1 addition & 0 deletions 1-fr-index.html
59 changes: 0 additions & 59 deletions 1-index.html

This file was deleted.

1 change: 1 addition & 0 deletions 1-index.html
Loading

0 comments on commit 0ee3676

Please sign in to comment.