Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spanish website translation + Hability to localize the site #2

Merged
merged 21 commits into from
Oct 13, 2022
Merged
Show file tree
Hide file tree
Changes from 14 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 0 additions & 10 deletions config.toml

This file was deleted.

8 changes: 8 additions & 0 deletions config/_default/config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# baseURL = "https://florisboard.org/"
baseURL = "https://f.delthia.com/"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For testing this is OK, but we must not forget changing this back to the florisboard.org domain before merging in.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe this could be made to work by having a different action when it is in a fork or on another branch, I haven't much experience with that, but if I find a simple way to make it work like that, maybe it would be easier if people contribute translations.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm I don't really know if an action can be configured to run with different params tbh, and even then how do you configure this param without having to commit it to the fork?

defaultContentLanguage = 'en'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suggest using a double quote for the en-string, to be in line with the other strings in the config.

disableKinds = ["RSS", "taxonomy", "taxonomyTerm"]
assetDir = "src"
enableRobotsTXT = true

title = "FlorisBoard"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing empty line at the end (this is a convention I use throughout all my projects, because it allows to print a file in the terminal quickly without messed up formats).

11 changes: 11 additions & 0 deletions config/_default/translations/languages.en.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
contentDir = 'content/en'
description = "An open-source keyboard for Android which respects your privacy. Currently in early-beta."
weight = 1
languageCode = "en-US"
gh-repo = "Visit GitHub repo"
privacy = "Privacy policy"
not-found = "The requested resource could not be found. Please check the address and try again."
footer = "For more information and download options check out the GitHub repo!"
modificated = "Last modified:"
florisboard-icon = "FlorisBoard app icon"
florisboard-screenshot = "FlorisBoard screenshot"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here, missing empty line at the end

11 changes: 11 additions & 0 deletions config/_default/translations/languages.es.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
contentDir = 'content/es'
description = "Un teclado libre para Android que respeta tu privacidad. Actualmente en beta temprana."
weight = 2
languageCode = "es-ES"
gh-repo = "Visitar el repositorio de GitHub"
privacy = "Política de privacidad"
not-found = "No se pudo encontrar el recurso solicitado. Por favor, comprueba la dirección y prueba otra vez."
footer = "¡Para más información y opciones de descarga echa un vistazo al repositorio de GitHub!"
modificated = "Modificado por última vez el"
florisboard-icon = "Icono de la aplicación FlorisBoard"
florisboard-screenshot = "Captura de pantalla de FlorisBoard"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here, missing empty line at the end

File renamed without changes.
42 changes: 42 additions & 0 deletions content/es/legal/privacy.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
---
title: "Política de privacidad"
description: "Política de privacidad de FlorisBoard que explica el acceso y uso de tus datos personales"
lastmod: "2022-08-25"
---

FlorisBoard (el "Proyecto") es un teclado libre que respeta la privacidad, desarrollado y mantenido principalmente por Patrick Goldinger ([@patrickgold](https://github.com/patrickgold)), junto al increíble apoyo de la comunidad de este proyecto. Esta política de privacidad existe para darte un mejor entendimiento de los datos a los que se debe de acceder y/o almacenar localmente por lo menos para proveerte con un servicio de teclado.

## Acceso y uso a los datos

El compromiso principal de este proyecto es acceder y almacenar a los mínimos datos personales posibles mientras que se provee una buena experiencia personalizada. Cualquier datos personales a los que se acceda o que se almacenen se mantienen exclusivamente localmente,!ªQ en memoria o en el directorio de datos privados de la aplicación, y **nunca** se comparten con nadie.

### ¿A qué datos personales accede FlorisBoard y por qué?

En cualquier momento que enfoques una área de texto y FlorisBoard sea el método de entrada por defecto (el "IME"), FlorisBoard tiene acceso a los contenidos completos de esa área de texto. Monitorizará y almacenará una pequeña ventana alrededor del cursor en memoria para ayudar a hacer un seguimiento del estado actual y mejorar el rendimiento. Adicionalmente, como un IME por defecto, FlorisBoard tiene acceso al portapapeles del sistema y lo monitoriza para proveerte con las características del portapapeles. Más allá, FlorisBoard tiene acceso al diccionario de usuario del sistema, aunque solo leyendo los contenidos si la comprobación ortográfica, las sugerencias, o la escritura por deslizamiento están activadas.

A menos que enuncie de otra manera en la siguiente sección, cualquiera de los datos personales a los que se acceda solo se almacenan temporalmente en memoria, y se descartarán cuando el campo de texto pierda el enfoque o el proceso del teclado termine.

### ¿Qué datos personales guarda FlorisBoard y por qué?

Algunas de las características requieren datos personales que se persistan de manera local en el disco, para poder ser reutilizados más tarde. Esto se aplica a:

- **Comprobación ortográfica, sugerencias y escritura por deslizamiento**
Para poder crear diccionarios personales automáticamente y proveer sugerencias dinámicas basadas en tus entradas anteriores, FlorisBoard tiene que monitorizar tu comportamiento de escritura, aprender de él y guardar los resultados localmente. El monitorizado del comportamiento de escritura se para completamente si el teclado está en modo incógnito, o si no hay ninguna característica habilitada que requiera esta opción.
- **Historial del portapapeles**
Para poder almacenar y mostrar múltiples ítems del portapapeles, FlorisBoard almacena los ítems del portapapeles en una base de datos local. La base de datos solo se mantiene y se usa si la característica de historial del portapapeles está habilitada.

### ¿Alguno de los datos personales almacenados deja el dispositivo?

No. Cualquier dato personal que persista se almacena localmente y **nunca** deja tu dispositivo.

## Otro

Para información sobre la lista de permisos pedidos por FlorisBoard, por favor, lee [este](https://github.com/florisboard/florisboard/wiki/List-of-perimssions-Florisboard-requests) documento.
delthia marked this conversation as resolved.
Show resolved Hide resolved

### Actualizaciones de esta política de privacidad

Nos reservamos el derecho de revisar y actualizar esta política periódicamente. Los cambios a está política se anunciarán públicamente y se enlazarán en el correspondiente conjunto de cambios de la versión en la que la nueva política tome efecto. El uso continuado de FlorisBoard se considerará la aceptación de esos cambios.

### Contacto

Si tienes preguntas adicionales, comentarios o preocupaciones con respecto a esta política de privacidad, por favor ponte en contacto con [[email protected]](mailto:[email protected]) o presenta una incidencia en el [gestor de incidencias](https://github.com/florisboard/florisboard/issues) de FlorisBoard.
2 changes: 1 addition & 1 deletion layouts/404.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{{ define "main" }}
<p style="color: red;">The requested resource could not be found. Please check the address and try again.</p>
<p style="color: red;">{{ .Param "not-found" }}</p>
Copy link
Member

@patrickgold patrickgold Sep 7, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure, but can't one use {{ i18n "string_name" }} for referencing strings in Hugo? If so I think using this would be best, as it is immediately clear that this variable is a translatable variable.

(if it is possible to use the i18n syntax this comment is valid for all usage sites, but I won't comment individually on all occurrences)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did it that way because it was the quickest I found, as I haven't much experience with the multilang part of hugo, but now that the translations where splitted into diferent files, I think it would be feasible to use the i18n syntax after I look into it.

{{ end }}
2 changes: 1 addition & 1 deletion layouts/_default/single.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{{ define "main" }}
<h1>{{ .Title }}</h1>
{{ with .Lastmod }}<p class="last-modified">Last modified: {{ . | time.Format ":date_medium" }}</p>{{ end }}
<p class="last-modified">{{ .Param "modificated" }} {{ with .Lastmod }}{{ . | time.Format ":date_medium" }}</p>{{ end }}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here you moved the {{ with .Lastmod }} block inwards, causing half of the last mod paragraph to always be included. It should be before the paragraph element, so it either includes the whole localized paragraph or not at all if the lastmod attribute is not defined.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll have to look a bit more into this, as I changed it because otherwise the translation variable would work. It does make sense like that, but as currently the site only has a single page that does contain the lastmod tag, I didn't think about that.

{{ .Content }}
{{ end }}
8 changes: 4 additions & 4 deletions layouts/index.html
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{{ define "main" }}
<main id="floris-main">
<p class="main-description">An open-source keyboard for Android which respects your privacy. Currently in early-beta.</p>
<img src="/images/florisboard-screenshot.jpeg" class="main-image" alt="FlorisBoard screenshot">
<p class="main-moreinfo">For more information and download options check out the GitHub repo!</p>
<a href="https://github.com/florisboard/florisboard" target="_blank">Visit GitHub repo</a>
<p class="main-description">{{ .Param "description" }}</p>
<img src="/images/florisboard-screenshot.{{ .Lang }}.jpeg" class="main-image" alt="{{ .Param "florisboard-screenshot" }}">
<p class="main-moreinfo">{{ .Param "footer" }}</p>
<a href="https://github.com/florisboard/florisboard" target="_blank">{{ .Param "gh-repo" }}</a>
</main>
{{ end }}
2 changes: 1 addition & 1 deletion layouts/partials/footer.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<footer id="floris-footer">
<span class="copyright">&copy; 2022 Patrick Goldinger</span>&nbsp;&bullet;&nbsp;<a href="/legal/privacy/">Privacy policy</a>
<span class="copyright">&copy; 2022 Patrick Goldinger</span>&nbsp;&bullet;&nbsp;<a href="{{ if (ne .Language.Lang "en") }}/{{ .Language.Lang }}{{ end }}/legal/privacy/">{{ .Param "privacy" }}</a>
</footer>
18 changes: 14 additions & 4 deletions layouts/partials/header.html
Original file line number Diff line number Diff line change
@@ -1,9 +1,19 @@
<header id="floris-header">
<a href="{{ .Site.BaseURL }}" class="floris-branding-banner">
<img src="/images/app-icon.png" alt="FlorisBoard app icon">
<img src="/images/app-icon.png" alt="{{ .Param "florisboard-icon" }}">
<span>FlorisBoard</span>
</a>
<a href="https://github.com/florisboard/florisboard" target="_blank">
<span>Visit GitHub repo</span>
</a>
<div>
<nav id="lang-select">
<input type="checkbox" id="lang">
<label for="lang" id="lang-label"><span>{{ $.Site.Language }} ▼</span></label>

<div class="langs">
{{ range .AllTranslations }}{{ if (ne $.Lang .Lang)}}<p><a href="{{ .Permalink }}">{{ .Lang }}</a></p>{{ end }}{{ end}}
</div>
</nav>
<a href="https://github.com/florisboard/florisboard" target="_blank">
<span>{{ .Param "gh-repo" }}</span>
</a>
</div>
</header>
59 changes: 59 additions & 0 deletions src/css/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -100,3 +100,62 @@ a:hover, a:focus {
padding: 16px;
width: 100%;
}

/* Language switcher */
#lang-select {
position: relative;
display: inline-block;
margin-right: .5em;
}

.langs {
display: none;
position: absolute;
background-color: var(--surface);
padding: 12px 16px;
margin-top: 12px;
border-radius: 0px 0px 12px 12px;
min-width: 2.4rem;
/* opacity: 0%;
transition: all 100ms ease-in-out; */
}

#lang:checked ~ .langs {
display: block;
/* opacity: 100%;
transition: all 100ms ease-in-out; */
}

#lang {
display: none;
}

#lang-label {
padding: 12px 16px;
border-radius: 12px;
cursor: pointer;
/* transition: all 100ms ease-in-out; */
transition: background 100ms ease-in-out;
}

#lang-label:hover {
background-color: var(--surface);
}

.langs p {
margin: auto;
}

.langs a {
text-decoration: none;
display: block;
margin-left: auto;
margin-right: auto;
text-align: center;
margin-bottom: 1rem;
}

#lang:checked ~ #lang-label {
border-radius: 12px 12px 0px 0px;
background-color: var(--surface);
}
Binary file added static/images/florisboard-screenshot.es.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.