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: def get_path(self) -> str:
return ( return slugify(self.get_section()) + "/" + slugify(f"{self.title}") + "/"
slugify(self.get_section()) + "/" + slugify(f"{self.id}-{self.title}") + "/"
)
def get_filename(self) -> str: def get_filename(self) -> str:
return "index.fr.md" return "index." + self.lang + ".md"
def get_authors(self) -> tuple: def get_authors(self) -> tuple:
return ( return (

View File

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