Hello i18n.

This commit is contained in:
Julien Palard 2023-01-24 14:13:26 +01:00
parent cad60f2f32
commit caf3ee3017
5 changed files with 85 additions and 32 deletions

3
.gitignore vendored
View File

@ -2,3 +2,6 @@
.venv/
output/
__pycache__/
Flex/
pelican-plugins/
.envrc

View File

@ -45,13 +45,16 @@ help:
Flex/.git/config:
git clone --depth 1 https://github.com/alexandrevicenzi/Flex
html: Flex/.git/config
pelican-plugins/.git/config:
git clone --depth 1 https://github.com/getpelican/pelican-plugins
html: Flex/.git/config pelican-plugins/.git/config
$(PELICAN) $(INPUTDIR) -o $(OUTPUTDIR) -s $(CONFFILE) $(PELICANOPTS)
clean:
[ ! -d $(OUTPUTDIR) ] || rm -rf $(OUTPUTDIR)
regenerate: Flex/.git/config
regenerate: Flex/.git/config pelican-plugins/.git/config
$(PELICAN) -r $(INPUTDIR) -o $(OUTPUTDIR) -s $(CONFFILE) $(PELICANOPTS)
serve:
@ -76,12 +79,9 @@ else
$(PELICAN) -lr $(INPUTDIR) -o $(OUTPUTDIR) -s $(CONFFILE) $(PELICANOPTS)
endif
publish: Flex/.git/config
publish: Flex/.git/config pelican-plugins/.git/config
$(PELICAN) $(INPUTDIR) -o $(OUTPUTDIR) -s $(PUBLISHCONF) $(PELICANOPTS)
ssh_upload: publish
scp -P $(SSH_PORT) -r $(OUTPUTDIR)/* $(SSH_USER)@$(SSH_HOST):$(SSH_TARGET_DIR)
rsync_upload: publish
rsync -e "ssh -p $(SSH_PORT)" -P -rvzc --cvs-exclude $(OUTPUTDIR)/ $(SSH_USER)@$(SSH_HOST):$(SSH_TARGET_DIR)

23
content/pages/index.en.md Normal file
View File

@ -0,0 +1,23 @@
Title: Julien Palard
Date: 2016-05-28
description: Julien Palard - mdk.fr
status: hidden
lang: en
URL:
save_as: index.html
CPython core developer, PSF fellow, independent Python trainer.
My projects:
- I build an interactive Python learning tool: [hackinscience.org](https://hackinscience.org/), it's free and [open-source](https://framagit.org/hackinscience/).
- I help translating the [Python documentation in French](https://docs.python.org/fr/) (come and help [here](https://github.com/python/python-docs-fr)).
- Other projects on [AFPy's gitea](https://git.afpy.org/mdk) and [my github](https://github.com/JulienPalard).
If you want to get in touch:
- By email: <a href=mailto:julien@palard.fr>julien@palard.fr</a>.
- On [Mastodon](https://joinmastodon.org): [@mdk@mamot.fr](https://mamot.fr/@mdk)
- On [IRC](https://web.libera.chat/#python-fr): `mdk`.
- Using [XMPP](https://xmpp.chapril.org/i/mdk@chapril.org): <a href=xmpp:mdk@chapril.org>mdk@chapril.org</a>.
- Here is My [GPG key](/Julien-Palard.pdf) and my [SSH keys](/id_rsa.pub).

View File

@ -2,20 +2,22 @@ Title: Julien Palard
Date: 2016-05-28
description: Julien Palard - mdk.fr
status: hidden
lang: fr
URL:
save_as: index.html
CPython core developer, PSF fellow, independent Python trainer.
Formateur Python indépendant, CPython core developer, PSF fellow.
My projects:
Mes projets:
- I build an interactive Python learning tool: [hackinscience.org](https://hackinscience.org/), it's free and [open-source](https://framagit.org/hackinscience/hkis-website).
- I help translating the [Python documentation in French](https://docs.python.org/fr/) (come and help [here](https://github.com/python/python-docs-fr)).
- Other projects on [AFPy's gitea](https://git.afpy.org/mdk) and [my github](https://github.com/JulienPalard).
- Je travaille sur un site dapprentissage de la programmation interactif : [hackinscience.org](https://hackinscience.org/).
- J'aide à la traduction de la [documentation de Python en Français](https://docs.python.org/fr/) (pour participer c'est [ici](https://git.afpy.org/AFPy/python-docs-fr)).
- Mes autres projets sont sur la [forge de l'AFPy](https://git.afpy.org/mdk) et sur [mon github](https://github.com/JulienPalard).
If you want to get in touch:
Pour me contacter :
- I'm [@mdk@mamot.fr](https://mamot.fr/@mdk) on [Mastodon](https://joinmastodon.org).
- I'm `mdk` on [IRC](https://web.libera.chat/#python-fr)
- I'm <a href=xmpp:mdk@chapril.org>mdk@chapril.org</a> on [XMPP](https://xmpp.chapril.org/i/mdk@chapril.org).
- I'm <a href=mailto:julien@palard.fr>julien@palard.fr</a> by email.
- Par email : <a href=mailto:julien@palard.fr>julien@palard.fr</a>.
- Sur [Mastodon](https://joinmastodon.org) : [@mdk@mamot.fr](https://mamot.fr/@mdk).
- Sur [irc://libera.chat](https://web.libera.chat/#python-fr) : `mdk`.
- Sur [XMPP](https://xmpp.chapril.org/i/mdk@chapril.org) <a href=xmpp:mdk@chapril.org>mdk@chapril.org</a>.
- Voilà ma [clé GPG](/Julien-Palard.pdf) et ma [clé SSH](/id_rsa.pub).

View File

@ -1,5 +1,6 @@
from datetime import date
AUTHOR = "Julien Palard"
SITENAME = "mdk.fr"
SITETITLE = "Julien Palard"
@ -15,17 +16,48 @@ DISABLE_URL_HASH = True
FAVICON = "/images/favicon.png"
DISPLAY_PAGES_ON_MENU = False
MAIN_MENU = False
MAIN_MENU = True
LINKS = (
MENUITEMS = (
("Formations", "/pages/formations.html"),
("Conférences", "/pages/talks.html"),
("CV", "/Julien-Palard.pdf"),
("Blog", "/blog/"),
("SSH keys", "/id_rsa.pub"),
("GPG key", "/pages/gpg.html"),
("Articles", "/blog/"),
)
LINKS = (
)
# Social widget
SOCIAL = (
("mastodon", "https://mamot.fr/@mdk"),
("github", "https://github.com/julienpalard"),
("stack-overflow", "https://stackoverflow.com/users/232831/julien-palard"),
("rss", "/feeds/all.atom.xml"),
)
# Path to Plugins
PLUGIN_PATHS = ['pelican-plugins']
# Enable i18n plugin, probably you already have some others here.
PLUGINS = ['i18n_subsites']
# Enable Jinja2 i18n extension used to parse translations.
JINJA_ENVIRONMENT = {'extensions': ['jinja2.ext.i18n']}
I18N_TEMPLATES_LANG = "en"
# Match languages for other configs.
OG_LOCALE = "fr_FR"
LOCALE = ("fr_FR", "fr_FR.utf8")
# Your language.
DEFAULT_LANG = "fr_FR"
I18N_SUBSITES = {
'en': {
'SITENAME': 'English Julien Palard',
'LOCALE': 'en_US',
'THEME_STATIC_DIR': '../theme'
}
}
PATH = "content"
TIMEZONE = "Europe/Paris"
@ -39,27 +71,20 @@ TRANSLATION_FEED_ATOM = None
AUTHOR_FEED_ATOM = None
AUTHOR_FEED_RSS = None
THEME_COLOR = "dark"
THEME_COLOR = "light"
THEME_COLOR_AUTO_DETECT_BROWSER_PREFERENCE = True
THEME_COLOR_ENABLE_USER_OVERRIDE = True
THEME_COLOR_ENABLE_USER_OVERRIDE = False
PYGMENTS_STYLE = "emacs"
PYGMENTS_STYLE_DARK = "monokai"
# Social widget
SOCIAL = (
("mastodon", "https://mamot.fr/@mdk"),
("github", "https://github.com/julienpalard"),
("stack-overflow", "https://stackoverflow.com/users/232831/julien-palard"),
("rss", "/feeds/all.atom.xml"),
)
USE_GOOGLE_FONTS = False
DEFAULT_PAGINATION = 10
THEME = "Flex"
THEME_STATIC_DIR = "theme"
ARTICLE_URL = "{category}/{slug}.html"
STATIC_PATHS = ["images"]
ARTICLE_SAVE_AS = "{category}/{slug}.html"
CATEGORY_URL = "{slug}/"
CATEGORY_SAVE_AS = "{slug}/index.html"