Skip to content

Commit

Permalink
Merge pull request #3179 from mlep/patch-56
Browse files Browse the repository at this point in the history
syncLang.py: link in markdown output
  • Loading branch information
koppor authored Sep 1, 2017
2 parents 54e0994 + 6a3aefa commit 9ffcb69
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions scripts/syncLang.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

RES_DIR = "src/main/resources/l10n"
STATUS_FILE = "status.md"
URL_BASE = "https://github.com/JabRef/jabref/tree/master/"


def get_current_branch():
Expand Down Expand Up @@ -413,8 +414,8 @@ def write_properties(property_files):
num_keys_translated = num_keys - num_keys_missing_value
percent_translated = int((num_keys_translated / float(num_keys)) * 100) if num_keys != 0 else 0

markdown.append("| {file} | {num_keys} | {num_keys_translated} | {num_keys_missing} | {percent_translated} |\n"
.format(file=get_filename(filepath=file), num_keys=num_keys, num_keys_translated=num_keys_translated, num_keys_missing=num_keys_missing_value, percent_translated=percent_translated))
markdown.append("| [{file}]({url_base}{file}) | {num_keys} | {num_keys_translated} | {num_keys_missing} | {percent_translated} |\n"
.format(url_base=URL_BASE, file=os.path.basename(file), num_keys=num_keys, num_keys_translated=num_keys_translated, num_keys_missing=num_keys_missing_value, percent_translated=percent_translated))

markdown = []
date = datetime.datetime.now().strftime("%Y-%m-%d %H:%M")
Expand Down

0 comments on commit 9ffcb69

Please sign in to comment.