From e74b337df98e2dc628d88532dfb60f24d6ceced5 Mon Sep 17 00:00:00 2001 From: "Daniel S. Billing" Date: Sat, 31 Jul 2021 16:12:45 +0200 Subject: [PATCH] Added translation to summaryscreen --- P3D/Content/Localization/en.json | 15 ++++++++++++ P3D/Content/Localization/no.json | 15 ++++++++++++ P3D/Screens/Pokemon/SummaryScreen.vb | 34 ++++++++++++++-------------- 3 files changed, 47 insertions(+), 17 deletions(-) diff --git a/P3D/Content/Localization/en.json b/P3D/Content/Localization/en.json index 37aad4426..7c77f1620 100644 --- a/P3D/Content/Localization/en.json +++ b/P3D/Content/Localization/en.json @@ -749,6 +749,21 @@ "got_away_safely": "Got away safely!", "run_away_failed": "Failed to run away." } + }, + "summaryscreen": { + "type": "Type", + "item": "Item", + "nature": "Nature", + "dexno": "Dex No.", + "idno": "ID No.", + "ability": "Ability", + "catch_method": "Catch Method", + "exp_points": "Exp. Points", + "to_next_lv": "To next Lv.", + "egg_low": "It looks like this Egg will~take a long time to hatch.", + "egg_medium": "It's getting warmer and moves~a little. It will hatch soon.", + "egg_high": "There is strong movement~noticeable. It will hatch soon!", + "egg_watch": "The Egg Watch" } } } \ No newline at end of file diff --git a/P3D/Content/Localization/no.json b/P3D/Content/Localization/no.json index 8cc130d03..05225b94f 100644 --- a/P3D/Content/Localization/no.json +++ b/P3D/Content/Localization/no.json @@ -753,6 +753,21 @@ "got_away_safely": "Slapp unna trygt!", "run_away_failed": "Kunne ikke løpe vekk." } + }, + "summaryscreen": { + "type": "Type", + "item": "Gjenstand", + "nature": "Natur", + "dexno": "Dex Nr.", + "idno": "ID Nr.", + "ability": "Evne", + "catch_method": "Fangstmetode", + "exp_points": "Exp. Poeng", + "to_next_lv": "Til neste Lv.", + "egg_low": "Det ser ut som dette egget vil~ta lang tid å klekke.", + "egg_medium": "Det blir varmere og beveger seg~litt. Den klekker snart.", + "egg_high": "Det er sterk bevegelse.~Den klekker snart!", + "egg_watch": "Eggvakten" } } } \ No newline at end of file diff --git a/P3D/Screens/Pokemon/SummaryScreen.vb b/P3D/Screens/Pokemon/SummaryScreen.vb index 524583c7e..09f878c48 100644 --- a/P3D/Screens/Pokemon/SummaryScreen.vb +++ b/P3D/Screens/Pokemon/SummaryScreen.vb @@ -262,15 +262,15 @@ Canvas.DrawRectangle(New Rectangle(DeltaX, DeltaY + 490, 250, 32), New Color(0, 0, 0, CInt(70 * _interfaceFade))) Canvas.DrawGradient(New Rectangle(DeltaX + 250, DeltaY + 490, 50, 32), New Color(0, 0, 0, CInt(70 * _interfaceFade)), New Color(0, 0, 0, 0), True, -1) - SpriteBatch.DrawString(FontManager.ChatFont, "Type", New Vector2(DeltaX + 10, DeltaY + 330 + 4), New Color(255, 255, 255, CInt(220 * _interfaceFade))) - SpriteBatch.DrawString(FontManager.ChatFont, "Item", New Vector2(DeltaX + 10, DeltaY + 362 + 4), New Color(255, 255, 255, CInt(220 * _interfaceFade))) - SpriteBatch.DrawString(FontManager.ChatFont, "Nature", New Vector2(DeltaX + 10, DeltaY + 394 + 4), New Color(255, 255, 255, CInt(220 * _interfaceFade))) - SpriteBatch.DrawString(FontManager.ChatFont, "Dex No.", New Vector2(DeltaX + 10, DeltaY + 426 + 4), New Color(255, 255, 255, CInt(220 * _interfaceFade))) + SpriteBatch.DrawString(FontManager.ChatFont, Localization.Translate("summaryscreen.type", Nothing, "Type"), New Vector2(DeltaX + 10, DeltaY + 330 + 4), New Color(255, 255, 255, CInt(220 * _interfaceFade))) + SpriteBatch.DrawString(FontManager.ChatFont, Localization.Translate("summaryscreen.item", Nothing, "Item"), New Vector2(DeltaX + 10, DeltaY + 362 + 4), New Color(255, 255, 255, CInt(220 * _interfaceFade))) + SpriteBatch.DrawString(FontManager.ChatFont, Localization.Translate("summaryscreen.nature", Nothing, "Nature"), New Vector2(DeltaX + 10, DeltaY + 394 + 4), New Color(255, 255, 255, CInt(220 * _interfaceFade))) + SpriteBatch.DrawString(FontManager.ChatFont, Localization.Translate("summaryscreen.dexno", Nothing, "Dex No."), New Vector2(DeltaX + 10, DeltaY + 426 + 4), New Color(255, 255, 255, CInt(220 * _interfaceFade))) SpriteBatch.DrawString(FontManager.ChatFont, "OT", New Vector2(DeltaX + 10, DeltaY + 458 + 4), New Color(255, 255, 255, CInt(220 * _interfaceFade))) SpriteBatch.DrawString(FontManager.ChatFont, GetPokemon().CatchTrainerName, New Vector2(DeltaX + 94, DeltaY + 458 + 4), New Color(255, 255, 255, CInt(220 * _fadeIn))) - SpriteBatch.DrawString(FontManager.ChatFont, "ID No.", New Vector2(DeltaX + 10, DeltaY + 490 + 4), New Color(255, 255, 255, CInt(220 * _interfaceFade))) + SpriteBatch.DrawString(FontManager.ChatFont, Localization.Translate("summaryscreen.idno", Nothing, "ID No."), New Vector2(DeltaX + 10, DeltaY + 490 + 4), New Color(255, 255, 255, CInt(220 * _interfaceFade))) SpriteBatch.DrawString(FontManager.ChatFont, GetPokemon().OT, New Vector2(DeltaX + 94, DeltaY + 490 + 4), New Color(255, 255, 255, CInt(220 * _fadeIn))) @@ -389,7 +389,7 @@ Canvas.DrawRectangle(New Rectangle(DeltaX + 350, DeltaY + 362 - 64, 300 + 24, 32), New Color(0, 0, 0, CInt(100 * _interfaceFade * _pageFade))) Canvas.DrawRectangle(New Rectangle(DeltaX + 350, DeltaY + 394 - 64, 300 + 24, 64 + 12), New Color(0, 0, 0, CInt(70 * _interfaceFade * _pageFade))) - SpriteBatch.DrawString(FontManager.ChatFont, "Ability", New Vector2(DeltaX + 360, DeltaY + 366 - 64), New Color(255, 255, 255, CInt(220 * _interfaceFade * _pageFade))) + SpriteBatch.DrawString(FontManager.ChatFont, Localization.Translate("summaryscreen.ability", Nothing, "Ability"), New Vector2(DeltaX + 360, DeltaY + 366 - 64), New Color(255, 255, 255, CInt(220 * _interfaceFade * _pageFade))) SpriteBatch.DrawString(FontManager.ChatFont, .Ability.Name, New Vector2(DeltaX + 440 + 24, DeltaY + 366 - 64), New Color(255, 255, 255, CInt(220 * _fadeIn * _pageFade))) SpriteBatch.DrawString(FontManager.ChatFont, .Ability.Description.CropStringToWidth(FontManager.ChatFont, 1.0F, 300 - 8), New Vector2(DeltaX + 358, DeltaY + 336), New Color(255, 255, 255, CInt(220 * _fadeIn * _pageFade))) @@ -397,7 +397,7 @@ Canvas.DrawRectangle(New Rectangle(DeltaX + 350, DeltaY + 362 + 64, 300 + 24, 32), New Color(0, 0, 0, CInt(100 * _interfaceFade * _pageFade))) Canvas.DrawRectangle(New Rectangle(DeltaX + 350, DeltaY + 394 + 64, 300 + 24, 64), New Color(0, 0, 0, CInt(70 * _interfaceFade * _pageFade))) - SpriteBatch.DrawString(FontManager.ChatFont, "Catch Method", New Vector2(DeltaX + 360, DeltaY + 366 + 64), New Color(255, 255, 255, CInt(220 * _interfaceFade * _pageFade))) + SpriteBatch.DrawString(FontManager.ChatFont, Localization.Translate("summaryscreen.catch_method", Nothing, "Catch Method"), New Vector2(DeltaX + 360, DeltaY + 366 + 64), New Color(255, 255, 255, CInt(220 * _interfaceFade * _pageFade))) Dim text As String = .CatchMethod.Replace(.CatchMethod(0), Char.ToUpper(.CatchMethod(0))) & " " & .CatchLocation SpriteBatch.DrawString(FontManager.ChatFont, text.CropStringToWidth(FontManager.ChatFont, 1.0F, 300 - 64), New Vector2(DeltaX + 358, DeltaY + 336 + 128), New Color(255, 255, 255, CInt(220 * _fadeIn * _pageFade))) @@ -415,12 +415,12 @@ 'EXP: Canvas.DrawRectangle(New Rectangle(DeltaX + 734 - 12, DeltaY + 362 + 64, 300 + 24, 32), New Color(0, 0, 0, CInt(100 * _interfaceFade * _pageFade))) - SpriteBatch.DrawString(FontManager.ChatFont, "Exp. Points", New Vector2(DeltaX + 744 - 12, DeltaY + 366 + 64), New Color(255, 255, 255, CInt(220 * _interfaceFade * _pageFade))) + SpriteBatch.DrawString(FontManager.ChatFont, Localization.Translate("summaryscreen.exp_points", Nothing, "Exp. Points"), New Vector2(DeltaX + 744 - 12, DeltaY + 366 + 64), New Color(255, 255, 255, CInt(220 * _interfaceFade * _pageFade))) SpriteBatch.DrawString(FontManager.ChatFont, .Experience.ToString(), New Vector2(DeltaX + 898 - 12, DeltaY + 366 + 64), New Color(255, 255, 255, CInt(220 * _fadeIn * _pageFade))) If .Level < CInt(GameModeManager.GetGameRuleValue("MaxLevel", "100")) Then Canvas.DrawRectangle(New Rectangle(DeltaX + 734 - 12, DeltaY + 394 + 64, 300 + 24, 64), New Color(0, 0, 0, CInt(70 * _interfaceFade * _pageFade))) - SpriteBatch.DrawString(FontManager.ChatFont, "To Next Lv.", New Vector2(DeltaX + 744 - 12, DeltaY + 398 + 64), New Color(255, 255, 255, CInt(220 * _interfaceFade * _pageFade))) + SpriteBatch.DrawString(FontManager.ChatFont, Localization.Translate("summaryscreen.to_next_lv", Nothing, "To Next Lv."), New Vector2(DeltaX + 744 - 12, DeltaY + 398 + 64), New Color(255, 255, 255, CInt(220 * _interfaceFade * _pageFade))) If .NeedExperience(.Level + 1) - .Experience > 0 Then SpriteBatch.DrawString(FontManager.ChatFont, CStr(.NeedExperience(.Level + 1) - .Experience), New Vector2(DeltaX + 898 - 12, DeltaY + 398 + 64), New Color(255, 255, 255, CInt(220 * _fadeIn * _pageFade))) @@ -515,17 +515,17 @@ Canvas.DrawRectangle(New Rectangle(DeltaX + 700, DeltaY + 76 + 32 * 5, 350, 160), New Color(0, 0, 0, CInt(70 * _interfaceFade * _pageFade * _moveFade))) 'Type: - SpriteBatch.DrawString(FontManager.ChatFont, "Type:", New Vector2(DeltaX + 710, DeltaY + 80), New Color(255, 255, 255, CInt(220 * _interfaceFade * _pageFade * _moveFade))) + SpriteBatch.DrawString(FontManager.ChatFont, Localization.Translate("summaryscreen.type", Nothing, "Type:"), New Vector2(DeltaX + 710, DeltaY + 80), New Color(255, 255, 255, CInt(220 * _interfaceFade * _pageFade * _moveFade))) Core.SpriteBatch.Draw(TextureManager.GetTexture("GUI\Menus\Types"), New Rectangle(DeltaX + 824, DeltaY + 86, 48, 16), .Attacks(_moveIndex).Type.GetElementImage(), New Color(255, 255, 255, CInt(255 * _fadeIn * _pageFade * _moveFade))) SpriteBatch.DrawString(FontManager.ChatFont, "PP:", New Vector2(DeltaX + 710, DeltaY + 114), New Color(255, 255, 255, CInt(220 * _interfaceFade * _pageFade * _moveFade))) SpriteBatch.DrawString(FontManager.ChatFont, .Attacks(_moveIndex).CurrentPP & " / " & .Attacks(_moveIndex).MaxPP, New Vector2(DeltaX + 824, DeltaY + 114), New Color(255, 255, 255, CInt(220 * _fadeIn * _pageFade * _moveFade))) 'Stats: - SpriteBatch.DrawString(FontManager.ChatFont, "Category:", New Vector2(DeltaX + 710, DeltaY + 144), New Color(255, 255, 255, CInt(220 * _interfaceFade * _pageFade * _moveFade))) + SpriteBatch.DrawString(FontManager.ChatFont, Localization.Translate("summaryscreen.category", Nothing, "Category:"), New Vector2(DeltaX + 710, DeltaY + 144), New Color(255, 255, 255, CInt(220 * _interfaceFade * _pageFade * _moveFade))) Core.SpriteBatch.Draw(.Attacks(_moveIndex).GetDamageCategoryImage(), New Rectangle(DeltaX + 824, DeltaY + 145, 48, 24), New Color(255, 255, 255, CInt(255 * _fadeIn * _pageFade * _moveFade))) - SpriteBatch.DrawString(FontManager.ChatFont, "Power:", New Vector2(DeltaX + 710, DeltaY + 176), New Color(255, 255, 255, CInt(220 * _interfaceFade * _pageFade * _moveFade))) + SpriteBatch.DrawString(FontManager.ChatFont, Localization.Translate("summaryscreen.power", Nothing, "Power:"), New Vector2(DeltaX + 710, DeltaY + 176), New Color(255, 255, 255, CInt(220 * _interfaceFade * _pageFade * _moveFade))) Dim power As String = .Attacks(_moveIndex).Power.ToString() If .Attacks(_moveIndex).Power <= 0 Then @@ -539,7 +539,7 @@ accuracy = "-" End If - SpriteBatch.DrawString(FontManager.ChatFont, "Accuracy:", New Vector2(DeltaX + 710, DeltaY + 208), New Color(255, 255, 255, CInt(220 * _interfaceFade * _pageFade * _moveFade))) + SpriteBatch.DrawString(FontManager.ChatFont, Localization.Translate("summaryscreen.accuracy", Nothing, "Accuracy:"), New Vector2(DeltaX + 710, DeltaY + 208), New Color(255, 255, 255, CInt(220 * _interfaceFade * _pageFade * _moveFade))) SpriteBatch.DrawString(FontManager.ChatFont, accuracy, New Vector2(DeltaX + 824, DeltaY + 208), New Color(255, 255, 255, CInt(220 * _fadeIn * _pageFade * _moveFade))) 'Description: @@ -551,17 +551,17 @@ Dim s As String = "" Dim percent As Integer = CInt((GetPokemon().EggSteps / GetPokemon().BaseEggSteps) * 100) If percent <= 33 Then - s = "It looks like this Egg will" & Environment.NewLine & "take a long time to hatch." + s = Localization.Translate("summaryscreen.egg_low", Nothing, "It looks like this Egg will" & Environment.NewLine & "take a long time to hatch.") ElseIf percent > 33 And percent <= 66 Then - s = "It's getting warmer and moves" & Environment.NewLine & "a little. It will hatch soon." + s = Localization.Translate("summaryscreen.egg_medium", Nothing, "It's getting warmer and moves" & Environment.NewLine & "a little. It will hatch soon.") Else - s = "There is strong movement" & Environment.NewLine & "noticeable. It will hatch soon!" + s = Localization.Translate("summaryscreen.egg_high", Nothing, "There is strong movement" & Environment.NewLine & "noticeable. It will hatch soon!") End If Canvas.DrawRectangle(New Rectangle(DeltaX + 400, DeltaY + 76, 350, 32), New Color(0, 0, 0, CInt(100 * _fadeIn))) Canvas.DrawRectangle(New Rectangle(DeltaX + 400, DeltaY + 108, 350, 96), New Color(0, 0, 0, CInt(70 * _fadeIn))) - SpriteBatch.DrawString(FontManager.ChatFont, "The Egg Watch", New Vector2(DeltaX + 410, DeltaY + 80), New Color(255, 255, 255, CInt(220 * _fadeIn))) + SpriteBatch.DrawString(FontManager.ChatFont, Localization.Translate("summaryscreen.egg_watch", Nothing, "The Egg Watch"), New Vector2(DeltaX + 410, DeltaY + 80), New Color(255, 255, 255, CInt(220 * _fadeIn))) SpriteBatch.DrawString(FontManager.ChatFont, s, New Vector2(DeltaX + 410, DeltaY + 132), New Color(255, 255, 255, CInt(220 * _fadeIn))) End Sub