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

Fix plugins for multi languages #82

Merged
merged 1 commit into from May 21, 2015
Merged

Conversation

@hardening
Copy link
Contributor

@hardening hardening commented May 21, 2015

The plugin was not migrating the metadata for non default languages, this patch fixes that.

Note: this plugin is not idenpotent if you have a post with default language in new metadata style, and a translation in the old style.

@Kwpolska
Copy link
Member

@Kwpolska Kwpolska commented May 21, 2015

We could just check if the metadata fields match the new syntax. Adding that and merging.

The plugin was not migrating the metadata for non default languages, this patch
fixes that.
@hardening hardening force-pushed the hardening:metadata_fix branch from 526c340 to 74bde22 May 21, 2015
@Kwpolska
Copy link
Member

@Kwpolska Kwpolska commented May 21, 2015

Please do not squash commits!

@hardening
Copy link
Contributor Author

@hardening hardening commented May 21, 2015

@Kwpolska sorry I was to remove the unused ext var

@Kwpolska
Copy link
Member

@Kwpolska Kwpolska commented May 21, 2015

I would have fixed that, too.

@Kwpolska Kwpolska merged commit 74bde22 into getnikola:master May 21, 2015
1 check failed
1 check failed
continuous-integration/travis-ci/pr The Travis CI build failed
Details
Kwpolska added a commit that referenced this pull request May 21, 2015
if lang == post.default_lang or len(post.translated_to) == 1:
fname = post.metadata_path
else:
fname = self.site.config['TRANSLATIONS_PATTERN'].format(path=post.post_name, lang=lang, ext='meta')

This comment has been minimized.

@Kwpolska

Kwpolska May 21, 2015
Member

It’s better to use os.path.splitext(post.translated_source_path(lang)) — this is more-or-less what post.py does to find the meta files. Fixed on master.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants