Skip to content

Commit 43cddd6

Browse files
authored
Merge pull request #780 from github/translations-toc-tweaks
Translation ToC tweaks
2 parents 86f1946 + 47003e1 commit 43cddd6

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

_layouts/article.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
<h1 class="alt-h1 lh-condensed text-center mb-3">{{ page.title }}</h1>
1111
<p class="lead text-center text-gray col-md-8 mx-auto mb-4 position-relative">{{ page.description }}</p>
12-
{% if lang == "en" %}
12+
{% if page.lang == "en" %}
1313
<nav class="toc mb-4 mb-md-6">
1414
<div class="card col-sm-8 col-md-4 col-lg-3 mx-auto">
1515
<a class="toc-trigger d-block text-center p-3">

docs/translations.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ If there's not, then today is your day to lead this effort! Here's how to start:
1212
1. Create a new branch for your translation work e.g. `es`.
1313
1. Copy `_data/locales/en.yml` to your target language file e.g. `_data/locales/es.yml` and translate all the strings.
1414
1. Create a new directory in `_articles/` for your language e.g. `_articles/es/`, copy each guide from `_articles/` into that folder and translate the content in each guide, except for the field names in the front matter between the `---`s at the top of each file, e.g., `title:` should be unchanged.
15-
1. Copy `index.html` to your target language index file e.g. `[_articles/es/index.html](https://github.com/github/opensource.guide/blob/master/_articles/es/index.html)` and update the `lang:` and add the `permalink:` field.
16-
1. Run `script/test` and make sure there are no failures with your translation files. Note that you may need to rename anchor links or leave some headers in English to fix broken links.
15+
1. Copy `index.html` to your target language index file e.g. `[_articles/es/index.html](https://github.com/github/opensource.guide/blob/master/_articles/es/index.html)` and update the `lang:` and add the `permalink:` field. Remove the `toc:` fields (they are only used for English).
16+
1. Run `script/test` and make sure there are no failures with your translation files. Note that you may need to fix broken links.
1717
1. Send a pull request.
1818

1919
Completing an initial translation of the whole site is a fairly large task. One way to break that task up is to work with other translators through pull requests on your fork. Example: [pull requests on fork for German translation](https://github.com/katrinleinweber/opensource.guide/pulls?q=is%3Apr+is%3Aclosed) and corresponding [initial pull request for German translation](https://github.com/github/opensource.guide/pull/577) on this repository.

0 commit comments

Comments
 (0)