Comments (21)
Hi, here's the right config.
# Default theme language.
# You can't change this one.
I18N_TEMPLATES_LANG = 'en'
# Your language.
DEFAULT_LANG = 'de'
OG_LOCALE = 'de_DE'
LOCALE = 'de_DE'
from flex.
Thx @alexandrevicenzi.
I did already try that but it's not working better...
Any idea?
This this the actual conf:
I18N_TEMPLATES_LANG = 'en'
DEFAULT_LANG = 'fr'
LOCALE = 'fr_FR'
OG_LOCALE = 'fr_FR'
JINJA_ENVIRONMENT = {'extensions': ['jinja2.ext.i18n']}
PLUGIN_PATHS = ['pelican-plugins']
PLUGINS = ['i18n_subsites']
from flex.
Try with German, Spanish or any other.
If none works is some Pelican misconfig. If not, it's a problem with the french translation.
from flex.
So it seems to be a Pelican misconfig :(
from flex.
In #73 I reported a similar problem. Using pelican 3.6.3 it works.
from flex.
@ncharlot what version are you using?
from flex.
$ pip freeze
...
pelican==3.7.0
...
from flex.
Try 3.6.3
from flex.
Downgrade to 3.6.3 causes this error:
AttributeError: 'Environment' object has no attribute 'install_gettext_translations'
from flex.
Replace
JINJA_ENVIRONMENT = {'extensions': ['jinja2.ext.i18n']}
with
JINJA_EXTENSIONS = ['jinja2.ext.i18n']
from flex.
It's ok!
So it was a regression.
from flex.
Actually it's a Flex bug, due the version 3.7.
from flex.
Due the change in Pelican 3.7:
Old way
JINJA_EXTENSIONS = ['jinja2.ext.i18n']
New way
JINJA_ENVIRONMENT = {'extensions': ['jinja2.ext.i18n']}
This code breaks.
The solution is change the way we validade if i18n is enabled.
from flex.
Ok I can look at the fix.
from flex.
@ncharlot remember, It must work with 3.6 and 3.7, so we just need to add an OR
statement.
from flex.
Ok.
from flex.
PR: #75
from flex.
Fixed by #75
from flex.
Trying master
with Pelican 3.7.1 and Jinja2 up to date, gives a CRITICAL: UndefinedError: 'gettext' is undefined
error, when trying to use this snippet in combination with JINJA_ENVIRONMENT = {'extensions': ['jinja2.ext.i18n']}
.
from flex.
@Phyks what OS?
from flex.
I am using Linux.
from flex.
Related Issues (20)
- Google fonts are added, even if set to false HOT 3
- Add support for stork search via search plugin HOT 4
- Style for toc markdown extension
- Fix styles for figure elements HOT 1
- Mastodon social button not working HOT 4
- Migrating to this great theme HOT 3
- Stork search URL is not going to correct place HOT 12
- Add main content class to make search easy and batter HOT 1
- Fix stork location when use self-hosted
- Recommend directly cloning this repo? HOT 3
- Canonical link for index page HOT 1
- Tags in pages title HOT 3
- Link to google developers reference in wiki is dead HOT 1
- Add support for Plausible analytics
- Publish as a Python package on PyPI HOT 6
- Add bidi support HOT 8
- Latex not render in article preview block HOT 2
- Version 3 - Release HOT 5
- JQuery security bugs
- Enhance documentation HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from flex.