Skip to content

Commit

Permalink
Prep for translations
Browse files Browse the repository at this point in the history
  • Loading branch information
CoralineAda committed May 25, 2018
1 parent dc9f7fd commit 02d3862
Show file tree
Hide file tree
Showing 10 changed files with 26 additions and 75 deletions.
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,19 @@ Be sure to read the Code of Conduct before submitting a pull request, opening an

## Adding your name as a signatory
Please use the Google Form linked on the bottom of the page at https://postmeritocracy.org. Do not open a PR to add your name.

## Adding a translation
* Fork the repo
* Make sure that you have Hugo installed: `brew install hugo`
* Create an empty markdown file called `_index.<COUNTRY_CODE>.md` in the `content` directory
* Write your translation there. Be sure to copy the structure of the English version at `index.md`, including all the special codes.
* Add an entry to `config.toml` with your language information under the [Languages] tag. For example, for Swedish, you would enter:

[Languages.se]
languageName = "Swedish"
languageCode = "se"

* Start the hugo server: `hugo server -D`
* Navigate to http://localhost:1313/COUNTRY_CODE/ and you should see your translation
* Open a pull request
* I will find another native speaker to look over the translation you made, and then it will be merged!
4 changes: 0 additions & 4 deletions config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,3 @@ page = ["html"]
languageName = "English"
languageCode = "en"
weight = 1

[Languages.se]
languageName = "Swedish"
languageCode = "se"
2 changes: 2 additions & 0 deletions content/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ These core values and principles are:
* The field of software development embraces technical change, and is made better by also accepting social change.
* We strive to reflect our values in everything that we do. We recognize that values that are espoused but not practiced are not values at all.

{{< translations >}}

### Signatories

<p class="callout">
Expand Down
19 changes: 0 additions & 19 deletions content/manifesto/.index-template.html

This file was deleted.

6 changes: 0 additions & 6 deletions content/manifesto/_index.se.md

This file was deleted.

5 changes: 0 additions & 5 deletions content/translations.md

This file was deleted.

31 changes: 0 additions & 31 deletions layouts/_default/translations.html

This file was deleted.

5 changes: 0 additions & 5 deletions layouts/languages/single.html

This file was deleted.

5 changes: 0 additions & 5 deletions layouts/partials/translation-row.html

This file was deleted.

8 changes: 8 additions & 0 deletions layouts/shortcodes/translations.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<!-- ### Translations
<ul class="data-list">
{{ range $.Site.Home.AllTranslations }}
<li><a href="{{ .Permalink }}">{{ .Language.LanguageName }}</a></li>
{{ end }}
</ul>
-->

0 comments on commit 02d3862

Please sign in to comment.