Skip to content

Commit

Permalink
Download translations dynamically (#2120)
Browse files Browse the repository at this point in the history
  • Loading branch information
privacyguides-bot authored and jonaharagon committed Apr 11, 2023
1 parent ebfb448 commit 2df3405
Show file tree
Hide file tree
Showing 2,056 changed files with 17 additions and 250,161 deletions.
54 changes: 0 additions & 54 deletions .github/workflows/crowdin-download.yml

This file was deleted.

3 changes: 0 additions & 3 deletions .github/workflows/pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,6 @@ jobs:
CARDS: true
run: |
pipenv run mkdocs build --config-file config/mkdocs.en.yml
pipenv run mkdocs build --config-file config/mkdocs.fr.yml
pipenv run mkdocs build --config-file config/mkdocs.he.yml
pipenv run mkdocs build --config-file config/mkdocs.nl.yml
pipenv run mkdocs --version
- name: Package website
Expand Down
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,7 @@
site
.cache
/i18n/
/includes/*
!/includes/*.en.*
/theme/overrides/*
!/theme/overrides/*.en.*
1 change: 1 addition & 0 deletions Brewfile.netlify
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
brew "pngquant"
brew "crowdin"
11 changes: 10 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ This website uses [`mkdocs-material-insiders`](https://squidfunk.github.io/mkdoc

1. Clone this repository and submodules: `git clone --recurse-submodules https://github.com/privacyguides/privacyguides.org.git`
2. Enable SSH commit verification with our local [`.allowed_signers`](/.allowed_signers) file: `git config gpg.ssh.allowedSignersFile .allowed_signers`
3. Install Python **3.8**, this is the only version supported by Netlify.
3. Install Python **3.8**, this is the only version supported by Netlify
4. Install **pipenv**: `pip install pipenv`
5. Install dependencies: `pipenv install --dev` (install [Pillow and CairoSVG](https://squidfunk.github.io/mkdocs-material/setup/setting-up-social-cards/#dependencies) as well to generate social cards)
6. Serve the site locally: `pipenv run mkdocs serve --config-file config/mkdocs.en.yml` (set `CARDS=true` to generate social cards)
Expand All @@ -100,6 +100,15 @@ This website uses [`mkdocs-material-insiders`](https://squidfunk.github.io/mkdoc

If you commit to `main` with commits signed with your SSH key, you should add your SSH key to [`.allowed_signers`](/.allowed_signers) in this repo.

### Local Translated Site Builds

1. Install the [Crowdin CLI Tool](https://developer.crowdin.com/cli-tool/) (`brew install crowdin`)
2. Set the `CROWDIN_PERSONAL_TOKEN` environment variable to your Crowdin personal access token
3. Run `crowdin download` in the root of this repo
4. Serve the site locally: `pipenv run mkdocs serve --config-file config/mkdocs.fr.yml` (replacing the config file with any language in [/config](/config))

Translations downloaded from Crowdin are [.gitignore](/.gitignore)'d, so any local changes to the translated site cannot be committed to this repo. Actual modifications need to be made on Crowdin. As an alternative to steps 1-3, you can copy the folders from [privacyguides/i18n](https://github.com/privacyguides/i18n) to the root of this repo to obtain the translated files.

## Releasing

1. Create a new tag: `git tag -s v3.X.X -m 'Some message'`
Expand Down
19 changes: 0 additions & 19 deletions i18n/ar/404.md

This file was deleted.

53 changes: 0 additions & 53 deletions i18n/ar/CODE_OF_CONDUCT.md

This file was deleted.

40 changes: 0 additions & 40 deletions i18n/ar/about/criteria.md

This file was deleted.

50 changes: 0 additions & 50 deletions i18n/ar/about/donate.md

This file was deleted.

Loading

0 comments on commit 2df3405

Please sign in to comment.