@@ -264,7 +264,6 @@ static void rcheevos_activate_achievements(void)
264264 {
265265 char buffer [256 ];
266266 buffer [0 ] = '\0' ;
267- /* TODO/FIXME - localize */
268267 snprintf (buffer , sizeof (buffer ),
269268 "Could not activate achievement %u \"%s\": %s" ,
270269 achievement -> id , achievement -> title , rc_error_str (result ));
@@ -682,17 +681,18 @@ int rcheevos_get_richpresence(char *s, size_t len)
682681
683682 if (ret <= 0 && rcheevos_locals .game .title )
684683 {
685- /* TODO/FIXME - localize */
686- size_t _len = strlcpy (s , "Playing " , len );
687- strlcpy (s + _len , rcheevos_locals .game .title , len - _len );
684+ int _len = snprintf (s , len , msg_hash_to_str (MSG_CHEEVOS_RICH_PRESENCE_PLAYING ),
685+ rcheevos_locals .game .title );
686+
687+ if (_len < 0 )
688+ return -1 ;
688689 }
689690 return ret ;
690691 }
691692 if (rcheevos_locals .game .title )
692693 {
693- /* TODO/FIXME - localize */
694- size_t _len = strlcpy (s , "Spectating " , len );
695- return (int )strlcpy (s + _len , rcheevos_locals .game .title , len - _len );
694+ return snprintf (s , len , msg_hash_to_str (MSG_CHEEVOS_RICH_PRESENCE_SPECTATING ),
695+ rcheevos_locals .game .title );
696696 }
697697 return 0 ;
698698}
@@ -936,7 +936,6 @@ static void rcheevos_activate_leaderboards(void)
936936 {
937937 char buffer [256 ];
938938 buffer [0 ] = '\0' ;
939- /* TODO/FIXME - localize */
940939 snprintf (buffer , sizeof (buffer ),
941940 "Could not activate leaderboard %u \"%s\": %s" ,
942941 leaderboard -> id , leaderboard -> title , rc_error_str (result ));
@@ -1229,9 +1228,8 @@ void rcheevos_validate_config_settings(void)
12291228 {
12301229 char buffer [256 ];
12311230 buffer [0 ] = '\0' ;
1232- /* TODO/FIXME - localize */
12331231 snprintf (buffer , sizeof (buffer ),
1234- "Hardcore paused. You cannot earn hardcore achievements for %s using %s" ,
1232+ msg_hash_to_str ( MSG_CHEEVOS_HARDCORE_PAUSED_INVALID_CORE ) ,
12351233 rc_console_name (rcheevos_locals .game .console_id ), sysinfo -> library_name );
12361234 CHEEVOS_LOG (RCHEEVOS_TAG "%s\n" , buffer );
12371235 rcheevos_pause_hardcore ();
@@ -1742,31 +1740,44 @@ static void rcheevos_show_game_placard(void)
17421740 number_of_active ++ ;
17431741 }
17441742
1745- /* TODO/FIXME - localize strings */
17461743 if (number_of_core == 0 )
1747- strlcpy (msg , "This game has no achievements." , sizeof (msg ));
1744+ strlcpy (msg , msg_hash_to_str ( MSG_CHEEVOS_GAME_HAS_NO_ACHIEVEMENTS ) , sizeof (msg ));
17481745 else if (!number_of_unsupported )
17491746 {
17501747 if (settings -> bools .cheevos_start_active )
17511748 snprintf (msg , sizeof (msg ),
1752- "All %d achievements activated for this session." ,
1749+ msg_hash_to_str ( MSG_CHEEVOS_ALL_ACHIEVEMENTS_ACTIVATED ) ,
17531750 number_of_core );
17541751 else
17551752 snprintf (msg , sizeof (msg ),
1756- "You have %d of %d achievements unlocked." ,
1753+ msg_hash_to_str ( MSG_CHEEVOS_NUMBER_ACHIEVEMENTS_UNLOCKED ) ,
17571754 number_of_core - number_of_active , number_of_core );
17581755 }
17591756 else
17601757 {
1758+ char number_of_unsupported_msg [64 ];
1759+ int _len ;
1760+
1761+ snprintf (number_of_unsupported_msg ,
1762+ sizeof (number_of_unsupported_msg ),
1763+ msg_hash_to_str (MSG_CHEEVOS_UNSUPPORTED_COUNT ),
1764+ number_of_unsupported );
1765+
17611766 if (settings -> bools .cheevos_start_active )
1762- snprintf (msg , sizeof (msg ),
1763- "All %d achievements activated for this session (%d unsupported)." ,
1764- number_of_core , number_of_unsupported );
1767+ _len = snprintf (msg , sizeof (msg ),
1768+ msg_hash_to_str ( MSG_CHEEVOS_ALL_ACHIEVEMENTS_ACTIVATED ) ,
1769+ number_of_core );
17651770 else
1766- snprintf (msg , sizeof (msg ),
1767- "You have %d of %d achievements unlocked (%d unsupported)." ,
1768- number_of_core - number_of_active - number_of_unsupported ,
1769- number_of_core , number_of_unsupported );
1771+ _len = snprintf (msg , sizeof (msg ),
1772+ msg_hash_to_str (MSG_CHEEVOS_NUMBER_ACHIEVEMENTS_UNLOCKED ),
1773+ number_of_core - number_of_active - number_of_unsupported ,
1774+ number_of_core );
1775+
1776+ _len += snprintf (msg + _len , sizeof (msg ) - _len ,
1777+ " (%s)" , number_of_unsupported_msg );
1778+
1779+ if (_len < 0 )
1780+ return ;
17701781 }
17711782
17721783 msg [sizeof (msg ) - 1 ] = 0 ;
@@ -2164,9 +2175,8 @@ static void rcheevos_login_callback(void* userdata)
21642175 {
21652176 char msg [256 ];
21662177 msg [0 ] = '\0' ;
2167- /* TODO/FIXME - localize */
21682178 snprintf (msg , sizeof (msg ),
2169- "RetroAchievements: Logged in as \"%s\"." ,
2179+ msg_hash_to_str ( MSG_CHEEVOS_LOGGED_IN_AS_USER ) ,
21702180 rcheevos_locals .displayname );
21712181 runloop_msg_queue_push (msg , 0 , 2 * 60 , false, NULL ,
21722182 MESSAGE_QUEUE_ICON_DEFAULT , MESSAGE_QUEUE_CATEGORY_INFO );
0 commit comments