-
-
Notifications
You must be signed in to change notification settings - Fork 125
/
Copy pathREADME.md
27 lines (23 loc) · 2.62 KB
/
README.md
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# Translating Datenanfragen.de
## Adding a new language
* Introduce Hugo to the new language in `config/_default/languages.toml`.
* Add a base URL in `config/production/languages.toml` and copy one of the existing blocks in `config/development/languages.toml` for the new language. Remember to use the `www` subdomain and no the apex domain as a `base_url`.
* In `src/Utility/common.ts`, add a fallback country to `fallback_countries`.
* In the translation file for the new language, set the values for the `macros` context. Remember to use the `www` subdomain and no the apex domain as a `base_url`.
* In all translation files, under `i18n-widget`, add the new language if necessary.
* In the deploy script `deploy.sh`, make sure to also copy the companies and SVAs for the new language.
* Add the new language to the `languageFiles` for `preact-i18n` in `.eslintrc.js`.
* In `webpack.common.js`, extend the array for the `translations-dummy` entrypoint with the new language code. Also link the new domain in the banner.
* In `content/` create a folder with the new language code and add a new file for all pages that should be available in the new language. At least create the following files: `generator.md`, `id-data-controls.md`, `my-requests.md`, `privacy-controls.md`, `suggest.md`, `g.md`
* Update the privacy policies to include the new site under "Scope".
* Add the domain to the `sites` array in `cypress/integration/use-cases/production.spec.js`.
* Make sure there is at least one blog post or update `cypress/integration/use-cases/production.spec.js` accordingly.
* Change the CSS link selector for external links in `assets/styles/variables.scss`.
* Add the domain to `content/*/verein/_index.md`.
* Extend `languages` with the new domain and its translations in `components-package/src/index.ts`. Import the language accordingly.
* If the sample letter blog articles have been translated, add the strings of the request templates to the `scripts/build-sample-letters/res/i18n.json` for the new language and add your language to the `enabledLanguages` array in `scripts/build-sample-letters/build.js` and then run it: `yarn build-sample-letters`.
* Mention the new domain in the `README`.
* Add the domain in dattel (see [`infrastructure` in our internal git](https://git.my-server.in/datenanfragen/infrastructure) on how to do that) and set the appropriate DNS records.
* In `deploy-dattel.js`, add the new language to the `languages` array and trigger a deploy using `CONTEXT=production ./deploy.sh && yarn deploy-dattel`.
## Notes
* When adding a new language, the `slug` of the `generator.md` page must not be translated, as our redirection code depends on it.