File tree Expand file tree Collapse file tree 3 files changed +13
-5
lines changed
Expand file tree Collapse file tree 3 files changed +13
-5
lines changed Original file line number Diff line number Diff line change @@ -38,10 +38,14 @@ def theme_trek_name_full(lang: Lang) -> str:
3838 return "鳌太线"
3939
4040
41- def share_title (lang : Lang ) -> str :
42- """Share image main title."""
41+ def share_title (theme : str | None , lang : Lang ) -> str :
42+ """Share image main title; depends on current map (theme), not just language."""
43+ if theme == "kili" :
44+ if lang == "en" :
45+ return "Kilimanjaro Trek Record"
46+ return "乞力马扎罗徒步记录"
4347 if lang == "en" :
44- return "Kilimanjaro Trek Record"
48+ return "AoTai Hike Record"
4549 return "鳌太线徒步记录"
4650
4751
Original file line number Diff line number Diff line change @@ -315,7 +315,7 @@ def generate(
315315 theme = _theme (world_state )
316316 graph = get_graph (theme )
317317 title_font = self ._get_font (50 )
318- title_text = share_title (lang )
318+ title_text = share_title (theme , lang )
319319 draw .text (
320320 (self .WIDTH // 2 , y_offset ),
321321 title_text ,
@@ -559,7 +559,7 @@ def generate(
559559 )
560560 json_data = {
561561 "summary" : {
562- "title" : share_title (lang ),
562+ "title" : share_title (theme , lang ),
563563 "status" : "finished"
564564 if outcome .is_finished and outcome .is_success
565565 else ("failed" if outcome .is_finished else "running" ),
Original file line number Diff line number Diff line change @@ -84,6 +84,9 @@ function refreshStaticUI() {
8484 setupMapKili . textContent = t ( "setupMapKilimanjaro" ) ;
8585 setupMapKili . classList . toggle ( "primary" , currentTheme === "kili" ) ;
8686 }
87+ if ( typeof window . __aoTaiRefreshSetupList === "function" ) {
88+ window . __aoTaiRefreshSetupList ( ) ;
89+ }
8790}
8891
8992export async function refreshAllUIText ( ) {
@@ -166,6 +169,7 @@ export async function bootstrap() {
166169 setupListEl . appendChild ( item ) ;
167170 } ) ;
168171 } ;
172+ window . __aoTaiRefreshSetupList = renderPending ;
169173
170174 const hideAndRemoveSetup = ( ) => {
171175 if ( ! setupEl ) return ;
You can’t perform that action at this time.
0 commit comments