Skip to content

Commit

Permalink
Enable spanish spellchecker
Browse files Browse the repository at this point in the history
  • Loading branch information
electrocucaracha committed Jan 27, 2022
1 parent 40d6fb6 commit f36a8dd
Show file tree
Hide file tree
Showing 7 changed files with 100 additions and 36 deletions.
42 changes: 24 additions & 18 deletions .github/workflows/spellcheck.yml
Original file line number Diff line number Diff line change
@@ -1,28 +1,34 @@
# This is a basic workflow to help you get started with Actions
---
# SPDX-license-identifier: Apache-2.0
##############################################################################
# Copyright (c) 2022
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Apache License, Version 2.0
# which accompanies this distribution, and is available at
# http://www.apache.org/licenses/LICENSE-2.0
##############################################################################

name: Spellcheck CI

# Controls when the action will run.
# yamllint disable-line rule:truthy
on:
# Triggers the workflow on push or pull request events but only for the main branch
pull_request:
branches: [ main ]

# Allows you to run this workflow manually from the Actions tab
types:
- submitted
paths:
- '**.md'
- '!.github/*'
branches:
- main
workflow_dispatch:


# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
check-spellcheck:
name: Run PySpelling tool to verify spelling issues
runs-on: ubuntu-latest

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2

- name: GitHub Spellcheck Action
uses: rojopolis/spellcheck-github-actions@0.20.0
- name: install aspell dictionaries
run: |
sudo apt-get update
sudo apt-get install -y aspell-es aspell-en
- uses: rojopolis/spellcheck-github-actions@0.21.1
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ resources/
node_modules/
tech-doc-hugo

*.dic
File renamed without changes.
15 changes: 15 additions & 0 deletions content/es/_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
titulo: Definición de plantilla
estatus: Retroalimentación bienvenida
categoría: concepto
---

## Que es esto?
Un rápido resumen del concepto, que es esto.

## Problema que es solucionado
Un par de lineas del problema que es solucionado.

## Como esto ayuda
Un par de lineas de como esto soluciona el problema.

Empty file added content/es/wordlist.txt
Empty file.
64 changes: 46 additions & 18 deletions spellcheck.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,47 @@
---
# SPDX-license-identifier: Apache-2.0
##############################################################################
# Copyright (c) 2022
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Apache License, Version 2.0
# which accompanies this distribution, and is available at
# http://www.apache.org/licenses/LICENSE-2.0
##############################################################################

matrix:
- name: Markdown
sources:
- 'content/en/*.md'
default_encoding: utf-8
aspell:
lang: en
ignore-case: true
dictionary:
wordlists:
- wordlist.txt
encoding: utf-8
pipeline:
- pyspelling.filters.markdown:
- pyspelling.filters.html:
comments: false
ignores:
- code
- pre
- name: English content
sources:
- 'content/en/*.md'
default_encoding: utf-8
aspell:
lang: en
ignore-case: true
dictionary:
wordlists:
- content/en/wordlist.txt
encoding: utf-8
pipeline:
- pyspelling.filters.markdown:
- pyspelling.filters.html:
comments: false
ignores:
- code
- pre
- name: Spanish content
sources:
- 'content/es/*.md'
default_encoding: utf-8
aspell:
lang: es
ignore-case: true
dictionary:
wordlists:
- content/es/wordlist.txt
encoding: utf-8
pipeline:
- pyspelling.filters.markdown:
- pyspelling.filters.html:
comments: false
ignores:
- code
- pre
14 changes: 14 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
[tox]
minversion = 3.15
skipsdist = True
envlist = spell

[testenv]
passenv = http_proxy HTTP_PROXY https_proxy HTTPS_PROXY no_proxy NO_PROXY
commands =
find . -type f -name "*.pyc" -delete

[testenv:spell]
deps =
pyspelling
commands = pyspelling -c spellcheck.yml

0 comments on commit f36a8dd

Please sign in to comment.