Move summary so it can be translated

This commit is contained in:
str4d
2015-06-07 22:30:12 +00:00
parent be2054af4e
commit 4a60b81e8a
2 changed files with 7 additions and 3 deletions

View File

@ -1,9 +1,11 @@
<article <article
id="urn:uuid:1225c695-cfb8-4ebb-aaaa-7805333efa6a" id="urn:uuid:1225c695-cfb8-4ebb-aaaa-7805333efa6a"
title="0.9.20 Released" title="0.9.20 Released"
summary="0.9.20 released with performance improvements and bug fixes."
href="http://i2p-projekt.i2p/en/blog/post/2015/06/02/0.9.20-Release" href="http://i2p-projekt.i2p/en/blog/post/2015/06/02/0.9.20-Release"
author="zzz"> author="zzz">
<details>
<summary>0.9.20 released with performance improvements and bug fixes.</summary>
</details>
<p> <p>
0.9.20 contains many important bug fixes, and several changes to increase floodfill capacity in the network. 0.9.20 contains many important bug fixes, and several changes to increase floodfill capacity in the network.
</p><p> </p><p>

View File

@ -18,7 +18,7 @@ def load_entries(fg):
entries = entries_data.split('</article>') entries = entries_data.split('</article>')
# split() creates an empty final element # split() creates an empty final element
for entry_str in entries[:-1]: for entry_str in entries[:-1]:
entry_parts = entry_str.split('>', 1) entry_parts = entry_str.split('</details>', 1)
metadata = extract_entry_metadata(entry_parts[0]) metadata = extract_entry_metadata(entry_parts[0])
fe = fg.add_entry() fe = fg.add_entry()
@ -30,7 +30,9 @@ def load_entries(fg):
fe.content(entry_parts[1], type='xhtml') fe.content(entry_parts[1], type='xhtml')
def extract_entry_metadata(s): def extract_entry_metadata(s):
return {k:v.strip('"') for k,v in re.findall(r'(\S+)=(".*?"|\S+)', s)} m = {k:v.strip('"') for k,v in re.findall(r'(\S+)=(".*?"|\S+)', s)}
m['summary'] = re.findall(r'<summary>(.*)</summary>', s)[0]
return m
def load_releases(fg): def load_releases(fg):
fg.load_extension('i2p') fg.load_extension('i2p')