Skip to content

Commit 7e947ba

Browse files
committed
French support + translations
1 parent 3e2d0ac commit 7e947ba

File tree

10 files changed

+7267
-3669
lines changed

10 files changed

+7267
-3669
lines changed

Includes/Helpers/Lookup.hpp

Lines changed: 6894 additions & 3464 deletions
Large diffs are not rendered by default.

Library/Sources/CTRPluginFrameworkImpl/Menu/PluginMenuHome.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -447,7 +447,7 @@ namespace CTRPluginFramework {
447447

448448
// Draw version if on default page
449449
if (folder->name == pluginName)
450-
Renderer::DrawString("Version: 1.0.3", 158, posY2, Color::Gray);
450+
Renderer::DrawString("Version: 1.0.3b", 158, posY2, Color::Gray);
451451

452452
else Renderer::DrawString("Multi-Pokemon Framework", 132, posY2, Color::Gray);
453453

Library/Sources/CTRPluginFrameworkImpl/Menu/PluginMenuTools.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -647,8 +647,8 @@ namespace CTRPluginFramework {
647647
static Clock clock;
648648
static bool timesup = true;
649649

650-
static const char version[] = "Version: 1.0.3";
651-
static const char compiled[] = "Compiled: April 7, 2023";
650+
static const char version[] = "Version: 1.0.3b";
651+
static const char compiled[] = "Compiled: July 1, 2023";
652652
const char *info[3] = {SystemModel().c_str(), InternetAccess().c_str(), CurrentTime().c_str()};
653653

654654
{

Library/lib/libctrpf.a

0 Bytes
Binary file not shown.

Sources/Folders/Battle.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ namespace Battle {
2121
data = ProcessPlus::Read16(location + 0xC);
2222

2323
if (data != 0 && data <= Helpers::AutoRegion(721, Helpers::GetVersion(802, 807))) {
24-
party[i] = allPkmn[data - 1];
24+
party[i] = (currLang == Lang::ENG ? English::allPkmn[data - 1] : French::allPkmn[data - 1]);
2525
valid++;
2626
}
2727

@@ -412,18 +412,18 @@ namespace Battle {
412412

413413
if (IsValid(location, pkmn)) {
414414
if (infoScreen == 0) {
415-
screen.Draw(language("Species: ", "Espece: ") << Color(0xF2, 0xCE, 0x70) << allPkmn[pkmn->species - 1], 5, 15, Color::White, Color::Black);
416-
screen.Draw("Nature: " << Color::White << allNatures[pkmn->nature], 5, 25, Color::White, Color::Black);
417-
screen.Draw(language("Item: ", "Objet: ") << (pkmn->heldItem == 0 ? Color::Gray : Color::White) << (pkmn->heldItem == 0 ? "None" : allItems[pkmn->heldItem - 1]), 5, 35, Color::White, Color::Black);
418-
screen.Draw(language("Ability: ", "Capacite: ") << Color::White << allAbilities[pkmn->ability - 1], 5, 45, Color::White, Color::Black);
415+
screen.Draw(language("Species: ", "Espece: ") << Color(0xF2, 0xCE, 0x70) << (currLang == Lang::ENG ? English::allPkmn[pkmn->species - 1] : French::allPkmn[pkmn->species - 1]), 5, 15, Color::White, Color::Black);
416+
screen.Draw("Nature: " << Color::White << (currLang == Lang::ENG ? English::allNatures[pkmn->nature] : French::allNatures[pkmn->nature]), 5, 25, Color::White, Color::Black);
417+
screen.Draw(language("Item: ", "Objet: ") << (pkmn->heldItem == 0 ? Color::Gray : Color::White) << (pkmn->heldItem == 0 ? "None" : (currLang == Lang::ENG ? English::allItems[pkmn->heldItem - 1] : French::allItems[pkmn->heldItem - 1])), 5, 35, Color::White, Color::Black);
418+
screen.Draw(language("Ability: ", "Capacite: ") << Color::White << (currLang == Lang::ENG ? English::allAbilities[pkmn->ability - 1] : French::allAbilities[pkmn->ability - 1]), 5, 45, Color::White, Color::Black);
419419
}
420420

421421
else if (infoScreen == 1) {
422422
screen.Draw(Color::SkyBlue << language("Moves", "Attaques"), 5, 5, Color::White, Color::Black);
423423

424424
for (int i = 0; i < 4; i++) {
425425
if (pkmn->moves[i] > 0)
426-
screen.Draw(to_string(i + 1) + ": " << Color::White << allMoves[pkmn->moves[i] - 1], 5, 15 + (i * 10), Color::White, Color::Black);
426+
screen.Draw(to_string(i + 1) + ": " << Color::White << (currLang == Lang::ENG ? English::allMoves[pkmn->moves[i] - 1] : French::allMoves[pkmn->moves[i] - 1]), 5, 15 + (i * 10), Color::White, Color::Black);
427427

428428
else screen.Draw(to_string(i + 1) + ": " << Color::Gray << language("None", "Aucun"), 5, 15 + (i * 10), Color::White, Color::Black);
429429
}

Sources/Folders/Computer.cpp

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ namespace Computer {
239239
KeyboardPlus keyboard;
240240

241241
if (IsValid(pointer, pkmn)) {
242-
if (keyboard.SetKeyboard(entry->Name() + ":", true, allNatures, natureID) != -1) {
242+
if (keyboard.SetKeyboard(entry->Name() + ":", true, (currLang == Lang::ENG ? English::allNatures : French::allNatures), natureID) != -1) {
243243
SetNature(pkmn, natureID);
244244

245245
if (SetPokemon(pointer, pkmn))
@@ -390,12 +390,12 @@ namespace Computer {
390390
vector<string> options;
391391
KeyboardPlus keyboard;
392392

393-
for (const Geograph &nickname : allCountries)
393+
for (const Geograph &nickname : (currLang == Lang::ENG ? English::allCountries : French::allCountries))
394394
options.push_back(nickname.name);
395395

396396
if (IsValid(pointer, pkmn)) {
397397
if (keyboard.SetKeyboard(entry->Name() + ":", true, options, getPlayerCountry) != -1) {
398-
playerCountry = allCountries[getPlayerCountry].id;
398+
playerCountry = (currLang == Lang::ENG ? English::allCountries[getPlayerCountry].id : French::allCountries[getPlayerCountry].id);
399399
SetCountry(pkmn, playerCountry);
400400

401401
if (SetPokemon(pointer, pkmn))
@@ -431,7 +431,7 @@ namespace Computer {
431431
static vector<string> options;
432432
KeyboardPlus keyboard;
433433

434-
for (const Origins &nickname : allOrigins) {
434+
for (const Origins &nickname : (currLang == Lang::ENG ? English::allOrigins : French::allOrigins)) {
435435
if (originsAvailable != 8) {
436436
if (originsAvailable > 3 && (group == Group::XY || group == Group::ORAS))
437437
options.push_back(nickname.name);
@@ -447,7 +447,7 @@ namespace Computer {
447447

448448
if (IsValid(pointer, pkmn)) {
449449
if (keyboard.SetKeyboard(entry->Name() + ":", true, options, getOrigin) != -1) {
450-
originID = allOrigins[getOrigin + Helpers::AutoRegion(4, 0)].choiceNo;
450+
originID = (currLang == Lang::ENG ? English::allOrigins[getOrigin + Helpers::AutoRegion(4, 0)].choiceNo : French::allOrigins[getOrigin + Helpers::AutoRegion(4, 0)].choiceNo);
451451
SetOrigin(pkmn, originID);
452452

453453
if (SetPokemon(pointer, pkmn))
@@ -463,17 +463,17 @@ namespace Computer {
463463
vector<string> options;
464464
KeyboardPlus keyboard;
465465

466-
if (allOrigins[getOrigin + Helpers::AutoRegion(4, 0)].choiceNo == 24 || allOrigins[getOrigin + Helpers::AutoRegion(4, 0)].choiceNo == 25) {
467-
deterVer = allLocs6[getMetLoc].choiceNo;
466+
if ((currLang == Lang::ENG ? English::allOrigins[getOrigin + Helpers::AutoRegion(4, 0)].choiceNo : French::allOrigins[getOrigin + Helpers::AutoRegion(4, 0)].choiceNo) == 24 || (currLang == Lang::ENG ? English::allOrigins[getOrigin + Helpers::AutoRegion(4, 0)].choiceNo : French::allOrigins[getOrigin + Helpers::AutoRegion(4, 0)].choiceNo) == 25) {
467+
deterVer = (currLang == Lang::ENG ? English::allLocs6[getMetLoc].choiceNo : French::allLocs6[getMetLoc].choiceNo);
468468

469-
for (const Locations &nickname : allLocs6)
469+
for (const Locations &nickname : (currLang == Lang::ENG ? English::allLocs6 : French::allLocs6))
470470
options.push_back(nickname.name);
471471
}
472472

473-
else if (allOrigins[getOrigin + Helpers::AutoRegion(4, 0)].choiceNo == 26 || allOrigins[getOrigin + Helpers::AutoRegion(4, 0)].choiceNo == 27) {
474-
deterVer = allLocs6b[getMetLoc].choiceNo;
473+
else if ((currLang == Lang::ENG ? English::allOrigins[getOrigin + Helpers::AutoRegion(4, 0)].choiceNo : French::allOrigins[getOrigin + Helpers::AutoRegion(4, 0)].choiceNo) == 26 || (currLang == Lang::ENG ? English::allOrigins[getOrigin + Helpers::AutoRegion(4, 0)].choiceNo : French::allOrigins[getOrigin + Helpers::AutoRegion(4, 0)].choiceNo) == 27) {
474+
deterVer = (currLang == Lang::ENG ? English::allLocs6b[getMetLoc].choiceNo : French::allLocs6b[getMetLoc].choiceNo);
475475

476-
for (const Locations &nickname : allLocs6b)
476+
for (const Locations &nickname : (currLang == Lang::ENG ? English::allLocs6b : French::allLocs6b))
477477
options.push_back(nickname.name);
478478
}
479479

@@ -501,7 +501,7 @@ namespace Computer {
501501
vector<string> options;
502502
KeyboardPlus keyboard;
503503

504-
for (const Balls &nickname : allBalls) {
504+
for (const Balls &nickname : (currLang == Lang::ENG ? English::allBalls : French::allBalls)) {
505505
if (group == Group::XY || group == Group::ORAS) {
506506
if (counter != 3)
507507
options.push_back(nickname.name);
@@ -515,14 +515,14 @@ namespace Computer {
515515
if (keyboard.SetKeyboard(entry->Name() + ":", true, options, getBall) != -1) {
516516
if (group == Group::XY || group == Group::ORAS) {
517517
if (getBall > 2) {
518-
ballID = allBalls[getBall + 1].choiceNo;
518+
ballID = (currLang == Lang::ENG ? English::allBalls[getBall + 1].choiceNo : French::allBalls[getBall + 1].choiceNo);
519519
goto apply;
520520
}
521521

522-
else ballID = allBalls[getBall].choiceNo;
522+
else ballID = (currLang == Lang::ENG ? English::allBalls[getBall].choiceNo : French::allBalls[getBall].choiceNo);
523523
}
524524

525-
else ballID = allBalls[getBall].choiceNo;
525+
else ballID = (currLang == Lang::ENG ? English::allBalls[getBall].choiceNo : French::allBalls[getBall].choiceNo);
526526

527527
apply:
528528
SetBall(pkmn, ballID);
@@ -613,17 +613,17 @@ namespace Computer {
613613
vector<string> options;
614614
KeyboardPlus keyboard;
615615

616-
if (allOrigins[getOrigin].choiceNo == 24 || allOrigins[getOrigin].choiceNo == 25) {
617-
deterEggVer = allLocs6[getEggMetLoc].choiceNo;
616+
if ((currLang == Lang::ENG ? English::allOrigins[getOrigin].choiceNo : French::allOrigins[getOrigin].choiceNo) == 24 || (currLang == Lang::ENG ? English::allOrigins[getOrigin].choiceNo : French::allOrigins[getOrigin].choiceNo) == 25) {
617+
deterEggVer = (currLang == Lang::ENG ? English::allLocs6[getEggMetLoc].choiceNo : French::allLocs6[getEggMetLoc].choiceNo);
618618

619-
for (const Locations &nickname : allLocs6)
619+
for (const Locations &nickname : (currLang == Lang::ENG ? English::allLocs6 : French::allLocs6))
620620
options.push_back(nickname.name);
621621
}
622622

623-
else if (allOrigins[getOrigin].choiceNo == 26 || allOrigins[getOrigin].choiceNo == 27) {
624-
deterEggVer = allLocs6b[getEggMetLoc].choiceNo;
623+
else if ((currLang == Lang::ENG ? English::allOrigins[getOrigin].choiceNo : French::allOrigins[getOrigin].choiceNo) == 26 || (currLang == Lang::ENG ? English::allOrigins[getOrigin].choiceNo : French::allOrigins[getOrigin].choiceNo) == 27) {
624+
deterEggVer = (currLang == Lang::ENG ? English::allLocs6b[getEggMetLoc].choiceNo : French::allLocs6b[getEggMetLoc].choiceNo);
625625

626-
for (const Locations &nickname : allLocs6b)
626+
for (const Locations &nickname : (currLang == Lang::ENG ? English::allLocs6b : French::allLocs6b))
627627
options.push_back(nickname.name);
628628
}
629629

@@ -886,13 +886,13 @@ namespace Computer {
886886
KeyboardPlus keyboard;
887887

888888
for (int i = 0; i < Helpers::AutoRegion(Helpers::PickGame(37, 44), 46); i++)
889-
options.push_back(allRibbons[i].name);
889+
options.push_back((currLang == Lang::ENG ? English::allRibbons[i].name : French::allRibbons[i].name));
890890

891891
if (IsValid(pointer, pkmn)) {
892892
start:
893893
if (keyboard.SetKeyboard(entry->Name() + ":", true, options, ribbonChoice) != -1) {
894894
if (keyboard.SetKeyboard(options[ribbonChoice] + ":", true, noYes, obtainRibbon) != -1)
895-
SetRibbons(pkmn, allRibbons[ribbonChoice].category, allRibbons[ribbonChoice].index, obtainRibbon);
895+
SetRibbons(pkmn, (currLang == Lang::ENG ? English::allRibbons[ribbonChoice].category : French::allRibbons[ribbonChoice].category), (currLang == Lang::ENG ? English::allRibbons[ribbonChoice].index : French::allRibbons[ribbonChoice].index), obtainRibbon);
896896

897897
else goto start;
898898

Sources/Folders/FestivalPlaza.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ namespace Plaza {
3030
}
3131

3232
else {
33-
vector<vector<string>> selection = {{language("Any", "Tout"), language("Male", "Mâle"), language("Female", "Femelle")}, {"Any", "1 to 10", "11 to 20", "21 to 30", "31 to 40", "41 to 50", "51 to 60", "61 to 70", "71 to 80", "81 to 90", "91 or higher"}};
33+
vector<vector<string>> selection = {{language("Any", "Tout"), language("Male", "Mâle"), language("Female", "Femelle")}, {language("Any", "Tout"), "1 ~ 10", "11 ~ 20", "21 ~ 30", "31 ~ 40", "41 ~ 50", "51 ~ 60", "61 ~ 70", "71 ~ 80", "81 ~ 90", "91 ~ higher"}};
3434

3535
if (keyboard.SetKeyboard(options[depositConfig] + ":", true, (depositConfig == 1 ? selection[0] : selection[1]), getSettings[depositConfig - 1]) != -1) {
3636
settings[depositConfig] = getSettings[depositConfig - 1];

0 commit comments

Comments
 (0)