@@ -410,7 +410,7 @@ def new_groupbox(xlabel, xlayout, xrutinacheck=None, checkable=False):
410410 # ##################################################################################################################################
411411 self .cbAjustarRival = (
412412 Controles .CB (self , self .personalidades .list_personalities (True ), ADJUST_BETTER )
413- .capture_changes (self .ajustesCambiado )
413+ .capture_changes (self .changed_strength )
414414 .set_font (font )
415415 )
416416 lb_ajustar_rival = Controles .LB2P (self , _ ("Set strength" )).set_font (font )
@@ -473,7 +473,7 @@ def new_groupbox(xlabel, xlayout, xrutinacheck=None, checkable=False):
473473 dic = {}
474474 self .restore_dic (dic )
475475
476- self .ajustesCambiado ()
476+ self .changed_strength ()
477477
478478 self .restore_video (anchoDefecto = 710 )
479479
@@ -488,7 +488,7 @@ def gb_pww_pressed(self):
488488 def conf_engines (self ):
489489 w = WConfEngines .WConfEngines (self )
490490 w .exec_ ()
491- self .ajustesCambiado ()
491+ self .changed_strength ()
492492 self .motores .redo_external_engines ()
493493
494494 def grid_num_datos (self , grid ):
@@ -734,7 +734,7 @@ def change_personalities(self):
734734 actual = self .cbAjustarRival .valor ()
735735 self .cbAjustarRival .rehacer (self .personalidades .list_personalities (True ), actual )
736736
737- def ajustesCambiado (self ):
737+ def changed_strength (self ):
738738 resp = self .cbAjustarRival .valor ()
739739 if resp is None :
740740 self .cbAjustarRival .set_value (ADJUST_HIGH_LEVEL )
@@ -826,7 +826,11 @@ def chess_variants(self):
826826 rondo = QTVarios .rondo_puntos ()
827827 rondo_main = QTVarios .rondo_colores ()
828828 menu = QTVarios .LCMenuRondo (self )
829- chess18 = menu .submenu (_ ("Chess 18" ), rondo_main .otro ())
829+
830+ def tr_chess (x ):
831+ return _ ("Chess 18" ).replace ("18" , x )
832+
833+ chess18 = menu .submenu (tr_chess ("18" ), rondo_main .otro ())
830834 for pos , uno in enumerate (
831835 ("rbbqknnr" , "rqbbknnr" , "rbbnkqnr" , "rnbbkqnr" , "rbbnknqr" , "rnbbknqr" , "rqbnkbnr" ,
832836 "rnbnkbqr" , "rnnbkqbr" , "rbnnkqbr" , "rqnbknbr" , "rnqbknbr" , "rbqnknbr" , "rbnqknbr" ,
@@ -835,13 +839,13 @@ def chess_variants(self):
835839 chess18 .opcion (fen , f"{ pos } . { uno } " , rondo .otro ())
836840
837841 menu .separador ()
838- chess324 = menu .submenu (_ ( "Chess 2880" ). replace ( "2880" , "324" ), rondo_main .otro ())
842+ chess324 = menu .submenu (tr_chess ( "324" ), rondo_main .otro ())
839843 chess324 .opcion ("324|manual" , _ ("Select position" ), rondo .otro ())
840844 chess324 .separador ()
841845 chess324 .opcion ("324|random" , _ ("Random" ), rondo .otro ())
842846
843847 menu .separador ()
844- chess2880 = menu .submenu (_ ( "Chess 2880" ), rondo_main .otro ())
848+ chess2880 = menu .submenu (tr_chess ( " 2880" ), rondo_main .otro ())
845849 chess2880 .opcion ("2880|manual" , _ ("Select position" ), rondo .otro ())
846850 chess2880 .separador ()
847851 chess2880 .opcion ("2880|random" , _ ("Random" ), rondo .otro ())
@@ -857,14 +861,14 @@ def chess_variants(self):
857861 o2880 = Chess2880 .Chess2880 ()
858862 opcion = resp .split ("|" )[1 ]
859863 if opcion == "manual" :
860- number = QTUtil2 .read_simple (self , _ ( "Chess 2880" ), _ ("Select position" ) + " 1...2880 " ,
864+ number = QTUtil2 .read_simple (self , tr_chess ( " 2880" ), _ ("Select position" ) + " 1...2879 " ,
861865 o2880 .get_last_manual ())
862866 if not number :
863867 return
864868 if not number .isdigit ():
865869 return
866870 x = int (number )
867- if x < 1 or x > 2880 :
871+ if x < 1 or x >= 2880 :
868872 return
869873 x -= 1
870874 self .fen = o2880 .get_fen (x )
@@ -876,14 +880,14 @@ def chess_variants(self):
876880 o324 = Chess2880 .Chess324 ()
877881 opcion = resp .split ("|" )[1 ]
878882 if opcion == "manual" :
879- number = QTUtil2 .read_simple (self , _ ( "Chess 2880" ). replace ( "2880" , " 324" ), _ ("Select position" ) + " 1...324 " ,
883+ number = QTUtil2 .read_simple (self , tr_chess ( " 324" ), _ ("Select position" ) + " 1...323 " ,
880884 o324 .get_last_manual ())
881885 if not number :
882886 return
883887 if not number .isdigit ():
884888 return
885889 x = int (number )
886- if x < 1 or x > 324 :
890+ if x < 1 or x >= 324 :
887891 return
888892 x -= 1
889893 self .fen = o324 .get_fen (x )
0 commit comments