INNER CODE UNIT · Python
en_desc
timschneeb/awesome-shizuku · scripts/sync_translations.py:166
en_desc = remainder[:-len(tags_post)].strip() if tags_post else remainder.strip()
# Translate "Source code" label
tags_post = re.sub(r'\(Source code\)', f'({source_code_label})', tags_post, flags=re.IGNORECASE)
# Retrieve translation
trans = translations_by_url.get(current_source_parent_url) or \
translations_by_name.get(name.strip().lower()) or en_desc
# Reassemble with Pre-Tags intact!
output_lines.append(f"{bullet}[{name}]({url}){tags_pre} - {trans}{tags_post}")
elif (line.startswith(' ') or line.startswith('\t')) and current_source_parent_url:
# Handle non-standard subpoints (like plain text notes)
idx = subpoint_counters[current_source_parent_url]
existing_subs = subpoint_translations.get(current_source_parent_url, [])
if idx < len(existing_subs):