Parse translated and nontranslated strings
This updates translate-tag.rb to parse all strings. This means that
we can add items such as {{ site.name }} into the source strings
and the plugin will do the rest. We no longer need hacky a
hacky workaround.
			
			
This commit is contained in:
		| @@ -33,11 +33,12 @@ module Jekyll | ||||
|       if page_language.nil? | ||||
|         Weblate::SourceFile.add_entry(weblate_id, text) | ||||
|  | ||||
|         text | ||||
|         Liquid::Template.parse(text).render(context) | ||||
|       else | ||||
|         translated_string = site.data["languages"][page_language][weblate_id] | ||||
|  | ||||
|         translated_string.nil? ? text : translated_string.strip | ||||
|         translated_string.nil? ? Liquid::Template.parse(text).render(context)  | ||||
|                                : Liquid::Template.parse(translated_string.strip).render(context) | ||||
|       end | ||||
|     end | ||||
|   end | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 djoate
					djoate