Skip to content

Commit

Permalink
Add catalan and spanish languages
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanfox1985 authored and adrianmo committed Mar 15, 2017
2 parents 984b0a6 + 52990a3 commit 7f9cb5f
Show file tree
Hide file tree
Showing 10 changed files with 144 additions and 11 deletions.
1 change: 1 addition & 0 deletions .gitignore
@@ -1,3 +1,4 @@
.DS_Store
public/
npm-debug.log
/node_modules/*
8 changes: 8 additions & 0 deletions README.md
Expand Up @@ -69,6 +69,14 @@ After installing the Universal theme successfully, we recommend you to take a lo
First, let's take a look at the [config.toml](//github.com/devcows/hugo-universal-theme/tree/master/exampleSite/config.toml). It will be useful to learn how to customize your site. Feel free to play around with the settings.


### Language

Available translations are in the `/i18n` directory. You can configure the language modifying the following key.

```toml
defaultContentLanguage = "en"
```

### Style

You can change the color of the theme by modifying the following key.
Expand Down
2 changes: 1 addition & 1 deletion exampleSite/config.toml
Expand Up @@ -2,7 +2,7 @@ baseurl = "https://example.org"
title = "Universal"
theme = "hugo-universal-theme"
languageCode = "en-us"
# Site language. Available translations: en, de
# Site language. Available translations in the theme's `/i18n` directory.
defaultContentLanguage = "en"
# Enable comments by entering your Disqus shortname
disqusShortname = "devcows"
Expand Down
62 changes: 62 additions & 0 deletions i18n/ca.yaml
@@ -0,0 +1,62 @@
- id: home
translation: "Inici"

- id: templateBy
translation: "Plantilla creada per"

- id: portedBy
translation: "Adaptada a Hugo per"

- id: contactGoTo
translation: "Anar a la pàgina de contacte"

- id: contactAddrTitle
translation: "Adreça"

- id: contactTitle
translation: "Contacte"

- id: contactForm
translation: "Formulari de contacte"

- id: contactName
translation: "El teu nom"

- id: contactMail
translation: "El teu email"

- id: contactMessage
translation: "El teu missatge"

- id: contactSend
translation: "Enviar missatge"

- id: navHome
translation: "anar a inici"

- id: navToggle
translation: "Canviar Navigació"

- id: categoriesTitle
translation: "Categories"

- id: searchTitle
translation: "Buscar"

- id: tagsTitle
translation: "Paraules clau"

- id: continueReading
translation: "Continuar llegint"

- id: readMore
translation: "Llegir més"

- id: authorBy
translation: "Per"

- id: recentPosts
translation: "Posts recents"

- id: aboutUs
translation: "Sobre nosaltres"
4 changes: 2 additions & 2 deletions i18n/en.yaml
Expand Up @@ -23,15 +23,15 @@
translation: "Your Name"

- id: contactMail
translation: " Your Email"
translation: "Your Email"

- id: contactMessage
translation: "Your Message"

- id: contactSend
translation: "Send Message"

- id: navHome
- id: navHome
translation: "go to homepage"

- id: navToggle
Expand Down
62 changes: 62 additions & 0 deletions i18n/es.yaml
@@ -0,0 +1,62 @@
- id: home
translation: "Inicio"

- id: templateBy
translation: "Plantilla creada por"

- id: portedBy
translation: "Adaptada a Hugo por"

- id: contactGoTo
translation: "Ir a la página de contacto"

- id: contactAddrTitle
translation: "Dirección"

- id: contactTitle
translation: "Contacto"

- id: contactForm
translation: "Formulario de contacto"

- id: contactName
translation: "Tu Nombre"

- id: contactMail
translation: "Tu Email"

- id: contactMessage
translation: "Tu Mensaje"

- id: contactSend
translation: "Enviar mensaje"

- id: navHome
translation: "ir a inicio"

- id: navToggle
translation: "Cambiar Navegación"

- id: categoriesTitle
translation: "Categorias"

- id: searchTitle
translation: "Buscar"

- id: tagsTitle
translation: "Palabras clave"

- id: continueReading
translation: "Continuar leyendo"

- id: readMore
translation: "Leer más"

- id: authorBy
translation: "Por"

- id: recentPosts
translation: "Posts recientes"

- id: aboutUs
translation: "Sobre nosotros"
4 changes: 2 additions & 2 deletions layouts/partials/features.html
Expand Up @@ -14,13 +14,13 @@
<i class="{{ .icon }}"></i>
</div>
<h3>{{ $element.name }}</h3>
<p>{{ $element.description }}</p>
<p>{{ $element.description | markdownify }}</p>
</div>
</div>
{{ if or (eq (mod $index 3) 2) (eq $index (sub (len $.Site.Data.features) 1 )) }}
</div>
</div>
{{ end }}
{{ end }}
{{ end }}
</div>
</section>
Expand Down
6 changes: 3 additions & 3 deletions layouts/partials/footer.html
Expand Up @@ -5,7 +5,7 @@
<div class="col-md-4 col-sm-6">
<h4>{{ i18n "aboutUs" }}</h4>

{{ .Site.Params.about_us | safeHTML }}
{{ .Site.Params.about_us | markdownify }}

<hr class="hidden-md hidden-lg hidden-sm">

Expand All @@ -15,7 +15,7 @@ <h4>{{ i18n "aboutUs" }}</h4>

<div class="col-md-4 col-sm-6">

{{ if isset .Site.Params "recent_posts" }} {{ if .Site.Params.recent_posts.enable }}
{{ if isset .Site.Params "recent_posts" }} {{ if .Site.Params.recent_posts.enable }}
<h4>{{ i18n "recentPosts" }}</h4>

<div class="blog-entries">
Expand Down Expand Up @@ -48,7 +48,7 @@ <h5><a href="{{ .Permalink }}">{{ .Title }}</a></h5>

<h4>{{ i18n "contactTitle" }}</h4>

{{ .Site.Params.address | safeHTML }}
{{ .Site.Params.address | markdownify }}

<a href="/contact" class="btn btn-small btn-template-main">{{ i18n "contactGoTo" }}</a>

Expand Down
2 changes: 1 addition & 1 deletion layouts/partials/recent_posts.html
Expand Up @@ -9,7 +9,7 @@ <h2>{{ .Site.Params.recent_posts.title }}</h2>
</div>

<p class="lead">
{{ .Site.Params.recent_posts.subtitle }}
{{ .Site.Params.recent_posts.subtitle | markdownify }}
</p>

<!-- *** BLOG HOMEPAGE *** -->
Expand Down
4 changes: 2 additions & 2 deletions layouts/partials/testimonials.html
Expand Up @@ -10,7 +10,7 @@ <h2>{{ .Site.Params.testimonials.title }}</h2>
</div>

<p class="lead">
{{ .Site.Params.testimonials.subtitle }}
{{ .Site.Params.testimonials.subtitle | markdownify }}
</p>

<!-- *** TESTIMONIALS CAROUSEL *** -->
Expand All @@ -20,7 +20,7 @@ <h2>{{ .Site.Params.testimonials.title }}</h2>
<li class="item">
<div class="testimonial same-height-always">
<div class="text">
<p>{{ .text }}</p>
<p>{{ .text | markdownify }}</p>
</div>
<div class="bottom">
<div class="icon"><i class="fa fa-quote-left"></i>
Expand Down

0 comments on commit 7f9cb5f

Please sign in to comment.