Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Attempted fix for localization issue #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Localization/FRA/Instagib.FRA
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
[ChatMessages]
[Common]
Welcome=Bienvenue à Instagib!
2 changes: 1 addition & 1 deletion Localization/INT/Instagib.INT
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[Instagib]
[Common]
SpawnHeader=Instagib mod
SpawnSubHeader=All hits, unless blocked, are instant kills.
WelcomeChatText=You're playing Instagib mod. All hits, unless blocked, are instant kills. Respawn times are cut down. You can parry projectiles. Good luck!
12 changes: 7 additions & 5 deletions include/InstagibPlayerController.uci
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
reliable client function ClientOnFirstSpawn()
{
//Localize() will find the "WelcomeChatText" key in the "Instagib" section of "Instagib.XXX" where XXX is replaced with the user's language's name (English is "INT")
//ReceiveChatMessage("",Localize("Instagib", "WelcomeChatText", "Instagib"),EFAC_ALL,false,false,,false);
//Localize() will find the "WelcomeChatText" key in the "Common" section of "Instagib.XXX" where XXX is replaced with the user's language's name (English is "INT")
//For whatever reason, the section of a localization file cannot be named after the name of your mod (e.g. "Instagib" as a section does not work in this case)
//ReceiveChatMessage("",Localize("Instagib", "WelcomeChatText", "Instagib"),EFAC_ALL,false,false,,false); <- Doesn't work!
ReceiveChatMessage("",Localize("Common", "WelcomeChatText", "Instagib"),EFAC_ALL,false,false,,false); // Should work

//Only show this on first spawn. Afterwards, only the normal game mode header will show.
//ClientShowLocalizedHeaderText(Localize("Instagib","SpawnHeader","Instagib"),,Localize("Instagib","SpawnSubHeader","Instagib"),true,false);
ClientShowLocalizedHeaderText(Localize("Common","SpawnHeader","Instagib"),,Localize("Common","SpawnSubHeader","Instagib"),true,false);


ReceiveChatMessage("","You're playing Instagib mod. All hits, unless blocked, are instant kills. Respawn times are cut down. You can parry projectiles. Good luck!",EFAC_ALL,false,false,,false);
ClientShowLocalizedHeaderText("Instagib mod",,"All hits, unless blocked, are instant kills.",true,false);
//ReceiveChatMessage("","You're playing Instagib mod. All hits, unless blocked, are instant kills. Respawn times are cut down. You can parry projectiles. Good luck!",EFAC_ALL,false,false,,false);
//ClientShowLocalizedHeaderText("Instagib mod",,"All hits, unless blocked, are instant kills.",true,false);
}