(language: str)
| 355 | |
| 356 | @app.command() |
| 357 | def list_outdated(language: str) -> list[Path]: |
| 358 | dir_path = Path(__file__).absolute().parent.parent |
| 359 | repo = git.Repo(dir_path) |
| 360 | |
| 361 | outdated_paths: list[Path] = [] |
| 362 | en_lang_paths = list(iter_en_paths_to_translate()) |
| 363 | for path in en_lang_paths: |
| 364 | lang_path = generate_lang_path(lang=language, path=path) |
| 365 | if not lang_path.exists(): |
| 366 | continue |
| 367 | en_commit_datetime = list(repo.iter_commits(paths=path, max_count=1))[ |
| 368 | 0 |
| 369 | ].committed_datetime |
| 370 | lang_commit_datetime = list(repo.iter_commits(paths=lang_path, max_count=1))[ |
| 371 | 0 |
| 372 | ].committed_datetime |
| 373 | if lang_commit_datetime < en_commit_datetime: |
| 374 | outdated_paths.append(path) |
| 375 | print(outdated_paths) |
| 376 | return outdated_paths |
| 377 | |
| 378 | |
| 379 | @app.command() |
no test coverage detected