@@ -264,7 +264,6 @@ static void rcheevos_activate_achievements(void)
264
264
{
265
265
char buffer [256 ];
266
266
buffer [0 ] = '\0' ;
267
- /* TODO/FIXME - localize */
268
267
snprintf (buffer , sizeof (buffer ),
269
268
"Could not activate achievement %u \"%s\": %s" ,
270
269
achievement -> id , achievement -> title , rc_error_str (result ));
@@ -682,17 +681,18 @@ int rcheevos_get_richpresence(char *s, size_t len)
682
681
683
682
if (ret <= 0 && rcheevos_locals .game .title )
684
683
{
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 ;
688
689
}
689
690
return ret ;
690
691
}
691
692
if (rcheevos_locals .game .title )
692
693
{
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 );
696
696
}
697
697
return 0 ;
698
698
}
@@ -936,7 +936,6 @@ static void rcheevos_activate_leaderboards(void)
936
936
{
937
937
char buffer [256 ];
938
938
buffer [0 ] = '\0' ;
939
- /* TODO/FIXME - localize */
940
939
snprintf (buffer , sizeof (buffer ),
941
940
"Could not activate leaderboard %u \"%s\": %s" ,
942
941
leaderboard -> id , leaderboard -> title , rc_error_str (result ));
@@ -1229,9 +1228,8 @@ void rcheevos_validate_config_settings(void)
1229
1228
{
1230
1229
char buffer [256 ];
1231
1230
buffer [0 ] = '\0' ;
1232
- /* TODO/FIXME - localize */
1233
1231
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 ) ,
1235
1233
rc_console_name (rcheevos_locals .game .console_id ), sysinfo -> library_name );
1236
1234
CHEEVOS_LOG (RCHEEVOS_TAG "%s\n" , buffer );
1237
1235
rcheevos_pause_hardcore ();
@@ -1742,31 +1740,44 @@ static void rcheevos_show_game_placard(void)
1742
1740
number_of_active ++ ;
1743
1741
}
1744
1742
1745
- /* TODO/FIXME - localize strings */
1746
1743
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 ));
1748
1745
else if (!number_of_unsupported )
1749
1746
{
1750
1747
if (settings -> bools .cheevos_start_active )
1751
1748
snprintf (msg , sizeof (msg ),
1752
- "All %d achievements activated for this session." ,
1749
+ msg_hash_to_str ( MSG_CHEEVOS_ALL_ACHIEVEMENTS_ACTIVATED ) ,
1753
1750
number_of_core );
1754
1751
else
1755
1752
snprintf (msg , sizeof (msg ),
1756
- "You have %d of %d achievements unlocked." ,
1753
+ msg_hash_to_str ( MSG_CHEEVOS_NUMBER_ACHIEVEMENTS_UNLOCKED ) ,
1757
1754
number_of_core - number_of_active , number_of_core );
1758
1755
}
1759
1756
else
1760
1757
{
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
+
1761
1766
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 );
1765
1770
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 ;
1770
1781
}
1771
1782
1772
1783
msg [sizeof (msg ) - 1 ] = 0 ;
@@ -2164,9 +2175,8 @@ static void rcheevos_login_callback(void* userdata)
2164
2175
{
2165
2176
char msg [256 ];
2166
2177
msg [0 ] = '\0' ;
2167
- /* TODO/FIXME - localize */
2168
2178
snprintf (msg , sizeof (msg ),
2169
- "RetroAchievements: Logged in as \"%s\"." ,
2179
+ msg_hash_to_str ( MSG_CHEEVOS_LOGGED_IN_AS_USER ) ,
2170
2180
rcheevos_locals .displayname );
2171
2181
runloop_msg_queue_push (msg , 0 , 2 * 60 , false, NULL ,
2172
2182
MESSAGE_QUEUE_ICON_DEFAULT , MESSAGE_QUEUE_CATEGORY_INFO );
0 commit comments