@@ -192,7 +192,7 @@ def __gt__(self, other):
192192 return self .as_tuple () > other .as_tuple ()
193193
194194
195- @dataclass (frozen = True , order = True )
195+ @dataclass (order = True , frozen = True , kw_only = True )
196196class Language :
197197 iso639_tag : str
198198 name : str
@@ -710,6 +710,7 @@ def build(self):
710710 f"-D locale_dirs={ locale_dirs } " ,
711711 f"-D language={ self .language .iso639_tag } " ,
712712 "-D gettext_compact=0" ,
713+ "-D translation_progress_classes=1" ,
713714 )
714715 )
715716 if self .language .tag == "ja" :
@@ -1141,19 +1142,20 @@ def parse_versions_from_devguide(http: urllib3.PoolManager) -> list[Version]:
11411142def parse_languages_from_config () -> list [Language ]:
11421143 """Read config.toml to discover languages to build."""
11431144 config = tomlkit .parse ((HERE / "config.toml" ).read_text (encoding = "UTF-8" ))
1144- languages = []
11451145 defaults = config ["defaults" ]
1146- for iso639_tag , section in config ["languages" ].items ():
1147- languages .append (
1148- Language (
1149- iso639_tag ,
1150- section ["name" ],
1151- section .get ("in_prod" , defaults ["in_prod" ]),
1152- sphinxopts = section .get ("sphinxopts" , defaults ["sphinxopts" ]),
1153- html_only = section .get ("html_only" , defaults ["html_only" ]),
1154- )
1146+ default_in_prod = defaults .get ("in_prod" , True )
1147+ default_sphinxopts = defaults .get ("sphinxopts" , [])
1148+ default_html_only = defaults .get ("html_only" , False )
1149+ return [
1150+ Language (
1151+ iso639_tag = iso639_tag ,
1152+ name = section ["name" ],
1153+ in_prod = section .get ("in_prod" , default_in_prod ),
1154+ sphinxopts = section .get ("sphinxopts" , default_sphinxopts ),
1155+ html_only = section .get ("html_only" , default_html_only ),
11551156 )
1156- return languages
1157+ for iso639_tag , section in config ["languages" ].items ()
1158+ ]
11571159
11581160
11591161def format_seconds (seconds : float ) -> str :
0 commit comments