multiple files for multiple languages

This commit is contained in:
Guilhem Fauré 2023-05-16 16:48:36 +02:00
parent 380f69da96
commit f5c0f8cf51
2 changed files with 3 additions and 7 deletions

View File

@ -49,12 +49,10 @@ class Article:
)
def get_path(self) -> str:
return (
slugify(self.get_section()) + "/" + slugify(f"{self.id}-{self.title}") + "/"
)
return slugify(self.get_section()) + "/" + slugify(f"{self.title}") + "/"
def get_filename(self) -> str:
return "index.fr.md"
return "index." + self.lang + ".md"
def get_authors(self) -> tuple:
return (

View File

@ -60,9 +60,7 @@ for article in unknown_chars_articles:
nb: int = len(unknown_chars_apparitions)
s: str = "s" if nb > 1 else ""
print(
f"\n{BOLD}{nb}{RESET} unknown character{s} "
+ f"detected in article {BOLD}{article.id}{RESET}"
+ f"\n{BOLD}Title:{RESET} "
f"\n{BOLD}{nb}{RESET} unknown character{s} in {BOLD}{article.lang}{RESET} "
+ highlight_unknown_chars(article.title)
)
for text in unknown_chars_apparitions: