Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Make and CI#96

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
raulcd merged 30 commits into3.8frommake-and-ci
May 6, 2020
Merged
Show file tree
Hide file tree
Changes fromall commits
Commits
Show all changes
30 commits
Select commitHold shift + click to select a range
3d1d3bb
add .pospell
gilgamezhMay 5, 2020
7ed9ea2
WIP fix spell errors
gilgamezhMay 5, 2020
feb6c86
Remove white-spaces
humitosMay 6, 2020
62a179f
Simplify `make` a lot
humitosMay 6, 2020
8a31e3f
Merge branch 'fix_ci' of github.com:raulcd/python-docs-es into 3.8
humitosMay 6, 2020
8aee4b8
Pin pip
humitosMay 6, 2020
52fa2cb
Change travis to use pospell directly instead from virtualenv.
raulcdMay 6, 2020
69f1b25
Utilizar temporalmente es_ES hasta que encontremos el paquete en ubun…
raulcdMay 6, 2020
9e44d1e
Fix powrap
raulcdMay 6, 2020
c35cd10
Update ubuntu version + python to try and install es_ES y es_AR
raulcdMay 6, 2020
d5b756b
tutorial/whatnow.po
raulcdMay 6, 2020
9c243d4
Fix tutorial/venv.po
raulcdMay 6, 2020
67e0b60
Fix tutorial/stdlib.po
raulcdMay 6, 2020
6f07d25
pospell over some files from tutorial
humitosMay 6, 2020
27b4fca
Merge branch 'make-and-ci' of github.com:raulcd/python-docs-es into m…
humitosMay 6, 2020
66cead2
Fix tutorial/stdlib2.po
raulcdMay 6, 2020
70f3199
Merge branch 'make-and-ci' of github.com:raulcd/python-docs-es into m…
raulcdMay 6, 2020
e7c2b7a
More pospell
humitosMay 6, 2020
85fa721
Merge branch 'make-and-ci' of github.com:raulcd/python-docs-es into m…
humitosMay 6, 2020
26f5ae6
Build RTD with Py3.8
humitosMay 6, 2020
b5059cc
More powrap fixes
raulcdMay 6, 2020
e3cc0d7
Merge branch 'make-and-ci' of github.com:raulcd/python-docs-es into m…
raulcdMay 6, 2020
1085237
Fix travis differences from dictionaire
raulcdMay 6, 2020
8ea55cd
Build only on `master` and PRs
humitosMay 6, 2020
e4eff5f
Proper regex for only branches
humitosMay 6, 2020
58bca5e
Fix regex
humitosMay 6, 2020
8985edc
pre-commit with dicts and sort
humitosMay 6, 2020
f84becf
Sort dict words
humitosMay 6, 2020
ed02839
Fix tutorial/classes.po
raulcdMay 6, 2020
c5f7f4e
Hopefully TravisCI will pass now!
humitosMay 6, 2020
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
3 changes: 3 additions & 0 deletions.gitignore
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
cpython/locale
*.mo
/_build/

Expand DownExpand Up@@ -48,3 +49,5 @@ coverage.xml
# Ides
.vscode/
.idea/

.pospell
2 changes: 2 additions & 0 deletions.overrides/CONTRIBUTING.rst
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
:orphan:

Guía para contribuir en la traducción
=====================================

Expand Down
2 changes: 2 additions & 0 deletions.overrides/translation-memory.rst
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
:orphan:

=======================
Memoria de traducción
=======================
Expand Down
2 changes: 2 additions & 0 deletions.overrides/upgrade-python-version.rst
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
:orphan:

=======================================
How to update to a new Python version
=======================================
Expand Down
8 changes: 7 additions & 1 deletion.pre-commit-config.yaml
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -9,4 +9,10 @@ repos:
rev: pre-commit
hooks:
- id: pospell
args: ['--personal-dict', 'dict', '--modified', '--language', 'es_ES']
args: ['--personal-dict', 'dict', '--modified', '--language', 'es_ES', '--language', 'es_AR']

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.5.0
hooks:
- id: file-contents-sorter
files: dict
5 changes: 4 additions & 1 deletion.readthedocs.yml
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -9,9 +9,12 @@ version: 2
sphinx:
configuration: conf.py

build:
image: latest

# Optionally set the version of Python and requirements required to build your docs
python:
version: 3.7
version: 3.8
install:
- requirements: requirements.txt

Expand Down
11 changes: 7 additions & 4 deletions.travis.yml
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,17 @@
language: python
dist:xenial
python: 3.7
dist:bionic
python: 3.8
before_install:
- sudo apt-get update
- sudo apt-get install -y hunspell hunspell-es
install:
-pip install pospell "powrap>=0.3.0"
-make setup
- pospell --version
- powrap --version
script:
- powrap --check --quiet **/*.po
- pospell -p dict -l es_ES **/*.po
- pospell -p dict -les_AR -les_ES **/*.po
- make build
branches:
only:
- /3\.\d/
163 changes: 25 additions & 138 deletionsMakefile
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -8,33 +8,29 @@
# Configuration

CPYTHON_PATH := cpython #Current commit for this upstream repo is setted by the submodule
BRANCH := 3.7
BRANCH := 3.8
LANGUAGE_TEAM := python-docs-es
LANGUAGE := es

# Internal variables
VENV := $(shell realpath ./venv)
PYTHON := $(shell which python3)
WORKDIRS := $(VENV)/workdirs
CPYTHON_WORKDIR := $(WORKDIRS)/cpython
LOCALE_DIR := $(WORKDIRS)/locale
JOBS := auto
SPHINXERRORHANDLING := "-W"
TRANSIFEX_PROJECT := python-newest
CPYTHON_WORKDIR := cpython
OUTPUT_DOCTREE := $(CPYTHON_WORKDIR)/Doc/_build/doctree
OUTPUT_HTML := $(CPYTHON_WORKDIR)/Doc/_build/html
LOCALE_DIR := $(CPYTHON_WORKDIR)/locale
TRANSIFEX_PROJECT := python-docs-es
POSPELL_TMP_DIR := .pospell


.PHONY: help
help:
@echo "Please use 'make <target>' where <target> is one of:"
@echo " build Build an local version in html, with warnings as errors"
@echo " push Update translations and Transifex config in the repository"
@echo " pull Download translations from Transifex; calls 'venv'"
@echo " tx-config Recreate an up-to-date project .tx/config; calls 'pot'"
@echo " pot Create/Update POT files from source files"
@echo " serve Serve a built documentation on http://localhost:8000"
@echo " spell Check spelling, storing output in $(POSPELL_TMP_DIR)"
@echo " progress To compute current progression on the tutorial"
@echo " spell Check spelling"
@echo " wrap Wrap all the PO files to a fixed column width"
@echo " progress To compute current progression on the tutorial"
@echo ""


Expand All@@ -44,86 +40,9 @@ help:
# treated as errors, which is good to skip simple Sphinx syntax mistakes.
.PHONY: build
build: setup
$(MAKE) -C $(CPYTHON_WORKDIR)/Doc/ \
VENVDIR=$(CPYTHON_WORKDIR)/Doc/venv \
PYTHON=$(PYTHON) \
SPHINXERRORHANDLING=$(SPHINXERRORHANDLING) \
SPHINXOPTS='-q --keep-going -j$(JOBS) \
-D locale_dirs=$(LOCALE_DIR) \
-D language=$(LANGUAGE) \
-D gettext_compact=0 \
-D latex_engine=xelatex \
-D latex_elements.inputenc= \
-D latex_elements.fontenc=' \
html;

@echo "Success! Open file://$(CPYTHON_WORKDIR)/Doc/build/html/index.html, " \
"or run 'make serve' to see them in http://localhost:8000";


# push: push new translation files and Transifex config files to repository,
# if any. Do nothing if there is no file changes. If GITHUB_TOKEN is set,
# then assumes we are in GitHub Actions, requiring different push args
.PHONY: push
push:
if ! git status -s | egrep '\.po|\.tx/config'; then \
echo "Nothing to commit"; \
exit 0; \
else \
git add *.po **/*.po .tx/config; \
git commit -m 'Update translations from Transifex'; \
if [ $(GITHUB_TOKEN) != "" ]; then \
header="$(echo -n token:"$(GITHUB_TOKEN)" | base64)"; \
git -c http.extraheader="AUTHORIZATION: basic $(header)" push; \
else \
git push; \
fi; \
fi


# pull: Download translations files from Transifex, and apply line wrapping.
# For downloading new translation files, first run "tx-config" target
# to update the translation file mapping.
.PHONY: pull
pull: venv
$(VENV)/bin/tx pull --force --language=$(LANGUAGE) --parallel
$(VENV)/bin/powrap --quiet *.po **/*.po


# tx-config: After running "pot", create a new Transifex config file by
# reading pot files generated, then tweak this config file to
# LANGUAGE.
.PHONY: tx-config
tx-config: pot
cd $(CPYTHON_WORKDIR)/Doc/locales; \
rm -rf .tx; \
$(VENV)/bin/sphinx-intl create-txconfig; \
$(VENV)/bin/sphinx-intl update-txconfig-resources \
--transifex-project-name=$(TRANSIFEX_PROJECT) \
--locale-dir . \
--pot-dir pot;

cd $(OLDPWD)
mv $(CPYTHON_WORKDIR)/Doc/locales/.tx/config .tx/config

sed -i .tx/config \
-e '/^source_file/d' \
-e 's|<lang>/LC_MESSAGES/||' \
-e "s|^file_filter|trans.$(LANGUAGE)|"


# pot: After running "setup" target, run a cpython Makefile's target
# to generate .pot files under $(CPYTHON_WORKDIR)/Doc/locales/pot
.PHONY: pot
pot: setup
$(MAKE) -C $(CPYTHON_WORKDIR)/Doc/ \
VENVDIR=$(CPYTHON_WORKDIR)/Doc/venv \
PYTHON=$(PYTHON) \
ALLSPHINXOPTS='-E -b gettext \
-D gettext_compact=0 \
-d build/.doctrees . \
locales/pot' \
build
sphinx-build -j auto -b html -d $(OUTPUT_DOCTREE) -D language=$(LANGUAGE) . $(OUTPUT_HTML)
@echo "Success! Open file://`pwd`/$(OUTPUT_HTML)/index.html, " \
"or run 'make serve' to see them in http://localhost:8000";


# setup: After running "venv" target, prepare that virtual environment with
Expand All@@ -132,39 +51,19 @@ pot: setup
# the translation files copy which could have new/updated files.
.PHONY: setup
setup: venv
# Setup the main clone
git submodule sync
git submodule update --init --force $(CPYTHON_PATH)
# Setup the current work directory
if ! [ -d $(CPYTHON_WORKDIR) ]; then \
rm -fr $(WORKDIRS); \
mkdir -p $(WORKDIRS); \
git clone $(CPYTHON_PATH) $(CPYTHON_WORKDIR); \
$(MAKE) -C $(CPYTHON_WORKDIR)/Doc \
VENVDIR=$(CPYTHON_WORKDIR)/Doc/venv \
PYTHON=$(PYTHON) venv; \
fi

# Setup translation files
if ! [ -d $(LOCALE_DIR)/$(LANGUAGE)/LC_MESSAGES/ ]; then \
mkdir -p $(LOCALE_DIR)/$(LANGUAGE)/LC_MESSAGES/; \
fi; \
cp --parents *.po **/*.po $(LOCALE_DIR)/$(LANGUAGE)/LC_MESSAGES/ \


# venv: create a virtual environment which will be used by almost every
# other target of this script
.PHONY: venv
venv:
if [ ! -d $(VENV) ]; then\
if [ ! -d $(VENV) ]; then \
$(PYTHON) -m venv --prompt $(LANGUAGE_TEAM) $(VENV); \
fi

$(VENV)/bin/python -m pip install -q -r requirements.txt 2> $(VENV)/pip-install.log

if grep -q 'pip install --upgrade pip' $(VENV)/pip-install.log; then \
$(VENV)/bin/pip install -q --upgrade pip; \
fi

$(VENV)/bin/python -m pip install -q -r requirements.txt


# serve: serve the documentation in a simple local web server, using cpython
Expand All@@ -174,28 +73,6 @@ serve:
$(MAKE) -C $(CPYTHON_WORKDIR)/Doc serve


# list files for spellchecking
SRCS := $(wildcard *.po **/*.po)
DESTS = $(addprefix $(POSPELL_TMP_DIR)/out/,$(patsubst %.po,%.txt,$(SRCS)))


# spell: run spell checking tool in all po files listed in SRCS variable,
# storing the output in text files DESTS for proofreading. The
# DESTS target run the spellchecking, while the typos.txt target
# gather all reported issues in one file, sorted without redundancy
.PHONY: spell
spell: venv $(DESTS) $(POSPELL_TMP_DIR)/typos.txt

$(POSPELL_TMP_DIR)/out/%.txt: %.po dict
@echo "Checking $< ..."
@mkdir -p $(@D)
@$(VENV)/bin/pospell -l $(LANGUAGE) -p dict $< > $@ || true

$(POSPELL_TMP_DIR)/typos.txt:
@echo "Gathering all typos in $(POSPELL_TMP_DIR)/typos.txt ..."
@cut -d: -f3- $(DESTS) | sort -u > $@


# clean: remove all .mo files and the venv directory that may exist and
# could have been created by the actions in other targets of this script
.PHONY: clean
Expand All@@ -207,3 +84,13 @@ clean:
.PHONY: progress
progress: venv
$(VENV)/bin/potodo --offline --path tutorial/


.PHONY: spell
spell: venv
$(VENV)/bin/pospell -p dict -l es_ES **/*.po


.PHONY: wrap
wrap: venv
$(VENV)/bin/powrap **/*.po
3 changes: 2 additions & 1 deletionc-api/abstract.po
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -12,7 +12,8 @@ msgstr ""
"POT-Creation-Date: 2019-05-06 11:59-0400\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: python-doc-es (https://mail.python.org/mailman3/lists/docs-es.python.org)\n"
"Language-Team: python-doc-es (https://mail.python.org/mailman3/lists/docs-es."
"python.org)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
Expand Down
3 changes: 2 additions & 1 deletionc-api/allocation.po
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -12,7 +12,8 @@ msgstr ""
"POT-Creation-Date: 2019-05-06 11:59-0400\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: python-doc-es (https://mail.python.org/mailman3/lists/docs-es.python.org)\n"
"Language-Team: python-doc-es (https://mail.python.org/mailman3/lists/docs-es."
"python.org)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
Expand Down
3 changes: 2 additions & 1 deletionc-api/apiabiversion.po
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -12,7 +12,8 @@ msgstr ""
"POT-Creation-Date: 2019-05-06 11:59-0400\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: python-doc-es (https://mail.python.org/mailman3/lists/docs-es.python.org)\n"
"Language-Team: python-doc-es (https://mail.python.org/mailman3/lists/docs-es."
"python.org)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
Expand Down
3 changes: 2 additions & 1 deletionc-api/bool.po
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -12,7 +12,8 @@ msgstr ""
"POT-Creation-Date: 2019-05-06 11:59-0400\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: python-doc-es (https://mail.python.org/mailman3/lists/docs-es.python.org)\n"
"Language-Team: python-doc-es (https://mail.python.org/mailman3/lists/docs-es."
"python.org)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
Expand Down
3 changes: 2 additions & 1 deletionc-api/descriptor.po
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -12,7 +12,8 @@ msgstr ""
"POT-Creation-Date: 2019-05-06 11:59-0400\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: python-doc-es (https://mail.python.org/mailman3/lists/docs-es.python.org)\n"
"Language-Team: python-doc-es (https://mail.python.org/mailman3/lists/docs-es."
"python.org)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
Expand Down
3 changes: 2 additions & 1 deletionc-api/index.po
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -12,7 +12,8 @@ msgstr ""
"POT-Creation-Date: 2019-05-06 11:59-0400\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: python-doc-es (https://mail.python.org/mailman3/lists/docs-es.python.org)\n"
"Language-Team: python-doc-es (https://mail.python.org/mailman3/lists/docs-es."
"python.org)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
Expand Down
3 changes: 2 additions & 1 deletionc-api/iterator.po
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -12,7 +12,8 @@ msgstr ""
"POT-Creation-Date: 2019-05-06 11:59-0400\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: python-doc-es (https://mail.python.org/mailman3/lists/docs-es.python.org)\n"
"Language-Team: python-doc-es (https://mail.python.org/mailman3/lists/docs-es."
"python.org)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
Expand Down
3 changes: 2 additions & 1 deletionc-api/none.po
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -12,7 +12,8 @@ msgstr ""
"POT-Creation-Date: 2019-05-06 11:59-0400\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: python-doc-es (https://mail.python.org/mailman3/lists/docs-es.python.org)\n"
"Language-Team: python-doc-es (https://mail.python.org/mailman3/lists/docs-es."
"python.org)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
Expand Down
3 changes: 2 additions & 1 deletionc-api/objbuffer.po
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -12,7 +12,8 @@ msgstr ""
"POT-Creation-Date: 2019-05-06 11:59-0400\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: python-doc-es (https://mail.python.org/mailman3/lists/docs-es.python.org)\n"
"Language-Team: python-doc-es (https://mail.python.org/mailman3/lists/docs-es."
"python.org)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
Expand Down
3 changes: 2 additions & 1 deletionc-api/objimpl.po
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -12,7 +12,8 @@ msgstr ""
"POT-Creation-Date: 2019-05-06 11:59-0400\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: python-doc-es (https://mail.python.org/mailman3/lists/docs-es.python.org)\n"
"Language-Team: python-doc-es (https://mail.python.org/mailman3/lists/docs-es."
"python.org)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
Expand Down
Loading

[8]ページ先頭

©2009-2025 Movatter.jp