@@ -199,11 +199,21 @@ class Language:
199199 in_prod : bool
200200 sphinxopts : tuple
201201 html_only : bool = False
202+ repo_name : str = None
202203
203204 @property
204205 def tag (self ):
205206 return self .iso639_tag .replace ("_" , "-" ).lower ()
206207
208+ @property
209+ def repo_url (self ):
210+ repo_name = (
211+ self .repo_name
212+ if self .repo_name is not None
213+ else f"python-docs-{ self .iso639_tag } "
214+ )
215+ return f"https://github.com/python/{ repo_name } .git"
216+
207217 @staticmethod
208218 def filter (languages , language_tags = None ):
209219 """Filter a sequence of languages according to --languages."""
@@ -674,15 +684,14 @@ def clone_translation(self):
674684 def translation_repo (self ):
675685 """See PEP 545 for translations repository naming convention."""
676686
677- locale_repo = f"https://github.com/python/python-docs-{ self .language .tag } .git"
678687 locale_clone_dir = (
679688 self .build_root
680689 / self .version .name
681690 / "locale"
682691 / self .language .iso639_tag
683692 / "LC_MESSAGES"
684693 )
685- return Repository (locale_repo , locale_clone_dir )
694+ return Repository (self . language . repo_url , locale_clone_dir )
686695
687696 @property
688697 def translation_branch (self ):
@@ -1161,6 +1170,7 @@ def parse_languages_from_config() -> list[Language]:
11611170 in_prod = section .get ("in_prod" , default_in_prod ),
11621171 sphinxopts = section .get ("sphinxopts" , default_sphinxopts ),
11631172 html_only = section .get ("html_only" , default_html_only ),
1173+ repo_name = section .get ("repo_name" ),
11641174 )
11651175 for iso639_tag , section in config ["languages" ].items ()
11661176 ]
0 commit comments