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

Don't use Post.source_path directly to determine translated post's source file name. #2669

merged 1 commit into from Feb 16, 2017


Copy link

@felixfontein felixfontein commented Feb 16, 2017

Allowing Post.translated_source_path() to return None.

Helping with one aspect of #2659.

…urce file name. Allowing Post.translated_source_path() to return None.
source_lang = utils.get_translation_candidate(, source, lang)
if os.path.exists(source_lang):
source = source_lang
if os.path.isfile(source):
Copy link

@Kwpolska Kwpolska Feb 16, 2017

Why was all this code removed? Was it all redundant?

Copy link
Contributor Author

@felixfontein felixfontein Feb 16, 2017

This code essentially does what post.translated_source_path(lang) is supposed to be doing. Even worse, it uses a slightly different logic, which could cause incorrect source files to be copied.

@felixfontein felixfontein merged commit 788a82a into master Feb 16, 2017
3 of 5 checks passed
@Kwpolska Kwpolska deleted the use-translated-source-path-function branch May 20, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants