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

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

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.
@Kwpolska
Copy link
Member

Please do not squash commits!

@hardening
Copy link
Contributor Author

@Kwpolska sorry I was to remove the unused ext var

@Kwpolska
Copy link
Member

I would have fixed that, too.

@Kwpolska Kwpolska merged commit 74bde22 into getnikola:master May 21, 2015
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')
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants