From b0b24795b24ee6809397fbbadf42f31f310a219f Mon Sep 17 00:00:00 2001 From: Agustin Henze Date: Wed, 8 Jul 2015 07:35:02 -0300 Subject: Imported Upstream version 7.6.0 --- nikola/plugins/task/sources.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'nikola/plugins/task/sources.py') diff --git a/nikola/plugins/task/sources.py b/nikola/plugins/task/sources.py index 4c669c2..840a31c 100644 --- a/nikola/plugins/task/sources.py +++ b/nikola/plugins/task/sources.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- -# Copyright © 2012-2014 Roberto Alsina and others. +# Copyright © 2012-2015 Roberto Alsina and others. # Permission is hereby granted, free of charge, to any # person obtaining a copy of this software and associated @@ -49,6 +49,7 @@ class Sources(Task): "translations": self.site.config["TRANSLATIONS"], "output_folder": self.site.config["OUTPUT_FOLDER"], "default_lang": self.site.config["DEFAULT_LANG"], + "show_untranslated_posts": self.site.config['SHOW_UNTRANSLATED_POSTS'], } self.site.scan_posts() @@ -56,6 +57,8 @@ class Sources(Task): if self.site.config['COPY_SOURCES']: for lang in kw["translations"]: for post in self.site.timeline: + if not kw["show_untranslated_posts"] and lang not in post.translated_to: + continue if post.meta('password'): continue output_name = os.path.join( @@ -77,5 +80,5 @@ class Sources(Task): 'targets': [output_name], 'actions': [(utils.copy_file, (source, output_name))], 'clean': True, - 'uptodate': [utils.config_changed(kw)], + 'uptodate': [utils.config_changed(kw, 'nikola.plugins.task.sources')], } -- cgit v1.2.3