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

[org_python_reader] TRANSLATION property is not respected #1382

Open
szebenyib opened this issue Jan 27, 2023 · 0 comments
Open

[org_python_reader] TRANSLATION property is not respected #1382

szebenyib opened this issue Jan 27, 2023 · 0 comments

Comments

@szebenyib
Copy link

If one creates a translated post (no i18n_subsites or other spec plugins) then it should respect the TRANSLATION property and not create two separate posts.

Stepst to reproduce:
Have this in your pelicanconf.py:

PLUGINS = ['org_python_reader']
ORGMODE = {
    'code_highlight': True
}

Have these two posts, test_en.org:

#+TITLE: TitleEn
#+DATE: 2023-01-27
#+CATEGORY: CategoryEn
#+AUTHOR: AuthorEn
#+PROPERTY: LANGUAGE en
#+PROPERTY: SUMMARY English summary
#+PROPERTY: SLUG slug1
#+PROPERTY: MODIFIED [2023-01-27 p]
#+PROPERTY: TAGS tag1en, tag2en
#+PROPERTY: KEYWORDS kw1en, kw2en

English content
#+TITLE: TitleHu
#+DATE: 2023-01-27
#+CATEGORY: CategoryHu
#+AUTHOR: AuthorHu
#+PROPERTY: LANGUAGE hu
#+PROPERTY: SUMMARY Hungarian summary
#+PROPERTY: SLUG slug1
#+PROPERTY: MODIFIED [2023-01-27 p]
#+PROPERTY: TAGS tag1hu, tag2hu
#+PROPERTY: KEYWORDS kw1hu, kw2hu
#+PROPERTY: TRANSLATION true

HU content

Observe that the generation does create two separate posts.

Now if one were to use in pelicanconf.py this instead of the above (so another solution to convert org into posts):

PLUGINS = ['org_reader']
ORG_READER_EMACS_LOCATION = '/usr/bin/emacs'

Then the two org files produce a translated post nicely.

@szebenyib szebenyib changed the title TRANSLATION property is not respected [org_python_reader] TRANSLATION property is not respected Jan 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant