From 9b2e291a46db46bad757f15e4f1d3ea8445acddf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20Mail=C3=A4nder?= Date: Sun, 3 Jul 2022 18:54:50 +0200 Subject: [PATCH] Extract translation strings. --- mods/ra/languages/lua/en.ftl | 391 ++++++++++++++++++ mods/ra/maps/allies-01/allies01.lua | 12 +- mods/ra/maps/allies-01/map.yaml | 2 + mods/ra/maps/allies-02/allies02.lua | 12 +- mods/ra/maps/allies-02/map.yaml | 2 + mods/ra/maps/allies-03a/allies03a.lua | 11 +- mods/ra/maps/allies-03a/map.yaml | 2 + mods/ra/maps/allies-03b/allies03b.lua | 11 +- mods/ra/maps/allies-03b/map.yaml | 2 + mods/ra/maps/allies-04/allies04.lua | 4 +- mods/ra/maps/allies-04/map.yaml | 2 + mods/ra/maps/allies-05a/allies05a.lua | 22 +- mods/ra/maps/allies-05a/map.yaml | 2 + mods/ra/maps/allies-05b/allies05b.lua | 16 +- mods/ra/maps/allies-05b/map.yaml | 2 + mods/ra/maps/allies-05c/allies05c.lua | 20 +- mods/ra/maps/allies-05c/map.yaml | 2 + mods/ra/maps/allies-06a/allies06a.lua | 10 +- mods/ra/maps/allies-06a/map.yaml | 2 + mods/ra/maps/allies-06b/allies06b.lua | 10 +- mods/ra/maps/allies-06b/map.yaml | 2 + mods/ra/maps/allies-07/allies07.lua | 16 +- mods/ra/maps/allies-07/map.yaml | 2 + mods/ra/maps/allies-08a/allies08a.lua | 15 +- mods/ra/maps/allies-08a/map.yaml | 2 + mods/ra/maps/allies-08b/allies08b.lua | 15 +- mods/ra/maps/allies-08b/map.yaml | 2 + mods/ra/maps/allies-09a/allies09a.lua | 8 +- mods/ra/maps/allies-09a/map.yaml | 2 + mods/ra/maps/allies-10a/allies10a.lua | 12 +- mods/ra/maps/allies-10a/map.yaml | 2 + mods/ra/maps/ant-01/ant-01.lua | 12 +- mods/ra/maps/ant-01/map.yaml | 2 + mods/ra/maps/ant-03/ant-03.lua | 6 +- mods/ra/maps/ant-03/map.yaml | 2 + mods/ra/maps/evacuation/evacuation.lua | 25 +- mods/ra/maps/evacuation/map.yaml | 2 + mods/ra/maps/exodus/exodus.lua | 20 +- mods/ra/maps/exodus/map.yaml | 2 + .../fall-of-greece-1-personal-war/map.yaml | 2 + .../personal-war.lua | 16 +- .../evacuation.lua | 22 +- .../maps/fall-of-greece-2-evacuation/map.yaml | 2 + mods/ra/maps/fort-lonestar/fort-lonestar.lua | 4 +- mods/ra/maps/fort-lonestar/map.yaml | 2 + .../in-the-nick-of-time.lua | 17 +- mods/ra/maps/in-the-nick-of-time/map.yaml | 2 + mods/ra/maps/infiltration/infiltration.lua | 13 +- mods/ra/maps/infiltration/map.yaml | 2 + mods/ra/maps/intervention/intervention.lua | 14 +- mods/ra/maps/intervention/map.yaml | 2 + mods/ra/maps/monster-tank-madness/map.yaml | 2 + .../monster-tank-madness.lua | 37 +- mods/ra/maps/production-disruption/map.yaml | 2 + .../production-disruption.lua | 18 +- .../maps/sarin-gas-1-crackdown/crackdown.lua | 10 +- mods/ra/maps/sarin-gas-1-crackdown/map.yaml | 2 + .../maps/sarin-gas-2-down-under/downunder.lua | 46 +-- mods/ra/maps/sarin-gas-2-down-under/map.yaml | 2 + .../controlledburn.lua | 8 +- .../maps/sarin-gas-3-controlled-burn/map.yaml | 2 + mods/ra/maps/shock-therapy/map.yaml | 2 + mods/ra/maps/shock-therapy/shock-therapy.lua | 6 +- .../fresh-tracks.lua | 14 +- .../siberian-conflict-1-fresh-tracks/map.yaml | 2 + .../siberian-conflict-3-wasteland/map.yaml | 2 + .../wasteland.lua | 4 +- mods/ra/maps/situation-critical/map.yaml | 2 + .../situation-critical/situation-critical.lua | 23 +- mods/ra/maps/soviet-01/map.yaml | 2 + mods/ra/maps/soviet-01/soviet01.lua | 2 +- mods/ra/maps/soviet-02a/map.yaml | 2 + mods/ra/maps/soviet-02a/soviet02a.lua | 4 +- mods/ra/maps/soviet-02b/map.yaml | 2 + mods/ra/maps/soviet-02b/soviet02b.lua | 6 +- mods/ra/maps/soviet-03/map.yaml | 2 + mods/ra/maps/soviet-03/soviet03.lua | 13 +- mods/ra/maps/soviet-04a/map.yaml | 2 + mods/ra/maps/soviet-04a/soviet04a.lua | 6 +- mods/ra/maps/soviet-04b/map.yaml | 2 + mods/ra/maps/soviet-04b/soviet04b.lua | 6 +- mods/ra/maps/soviet-05/map.yaml | 2 + mods/ra/maps/soviet-05/soviet05.lua | 14 +- mods/ra/maps/soviet-06a/map.yaml | 2 + mods/ra/maps/soviet-06a/soviet06a.lua | 8 +- mods/ra/maps/soviet-06b/map.yaml | 2 + mods/ra/maps/soviet-06b/soviet06b.lua | 8 +- mods/ra/maps/soviet-07/map.yaml | 2 + mods/ra/maps/soviet-07/soviet07.lua | 19 +- mods/ra/maps/soviet-08a/map.yaml | 2 + mods/ra/maps/soviet-08a/soviet08a.lua | 6 +- mods/ra/maps/soviet-08b/map.yaml | 2 + mods/ra/maps/soviet-08b/soviet08b.lua | 6 +- mods/ra/maps/soviet-09/map.yaml | 2 + mods/ra/maps/soviet-09/soviet09.lua | 8 +- mods/ra/maps/soviet-10/map.yaml | 2 + mods/ra/maps/soviet-10/soviet10.lua | 18 +- mods/ra/maps/soviet-11a/map.yaml | 2 + mods/ra/maps/soviet-11a/soviet11a.lua | 4 +- mods/ra/maps/soviet-11b/map.yaml | 2 + mods/ra/maps/soviet-11b/soviet11b.lua | 4 +- .../soviet-soldier-volkov-n-chitzkoi/map.yaml | 2 + .../soviet-soldier-volkov-n-chitzkoi.lua | 16 +- mods/ra/maps/survival01/map.yaml | 2 + mods/ra/maps/survival01/survival01.lua | 28 +- mods/ra/maps/survival02/map.yaml | 2 + mods/ra/maps/survival02/survival02.lua | 26 +- mods/ra/maps/top-o-the-world/map.yaml | 2 + .../maps/top-o-the-world/top-o-the-world.lua | 12 +- mods/ra/scripts/campaign.lua | 8 +- 110 files changed, 899 insertions(+), 331 deletions(-) create mode 100644 mods/ra/languages/lua/en.ftl diff --git a/mods/ra/languages/lua/en.ftl b/mods/ra/languages/lua/en.ftl new file mode 100644 index 0000000000..d32bafbe85 --- /dev/null +++ b/mods/ra/languages/lua/en.ftl @@ -0,0 +1,391 @@ +## campaign.lua +objective-failed = Objective failed +objective-completed = Objective completed + +primary = Primary +secondary = Secondary + +new-primary-objective = New primary objective +new-secondary-objective = New secondary objective + +## allies01, allies-03, allies-05abc, evacuation, personal-war +tanya = Tanya + +## allies-01 +extract-einstein-helicopter = Wait for the helicopter and extract Einstein. +find-einstein = Find Einstein. +einstein-survive = Einstein must survive. +protect-civilians = Protect all civilians. + +## allies-01, allies-03, allies-05abc, evacuation +tanya-rules-of-engagement = According to the rules of engagement I need your explicit orders to fire, Commander! + +# allies-01, allies-05abc, evacuation +tanya-survive = Tanya must survive. + +## allies-02, soviet-06 +escort-convoy = Escort the convoy. + +## allies-02 +convoy-arrived = The convoy arrived! +secure-convoy = Secure the convoy's path. +eliminate-soviets = Eliminate the entire Soviet presence in this area. + +## allies-03a +destroy-oilpumps = Destroy all Soviet oil pumps. + +## allies-03b +find-lost-tanks = Find our lost tanks. + +## allies-03ab +destroy-bridges = Destroy all bridges. +free-prisoners = Free all Allied soldiers and keep them alive. + +## allies-04 +destroy-soviet-units-buildings = Destroy all Soviet units and buildings in this region. +destroy-convoys = Eliminate all passing Soviet convoys. + +## allies-05a +extract-transport = Get all your forces into the transport. + +# allies-05abc +spy = Spy +disguise-spy = Commander! You have to disguise me in order to get through the enemy patrols. +battlefield-control = Battlefield Control +skip-heroics = Good work! But next time skip the heroics! +rescue-tanya = Rescue Tanya. +elminate-soviet-units = Eliminate all Soviet units in this area. +infiltrate-warfactory = Infiltrate the Soviet warfactory. +destroy-sam-sites-blocker = Destroy all four SAM Sites that block + our reinforcements' helicopter. + +# allies-06ab +soviet-tech-centers-discovered = Coordinates of the Soviet tech centers discovered. +destroy-soviet-buildings-units = Destroy all Soviet buildings and units in the area. +dont-capture-tech-centers = Do not capture the tech centers! Infiltrate one with a spy. +infiltrate-tech-center-spy = Infiltrate one of the Soviet tech centers with a spy. +capture-radar-shore = Capture the Radar Dome at the shore. + +# allies-07 +enemy-approaching = Enemy approaching. +soviet-armored-battalion-arrives-in = Soviet armored battalion arrives in { $time } +destroy-all-soviet-sub-pens = Destroy all Soviet Sub Pens. +clear-area-all-subs = Clear the area of all sub activity. + +## allies-07, soviet-05 +capture-radar-dome = Capture the Radar Dome. + +## soviet-04ab, soviet-05 +defeat-allied-forces = Defeat the Allied forces. + +## allies-08ab +experiment-successful = The experiment is a success! +chronosphere-experiments-completes-in = Chronosphere experiment completes in { $time } +defend-chronosphere-tech-center = Defend the Chronosphere and the Tech Center + at all costs. +chronosphere-needs-power = The Chronosphere must have power when the + timer runs out. +evacuate-scientists-from-island = Evacuate all scientists from the island to + the west. + +## allies09a +extract-kosygin = Extract Kosygin and + get him back to your base. +infiltrate-soviet-command-center-contact-kosygin = Infiltrate the Soviet command center and + contact Kosygin. +kosygin-must-survive = Kosygin must survive. + +## allies-10a +we-are-too-late = We're too late! +incoming-transmission-capitalized = INCOMING TRANSMISSION +deactivate-four-missiles = Commander, we're tracking four missiles. They must be deactivated! We are scrambling a team to assault the missile control bunker. Clear the way and capture the enemy command center. Hurry! +capture-enemy-command-center = Capture the enemy Command Center. Hurry! +disable-atomic-weapons = Find a way to take the atomic weapons off-line. + +## ant-01 +allied-forces-have-arrived = Allied forces have arrived! +defend-outpost-until-reinforcements-arrive = Defend outpost until reinforcements arrive. +reinforcements-arrive-in = Reinforcements arrive in { $time } +find-outpost = Find the outpost. + +## ants-03 +gas-every-ant-nest = Gas every ant nest. +kill-every-ant-above-ground = Kill every ant lurking above ground. + +## evacuation +allied-reinforcements-arrive-in = Allied reinforcements arrive in { $time } +wait-for-helicopter-extract-einstein = Wait for a helicopter at the LZ and extract Einstein. +keep-einstein-alive-at-all-costs = Keep Einstein alive at all costs. +find-einstein-crashed-helicopter = Find Einstein's crashed helicopter. +destroy-sam-sites = Destroy the SAM sites. +hold-position-protect-base = Hold your position and protect the base. +keep-civilians-alive = Do not lose more than { $units } units. +take-out-the-soviet-power-grid = Take out the Soviet power grid. + +## exodus +units-evacuated = { $evacuated } / { $threshold } units evacuated. +evacuate-units = Evacuate { $threshold } units. +destroy-nearby-soviet-airbases = Destroy the nearby Soviet airbases. +evacuate-at-least-one-gap-generator = Evacuate at least one mobile gap generator. +transferring-funds = Transferring funds. +co-commander-missing = Co-Commander is missing + +## fall-of-greece-1-personal-war +civilians-manual-targetting = Commander, there are several civilians in the area. + We'll need you to call out targets. +soviet-aircraft-armor-moving-in = Alfa Niner this is Lima One Six. Be advised, Soviet aircraft and armor moving into your AO. +headquarters = Headquarters +extraction-point-compromised-evacuate-base = Extraction point is compromised. Evacuate the base! +new-extraction-point-northwest = We've set up a new extraction point to the Northwest. +stalin-will-pay = Stalin will pay for what he has done today! + I will bury him with my own hands! +stavros = Stavros +keep-stavros-tanya-alive = Keep Stavros and Tanya alive. +get-tanya-stavros-helicopter = Get Stavros and Tanya to the extraction helicopter. + +## fall-of-greece-2-evacuation +civilians-evacuated = { $evacuated } / { $threshold } civilians evacuated. +chinook-assist-evacuation = Alfa Niner this is Pegasus. We are on site and ready to assist with the evacuation. +chinook-pilot = Chinook pilot +rescue-civlians-island-shelter-easy = Evacuate at least half of the civilians to the island + shelter. +rescue-civlians-island-shelter-normal = Evacuate at least three quarters of the civilians to + the island shelter. +rescue-civlians-island-shelter-hard = Evacuate all civilians to the island shelter. +clear-enemy-submarines = Clear the area of enemy submarine activity. + +## fort-lonestar +no-more-waves = You almost survived the onslaught! No more waves incoming. +defend-fort-lonestar = Defend Fort Lonestar at all costs! + +## in-the-nick-of-time +friendlies-coming-out = Friendlies coming out! +medic = Medic +get-scientists-evacuation-point = Commander, we're detecting Soviet transports headed your way. Get those scientists back to the extraction point in the southeast! +landcom-16-capitalized = LANDCOM 16 +scientists-killed-in-command-center = The scientists were in the Command Center! +too-late = We're too late! +chronosphere-explodes-in = Chronosphere explodes in { $time } +rescue-scientists-extraction-point = Rescue the scientists and escort them back to the + extraction point. + +## infiltration +secure-laboratory-guards = Secure the laboratory by eliminating its guards. +destroy-remaining-soviet-presence = Destroy the remaining Soviet presence. +infiltrate-laboratory = Get our spy into the laboratory undetected. +secure-lab-in = Secure lab in: { $time } +soviet-research-lab-not-secured-in-time = The Soviet research laboratory was not secured in time. + +## intervention +percentage-village-destroyed = { $percentage }% of the village destroyed. +save-village = Save the village. +mcv-main-island = Get your MCV to the main island. +capture-air-force-hq = Locate and capture the enemy's Air Force HQ. + +## monster-tank-madness +find-demitri = Find Dr. Demitri. He is likely hiding in the village + to the far south. +reprogram-super-tanks = Reprogram the super tanks by sending a spy into + the Soviet radar dome. +defend-outpost = Defend and repair our outpost. +super-tank-self-destruct-t-minus-3 = In 3 minutes the super tanks will self-destruct. +evacuate-demitri = Evacuate Dr. Demitri with the helicopter waiting + at our outpost. +super-tank-self-destruct-in = The super tanks self-destruct in { $time } +super-tanks-destroyed = The super tanks are destroyed! +eliminate-super-tanks = Eliminate these super tanks. +steal-money-outpost = Steal money from the nearby outpost with the Thief. +cross-river = Secure transport to the mainland. +find-outpost = Find our outpost and start repairs on it. +evacuate-civilian-hospital = Evacuate all civilians from the hospital. +demitri-extracted-super-tanks-destroyed = Dr. Demitri has been extracted and the super tanks have been dealt with. + +## production-disruption, shock-therapy +capture-enemy-radar-dome = Capture the enemy radar dome. + +## production-disruption +destroy-escaping-submarine = Destroy the submarine before it escapes! +submarine-escapes = The sub is heading for open sea! +submarine-completes-in = Submarine completes in { $time } +destroy-soviet-sub-pen = Destroy the Soviet sub pen. +power-down-tesla-coils = Take down power to the tesla coils. + +## sarin-gas-1-crackdown, soviet09 +convoy-truck-escaping = Convoy truck attempting to escape! + +## sarin-gas-1-crackdown +prevent-soviet-trucks-escaping = Prevent Soviet convoy trucks from escaping. +clear-sector-soviet-presence = Clear the sector of all Soviet presence. +infiltrate-radar-reveal-escape-routes = Infiltrate the Soviet Radar Dome to reveal truck + ecape routes. + +## sarin-gas-2-down-under, situation-critical +scientist = Scientist + +## sarin-gas-2-down-under +flame-turret-deactivated = Flame Turret deactivated. +console = Console +sarin-dispenser-activated = Sarin Nerve Gas dispensers activated. +tesla-coil-deactivated = Tesla Coil deactivated. +tesla-coil-activated = Initialising Tesla Coil defence. +prisoners-escaping = Warning, prisoners are attempting to escape! +intercom = Intercom +hurry-base-compromised = The base is compromised. We have to hurry the execution! +soviet-officer = Soviet Officer +prepare-to-fire = Prepare to Fire! +fire = Fire! +thanks-for-rescue = Thanks for the rescue! +move-nuclear-outside = The Soviets have an unstable nuclear device stored here. + I need to move it out of the facility! +exit-clear-hopefully = I hope the exit is clear! +reach-eastern-exit = Reach the eastern exit of the facility. +free-tanya-keep-alive = Free Tanya and keep her alive. +kill-soviet-officers-scientists = Kill all Soviet officers and scientists. +steal-soviet-mammoth-tank = Steal a Soviet mammoth tank. +no-casualties = Do not lose a single soldier or civilian + under your command. + +## sarin-gas-3-controlled-burn +capture-sarin-plants-intact = Capture all Sarin processing plants intact. +destroy-enemy-compound = Destroy the enemy compound. +cut-power-east = Bring down the power of the base to the east. + +## shock-therapy +destroy-opposition = Destroy all that oppose us. + +## siberian-conflict-1-fresh-tracks +first-trucks-entering = The first trucks are entering your AO. +first-trucks-arrive-in = First trucks arrive in { $time } +destroy-soviet-convoy = Destroy all Soviet convoy trucks. +destroy-bridges-slow-convoy = Destroy the nearby bridges to slow the + convoys down. + +## siberian-conflict-3-wasteland +destroy-soviet-units-infrastructure = Destroy all Soviet units and structures. + +## situation-critical +plans-stolen-erase-data = Plans stolen; erasing all data. +software-update-failed-manual-targets = IFF software update failed. Require manual target input. +volkov = Volkov +missiles-launch-in = Missiles launch in { $time } +too-late = We're too late! +kill-power = Bring the base to low power. Volkov will arrive + once the defenses are down. +infiltrate-bio-weapons-lab-scientist = Infiltrate the bio-weapons lab with the scientist. +destroy-bio-weapons-lab-missile-silos = Destroy the bio-weapons lab and missile silos. +destroy-all-sam-sites-strategic-bombers = Destroy all sam sites on the island. + Our strategic bombers will finish the rest. + +## situation-critical, soviet-soldier-volkov-n-chitzkoi +volkov-survive = Volkov must survive. + +## soviet-01 +raze-village = Raze the village. + +## soviet-02ab, soviet-08a, soviet-11 +protect-command-center = Protect the Command Center. +destroy-allied-units-structures = Destroy all Allied units and structures. + +## soviet-03 +kill-enemy-spy = Kill the enemy spy. +clear-farm-reinforcements = Clear the nearby farm for reinforcements. +scavenge-civilian-buildings = Scavenge the civilian buildings for supplies. +time-remaining = Time Remaining: { $time } + +## soviet-04ab, soviet-08ab, soviet-10 +destroy-radar-dome-reinforcements = Destroy Allied Radar Dome to stop enemy + reinforcements. + +## soviet05 +allied-mcv-island = Allied MCV detected moving to the island. +defend-radar-dome = Defend the Radar Dome. +allied-expansion-movement-detected = Movement of an Allied expansion base discovered. +coordinates-allied-expansion-discovered = Coordinates of an Allied expansion base discovered. + +## soviet06ab +destroy-capture-radar-dome-reinforcements = Destroy or capture the Allied radar dome to stop + enemy reinforcements. +keep-trucks-alive = Keep all trucks alive. + +## soviet07 +deactivate-security-system = Deactivate the security system. +rescue-engineers = Rescue the engineers. +engineers-coolant-station = Get the engineers to the coolant stations. +engineer-reprogram-security = Use an Engineer to reprogram the security system. +engineer-reactor-core = Get an Engineer to the reactor core. +free-dogs = Free the dogs. +time-until-meltdown = Time until Meltdown: { $time } + +## soviet-08ab +destroy-allied-sympathizers-village = Destroy the village of Allied sympathizers. + +## soviet-09 +trucks-stopped-near-allied-base = Commander, the truck has stopped at a nearby allied base. + Allied radio intercepts say the truck has orders to flee the battlefield + if any Soviet units approach the base. +destroy-stolen-convoy-truck = Destroy the stolen convoy truck. + Do not let it escape. +defend-forward-command-center = Defend our forward command center. + +## soviet-10 +run-for-it = RUN FOR IT! +convoy-commander = Convoy commander +we-are-surrounded = We're surrounded! +corridor-closes-in = Corridor closes in { $time } +escort-convoy-mountain-pass = Escort the convoy through the mountain pass. +protect-every-truck = Do not lose a single truck. +save-migs = Do not squander any of our new MiG aircraft. + +## soviet-11b +destroy-allied-naval-base = Destroy Allied naval base. + +## soviet-soldier-volkov-n-chitzkoi +destroy-control-center = Destroy the Control Center. +tank-division-must-not-be-destroyed = Your tank division must not be destroyed before + the alloy facility is dealt with. +keep-chitzkoi-alive = Keep Chitzkoi Alive. +destroy-alloy-facility = Destroy the alloy facility. +heavy-turret-control-destroyed = Excellent! The heavy turret control center is destroyed + and now we can deal with the alloy facility. +rebuild-chitzkoy = We can rebuild Chitzkoi. We have the technology. + +## survival01 +french-reinforcements-arrive-in = French reinforcements arrive in { $time } +french-allies-arrived = Our french allies have arrived! +takeover-reinforcements-kill-remaining-soviet-forces = Take control of French reinforcements and + kill all remaining Soviet forces. +takeover-reinforcements-dismantle-soviet-base = Take control of French reinforcements and + dismantle the nearby Soviet base. +enforce-position-hold-until-reinforcements = Enforce your position and hold-out the onslaught + until reinforcements arrive. +destroy-two-sames-before-reinforcements = Destroy the two SAM sites before reinforcements + arrive. +soviets-blocking-gps = The Soviets are blocking our GPS. We need to investigate their new technology. +capture-hold-soviet-airbase-northeast = Capture and hold the Soviet airbase + in the northeast. +french-survived-dismantled-soviet-presence = The French forces have survived and dismantled the Soviet presence in the area! +kill-remaining-soviet-forces = Kill all remaining Soviet forces. +dismantle-nearby-soviet-base = Dismantle the nearby Soviet base. + +## survival02 +destroy-all-soviet-forces = Destroy all Soviet forces in the area. +soviet-reinforcements-arrive-in = Soviet reinforcements arrive in { $time } +reinforced-position-initiate-counter-attack = Excellent work Commander! We have reinforced our position enough to initiate a counter-attack. +incoming-report = Incoming Report +destroy-remaining-soviet-forces-area = Destroy the remaining Soviet forces in the area. +soviet-reinforcements-arrived = Soviet reinforcements have arrived! +repair-bridges-for-reinforcement = Commander! The Soviets destroyed the bridges to disable our reinforcements. Repair them for additional reinforcements. +repair-two-southern-bridges = Repair the two southern bridges. +enforce-position-hold-out-onslaught = Enforce your position and hold-out the onslaught. +remaining-soviet-presence-destroyed = We have destroyed the remaining Soviet presence! +soviet-reinforcements-approaching = The Soviet reinforcements are approaching! + +## top-o-the-world +supply-truck-waystation = Bring the supply truck to the waystation. +waystation-must-not-be-destroyed = The waystation must not be destroyed. +destory-aa-guns-enable-air-support = Destroy all the AA Guns to enable air support. +find-destroy-bridge-stop-allied-reinforcements = Find and destroy the bridge the allies are using + to bring their reinforcements in the area. +air-support-t-minus-3 = Very good comrade general! Our air units just took off + and should be in your area in approximately three minutes. +allied-ground-reinforcements-stopped = This should stop the allied forces from getting their ground based reinforcements. diff --git a/mods/ra/maps/allies-01/allies01.lua b/mods/ra/maps/allies-01/allies01.lua index 6c9a0be72a..704c44b745 100644 --- a/mods/ra/maps/allies-01/allies01.lua +++ b/mods/ra/maps/allies-01/allies01.lua @@ -25,7 +25,7 @@ SendInsertionHelicopter = function() local tanya = passengers[1] Trigger.OnKilled(tanya, TanyaKilledInAction) Trigger.AfterDelay(DateTime.Seconds(4), function() - Media.DisplayMessage("According to the rules of engagement I need your explicit orders to fire, Commander!", "Tanya") + Media.DisplayMessage(UserInterface.Translate("tanya-rules-of-engagement"), UserInterface.Translate("tanya")) end) end @@ -151,7 +151,7 @@ CreateEinstein = function() einstein = Actor.Create(EinsteinType, true, { Location = EinsteinSpawnPoint.Location, Owner = Greece }) einstein.Scatter() Trigger.OnKilled(einstein, RescueFailed) - ExtractObjective = Greece.AddObjective("Wait for the helicopter and extract Einstein.") + ExtractObjective = AddPrimaryObjective(Greece, "extract-einstein-helicopter") Trigger.AfterDelay(DateTime.Seconds(1), function() Media.PlaySpeechNotification(Greece, "TargetFreed") end) end @@ -190,10 +190,10 @@ WorldLoaded = function() InitObjectives(Greece) - FindEinsteinObjective = Greece.AddObjective("Find Einstein.") - TanyaSurviveObjective = Greece.AddObjective("Tanya must survive.") - EinsteinSurviveObjective = Greece.AddObjective("Einstein must survive.") - CivilProtectionObjective = Greece.AddObjective("Protect all civilians.", "Secondary", false) + FindEinsteinObjective = AddPrimaryObjective(Greece, "find-einstein") + TanyaSurviveObjective = AddPrimaryObjective(Greece, "tanya-survive") + EinsteinSurviveObjective = AddPrimaryObjective(Greece, "einstein-survive") + CivilProtectionObjective = AddSecondaryObjective(Greece, "protect-civilians") RunInitialActivities() diff --git a/mods/ra/maps/allies-01/map.yaml b/mods/ra/maps/allies-01/map.yaml index 33bc2f438b..2c54c6720f 100644 --- a/mods/ra/maps/allies-01/map.yaml +++ b/mods/ra/maps/allies-01/map.yaml @@ -448,3 +448,5 @@ Actors: Rules: ra|rules/campaign-rules.yaml, ra|rules/campaign-tooltips.yaml, ra|rules/campaign-palettes.yaml, rules.yaml Weapons: weapons.yaml + +Translations: ra|languages/lua/en.ftl diff --git a/mods/ra/maps/allies-02/allies02.lua b/mods/ra/maps/allies-02/allies02.lua index fc67669cc8..adeef35b1d 100644 --- a/mods/ra/maps/allies-02/allies02.lua +++ b/mods/ra/maps/allies-02/allies02.lua @@ -168,7 +168,9 @@ FinishTimer = function() c = HSLColor.White end - Trigger.AfterDelay(DateTime.Seconds(i), function() UserInterface.SetMissionText("The convoy arrived!", c) end) + Trigger.AfterDelay(DateTime.Seconds(i), function() + UserInterface.SetMissionText(UserInterface.Translate("convoy-arrived"), c) + end) end Trigger.AfterDelay(DateTime.Seconds(6), function() UserInterface.SetMissionText("") end) end @@ -180,7 +182,7 @@ SendTrucks = function() DateTime.TimeLimit = 0 UserInterface.SetMissionText("") - ConvoyObjective = player.AddObjective("Escort the convoy.") + ConvoyObjective = AddPrimaryObjective(player, "escort-convoy") Media.PlaySpeechNotification(player, "ConvoyApproaching") Trigger.AfterDelay(DateTime.Seconds(3), function() @@ -220,10 +222,10 @@ WorldLoaded = function() InitObjectives(player) - ussrObj = ussr.AddObjective("Deny the allies!") + ussrObj = AddPrimaryObjective(ussr, "") - SecureObjective = player.AddObjective("Secure the convoy's path.") - ConquestObjective = player.AddObjective("Eliminate the entire soviet presence in this area.") + SecureObjective = AddPrimaryObjective(player, "secure-convoy") + ConquestObjective = AddPrimaryObjective(player, "eliminate-soviets") Trigger.AfterDelay(DateTime.Seconds(1), function() Media.PlaySpeechNotification(allies, "MissionTimerInitialised") end) diff --git a/mods/ra/maps/allies-02/map.yaml b/mods/ra/maps/allies-02/map.yaml index 4db1b6016a..12ae656cb9 100644 --- a/mods/ra/maps/allies-02/map.yaml +++ b/mods/ra/maps/allies-02/map.yaml @@ -657,3 +657,5 @@ Actors: Owner: Neutral Rules: ra|rules/campaign-rules.yaml, ra|rules/campaign-tooltips.yaml, ra|rules/campaign-palettes.yaml, rules.yaml + +Translations: ra|languages/lua/en.ftl diff --git a/mods/ra/maps/allies-03a/allies03a.lua b/mods/ra/maps/allies-03a/allies03a.lua index d5cb186218..9db90d8f16 100644 --- a/mods/ra/maps/allies-03a/allies03a.lua +++ b/mods/ra/maps/allies-03a/allies03a.lua @@ -51,7 +51,7 @@ SendAlliedUnits = function() if TanyaType == "e7.noautotarget" then Trigger.AfterDelay(DateTime.Seconds(2), function() - Media.DisplayMessage("According to the rules of engagement I need your explicit orders to fire, Commander!", "Tanya") + Media.DisplayMessage(UserInterface.Translate("tanya-rules-of-engagement"), UserInterface.Translate("tanya")) end) end Artillery.Stance = "HoldFire" @@ -107,11 +107,10 @@ InitPlayers = function() end AddObjectives = function() - KillBridges = player.AddObjective("Destroy all bridges.") - TanyaSurvive = player.AddObjective("Tanya must survive.") - KillUSSR = player.AddObjective("Destroy all Soviet oil pumps.", "Secondary", false) - FreePrisoners = player.AddObjective("Free all Allied soldiers and keep them alive.", "Secondary", false) - ussr.AddObjective("Bridges must not be destroyed.") + KillBridges = AddPrimaryObjective(player, "destroy-bridges") + TanyaSurvive = AddPrimaryObjective(player, "tanya-survive") + KillUSSR = AddSecondaryObjective(player, "destroy-oilpumps") + FreePrisoners = AddSecondaryObjective(player, "free-prisoners") end InitTriggers = function() diff --git a/mods/ra/maps/allies-03a/map.yaml b/mods/ra/maps/allies-03a/map.yaml index bfa05baac8..5cc3185748 100644 --- a/mods/ra/maps/allies-03a/map.yaml +++ b/mods/ra/maps/allies-03a/map.yaml @@ -1311,3 +1311,5 @@ Actors: Rules: ra|rules/campaign-rules.yaml, ra|rules/campaign-tooltips.yaml, ra|rules/campaign-palettes.yaml, rules.yaml Weapons: weapons.yaml + +Translations: ra|languages/lua/en.ftl diff --git a/mods/ra/maps/allies-03b/allies03b.lua b/mods/ra/maps/allies-03b/allies03b.lua index 322005ccef..51fbb21ace 100644 --- a/mods/ra/maps/allies-03b/allies03b.lua +++ b/mods/ra/maps/allies-03b/allies03b.lua @@ -64,7 +64,7 @@ SetupAlliedUnits = function() if TanyaType == "e7.noautotarget" then Trigger.AfterDelay(DateTime.Seconds(2), function() - Media.DisplayMessage("According to the rules of engagement I need your explicit orders to fire, Commander!", "Tanya") + Media.DisplayMessage(UserInterface.Translate("tanya-rules-of-engagement"), UserInterface.Translate("tanya")) end) end @@ -173,11 +173,10 @@ end AddObjectives = function() InitObjectives(player) - KillBridges = player.AddObjective("Destroy all bridges.") - TanyaSurvive = player.AddObjective("Tanya must survive.") - FindAllies = player.AddObjective("Find our lost tanks.", "Secondary", false) - FreePrisoners = player.AddObjective("Free all Allied soldiers and keep them alive.", "Secondary", false) - ussr.AddObjective("Bridges must not be destroyed.") + KillBridges = AddPrimaryObjective(player, "destroy-bridges") + TanyaSurvive = AddPrimaryObjective(player, "tanya-survive") + FindAllies = AddSecondaryObjective(player, "find-lost-tanks") + FreePrisoners = AddSecondaryObjective(player, "free-prisoners") end InitTriggers = function() diff --git a/mods/ra/maps/allies-03b/map.yaml b/mods/ra/maps/allies-03b/map.yaml index 56088dc7a9..de488d0018 100644 --- a/mods/ra/maps/allies-03b/map.yaml +++ b/mods/ra/maps/allies-03b/map.yaml @@ -1211,3 +1211,5 @@ Actors: Rules: ra|rules/campaign-rules.yaml, ra|rules/campaign-tooltips.yaml, ra|rules/campaign-palettes.yaml, rules.yaml Weapons: weapons.yaml + +Translations: ra|languages/lua/en.ftl diff --git a/mods/ra/maps/allies-04/allies04.lua b/mods/ra/maps/allies-04/allies04.lua index 66347d68c5..ef9f9d8400 100644 --- a/mods/ra/maps/allies-04/allies04.lua +++ b/mods/ra/maps/allies-04/allies04.lua @@ -139,8 +139,8 @@ Tick = function() end AddObjectives = function() - KillUSSR = player.AddObjective("Destroy all Soviet units and buildings in this region.") - DestroyConvoys = player.AddObjective("Eliminate all passing Soviet convoys.", "Secondary", false) + KillUSSR = AddPrimaryObjective(player, "destroy-soviet-units-buildings") + DestroyConvoys = AddSecondaryObjective(player, "destroy-convoys") end WorldLoaded = function() diff --git a/mods/ra/maps/allies-04/map.yaml b/mods/ra/maps/allies-04/map.yaml index 5525cd6023..467ba2b458 100644 --- a/mods/ra/maps/allies-04/map.yaml +++ b/mods/ra/maps/allies-04/map.yaml @@ -534,3 +534,5 @@ Actors: Owner: Neutral Rules: ra|rules/campaign-rules.yaml, ra|rules/campaign-tooltips.yaml, ra|rules/campaign-palettes.yaml, rules.yaml + +Translations: ra|languages/lua/en.ftl diff --git a/mods/ra/maps/allies-05a/allies05a.lua b/mods/ra/maps/allies-05a/allies05a.lua index c660f3290b..1982e7b11b 100644 --- a/mods/ra/maps/allies-05a/allies05a.lua +++ b/mods/ra/maps/allies-05a/allies05a.lua @@ -137,7 +137,7 @@ SendWaterExtraction = function() Camera.Position = flare.CenterPosition WaterExtractionTran = Reinforcements.ReinforceWithTransport(greece, ExtractionTransport, nil, SpyEntryPath)[1] - ExtractObj = greece.AddObjective("Get all your forces into the transport.") + ExtractObj = AddPrimaryObjective(greece, "extract-transport") Trigger.OnKilled(WaterExtractionTran, function() ussr.MarkCompletedObjective(ussrObj) end) Trigger.OnAllRemovedFromWorld(greece.GetGroundAttackers(), function() @@ -185,20 +185,20 @@ FreeTanya = function() if TanyaType == "e7.noautotarget" then Trigger.AfterDelay(DateTime.Seconds(1), function() - Media.DisplayMessage("According to the rules of engagement I need your explicit orders to fire, Commander!", "Tanya") + Media.DisplayMessage(UserInterface.Translate("tanya-rules-of-engagement"), UserInterface.Translate("tanya")) end) end Trigger.OnKilled(Tanya, function() ussr.MarkCompletedObjective(ussrObj) end) if Difficulty == "tough" then - KillSams = greece.AddObjective("Destroy all four SAM Sites that block\nour reinforcements' helicopter.") + KillSams = AddPrimaryObjective(greece, "destroy-sam-sites-blocker") greece.MarkCompletedObjective(mainObj) - surviveObj = greece.AddObjective("Tanya must not die!") + surviveObj = AddPrimaryObjective(greece, "tanya-survive") Media.PlaySpeechNotification(greece, "TanyaRescued") else - KillSams = greece.AddObjective("Destroy all four SAM sites that block\nthe extraction helicopter.") + KillSams = AddPrimaryObjective(greece, "destroy-sam-sites-blocker") Media.PlaySpeechNotification(greece, "TargetFreed") end @@ -220,7 +220,7 @@ SendSpy = function() end Trigger.AfterDelay(DateTime.Seconds(3), function() - Media.DisplayMessage("Commander! You have to disguise me in order to get through the enemy patrols.", "Spy") + Media.DisplayMessage(UserInterface.Translate("disguise-spy"), "Spy") end) end @@ -264,7 +264,7 @@ InitTriggers = function() end if not greece.IsObjectiveCompleted(infWarfactory) then - Media.DisplayMessage("Good work! But next time skip the heroics!", "Battlefield Control") + Media.DisplayMessage(UserInterface.Translate("skip-heroics"), UserInterface.Translate("battlefield-control")) greece.MarkCompletedObjective(infWarfactory) end @@ -372,10 +372,10 @@ InitTriggers = function() end AddObjectives = function() - ussrObj = ussr.AddObjective("Deny the Allies.") - mainObj = greece.AddObjective("Rescue Tanya.") - KillAll = greece.AddObjective("Eliminate all Soviet units in this area.") - infWarfactory = greece.AddObjective("Infiltrate the Soviet warfactory.", "Secondary", false) + ussrObj = AddPrimaryObjective(ussr, "") + mainObj = AddPrimaryObjective(greece, "rescue-tanya") + KillAll = AddPrimaryObjective(greece, "elminate-soviet-units") + infWarfactory = AddSecondaryObjective(greece, "infiltrate-warfactory") end WorldLoaded = function() diff --git a/mods/ra/maps/allies-05a/map.yaml b/mods/ra/maps/allies-05a/map.yaml index db4633d5fc..97b7e11591 100644 --- a/mods/ra/maps/allies-05a/map.yaml +++ b/mods/ra/maps/allies-05a/map.yaml @@ -1564,3 +1564,5 @@ Rules: ra|rules/campaign-rules.yaml, ra|rules/campaign-tooltips.yaml, ra|rules/c Weapons: weapons.yaml Notifications: notifications.yaml + +Translations: ra|languages/lua/en.ftl diff --git a/mods/ra/maps/allies-05b/allies05b.lua b/mods/ra/maps/allies-05b/allies05b.lua index 278ec5f646..cb84a45c5b 100644 --- a/mods/ra/maps/allies-05b/allies05b.lua +++ b/mods/ra/maps/allies-05b/allies05b.lua @@ -50,7 +50,7 @@ SendSpy = function() Trigger.OnKilled(Spy, function() USSR.MarkCompletedObjective(USSRObj) end) Trigger.AfterDelay(DateTime.Seconds(3), function() - Media.DisplayMessage("Commander! You have to disguise me in order to get through the enemy patrols.", "Spy") + Media.DisplayMessage(UserInterface.Translate("disguise-spy"), "Spy") if SpecialCameras then SpyCameraA = Actor.Create("camera", true, { Owner = Greece, Location = SpyCamera1.Location }) SpyCameraB = Actor.Create("camera", true, { Owner = Greece, Location = SpyCamera2.Location }) @@ -239,7 +239,7 @@ FreeTanya = function() if TanyaType == "e7.noautotarget" then Trigger.AfterDelay(DateTime.Seconds(1), function() - Media.DisplayMessage("According to the rules of engagement I need your explicit orders to fire, Commander!", "Tanya") + Media.DisplayMessage(UserInterface.Translate("tanya-rules-of-engagement"), UserInterface.Translate("tanya")) end) end @@ -254,7 +254,7 @@ FreeTanya = function() end) end) - KillSams = Greece.AddObjective("Destroy all four SAM sites that block\nthe extraction helicopter.") + KillSams = AddPrimaryObjective(Greece, "destroy-sam-sites-blocker") Trigger.OnKilled(Tanya, function() USSR.MarkCompletedObjective(USSRObj) end) if not SpecialCameras and PrisonCamera and PrisonCamera.IsInWorld then @@ -318,7 +318,7 @@ InitTriggers = function() end if not Greece.IsObjectiveCompleted(InfWarfactory) then - Media.DisplayMessage("Good work! But next time skip the heroics!", "Battlefield Control") + Media.DisplayMessage(UserInterface.Translate("skip-heroics"), UserInterface.Translate("battlefield-control")) Greece.MarkCompletedObjective(InfWarfactory) end @@ -388,10 +388,10 @@ WorldLoaded = function() InitObjectives(Greece) - USSRObj = USSR.AddObjective("Deny the Allies.") - MainObj = Greece.AddObjective("Rescue Tanya.") - KillAll = Greece.AddObjective("Eliminate all Soviet units in this area.") - InfWarfactory = Greece.AddObjective("Infiltrate the Soviet warfactory.", "Secondary", false) + USSRObj = AddPrimaryObjective(USSR, "") + MainObj = AddPrimaryObjective(Greece, "rescue-tanya") + KillAll = AddPrimaryObjective(Greece, "elminate-soviet-units") + InfWarfactory = AddSecondaryObjective(Greece, "infiltrate-warfactory") InitTriggers() SendSpy() diff --git a/mods/ra/maps/allies-05b/map.yaml b/mods/ra/maps/allies-05b/map.yaml index b075b7723d..cd5422f0a8 100644 --- a/mods/ra/maps/allies-05b/map.yaml +++ b/mods/ra/maps/allies-05b/map.yaml @@ -1194,3 +1194,5 @@ Rules: ra|rules/campaign-rules.yaml, ra|rules/campaign-tooltips.yaml, ra|rules/c Weapons: weapons.yaml Notifications: notifications.yaml + +Translations: ra|languages/lua/en.ftl diff --git a/mods/ra/maps/allies-05c/allies05c.lua b/mods/ra/maps/allies-05c/allies05c.lua index 393506ba26..51055061f8 100644 --- a/mods/ra/maps/allies-05c/allies05c.lua +++ b/mods/ra/maps/allies-05c/allies05c.lua @@ -72,7 +72,7 @@ SendSpy = function() end Trigger.AfterDelay(DateTime.Seconds(3), function() - Media.DisplayMessage("Commander! You have to disguise me in order to get through the enemy patrols.", "Spy") + Media.DisplayMessage(UserInterface.Translate("disguise-spy"), UserInterface.Translate("spy")) end) end @@ -184,20 +184,20 @@ FreeTanya = function() if TanyaType == "e7.noautotarget" then Trigger.AfterDelay(DateTime.Seconds(1), function() - Media.DisplayMessage("According to the rules of engagement I need your explicit orders to fire, Commander!", "Tanya") + Media.DisplayMessage(UserInterface.Translate("tanya-rules-of-engagement"), "Tanya") end) end Trigger.OnKilled(Tanya, function() USSR.MarkCompletedObjective(USSRObj) end) if Difficulty == "tough" then - KillSams = Greece.AddObjective("Destroy all six SAM Sites that block\nour reinforcements' helicopter.") + KillSams = AddPrimaryObjective(Greece, "destroy-sam-sites-blocker") Greece.MarkCompletedObjective(MainObj) - SurviveObj = Greece.AddObjective("Tanya must not die!") + SurviveObj = AddPrimaryObjective(Greece, "tanya-survive") Media.PlaySpeechNotification(Greece, "TanyaRescued") else - KillSams = Greece.AddObjective("Destroy all six SAM sites that block\nthe extraction helicopter.") + KillSams = AddPrimaryObjective(Greece, "destroy-sam-sites-blocker") Media.PlaySpeechNotification(Greece, "TargetFreed") end @@ -238,7 +238,7 @@ InitTriggers = function() end if not Greece.IsObjectiveCompleted(InfWarfactory) then - Media.DisplayMessage("Good work! But next time skip the heroics!", "Battlefield Control") + Media.DisplayMessage(UserInterface.Translate("skip-heroics"), UserInterface.Translate("battlefield-control")) Greece.MarkCompletedObjective(InfWarfactory) end @@ -346,10 +346,10 @@ WorldLoaded = function() InitObjectives(Greece) - USSRObj = USSR.AddObjective("Deny the Allies.") - MainObj = Greece.AddObjective("Rescue Tanya.") - KillAll = Greece.AddObjective("Eliminate all Soviet units in this area.") - InfWarfactory = Greece.AddObjective("Infiltrate the Soviet warfactory.", "Secondary", false) + USSRObj = AddPrimaryObjective(USSR, "") + MainObj = AddPrimaryObjective(Greece, "rescue-tanya") + KillAll = AddPrimaryObjective(Greece, "elminate-soviet-units") + InfWarfactory = AddSecondaryObjective(Greece, "infiltrate-warfactory") InitTriggers() SendSpy() diff --git a/mods/ra/maps/allies-05c/map.yaml b/mods/ra/maps/allies-05c/map.yaml index 18872a3060..788d51d15e 100644 --- a/mods/ra/maps/allies-05c/map.yaml +++ b/mods/ra/maps/allies-05c/map.yaml @@ -1065,3 +1065,5 @@ Rules: ra|rules/campaign-rules.yaml, ra|rules/campaign-tooltips.yaml, ra|rules/c Weapons: weapons.yaml Notifications: notifications.yaml + +Translations: ra|languages/lua/en.ftl diff --git a/mods/ra/maps/allies-06a/allies06a.lua b/mods/ra/maps/allies-06a/allies06a.lua index 8690074f56..d626592a0e 100644 --- a/mods/ra/maps/allies-06a/allies06a.lua +++ b/mods/ra/maps/allies-06a/allies06a.lua @@ -126,7 +126,7 @@ CaptureRadarDome = function() end end) - Media.DisplayMessage("Coordinates of the Soviet tech centers discovered.") + Media.DisplayMessage(UserInterface.Translate("soviet-tech-centers-discovered")) if Difficulty == "easy" then Actor.Create("Camera", true, { Owner = player, Location = Weapcam.Location }) @@ -141,7 +141,7 @@ InfiltrateTechCenter = function() return end infiltrated = true - DestroySovietsObj = player.AddObjective("Destroy all Soviet buildings and units in the area.") + DestroySovietsObj = AddPrimaryObjective(player, "destroy-soviet-buildings-units") player.MarkCompletedObjective(InfiltrateTechCenterObj) local Proxy = Actor.Create("powerproxy.paratroopers", false, { Owner = ussr }) @@ -153,7 +153,7 @@ InfiltrateTechCenter = function() Trigger.OnCapture(a, function() if not infiltrated then - Media.DisplayMessage("Do not capture the tech centers! Infiltrate one with a spy.") + Media.DisplayMessage(UserInterface.Translate("dont-capture-tech-centers")) end end) end) @@ -181,8 +181,8 @@ WorldLoaded = function() InitObjectives(player) - InfiltrateTechCenterObj = player.AddObjective("Infiltrate one of the Soviet tech centers with a spy.") - CaptureRadarDomeObj = player.AddObjective("Capture the Radar Dome at the shore.", "Secondary", false) + InfiltrateTechCenterObj = AddPrimaryObjective(player, "infiltrate-tech-center-spy") + CaptureRadarDomeObj = AddSecondaryObjective(player, "capture-radar-shore") Camera.Position = DefaultCameraPosition.CenterPosition diff --git a/mods/ra/maps/allies-06a/map.yaml b/mods/ra/maps/allies-06a/map.yaml index c09580ce46..ee8f773c30 100644 --- a/mods/ra/maps/allies-06a/map.yaml +++ b/mods/ra/maps/allies-06a/map.yaml @@ -630,3 +630,5 @@ Actors: Location: 73,90 Rules: ra|rules/campaign-rules.yaml, ra|rules/campaign-tooltips.yaml, ra|rules/campaign-palettes.yaml, rules.yaml + +Translations: ra|languages/lua/en.ftl diff --git a/mods/ra/maps/allies-06b/allies06b.lua b/mods/ra/maps/allies-06b/allies06b.lua index 85e1e7c24b..eb4de17e60 100644 --- a/mods/ra/maps/allies-06b/allies06b.lua +++ b/mods/ra/maps/allies-06b/allies06b.lua @@ -136,7 +136,7 @@ CaptureRadarDome = function() end end) - Media.DisplayMessage("Coordinates of the Soviet tech centers discovered.") + Media.DisplayMessage(UserInterface.Translate("soviet-tech-centers-discovered")) if Difficulty == "easy" then Actor.Create("Camera", true, { Owner = player, Location = Weapcam.Location }) @@ -151,13 +151,13 @@ InfiltrateTechCenter = function() return end infiltrated = true - DestroySovietsObj = player.AddObjective("Destroy all Soviet buildings and units in the area.") + DestroySovietsObj = AddPrimaryObjective(player, "destroy-soviet-buildings-units") player.MarkCompletedObjective(InfiltrateTechCenterObj) end) Trigger.OnCapture(a, function() if not infiltrated then - Media.DisplayMessage("Do not capture the tech centers! Infiltrate one with a spy.") + Media.DisplayMessage(UserInterface.Translate("dont-capture-tech-centers")) end end) end) @@ -185,8 +185,8 @@ WorldLoaded = function() InitObjectives(player) - InfiltrateTechCenterObj = player.AddObjective("Infiltrate one of the Soviet tech centers with a spy.") - CaptureRadarDomeObj = player.AddObjective("Capture the Radar Dome at the shore.", "Secondary", false) + InfiltrateTechCenterObj = AddPrimaryObjective(player, "infiltrate-tech-center-spy") + CaptureRadarDomeObj = AddSecondaryObjective(player, "capture-radar-shore") Camera.Position = DefaultCameraPosition.CenterPosition diff --git a/mods/ra/maps/allies-06b/map.yaml b/mods/ra/maps/allies-06b/map.yaml index aae40ec63f..2cb6cae442 100644 --- a/mods/ra/maps/allies-06b/map.yaml +++ b/mods/ra/maps/allies-06b/map.yaml @@ -844,3 +844,5 @@ Actors: Owner: Neutral Rules: ra|rules/campaign-rules.yaml, ra|rules/campaign-tooltips.yaml, ra|rules/campaign-palettes.yaml, rules.yaml + +Translations: ra|languages/lua/en.ftl diff --git a/mods/ra/maps/allies-07/allies07.lua b/mods/ra/maps/allies-07/allies07.lua index 008d01b993..7309d356e5 100644 --- a/mods/ra/maps/allies-07/allies07.lua +++ b/mods/ra/maps/allies-07/allies07.lua @@ -114,6 +114,7 @@ StartTimerFunction = function() end end +EnemyApproaching = UserInterface.Translate("enemy-approaching") FinishTimer = function() for i = 0, 5, 1 do local c = TimerColor @@ -121,7 +122,7 @@ FinishTimer = function() c = HSLColor.White end - Trigger.AfterDelay(DateTime.Seconds(i), function() UserInterface.SetMissionText("Enemy approaching", c) end) + Trigger.AfterDelay(DateTime.Seconds(i), function() UserInterface.SetMissionText(EnemyApproaching, c) end) end Trigger.AfterDelay(DateTime.Seconds(6), function() UserInterface.SetMissionText("") end) end @@ -164,7 +165,10 @@ Tick = function() if StartTimer then if ticked > 0 then - UserInterface.SetMissionText("Soviet armored battalion arrives in " .. Utils.FormatTime(ticked), TimerColor) + if (ticked % DateTime.Seconds(1)) == 0 then + Timer = UserInterface.Translate("soviet-armored-battalion-arrives-in", { ["time"] = Utils.FormatTime(ticked) }) + UserInterface.SetMissionText(Timer, TimerColor) + end ticked = ticked - 1 elseif ticked == 0 then FinishTimer() @@ -186,10 +190,10 @@ WorldLoaded = function() Camera.Position = DefaultCameraPosition.CenterPosition InitObjectives(greece) - CaptureRadarDomeObj = greece.AddObjective("Capture the Radar Dome.") - DestroySubPens = greece.AddObjective("Destroy all Soviet Sub Pens") - ClearSubActivity = greece.AddObjective("Clear the area of all sub activity", "Secondary", false) - BeatAllies = ussr.AddObjective("Defeat the Allied forces.") + CaptureRadarDomeObj = AddPrimaryObjective(greece, "capture-radar-dome") + DestroySubPens = AddPrimaryObjective(greece, "destroy-all-soviet-sub-pens") + ClearSubActivity = AddSecondaryObjective(greece, "clear-area-all-subs") + BeatAllies = AddPrimaryObjective(ussr, "") PowerProxy = Actor.Create("powerproxy.paratroopers", false, { Owner = ussr }) diff --git a/mods/ra/maps/allies-07/map.yaml b/mods/ra/maps/allies-07/map.yaml index 454c9758f3..81915d9595 100644 --- a/mods/ra/maps/allies-07/map.yaml +++ b/mods/ra/maps/allies-07/map.yaml @@ -877,3 +877,5 @@ Actors: Location: 33,62 Rules: ra|rules/campaign-rules.yaml, ra|rules/campaign-tooltips.yaml, ra|rules/campaign-palettes.yaml, rules.yaml + +Translations: ra|languages/lua/en.ftl diff --git a/mods/ra/maps/allies-08a/allies08a.lua b/mods/ra/maps/allies-08a/allies08a.lua index 05df7d5f1a..9d99c62089 100644 --- a/mods/ra/maps/allies-08a/allies08a.lua +++ b/mods/ra/maps/allies-08a/allies08a.lua @@ -82,7 +82,7 @@ DefendChronosphereCompleted = function() units[unit] = cells[i] end Chronosphere.Chronoshift(units) - UserInterface.SetMissionText("The experiment is a success!", greece.Color) + UserInterface.SetMissionText(UserInterface.Translate("experiment-successful"), greece.Color) Trigger.AfterDelay(DateTime.Seconds(3), function() greece.MarkCompletedObjective(DefendChronosphere) @@ -104,7 +104,10 @@ Tick = function() end if ticked > 0 then - UserInterface.SetMissionText("Chronosphere experiment completes in " .. Utils.FormatTime(ticked), TimerColor) + if (ticked % DateTime.Seconds(1)) == 0 then + Timer = UserInterface.Translate("chronosphere-experiments-completes-in", { ["time"] = Utils.FormatTime(ticked) }) + UserInterface.SetMissionText(Timer, TimerColor) + end ticked = ticked - 1 elseif ticked == 0 and (greece.PowerState ~= "Normal") then greece.MarkFailedObjective(KeepBasePowered) @@ -120,10 +123,10 @@ WorldLoaded = function() germany = Player.GetPlayer("Germany") InitObjectives(greece) - DefendChronosphere = greece.AddObjective("Defend the Chronosphere and the Tech Center\nat all costs.") - KeepBasePowered = greece.AddObjective("The Chronosphere must have power when the\ntimer runs out.") - EvacuateScientists = greece.AddObjective("Evacuate all scientists from the island to\nthe west.", "Secondary", false) - BeatAllies = ussr.AddObjective("Defeat the Allied forces.") + DefendChronosphere = AddPrimaryObjective(greece, "defend-chronosphere-tech-center") + KeepBasePowered = AddPrimaryObjective(greece, "chronosphere-needs-power") + EvacuateScientists = AddSecondaryObjective(greece, "evacuate-scientists-from-island") + BeatAllies = AddPrimaryObjective(ussr, "") Trigger.AfterDelay(DateTime.Minutes(1), function() Media.PlaySpeechNotification(greece, "TwentyMinutesRemaining") diff --git a/mods/ra/maps/allies-08a/map.yaml b/mods/ra/maps/allies-08a/map.yaml index 25af3b242a..8c69aec9cc 100644 --- a/mods/ra/maps/allies-08a/map.yaml +++ b/mods/ra/maps/allies-08a/map.yaml @@ -988,3 +988,5 @@ Actors: Location: 58,86 Rules: ra|rules/campaign-rules.yaml, ra|rules/campaign-tooltips.yaml, ra|rules/campaign-palettes.yaml, rules.yaml + +Translations: ra|languages/lua/en.ftl diff --git a/mods/ra/maps/allies-08b/allies08b.lua b/mods/ra/maps/allies-08b/allies08b.lua index 42df4de073..04cc1ab84d 100644 --- a/mods/ra/maps/allies-08b/allies08b.lua +++ b/mods/ra/maps/allies-08b/allies08b.lua @@ -82,7 +82,7 @@ DefendChronosphereCompleted = function() units[unit] = cells[i] end Chronosphere.Chronoshift(units) - UserInterface.SetMissionText("The experiment is a success!", greece.Color) + UserInterface.SetMissionText(UserInterface.Translate("experiment-successful"), greece.Color) Trigger.AfterDelay(DateTime.Seconds(3), function() greece.MarkCompletedObjective(DefendChronosphere) @@ -104,7 +104,10 @@ Tick = function() end if ticked > 0 then - UserInterface.SetMissionText("Chronosphere experiment completes in " .. Utils.FormatTime(ticked), TimerColor) + if (ticked % DateTime.Seconds(1)) == 0 then + Timer = UserInterface.Translate("chronosphere-experiments-completes-in", { ["time"] = Utils.FormatTime(ticked) }) + UserInterface.SetMissionText(Timer, TimerColor) + end ticked = ticked - 1 elseif ticked == 0 and (greece.PowerState ~= "Normal") then greece.MarkFailedObjective(KeepBasePowered) @@ -120,10 +123,10 @@ WorldLoaded = function() england = Player.GetPlayer("England") InitObjectives(greece) - DefendChronosphere = greece.AddObjective("Defend the Chronosphere and the Tech Center\nat all costs.") - KeepBasePowered = greece.AddObjective("The Chronosphere must have power when the\ntimer runs out.") - EvacuateScientists = greece.AddObjective("Evacuate all scientists from the island to\nthe east.", "Secondary", false) - BeatAllies = ussr.AddObjective("Defeat the Allied forces.") + DefendChronosphere = AddPrimaryObjective(greece, "defend-chronosphere-tech-center") + KeepBasePowered = AddPrimaryObjective(greece, "chronosphere-needs-power") + EvacuateScientists = AddSecondaryObjective(greece, "evacuate-scientists-from-island") + BeatAllies = AddPrimaryObjective(ussr, "") Trigger.AfterDelay(DateTime.Minutes(1), function() Media.PlaySpeechNotification(greece, "TwentyMinutesRemaining") diff --git a/mods/ra/maps/allies-08b/map.yaml b/mods/ra/maps/allies-08b/map.yaml index 1e4ac8f36d..bbbd879034 100644 --- a/mods/ra/maps/allies-08b/map.yaml +++ b/mods/ra/maps/allies-08b/map.yaml @@ -827,3 +827,5 @@ Actors: Location: 72,60 Rules: ra|rules/campaign-rules.yaml, ra|rules/campaign-tooltips.yaml, ra|rules/campaign-palettes.yaml, rules.yaml + +Translations: ra|languages/lua/en.ftl diff --git a/mods/ra/maps/allies-09a/allies09a.lua b/mods/ra/maps/allies-09a/allies09a.lua index c0d670cf15..1a679358a1 100644 --- a/mods/ra/maps/allies-09a/allies09a.lua +++ b/mods/ra/maps/allies-09a/allies09a.lua @@ -50,7 +50,7 @@ CreateKosygin = function() Media.PlaySpeechNotification(Greece, "ObjectiveMet") local kosygin = Actor.Create(KosyginType, true, { Location = KosyginSpawnPoint.Location, Owner = Greece }) Trigger.OnKilled(kosygin, RescueFailed) - ExtractObjective = Greece.AddObjective("Extract Kosygin and\nget him back to your base.") + ExtractObjective = AddPrimaryObjective(Greece, "extract-kosygin") Trigger.AfterDelay(DateTime.Seconds(1), function() Media.PlaySpeechNotification(Greece, "TargetFreed") end) end @@ -161,9 +161,9 @@ WorldLoaded = function() USSR = Player.GetPlayer("USSR") Camera.Position = DefaultCameraPosition.CenterPosition InitObjectives(Greece) - UseSpyObjective = Greece.AddObjective("Infiltrate the Soviet command center and\ncontact Kosygin.") - KosyginSurviveObjective = Greece.AddObjective("Kosygin must survive.") - USSRObj = USSR.AddObjective("Eliminate all Allied forces.") + UseSpyObjective = AddPrimaryObjective(Greece, "infiltrate-soviet-command-center-contact-kosygin") + KosyginSurviveObjective = AddPrimaryObjective(Greece, "kosygin-must-survive") + USSRObj = AddPrimaryObjective(USSR, "") InitialAlliedReinforcements() InfiltrateForwardCenter() InitialSovietPatrols() diff --git a/mods/ra/maps/allies-09a/map.yaml b/mods/ra/maps/allies-09a/map.yaml index 73829ee095..bd7286fb42 100644 --- a/mods/ra/maps/allies-09a/map.yaml +++ b/mods/ra/maps/allies-09a/map.yaml @@ -973,3 +973,5 @@ Actors: Rules: ra|rules/campaign-rules.yaml, ra|rules/campaign-tooltips.yaml, ra|rules/campaign-palettes.yaml, rules.yaml Weapons: weapons.yaml + +Translations: ra|languages/lua/en.ftl diff --git a/mods/ra/maps/allies-10a/allies10a.lua b/mods/ra/maps/allies-10a/allies10a.lua index 8f0ff55dcb..f4d4e25c0a 100644 --- a/mods/ra/maps/allies-10a/allies10a.lua +++ b/mods/ra/maps/allies-10a/allies10a.lua @@ -60,7 +60,7 @@ MissionTriggers = function() Trigger.OnTimerExpired(function() DateTime.TimeLimit = 0 - Trigger.AfterDelay(1, function() UserInterface.SetMissionText("We're too late!", USSR.Color) end) + Trigger.AfterDelay(1, function() UserInterface.SetMissionText(UserInterface.Translate("we-are-too-late"), USSR.Color) end) USSR.MarkCompletedObjective(HoldOut) end) @@ -99,7 +99,7 @@ LaunchMissiles = function() MissileSilo1.ActivateNukePower(CPos.New(127, 127)) Trigger.AfterDelay(DateTime.Seconds(3), function() - Media.DisplayMessage("INCOMING TRANSMISSION", "LANDCOM 16") + Media.DisplayMessage(UserInterface.Translate("incoming-transmission-capitalized"), UserInterface.Translate("landcom-16-capitalized")) Media.PlaySpeechNotification(Greece, "AbombLaunchDetected") MissileSilo2.ActivateNukePower(CPos.New(127, 127)) end) @@ -120,13 +120,13 @@ LaunchMissiles = function() -- Completing immediately indicates that the FMV is not available -- Fall back to a text message if fmvStart == DateTime.GameTime then - Media.DisplayMessage("Commander, we're tracking four missiles. They must be deactivated! We are scrambling a team to assult the missile control bunker. Clear the way and capture the enemy command center. Hurry!", "LANDCOM 16") + Media.DisplayMessage(UserInterface.Translate("deactivate-four-missiles"), UserInterface.Translate("landcom-16-capitalized")) end end) end) Trigger.AfterDelay(DateTime.Seconds(9), function() - CaptureFCom = Greece.AddObjective("Capture the enemy Command Center. Hurry!") + CaptureFCom = AddPrimaryObjective(Greece, "capture-enemy-command-center") DateTime.TimeLimit = TimerTicks Media.PlaySpeechNotification(Greece, "TimerStarted") Greece.MarkCompletedObjective(ApproachBase) @@ -162,8 +162,8 @@ WorldLoaded = function() InitObjectives(Greece) - HoldOut = USSR.AddObjective("Hold out until missiles reach their destination") - ApproachBase = Greece.AddObjective("Find a way to take the atomic weapons off-line.") + HoldOut = AddPrimaryObjective(USSR, "") + ApproachBase = AddPrimaryObjective(Greece, "disable-atomic-weapons") Camera.Position = DefaultCameraPosition.CenterPosition StandardDrop = Actor.Create("paradrop", false, { Owner = USSR }) diff --git a/mods/ra/maps/allies-10a/map.yaml b/mods/ra/maps/allies-10a/map.yaml index 9c74d72cea..f3b9f9231b 100644 --- a/mods/ra/maps/allies-10a/map.yaml +++ b/mods/ra/maps/allies-10a/map.yaml @@ -1616,3 +1616,5 @@ Actors: Rules: ra|rules/campaign-rules.yaml, ra|rules/campaign-tooltips.yaml, ra|rules/campaign-palettes.yaml, rules.yaml Weapons: weapons.yaml + +Translations: ra|languages/lua/en.ftl diff --git a/mods/ra/maps/ant-01/ant-01.lua b/mods/ra/maps/ant-01/ant-01.lua index de7aeff3e5..367d4fd816 100644 --- a/mods/ra/maps/ant-01/ant-01.lua +++ b/mods/ra/maps/ant-01/ant-01.lua @@ -34,13 +34,14 @@ SendInsertionHelicopter = function() Reinforcements.ReinforceWithTransport(Allies, InsertionHelicopterType, ChopperTeam, InsertionPath, { waypoint4.Location }) end +AlliedForcesHaveArrived = UserInterface.Translate("allied-forces-have-arrived") FinishTimer = function() for i = 0, 9, 1 do local c = TimerColor if i % 2 == 0 then c = HSLColor.White end - Trigger.AfterDelay(DateTime.Seconds(i), function() UserInterface.SetMissionText("Allied forces have arrived!", c) end) + Trigger.AfterDelay(DateTime.Seconds(i), function() UserInterface.SetMissionText(AlliedForcesHaveArrived, c) end) end Trigger.AfterDelay(DateTime.Seconds(10), function() UserInterface.SetMissionText("") end) end @@ -59,7 +60,7 @@ DiscoveredAlliedBase = function(actor, discoverer) --Need to delay this so we don't fail mission before obj added Trigger.AfterDelay(DateTime.Seconds(1), function() - SurviveObjective = Allies.AddObjective("Defend outpost until reinforcements arrive.") + SurviveObjective = AddPrimaryObjective(Allies, "defend-outpost-until-reinforcements-arrive") SetupTimeNotifications() Trigger.OnAllRemovedFromWorld(AlliedBase, function() Allies.MarkFailedObjective(SurviveObjective) @@ -122,7 +123,10 @@ Tick = function() end ticks = ticks - 1; - UserInterface.SetMissionText("Reinforcements arrive in " .. Utils.FormatTime(ticks), TimerColor) + if (ticks % DateTime.Seconds(1)) == 0 then + Timer = UserInterface.Translate("reinforcements-arrive-in", { ["time"] = Utils.FormatTime(ticks) }) + UserInterface.SetMissionText(Timer, TimerColor) + end else if not AtEndGame then Media.PlaySpeechNotification(Allies, "SecondObjectiveMet") @@ -140,7 +144,7 @@ end AddObjectives = function() InitObjectives(Allies) - DiscoverObjective = Allies.AddObjective("Find the outpost.") + DiscoverObjective = AddPrimaryObjective(Allies, "find-outpost") Utils.Do(AlliedBase, function(actor) Trigger.OnEnteredProximityTrigger(actor.CenterPosition, WDist.FromCells(8), function(discoverer, id) diff --git a/mods/ra/maps/ant-01/map.yaml b/mods/ra/maps/ant-01/map.yaml index d097439334..a5877e681f 100644 --- a/mods/ra/maps/ant-01/map.yaml +++ b/mods/ra/maps/ant-01/map.yaml @@ -596,3 +596,5 @@ Actors: Owner: Neutral Rules: ra|rules/campaign-rules.yaml, ra|rules/campaign-tooltips.yaml, rules.yaml, ra|rules/campaign-palettes.yaml + +Translations: ra|languages/lua/en.ftl diff --git a/mods/ra/maps/ant-03/ant-03.lua b/mods/ra/maps/ant-03/ant-03.lua index 2087f4c4f3..f55265ef2f 100644 --- a/mods/ra/maps/ant-03/ant-03.lua +++ b/mods/ra/maps/ant-03/ant-03.lua @@ -94,9 +94,9 @@ WorldLoaded = function() InitObjectives(Spain) - EatSpain = BadGuy.AddObjective("For the Swarm!") - GasNests = Spain.AddObjective("Gas every ant nest.") - KillAll = Spain.AddObjective("Kill every ant lurking above ground.") + EatSpain = AddPrimaryObjective(BadGuy, "") + GasNests = AddPrimaryObjective(Spain, "gas-every-ant-nest") + KillAll = AddPrimaryObjective(Spain, "kill-every-ant-above-ground") Camera.Position = DefaultCameraPosition.CenterPosition Start() diff --git a/mods/ra/maps/ant-03/map.yaml b/mods/ra/maps/ant-03/map.yaml index 0939099c08..02a1ce080c 100644 --- a/mods/ra/maps/ant-03/map.yaml +++ b/mods/ra/maps/ant-03/map.yaml @@ -669,3 +669,5 @@ Actors: Owner: Neutral Rules: ra|rules/campaign-rules.yaml, ra|rules/campaign-tooltips.yaml, ra|rules/campaign-palettes.yaml, rules.yaml + +Translations: ra|languages/lua/en.ftl diff --git a/mods/ra/maps/evacuation/evacuation.lua b/mods/ra/maps/evacuation/evacuation.lua index 8324b5ed7a..39804d989c 100644 --- a/mods/ra/maps/evacuation/evacuation.lua +++ b/mods/ra/maps/evacuation/evacuation.lua @@ -188,7 +188,11 @@ Tick = function() end if allies2.IsLocalPlayer and DateTime.GameTime <= ReinforcementsDelay then - UserInterface.SetMissionText("Allied reinforcements arrive in " .. Utils.FormatTime(ReinforcementsDelay - DateTime.GameTime)) + if DateTime.GameTime % DateTime.Seconds(1) == 0 then + local time = Utils.FormatTime(ReinforcementsDelay - DateTime.GameTime) + local timer = UserInterface.Translate("allied-reinforcements-arrive-in", { ["time"] = time }) + UserInterface.SetMissionText(timer) + end else UserInterface.SetMissionText("") end @@ -234,7 +238,7 @@ SetupTriggers = function() Trigger.OnAllKilledOrCaptured(Sams, function() allies1.MarkCompletedObjective(objDestroySamSites) - objExtractEinstein = allies1.AddObjective("Wait for a helicopter at the LZ and extract Einstein.") + objExtractEinstein = AddPrimaryObjective(allies1, "wait-for-helicopter-extract-einstein") Actor.Create("flare", true, { Owner = allies1, Location = ExtractionLZ.Location + CVec.New(1, -1) }) Beacon.New(allies1, ExtractionLZ.CenterPosition) Media.PlaySpeechNotification(allies1, "SignalFlareNorth") @@ -263,7 +267,7 @@ SetupTriggers = function() ReassignActors(TownUnits, neutral, allies1) Utils.Do(TownUnits, function(a) a.Stance = "Defend" end) allies1.MarkCompletedObjective(objFindEinstein) - objEinsteinSurvival = allies1.AddObjective("Keep Einstein alive at all costs.") + objEinsteinSurvival = AddPrimaryObjective(allies1, "keep-einstein-alive-at-all-costs") Trigger.OnKilled(Einstein, function() allies1.MarkFailedObjective(objEinsteinSurvival) end) @@ -292,7 +296,7 @@ SpawnTanya = function() if Difficulty ~= "easy" and allies1.IsLocalPlayer then Trigger.AfterDelay(DateTime.Seconds(2), function() - Media.DisplayMessage("According to the rules of engagement I need your explicit orders to fire, Commander!", "Tanya") + Media.DisplayMessage(UserInterface.Translate("tanya-rules-of-engagement"), UserInterface.Translate("tanya")) end) end end @@ -339,13 +343,14 @@ WorldLoaded = function() ReassignActors(Map.ActorsInWorld, allies, allies2) SpawnTanya() - objTanyaMustSurvive = allies1.AddObjective("Tanya must survive.") - objFindEinstein = allies1.AddObjective("Find Einstein's crashed helicopter.") - objDestroySamSites = allies1.AddObjective("Destroy the SAM sites.") + objTanyaMustSurvive = AddPrimaryObjective(allies1, "tanya-survive") + objFindEinstein = AddPrimaryObjective(allies1, "find-einstein-crashed-helicopter") + objDestroySamSites = AddPrimaryObjective(allies1, "destroy-sam-sites") - objHoldPosition = allies2.AddObjective("Hold your position and protect the base.") - objLimitLosses = allies2.AddObjective("Do not lose more than " .. DeathThreshold[Difficulty] .. " units.", "Secondary", false) - objCutSovietPower = allies2.AddObjective("Take out the Soviet power grid.", "Secondary", false) + objHoldPosition = AddPrimaryObjective(allies2, "hold-position-protect-base") + local dontLoseMoreThan = UserInterface.Translate("keep-civilians-alive", { ["units"] = DeathThreshold[Difficulty] }) + objLimitLosses = AddSecondaryObjective(allies2, dontLoseMoreThan) + objCutSovietPower = AddSecondaryObjective(allies2, "take-out-the-soviet-power-grid") SetupTriggers() SetupSoviets() diff --git a/mods/ra/maps/evacuation/map.yaml b/mods/ra/maps/evacuation/map.yaml index f6cbf61ca4..c001885cc9 100644 --- a/mods/ra/maps/evacuation/map.yaml +++ b/mods/ra/maps/evacuation/map.yaml @@ -1756,3 +1756,5 @@ Actors: ScriptTags: TownAttacker Rules: ra|rules/campaign-rules.yaml, ra|rules/campaign-tooltips.yaml, ra|rules/campaign-palettes.yaml, ra|rules/coop-missions-rules.yaml, rules.yaml + +Translations: ra|languages/lua/en.ftl diff --git a/mods/ra/maps/exodus/exodus.lua b/mods/ra/maps/exodus/exodus.lua index f4413fed76..6df955c2c8 100644 --- a/mods/ra/maps/exodus/exodus.lua +++ b/mods/ra/maps/exodus/exodus.lua @@ -229,6 +229,12 @@ ManageSovietAircraft = function() end end +SetEvacuateMissionText = function() + local attributes = { ["evacuated"] = UnitsEvacuated, ["threshold"] = unitsEvacuatedThreshold } + local unitsEvacuated = UserInterface.Translate("units-evacuated", attributes) + UserInterface.SetMissionText(unitsEvacuated, TextColor) +end + UnitsEvacuated = 0 EvacuateAlliedUnit = function(unit) if (unit.Owner == allies1 or unit.Owner == allies2) and unit.HasProperty("Move") then @@ -258,7 +264,7 @@ EvacuateAlliedUnit = function(unit) a.Destroy() end) - UserInterface.SetMissionText(UnitsEvacuated .. "/" .. unitsEvacuatedThreshold .. " units evacuated.", TextColor) + SetEvacuateMissionText() if UnitsEvacuated >= unitsEvacuatedThreshold then Utils.Do(humans, function(player) @@ -301,12 +307,12 @@ WorldLoaded = function() end) unitsEvacuatedThreshold = UnitsEvacuatedThreshold[Difficulty] - UserInterface.SetMissionText(UnitsEvacuated .. "/" .. unitsEvacuatedThreshold .. " units evacuated.", TextColor) + SetEvacuateMissionText() Utils.Do(humans, function(player) if player then - evacuateUnits = player.AddObjective("Evacuate " .. unitsEvacuatedThreshold .. " units.") - destroyAirbases = player.AddObjective("Destroy the nearby Soviet airbases.", "Secondary", false) - evacuateMgg = player.AddObjective("Evacuate at least one mobile gap generator.", "Secondary", false) + evacuateUnits = AddPrimaryObjective(player, UserInterface.Translate("evacuate-units", { ["threshold"] = unitsEvacuatedThreshold })) + destroyAirbases = AddSecondaryObjective(player, "destroy-nearby-soviet-airbases") + evacuateMgg = AddSecondaryObjective(player, "evacuate-at-least-one-gap-generator") end end) @@ -318,7 +324,7 @@ WorldLoaded = function() end) end) - sovietObjective = soviets.AddObjective("Eradicate all allied troops.") + sovietObjective = AddPrimaryObjective(soviets, "") if not allies2 or allies1.IsLocalPlayer then Camera.Position = Allies1EntryPoint.CenterPosition @@ -328,7 +334,7 @@ WorldLoaded = function() if not allies2 then allies1.Cash = 10000 - Media.DisplayMessage("Transferring funds.", "Co-Commander is missing") + Media.DisplayMessage(UserInterface.Translate("transferring-funds"), UserInterface.Translate("co-commander-missing")) end SpawnAlliedUnit(MobileConstructionVehicle) diff --git a/mods/ra/maps/exodus/map.yaml b/mods/ra/maps/exodus/map.yaml index 8af80a2a80..21c3e3881d 100644 --- a/mods/ra/maps/exodus/map.yaml +++ b/mods/ra/maps/exodus/map.yaml @@ -1383,3 +1383,5 @@ Actors: Location: 130,45 Rules: ra|rules/campaign-rules.yaml, ra|rules/campaign-tooltips.yaml, ra|rules/campaign-palettes.yaml, ra|rules/coop-missions-rules.yaml, rules.yaml + +Translations: ra|languages/lua/en.ftl diff --git a/mods/ra/maps/fall-of-greece-1-personal-war/map.yaml b/mods/ra/maps/fall-of-greece-1-personal-war/map.yaml index b70d6f7a01..562b3b2db1 100644 --- a/mods/ra/maps/fall-of-greece-1-personal-war/map.yaml +++ b/mods/ra/maps/fall-of-greece-1-personal-war/map.yaml @@ -1308,3 +1308,5 @@ Actors: Rules: ra|rules/campaign-rules.yaml, ra|rules/campaign-tooltips.yaml, ra|rules/campaign-palettes.yaml, rules.yaml Weapons: weapons.yaml + +Translations: ra|languages/lua/en.ftl diff --git a/mods/ra/maps/fall-of-greece-1-personal-war/personal-war.lua b/mods/ra/maps/fall-of-greece-1-personal-war/personal-war.lua index 6a96d75205..c30ef45c64 100644 --- a/mods/ra/maps/fall-of-greece-1-personal-war/personal-war.lua +++ b/mods/ra/maps/fall-of-greece-1-personal-war/personal-war.lua @@ -79,7 +79,7 @@ MissionStart = function() end) end) Trigger.AfterDelay(DateTime.Seconds(6), function() - Media.DisplayMessage("Commander, there are several civilians in the area.\nWe'll need you to call out targets.", "Tanya") + Media.DisplayMessage(UserInterface.Translate("civilians-manual-targetting"), UserInterface.Translate("tanya")) end) end end) @@ -184,7 +184,7 @@ FootprintTriggers = function() foot5Triggered = true Media.PlaySoundNotification(Allies, "AlertBleep") - Media.DisplayMessage("Alfa Niner this is Lima One Six. Be advised, Soviet aircraft and armor moving into your AO.", "Headquarters") + Media.DisplayMessage(UserInterface.Translate("soviet-aircraft-armor-moving-in"), UserInterface.Translate("headquarters")) Utils.Do(Trigger5Team, function(actor) if not actor.IsDead then actor.AttackMove(TacticalNuke1.Location) @@ -205,7 +205,7 @@ FootprintTriggers = function() Trigger.AfterDelay(DateTime.Seconds(20), function() Media.PlaySoundNotification(Allies, "AlertBuzzer") - Media.DisplayMessage("Extraction point is compromised. Evacuate the base!", "Headquarters") + Media.DisplayMessage(UserInterface.Translate("extraction-point-compromised-evacuate-base"), UserInterface.Translate("headquarters")) local defenders = Reinforcements.Reinforce(England, TentTeam, { Tent.Location, TentMove.Location }, 0) Utils.Do(defenders, IdleHunt) if Difficulty == "hard" then @@ -230,7 +230,7 @@ FootprintTriggers = function() end) Trigger.AfterDelay(DateTime.Seconds(50), function() - Media.DisplayMessage("We've set up a new extraction point to the Northwest.", "Headquarters") + Media.DisplayMessage(UserInterface.Translate("new-extraction-point-northwest"), UserInterface.Translate("headquarters")) end) end end) @@ -362,7 +362,7 @@ FootprintTriggers = function() foot12Triggered = true Media.PlaySoundNotification(Allies, "AlertBleep") - Media.DisplayMessage("Stalin will pay for what he has done today!\nI will bury him with my own hands!", "Stavros") + Media.DisplayMessage(UserInterface.Translate("stalin-will-pay"), UserInterface.Translate("stavros")) end end) end @@ -492,9 +492,9 @@ WorldLoaded = function() InitObjectives(Allies) - SovietObj = USSR.AddObjective("Kill Stavros.") - ProtectVIPs = Allies.AddObjective("Keep Stavros and Tanya alive.") - ExtractStavros = Allies.AddObjective("Get Stavros and Tanya to the extraction helicopter.") + SovietObj = AddPrimaryObjective(USSR, "") + ProtectVIPs = AddPrimaryObjective(Allies, "keep-stavros-tanya-alive") + ExtractStavros = AddPrimaryObjective(Allies, "get-tanya-stavros-helicopter") InsertionDrop = Actor.Create("insertiondrop", false, { Owner = Allies }) InsertionDropHard = Actor.Create("insertiondrophard", false, { Owner = Allies }) diff --git a/mods/ra/maps/fall-of-greece-2-evacuation/evacuation.lua b/mods/ra/maps/fall-of-greece-2-evacuation/evacuation.lua index 613183f826..156b3a868b 100644 --- a/mods/ra/maps/fall-of-greece-2-evacuation/evacuation.lua +++ b/mods/ra/maps/fall-of-greece-2-evacuation/evacuation.lua @@ -177,6 +177,12 @@ VillageSetup = function() end) end +SetCivilianEvacuatedText = function() + local attributes = { ["evacuated"] = CiviliansEvacuated, ["threshold"] = CiviliansEvacuatedThreshold } + local civiliansEvacuated = UserInterface.Translate("civilians-evacuated", attributes) + UserInterface.SetMissionText(civiliansEvacuated, TextColor) +end + CiviliansEvacuatedThreshold = { hard = 20, @@ -194,7 +200,7 @@ CiviliansKilled = 0 EvacuateCivilians = function() Trigger.OnInfiltrated(SafeHouse, function() CiviliansEvacuated = CiviliansEvacuated + 1 - UserInterface.SetMissionText(CiviliansEvacuated .. "/" .. CiviliansEvacuatedThreshold .. " civilians evacuated.", TextColor) + SetCivilianEvacuatedText() end) Trigger.OnKilled(SafeHouse, function() @@ -209,7 +215,7 @@ EvacuateCivilians = function() Trigger.OnAllKilled(enemyBase, function() Media.PlaySoundNotification(Allies, "AlertBleep") - Media.DisplayMessage("Alfa Niner this is Pegasus. We are on site and ready to assist with the evacuation.", "Chinook pilot") + Media.DisplayMessage(UserInterface.Translate("chinook-assist-evacuation"), UserInterface.Translate("chinook-pilot")) Reinforcements.Reinforce(Allies, { "tran" }, { ChinookEntry.Location, ChinookLZ.Location }) end) end @@ -236,20 +242,20 @@ WorldLoaded = function() InitObjectives(Allies) if Difficulty == "easy" then - RescueCivilians = Allies.AddObjective("Evacuate at least half of the civilians to the island\nshelter.") + RescueCivilians = AddPrimaryObjective(Allies, "rescue-civlians-island-shelter-easy") elseif Difficulty == "normal" then - RescueCivilians = Allies.AddObjective("Evacuate at least three quarters of the civilians to\nthe island shelter.") + RescueCivilians = AddPrimaryObjective(Allies, "rescue-civlians-island-shelter-normal") else - RescueCivilians = Allies.AddObjective("Evacuate all civilians to the island shelter.") + RescueCivilians = AddPrimaryObjective(Allies, "rescue-civlians-island-shelter-hard") end - ClearWaterway = Allies.AddObjective("Clear the area of enemy submarine activity.", "Secondary", false) - SovietObj = USSR.AddObjective("Defeat Allies.") + ClearWaterway = AddSecondaryObjective(Allies, "clear-enemy-submarines") + SovietObj = AddPrimaryObjective(USSR, "") CiviliansEvacuatedThreshold = CiviliansEvacuatedThreshold[Difficulty] CiviliansKilledThreshold = CiviliansKilledThreshold[Difficulty] TextColor = Allies.Color - UserInterface.SetMissionText(CiviliansEvacuated .. "/" .. CiviliansEvacuatedThreshold .. " civilians evacuated.", TextColor) + SetCivilianEvacuatedText() StandardDrop = Actor.Create("paradrop", false, { Owner = USSR }) FlamerDrop = Actor.Create("flamerdrop", false, { Owner = USSR }) Camera.Position = DefaultCameraPosition.CenterPosition diff --git a/mods/ra/maps/fall-of-greece-2-evacuation/map.yaml b/mods/ra/maps/fall-of-greece-2-evacuation/map.yaml index 7f3fb80390..91b97eb92c 100644 --- a/mods/ra/maps/fall-of-greece-2-evacuation/map.yaml +++ b/mods/ra/maps/fall-of-greece-2-evacuation/map.yaml @@ -1044,3 +1044,5 @@ Actors: Owner: Neutral Rules: ra|rules/campaign-rules.yaml, ra|rules/campaign-tooltips.yaml, ra|rules/campaign-palettes.yaml, rules.yaml + +Translations: ra|languages/lua/en.ftl diff --git a/mods/ra/maps/fort-lonestar/fort-lonestar.lua b/mods/ra/maps/fort-lonestar/fort-lonestar.lua index 72221d5f4f..668cf3511f 100644 --- a/mods/ra/maps/fort-lonestar/fort-lonestar.lua +++ b/mods/ra/maps/fort-lonestar/fort-lonestar.lua @@ -167,7 +167,7 @@ SendWave = function() end Trigger.AfterDelay(DateTime.Minutes(1), SovietsRetreating) - Media.DisplayMessage("You almost survived the onslaught! No more waves incoming.") + Media.DisplayMessage(UserInterface.Translate("no-more-waves")) end end) end @@ -220,7 +220,7 @@ WorldLoaded = function() end end - Media.DisplayMessage("Defend Fort Lonestar at all costs!") + Media.DisplayMessage(UserInterface.Translate("defend-fort-lonestar")) SetupWallOwners() diff --git a/mods/ra/maps/fort-lonestar/map.yaml b/mods/ra/maps/fort-lonestar/map.yaml index 51c30b9dd1..0210f99348 100644 --- a/mods/ra/maps/fort-lonestar/map.yaml +++ b/mods/ra/maps/fort-lonestar/map.yaml @@ -468,3 +468,5 @@ Weapons: weapons.yaml Sequences: sequences.yaml Music: music.yaml + +Translations: ra|languages/lua/en.ftl diff --git a/mods/ra/maps/in-the-nick-of-time/in-the-nick-of-time.lua b/mods/ra/maps/in-the-nick-of-time/in-the-nick-of-time.lua index baac90472c..2e242eddec 100644 --- a/mods/ra/maps/in-the-nick-of-time/in-the-nick-of-time.lua +++ b/mods/ra/maps/in-the-nick-of-time/in-the-nick-of-time.lua @@ -88,7 +88,7 @@ AlliedReinforcements = function() Trigger.OnAllKilled(houseSquad, function() if not AlliesHouse.IsDead then Media.PlaySoundNotification(Greece, "AlertBleep") - Media.DisplayMessage("Friendlies coming out!", "Medic") + Media.DisplayMessage(UserInterface.Translate("friendlies-coming-out"), UserInterface.Translate("medic")) Reinforcements.Reinforce(Greece, AlliedHouseSquad, { VillageSpawnAllies.Location, VillageRally.Location }, 0) end end) @@ -183,7 +183,7 @@ AlliedReinforcements = function() Trigger.AfterDelay(DateTime.Seconds(5), function() Media.PlaySpeechNotification(Greece, "ReinforcementsArrived") - Media.DisplayMessage("Commander, we're detecting Soviet transports headed your way. Get those scientists back to the extraction point in the southeast!", "LANDCOM 16") + Media.DisplayMessage(UserInterface.Translate("get-scientists-evacuation-point"), UserInterface.Translate("landcom-16-capitalized")) local northTeam = Reinforcements.ReinforceWithTransport(Greece, "lst.reinforcement", NorthWaterTeam, NorthWaterPath1, { NorthWaterPath1[1] }) end) @@ -323,7 +323,7 @@ LoseTriggers = function() Trigger.OnKilled(ForwardCommand, function() if not ScientistsFreed then Greece.MarkFailedObjective(RescueScientists) - Media.DisplayMessage("The scientists were in the Command Center!", "LANDCOM 16") + Media.DisplayMessage(UserInterface.Translate("scientists-killed-in-command-center"), UserInterface.Translate("landcom-16-capitalized")) end end) @@ -343,10 +343,13 @@ Tick = function() end if ticked > 0 then - UserInterface.SetMissionText("Chronosphere explodes in " .. Utils.FormatTime(ticked), TimerColor) + if (ticked % DateTime.Seconds(1)) == 0 then + Timer = UserInterface.Translate("chronosphere-explodes-in", { ["time"] = Utils.FormatTime(ticked) }) + UserInterface.SetMissionText(Timer, TimerColor) + end ticked = ticked - 1 elseif ticked == 0 then - UserInterface.SetMissionText("We're too late!", USSR.Color) + UserInterface.SetMissionText(UserInterface.Translate("too-late"), USSR.Color) USSR.MarkCompletedObjective(SovietObj) end end @@ -358,8 +361,8 @@ WorldLoaded = function() InitObjectives(Greece) - SovietObj = USSR.AddObjective("Defeat Allies.") - RescueScientists = Greece.AddObjective("Rescue the scientists and escort them back to the\nextraction point.") + SovietObj = AddPrimaryObjective(USSR, "") + RescueScientists = AddPrimaryObjective(Greece, "rescue-scientists-extraction-point") Camera.Position = DefaultCameraPosition.CenterPosition Paradrop1 = Actor.Create("paradrop1", false, { Owner = USSR }) diff --git a/mods/ra/maps/in-the-nick-of-time/map.yaml b/mods/ra/maps/in-the-nick-of-time/map.yaml index b90b2e5ab0..2bdb71193c 100644 --- a/mods/ra/maps/in-the-nick-of-time/map.yaml +++ b/mods/ra/maps/in-the-nick-of-time/map.yaml @@ -955,3 +955,5 @@ Actors: Owner: Neutral Rules: ra|rules/campaign-rules.yaml, ra|rules/campaign-tooltips.yaml, ra|rules/campaign-palettes.yaml, rules.yaml + +Translations: ra|languages/lua/en.ftl diff --git a/mods/ra/maps/infiltration/infiltration.lua b/mods/ra/maps/infiltration/infiltration.lua index 5911a2b960..e6bbf21b2c 100644 --- a/mods/ra/maps/infiltration/infiltration.lua +++ b/mods/ra/maps/infiltration/infiltration.lua @@ -81,8 +81,8 @@ reinforcementsHaveArrived = false LabInfiltrated = function() Utils.Do(humans, function(player) if player then - secureLab = player.AddObjective("Secure the laboratory by eliminating its guards.") - destroyBase = player.AddObjective("Destroy the remaining Soviet presence.") + secureLab = AddPrimaryObjective(player, "secure-laboratory-guards") + destroyBase = AddPrimaryObjective(player, "destroy-remaining-soviet-presence") player.MarkCompletedObjective(infiltrateLab) Trigger.ClearAll(Lab) Trigger.AfterDelay(0, function() @@ -172,7 +172,7 @@ end InsertSpies = function() Utils.Do(humans, function(player) if player then - infiltrateLab = player.AddObjective("Get our spy into the laboratory undetected.") + infiltrateLab = AddPrimaryObjective(player, "infiltrate-laboratory") end end) @@ -267,11 +267,14 @@ SecureLabTimer = function() end if ticked > 0 then - UserInterface.SetMissionText("Secure lab in: " .. Utils.FormatTime(ticked), TimerColor) + if (ticked % DateTime.Seconds(1)) == 0 then + Timer = UserInterface.Translate("secure-lab-in", { ["time"] = Utils.FormatTime(ticked) }) + UserInterface.SetMissionText(Timer, TimerColor) + end ticked = ticked - 1 elseif ticked <= 0 then TimerColor = soviets.Color - UserInterface.SetMissionText("The Soviet research laboratory was not secured in time.", TimerColor) + UserInterface.SetMissionText(UserInterface.Translate("soviet-research-lab-not-secured-in-time"), TimerColor) SecureLabFailed() end end diff --git a/mods/ra/maps/infiltration/map.yaml b/mods/ra/maps/infiltration/map.yaml index f637866859..ef6ab825e1 100644 --- a/mods/ra/maps/infiltration/map.yaml +++ b/mods/ra/maps/infiltration/map.yaml @@ -1790,3 +1790,5 @@ Actors: Location: 43,50 Rules: ra|rules/campaign-rules.yaml, ra|rules/campaign-tooltips.yaml, ra|rules/campaign-palettes.yaml, ra|rules/coop-missions-rules.yaml, rules.yaml + +Translations: ra|languages/lua/en.ftl diff --git a/mods/ra/maps/intervention/intervention.lua b/mods/ra/maps/intervention/intervention.lua index 13574619e2..5456552c7d 100644 --- a/mods/ra/maps/intervention/intervention.lua +++ b/mods/ra/maps/intervention/intervention.lua @@ -235,7 +235,11 @@ Tick = function() player.MarkFailedObjective(villageObjective) end - UserInterface.SetMissionText(VillagePercentage .. "% of the village destroyed.", CurrentColor) + if CachedVillagePercentage ~= VillagePercentage then + VillageDestroyed = UserInterface.Translate("percentage-village-destroyed", { ["percentage"] = VillagePercentage }) + UserInterface.SetMissionText(VillageDestroyed, CurrentColor) + CachedVillagePercentage = VillagePercentage + end end end @@ -245,9 +249,9 @@ WorldLoaded = function() InitObjectives(player) - sovietObjective = soviets.AddObjective("Destroy the village.") - villageObjective = player.AddObjective("Save the village.") - beachheadObjective = player.AddObjective("Get your MCV to the main island.") + sovietObjective = AddPrimaryObjective(soviets, "") + villageObjective = AddPrimaryObjective(player, "save-village") + beachheadObjective = AddPrimaryObjective(player, "mcv-main-island") beachheadTrigger = false Trigger.OnExitedFootprint(BeachheadTrigger, function(a, id) @@ -256,7 +260,7 @@ WorldLoaded = function() Trigger.RemoveFootprintTrigger(id) player.MarkCompletedObjective(beachheadObjective) - captureObjective = player.AddObjective("Locate and capture the enemy's Air Force HQ.") + captureObjective = AddPrimaryObjective(player, "capture-air-force-hq") if AirForceHQ.IsDead then player.MarkFailedObjective(captureObjective) diff --git a/mods/ra/maps/intervention/map.yaml b/mods/ra/maps/intervention/map.yaml index 92da157464..b3a9fd11b5 100644 --- a/mods/ra/maps/intervention/map.yaml +++ b/mods/ra/maps/intervention/map.yaml @@ -2203,3 +2203,5 @@ Actors: Rules: ra|rules/campaign-rules.yaml, ra|rules/campaign-tooltips.yaml, ra|rules/campaign-palettes.yaml, rules.yaml Weapons: weapons.yaml + +Translations: ra|languages/lua/en.ftl diff --git a/mods/ra/maps/monster-tank-madness/map.yaml b/mods/ra/maps/monster-tank-madness/map.yaml index 3103ab13f4..c4fa984f77 100644 --- a/mods/ra/maps/monster-tank-madness/map.yaml +++ b/mods/ra/maps/monster-tank-madness/map.yaml @@ -2098,3 +2098,5 @@ Rules: ra|rules/campaign-rules.yaml, ra|rules/campaign-tooltips.yaml, ra|rules/c Weapons: weapons.yaml Voices: voices.yaml + +Translations: ra|languages/lua/en.ftl diff --git a/mods/ra/maps/monster-tank-madness/monster-tank-madness.lua b/mods/ra/maps/monster-tank-madness/monster-tank-madness.lua index 6b2561d5a8..6e675d6723 100644 --- a/mods/ra/maps/monster-tank-madness/monster-tank-madness.lua +++ b/mods/ra/maps/monster-tank-madness/monster-tank-madness.lua @@ -67,9 +67,9 @@ SetupAlliedBase = function() AlliedBaseHarv.Owner = player AlliedBaseHarv.FindResources() - FindDemitri = player.AddObjective("Find Dr. Demitri. He is likely hiding in the village\n to the far south.") - InfiltrateRadarDome = player.AddObjective("Reprogram the super tanks by sending a spy into\n the Soviet radar dome.") - DefendOutpost = player.AddObjective("Defend and repair our outpost.", "Secondary", false) + FindDemitri = AddPrimaryObjective(player, "find-demitri") + InfiltrateRadarDome = AddPrimaryObjective(player, "reprogram-super-tanks") + DefendOutpost = AddSecondaryObjective(player, "defend-outpost") player.MarkCompletedObjective(FindOutpost) -- Don't fail the Objective instantly @@ -177,7 +177,7 @@ SuperTankDomeInfiltrated = function() Media.PlaySpeechNotification(player, "ControlCenterDeactivated") Trigger.AfterDelay(DateTime.Seconds(4), function() - Media.DisplayMessage("In 3 minutes the super tanks will self-destruct.") + Media.DisplayMessage(UserInterface.Translate("super-tank-self-destruct-t-minus-3")) Media.PlaySpeechNotification(player, "WarningThreeMinutesRemaining") end) end) @@ -207,7 +207,7 @@ CreateDemitri = function() demitri.Move(DemitriTriggerAreaCenter.Location) Media.PlaySpeechNotification(player, "TargetFreed") - EvacuateDemitri = player.AddObjective("Evacuate Dr. Demitri with the helicopter waiting\n at our outpost.") + EvacuateDemitri = AddPrimaryObjective(player, "evacuate-demitri") player.MarkCompletedObjective(FindDemitri) local flarepos = CPos.New(DemitriLZ.Location.X, DemitriLZ.Location.Y - 1) @@ -249,7 +249,10 @@ Tick = function() end if ticked > 0 then - UserInterface.SetMissionText("The super tanks self-destruct in " .. Utils.FormatTime(ticked), TimerColor) + if (ticked % DateTime.Seconds(1)) == 0 then + Timer = UserInterface.Translate("super-tank-self-destruct-in", { ["time"] = Utils.FormatTime(ticked) }) + UserInterface.SetMissionText(Timer, TimerColor) + end ticked = ticked - 1 elseif ticked == 0 then FinishTimer() @@ -264,7 +267,7 @@ FinishTimer = function() c = HSLColor.White end - Trigger.AfterDelay(DateTime.Seconds(i), function() UserInterface.SetMissionText("The super tanks are destroyed!", c) end) + Trigger.AfterDelay(DateTime.Seconds(i), function() UserInterface.SetMissionText(UserInterface.Translate("super-tanks-destroyed"), c) end) end Trigger.AfterDelay(DateTime.Seconds(10), function() UserInterface.SetMissionText("") end) end @@ -297,15 +300,15 @@ end AddObjectives = function() InitObjectives(player) - EliminateSuperTanks = player.AddObjective("Eliminate these super tanks.") - StealMoney = player.AddObjective("Steal money from the nearby outpost with the Thief.") - CrossRiver = player.AddObjective("Secure transport to the mainland.") - FindOutpost = player.AddObjective("Find our outpost and start repairs on it.") - RescueCivilians = player.AddObjective("Evacuate all civilians from the hospital.", "Secondary", false) - BadGuyObj = badguy.AddObjective("Deny the destruction of the super tanks.") - USSRObj = ussr.AddObjective("Deny the destruction of the super tanks.") - UkraineObj = ukraine.AddObjective("Survive.") - TurkeyObj = turkey.AddObjective("Destroy.") + EliminateSuperTanks = AddPrimaryObjective(player, "eliminate-super-tanks") + StealMoney = AddPrimaryObjective(player, "steal-money-outpost") + CrossRiver = AddPrimaryObjective(player, "cross-river") + FindOutpost = AddPrimaryObjective(player, "find-outpost") + RescueCivilians = AddSecondaryObjective(player, "evacuate-civilian-hospital") + BadGuyObj = AddPrimaryObjective(badguy, "") + USSRObj = AddPrimaryObjective(ussr, "") + UkraineObj = AddPrimaryObjective(ukraine, "") + TurkeyObj = AddPrimaryObjective(turkey, "") Trigger.OnPlayerLost(player, function() ussr.MarkCompletedObjective(USSRObj) @@ -315,7 +318,7 @@ AddObjectives = function() end) Trigger.OnPlayerWon(player, function() - Media.DisplayMessage("Dr. Demitri has been extracted and the super tanks have been dealt with.") + Media.DisplayMessage(UserInterface.Translate("demitri-extracted-super-tanks-destroyed")) ussr.MarkFailedObjective(USSRObj) badguy.MarkFailedObjective(BadGuyObj) ukraine.MarkFailedObjective(UkraineObj) diff --git a/mods/ra/maps/production-disruption/map.yaml b/mods/ra/maps/production-disruption/map.yaml index 310b886b6d..e669043f3d 100644 --- a/mods/ra/maps/production-disruption/map.yaml +++ b/mods/ra/maps/production-disruption/map.yaml @@ -648,3 +648,5 @@ Actors: Owner: Neutral Rules: ra|rules/campaign-rules.yaml, ra|rules/campaign-tooltips.yaml, ra|rules/campaign-palettes.yaml, rules.yaml + +Translations: ra|languages/lua/en.ftl diff --git a/mods/ra/maps/production-disruption/production-disruption.lua b/mods/ra/maps/production-disruption/production-disruption.lua index 9c223399d4..3500e93bd2 100644 --- a/mods/ra/maps/production-disruption/production-disruption.lua +++ b/mods/ra/maps/production-disruption/production-disruption.lua @@ -94,7 +94,7 @@ end PowerDown = false PowerDownTeslas = function() if not PowerDown then - CaptureDome = Greece.AddObjective("Capture the enemy radar dome.", "Secondary", false) + CaptureDome = AddSecondaryObjective(Greece, "capture-enemy-radar-dome") Greece.MarkCompletedObjective(PowerDownTeslaCoils) Media.PlaySpeechNotification(Greece, "ReinforcementsArrived") PowerDown = true @@ -167,7 +167,7 @@ end MissileSubEscape = function() local missileSub = Actor.Create("msub", true, { Owner = USSR, Location = MissileSubSpawn.Location }) Actor.Create("camera", true, { Owner = Greece, Location = SubPath2.Location }) - DestroySub = Greece.AddPrimaryObjective("Destroy the submarine before it escapes!.") + DestroySub = AddPrimaryObjective(Greece, "destroy-escaping-submarine") Utils.Do(SubEscapePath, function(waypoint) missileSub.Move(waypoint.Location) @@ -185,6 +185,7 @@ MissileSubEscape = function() end) end +SubmarineEscapes = UserInterface.Translate("submarine-escapes") FinishTimer = function() for i = 0, 5 do local c = TimerColor @@ -192,7 +193,7 @@ FinishTimer = function() c = HSLColor.White end - Trigger.AfterDelay(DateTime.Seconds(i), function() UserInterface.SetMissionText("The sub is heading for open sea!", c) end) + Trigger.AfterDelay(DateTime.Seconds(i), function() UserInterface.SetMissionText(SubmarineEscapes, c) end) end Trigger.AfterDelay(DateTime.Seconds(6), function() UserInterface.SetMissionText("") end) end @@ -210,7 +211,10 @@ Tick = function() end if ticked > 0 then - UserInterface.SetMissionText("Submarine completes in " .. Utils.FormatTime(ticked), TimerColor) + if (ticked % DateTime.Seconds(1)) == 0 then + Timer = UserInterface.Translate("submarine-completes-in", { ["time"] = Utils.FormatTime(ticked) }) + UserInterface.SetMissionText(Timer, TimerColor) + end ticked = ticked - 1 elseif ticked == 0 and not TimerFinished then MissileSubEscape() @@ -223,9 +227,9 @@ WorldLoaded = function() USSR = Player.GetPlayer("USSR") BadGuy = Player.GetPlayer("BadGuy") - EscapeWithSub = USSR.AddObjective("Get a missile sub to open waters.") - StopProduction = Greece.AddObjective("Destroy the Soviet sub pen.") - PowerDownTeslaCoils = Greece.AddObjective("Take down power to the tesla coils.") + EscapeWithSub = AddPrimaryObjective(USSR, "") + StopProduction = AddPrimaryObjective(Greece, "destroy-soviet-sub-pen") + PowerDownTeslaCoils = AddPrimaryObjective(Greece, "power-down-tesla-coils") InitObjectives(Greece) diff --git a/mods/ra/maps/sarin-gas-1-crackdown/crackdown.lua b/mods/ra/maps/sarin-gas-1-crackdown/crackdown.lua index 427b3f13d3..804719558a 100644 --- a/mods/ra/maps/sarin-gas-1-crackdown/crackdown.lua +++ b/mods/ra/maps/sarin-gas-1-crackdown/crackdown.lua @@ -102,7 +102,7 @@ MoveTruckEscapeRoute = function(truck, route) if truck.IsDead then return else - Media.DisplayMessage("Convoy truck attempting to escape!") + Media.DisplayMessage(UserInterface.Translate("convoy-truck-escaping")) Media.PlaySoundNotification(greece, "AlertBleep") Utils.Do(route, function(waypoint) truck.Move(waypoint.Location) @@ -139,10 +139,10 @@ WorldLoaded = function() InitObjectives(greece) - objDestroyAllTrucks = greece.AddObjective("Prevent Soviet convoy trucks from escaping.") - objKillAll = greece.AddObjective("Clear the sector of all Soviet presence.") - objRadarSpy = greece.AddObjective("Infiltrate the Soviet Radar Dome to reveal truck \necape routes.", "Secondary", false) - ussrObj = ussr.AddObjective("Deny the Allies.") + objDestroyAllTrucks = AddPrimaryObjective(greece, "prevent-soviet-trucks-escaping") + objKillAll = AddPrimaryObjective(greece, "clear-sector-soviet-presence") + objRadarSpy = AddSecondaryObjective(greece, "infiltrate-radar-reveal-escape-routes") + ussrObj = ussr.AddObjective("") ActivateAI() SetupTriggers() diff --git a/mods/ra/maps/sarin-gas-1-crackdown/map.yaml b/mods/ra/maps/sarin-gas-1-crackdown/map.yaml index fe1623287b..86a46a46da 100644 --- a/mods/ra/maps/sarin-gas-1-crackdown/map.yaml +++ b/mods/ra/maps/sarin-gas-1-crackdown/map.yaml @@ -1010,3 +1010,5 @@ Actors: Location: 24,58 Rules: ra|rules/campaign-rules.yaml, ra|rules/campaign-tooltips.yaml, ra|rules/campaign-palettes.yaml, rules.yaml + +Translations: ra|languages/lua/en.ftl diff --git a/mods/ra/maps/sarin-gas-2-down-under/downunder.lua b/mods/ra/maps/sarin-gas-2-down-under/downunder.lua index 09793b8ec9..af851861fd 100644 --- a/mods/ra/maps/sarin-gas-2-down-under/downunder.lua +++ b/mods/ra/maps/sarin-gas-2-down-under/downunder.lua @@ -73,7 +73,7 @@ ConsoleTriggers = function() if actor.Owner == greece then Trigger.RemoveProximityTrigger(id) if not FlameTower1.IsDead then - Media.DisplayMessage("Flame Turret deactivated", "Console") + Media.DisplayMessage(UserInterface.Translate("flame-turret-deactivated"), UserInterface.Translate("console")) FlameTower1.Kill() end end @@ -83,7 +83,7 @@ ConsoleTriggers = function() if actor.Owner == greece then Trigger.RemoveProximityTrigger(id) if not FlameTower2.IsDead then - Media.DisplayMessage("Flame Turret deactivated", "Console") + Media.DisplayMessage(UserInterface.Translate("flame-turret-deactivated"), UserInterface.Translate("console")) FlameTower2.Kill() end end @@ -93,7 +93,7 @@ ConsoleTriggers = function() if actor.Owner == greece then Trigger.RemoveProximityTrigger(id) if not FlameTower3.IsDead then - Media.DisplayMessage("Flame Turret deactivated", "Console") + Media.DisplayMessage(UserInterface.Translate("flame-turret-deactivated"), UserInterface.Translate("console")) FlameTower3.Kill() end end @@ -105,7 +105,7 @@ ConsoleTriggers = function() Trigger.RemoveProximityTrigger(id) gasActive = true - Media.DisplayMessage("Sarin Nerve Gas dispensers activated", "Console") + Media.DisplayMessage(UserInterface.Translate("sarin-dispenser-activated"), UserInterface.Translate("console")) local KillCamera = Actor.Create("camera", true, { Owner = greece, Location = Sarin2.Location }) local flare1 = Actor.Create("flare", true, { Owner = england, Location = Sarin1.Location }) local flare2 = Actor.Create("flare", true, { Owner = england, Location = Sarin2.Location }) @@ -133,7 +133,7 @@ ConsoleTriggers = function() if actor.Owner == greece then Trigger.RemoveProximityTrigger(id) if not BadCoil.IsDead then - Media.DisplayMessage("Tesla Coil deactivated", "Console") + Media.DisplayMessage(UserInterface.Translate("tesla-coil-deactivated"), UserInterface.Translate("console")) BadCoil.Kill() end end @@ -145,7 +145,7 @@ ConsoleTriggers = function() Trigger.RemoveProximityTrigger(id) teslaActive = true - Media.DisplayMessage("Initialising Tesla Coil defence", "Console") + Media.DisplayMessage(UserInterface.Translate("tesla-coil-activated"), UserInterface.Translate("console")) local tesla1 = Actor.Create("tsla", true, { Owner = turkey, Location = TurkeyCoil1.Location }) local tesla2 = Actor.Create("tsla", true, { Owner = turkey, Location = TurkeyCoil2.Location }) Trigger.AfterDelay(DateTime.Seconds(10), function() @@ -163,11 +163,11 @@ ConsoleTriggers = function() if actor.Owner == greece then Trigger.RemoveProximityTrigger(id) if not FlameTowerTanya1.IsDead then - Media.DisplayMessage("Flame Turret deactivated", "Console") + Media.DisplayMessage(UserInterface.Translate("flame-turret-deactivated"), UserInterface.Translate("console")) FlameTowerTanya1.Kill() end if not FlameTowerTanya2.IsDead then - Media.DisplayMessage("Flame Turret deactivated", "Console") + Media.DisplayMessage(UserInterface.Translate("flame-turret-deactivated"), UserInterface.Translate("console")) FlameTowerTanya2.Kill() end end @@ -177,11 +177,11 @@ ConsoleTriggers = function() if actor.Owner == greece then Trigger.RemoveProximityTrigger(id) if not FlameTowerExit1.IsDead then - Media.DisplayMessage("Flame Turret deactivated", "Console") + Media.DisplayMessage(UserInterface.Translate("flame-turret-deactivated"), UserInterface.Translate("console")) FlameTowerExit1.Kill() end if not FlameTowerExit3.IsDead then - Media.DisplayMessage("Flame Turret deactivated", "Console") + Media.DisplayMessage(UserInterface.Translate("flame-turret-deactivated"), UserInterface.Translate("console")) FlameTowerExit3.Kill() end end @@ -366,7 +366,7 @@ PrisonEscape = function() alarmed = true Trigger.RemoveFootprintTrigger(id) - Media.DisplayMessage("Warning, prisoners are attempting to escape!", "Intercom") + Media.DisplayMessage(UserInterface.Translate("prisoners-escaping"), UserInterface.Translate("intercom")) Media.PlaySoundNotification(greece, "AlertBuzzer") Utils.Do(GuardDogs, IdleHunt) end) @@ -374,7 +374,7 @@ end ScientistExecution = function() Media.PlaySoundNotification(greece, "AlertBleep") - Media.DisplayMessage("The base is compromised. We have to hurry the execution!", "Soviet Officer") + Media.DisplayMessage(UserInterface.Translate("hurry-base-compromised"), UserInterface.Translate("soviet-officer")) Utils.Do(DemoTeam, function(actor) actor.AttackMove(DemoDrive2.Location) end) @@ -387,13 +387,13 @@ ScientistExecution = function() Trigger.AfterDelay(DateTime.Seconds(7), function() if not Officer2.IsDead then - Media.DisplayMessage("Prepare to Fire!", "Soviet Officer") + Media.DisplayMessage(UserInterface.Translate("prepare-to-fire"), UserInterface.Translate("soviet-officer")) end end) Trigger.AfterDelay(DateTime.Seconds(15), function() if not Officer2.IsDead then - Media.DisplayMessage("Fire!", "Soviet Officer") + Media.DisplayMessage(UserInterface.Translate("fire"), UserInterface.Translate("soviet-officer")) end Utils.Do(FiringSquad, function(actor) @@ -405,11 +405,11 @@ ScientistExecution = function() end ScientistRescued = function() - Media.DisplayMessage("Thanks for the rescue!", "Scientist") + Media.DisplayMessage(UserInterface.Translate("thanks-for-rescue"), UserInterface.Translate("scientist")) Trigger.AfterDelay(DateTime.Seconds(5), function() if not ScientistMan.IsDead and not DemoTruck.IsDead then - Media.DisplayMessage("The Soviets have an unstable nuclear device stored here. \n I need to move it out of the facility!", "Scientist") + Media.DisplayMessage(UserInterface.Translate("move-nuclear-outside"), UserInterface.Translate("scientist")) DemoTruck.GrantCondition("mission") ScientistMan.EnterTransport(DemoTruck) end @@ -423,7 +423,7 @@ DemoTruckExit = function() return end - Media.DisplayMessage("I hope the exit is clear!", "Scientist") + Media.DisplayMessage(UserInterface.Translate("exit-clear-hopefully"), UserInterface.Translate("scientist")) Utils.Do(DemoTruckPath, function(waypoint) DemoTruck.Move(waypoint.Location) end) @@ -459,13 +459,13 @@ WorldLoaded = function() InitObjectives(greece) - ussrObj = ussr.AddObjective("Defeat the Allies.") - ExitBase = greece.AddObjective("Reach the eastern exit of the facility.") - FreeTanya = greece.AddObjective("Free Tanya and keep her alive.") - KillVIPs = greece.AddObjective("Kill all Soviet officers and scientists.", "Secondary", false) - StealTank = greece.AddObjective("Steal a Soviet mammoth tank.", "Secondary", false) + ussrObj = ussr.AddObjective("") + ExitBase = AddPrimaryObjective(greece, "reach-eastern-exit") + FreeTanya = AddPrimaryObjective(greece, "free-tanya-keep-alive") + KillVIPs = AddSecondaryObjective(greece, "kill-soviet-officers-scientists") + StealTank = AddSecondaryObjective(greece, "steal-soviet-mammoth-tank") if Difficulty == "hard" then - NoCasualties = greece.AddPrimaryObjective("Do not lose a single soldier or civilian\nunder your command.") + NoCasualties = AddPrimaryObjective(greece, "no-casualties") end StartSpy.DisguiseAsType("e1", ussr) diff --git a/mods/ra/maps/sarin-gas-2-down-under/map.yaml b/mods/ra/maps/sarin-gas-2-down-under/map.yaml index ba18407c29..d63b6585e2 100644 --- a/mods/ra/maps/sarin-gas-2-down-under/map.yaml +++ b/mods/ra/maps/sarin-gas-2-down-under/map.yaml @@ -1366,3 +1366,5 @@ Actors: Owner: Neutral Rules: ra|rules/campaign-rules.yaml, ra|rules/campaign-tooltips.yaml, ra|rules/campaign-palettes.yaml, rules.yaml + +Translations: ra|languages/lua/en.ftl diff --git a/mods/ra/maps/sarin-gas-3-controlled-burn/controlledburn.lua b/mods/ra/maps/sarin-gas-3-controlled-burn/controlledburn.lua index 550239bb8f..9d0538f6a1 100644 --- a/mods/ra/maps/sarin-gas-3-controlled-burn/controlledburn.lua +++ b/mods/ra/maps/sarin-gas-3-controlled-burn/controlledburn.lua @@ -72,8 +72,8 @@ MCVArrived = false MCVArrivedTick = false PowerDownTeslas = function() if not MCVArrived then - CaptureSarin = Greece.AddObjective("Capture all Sarin processing plants intact.") - KillBase = Greece.AddObjective("Destroy the enemy compound.") + CaptureSarin = Greece.AddObjective("capture-sarin-plants-intact") + KillBase = Greece.AddObjective("destroy-enemy-compound") Greece.MarkCompletedObjective(TakeOutPower) Media.PlaySpeechNotification(Greece, "ReinforcementsArrived") Reinforcements.Reinforce(Greece, MCVReinforcements[Difficulty], { AlliesSpawn.Location, AlliesMove.Location }) @@ -121,8 +121,8 @@ WorldLoaded = function() USSR = Player.GetPlayer("USSR") BadGuy = Player.GetPlayer("BadGuy") - SovietObj = USSR.AddObjective("Defeat the Allies.") - TakeOutPower = Greece.AddObjective("Bring down the power of the base to the east.") + SovietObj = AddPrimaryObjective(USSR, "") + TakeOutPower = AddPrimaryObjective(Greece, "cut-power-east") InitObjectives(Greece) diff --git a/mods/ra/maps/sarin-gas-3-controlled-burn/map.yaml b/mods/ra/maps/sarin-gas-3-controlled-burn/map.yaml index ff7ed9d88e..1e8f52087a 100644 --- a/mods/ra/maps/sarin-gas-3-controlled-burn/map.yaml +++ b/mods/ra/maps/sarin-gas-3-controlled-burn/map.yaml @@ -1242,3 +1242,5 @@ Actors: Owner: Neutral Rules: ra|rules/campaign-rules.yaml, ra|rules/campaign-tooltips.yaml, ra|rules/campaign-palettes.yaml, rules.yaml + +Translations: ra|languages/lua/en.ftl diff --git a/mods/ra/maps/shock-therapy/map.yaml b/mods/ra/maps/shock-therapy/map.yaml index 41963a5049..ef6cbdb816 100644 --- a/mods/ra/maps/shock-therapy/map.yaml +++ b/mods/ra/maps/shock-therapy/map.yaml @@ -996,3 +996,5 @@ Actors: Owner: Neutral Rules: ra|rules/campaign-rules.yaml, ra|rules/campaign-tooltips.yaml, ra|rules/campaign-palettes.yaml, rules.yaml + +Translations: ra|languages/lua/en.ftl diff --git a/mods/ra/maps/shock-therapy/shock-therapy.lua b/mods/ra/maps/shock-therapy/shock-therapy.lua index 4ab8c7684b..6bc0602704 100644 --- a/mods/ra/maps/shock-therapy/shock-therapy.lua +++ b/mods/ra/maps/shock-therapy/shock-therapy.lua @@ -309,9 +309,9 @@ WorldLoaded = function() InitObjectives(USSR) - BeatRussia = Greece.AddObjective("Stop Ivan.") - KillAll = USSR.AddObjective("Destroy all that oppose us.") - CaptureDome = USSR.AddObjective("Capture the enemy radar dome.", "Secondary", false) + BeatRussia = AddPrimaryObjective(Greece, "") + KillAll = AddPrimaryObjective(USSR, "destroy-opposition") + CaptureDome = AddSecondaryObjective(USSR, "capture-enemy-radar-dome") Camera.Position = LZ.CenterPosition ShockDrop = Actor.Create("shockdrop", false, { Owner = USSR }) diff --git a/mods/ra/maps/siberian-conflict-1-fresh-tracks/fresh-tracks.lua b/mods/ra/maps/siberian-conflict-1-fresh-tracks/fresh-tracks.lua index 45643d52f6..ff6497f93c 100644 --- a/mods/ra/maps/siberian-conflict-1-fresh-tracks/fresh-tracks.lua +++ b/mods/ra/maps/siberian-conflict-1-fresh-tracks/fresh-tracks.lua @@ -204,6 +204,7 @@ BridgeTriggers = function() end) end +FirstTrucksEntering = UserInterface.Translate("first-trucks-entering") FinishTimer = function() for i = 0, 5 do local c = TimerColor @@ -211,7 +212,7 @@ FinishTimer = function() c = HSLColor.White end - Trigger.AfterDelay(DateTime.Seconds(i), function() UserInterface.SetMissionText("The first trucks are entering your AO.", c) end) + Trigger.AfterDelay(DateTime.Seconds(i), function() UserInterface.SetMissionText(FirstTrucksEntering, c) end) end Trigger.AfterDelay(DateTime.Seconds(6), function() UserInterface.SetMissionText("") end) end @@ -220,7 +221,10 @@ ticked = TimerTicks ConvoysSent = false Tick = function() if ticked > 0 then - UserInterface.SetMissionText("First trucks arrive in " .. Utils.FormatTime(ticked), TimerColor) + if (ticked % DateTime.Seconds(1)) == 0 then + Timer = UserInterface.Translate("first-trucks-arrive-in", { ["time"] = Utils.FormatTime(ticked) }) + UserInterface.SetMissionText(Timer, TimerColor) + end ticked = ticked - 1 elseif ticked == 0 and not ConvoysSent then SendConvoys() @@ -236,9 +240,9 @@ WorldLoaded = function() Allies = Player.GetPlayer("Allies") USSR = Player.GetPlayer("USSR") - SovietObj = USSR.AddObjective("Defeat the Allies.") - StopTrucks = Allies.AddObjective("Destroy all Soviet convoy trucks.") - DestroyBridges = Allies.AddObjective("Destroy the nearby bridges to slow the\nconvoys down.", "Secondary", false) + SovietObj = AddPrimaryObjective(USSR, "") + StopTrucks = AddPrimaryObjective(Allies, "destroy-soviet-convoy") + DestroyBridges = AddSecondaryObjective(Allies, "destroy-bridges-slow-convoy") InitObjectives(Allies) diff --git a/mods/ra/maps/siberian-conflict-1-fresh-tracks/map.yaml b/mods/ra/maps/siberian-conflict-1-fresh-tracks/map.yaml index ba32edb195..9f5e514af9 100644 --- a/mods/ra/maps/siberian-conflict-1-fresh-tracks/map.yaml +++ b/mods/ra/maps/siberian-conflict-1-fresh-tracks/map.yaml @@ -670,3 +670,5 @@ Actors: Owner: Neutral Rules: ra|rules/campaign-rules.yaml, ra|rules/campaign-tooltips.yaml, ra|rules/campaign-palettes.yaml, rules.yaml + +Translations: ra|languages/lua/en.ftl diff --git a/mods/ra/maps/siberian-conflict-3-wasteland/map.yaml b/mods/ra/maps/siberian-conflict-3-wasteland/map.yaml index c43746ffdc..45e11137ae 100644 --- a/mods/ra/maps/siberian-conflict-3-wasteland/map.yaml +++ b/mods/ra/maps/siberian-conflict-3-wasteland/map.yaml @@ -1016,3 +1016,5 @@ Actors: Owner: Neutral Rules: ra|rules/campaign-rules.yaml, ra|rules/campaign-tooltips.yaml, ra|rules/campaign-palettes.yaml, rules.yaml + +Translations: ra|languages/lua/en.ftl diff --git a/mods/ra/maps/siberian-conflict-3-wasteland/wasteland.lua b/mods/ra/maps/siberian-conflict-3-wasteland/wasteland.lua index 3263c65480..e6d835d557 100644 --- a/mods/ra/maps/siberian-conflict-3-wasteland/wasteland.lua +++ b/mods/ra/maps/siberian-conflict-3-wasteland/wasteland.lua @@ -56,8 +56,8 @@ WorldLoaded = function() InitObjectives(Allies) - SovietObj = USSR.AddObjective("Stop the Allies") - DestroyAll = Allies.AddObjective("Destroy all Soviet units and structures.") + SovietObj = AddPrimaryObjective(USSR, "") + DestroyAll = AddPrimaryObjective(Allies, "destroy-soviet-units-infrastructure") Camera.Position = DefaultCameraPosition.CenterPosition PowerProxy = Actor.Create("paratroopers", false, { Owner = BadGuy }) diff --git a/mods/ra/maps/situation-critical/map.yaml b/mods/ra/maps/situation-critical/map.yaml index 2417607671..a3c0d48076 100644 --- a/mods/ra/maps/situation-critical/map.yaml +++ b/mods/ra/maps/situation-critical/map.yaml @@ -565,3 +565,5 @@ Actors: Rules: ra|rules/campaign-rules.yaml, ra|rules/campaign-tooltips.yaml, ra|rules/campaign-palettes.yaml, rules.yaml Weapons: weapons.yaml + +Translations: ra|languages/lua/en.ftl diff --git a/mods/ra/maps/situation-critical/situation-critical.lua b/mods/ra/maps/situation-critical/situation-critical.lua index 8d7cac0222..002fbd772c 100644 --- a/mods/ra/maps/situation-critical/situation-critical.lua +++ b/mods/ra/maps/situation-critical/situation-critical.lua @@ -90,7 +90,7 @@ SetupTriggers = function() end) Trigger.OnInfiltrated(BioLab, function() - Media.DisplayMessage("Plans stolen; erasing all data.", "Scientist") + Media.DisplayMessage("plans-stolen-erase-data", "scientist") Trigger.AfterDelay(DateTime.Seconds(5), function() USSR.MarkCompletedObjective(InfiltrateLab) LabInfiltrated = true @@ -137,7 +137,7 @@ SendInVolkov = function() USSR.MarkFailedObjective(VolkovSurvive) end) Trigger.OnAddedToWorld(teamVolkov[1], function(a) - Media.DisplayMessage("IFF software update failed. Require manual target input.", "Volkov") + Media.DisplayMessage(UserInterface.Translate("software-update-failed-manual-targets"), UserInterface.Translate("volkov")) end) Trigger.OnAddedToWorld(teamVolkov[2], function(b) @@ -157,10 +157,13 @@ Tick = function() end if ticked > 0 then - UserInterface.SetMissionText("Missiles launch in " .. Utils.FormatTime(ticked), TimerColor) + if (ticked % DateTime.Seconds(1)) == 0 then + Timer = UserInterface.Translate("missiles-launch-in", { ["time"] = Utils.FormatTime(ticked) }) + UserInterface.SetMissionText(Timer, TimerColor) + end ticked = ticked - 1 elseif ticked == 0 then - UserInterface.SetMissionText("We're too late!", USSR.Color) + UserInterface.SetMissionText(UserInterface.Translate("too-late"), USSR.Color) Turkey.MarkCompletedObjective(LaunchMissles) end end @@ -171,12 +174,12 @@ WorldLoaded = function() InitObjectives(USSR) - LaunchMissles = Turkey.AddObjective("Survive until time expires.") - KillPower = USSR.AddObjective("Bring the base to low power. Volkov will arrive\nonce the defenses are down.") - InfiltrateLab = USSR.AddObjective("Infiltrate the bio-weapons lab with the scientist.") - DestroyFacility = USSR.AddObjective("Destroy the bio-weapons lab and missile silos.") - KillSams = USSR.AddObjective("Destroy all sam sites on the island.\nOur strategic bombers will finish the rest.", "Secondary", false) - VolkovSurvive = USSR.AddObjective("Volkov must survive.") + LaunchMissles = AddPrimaryObjective(Turkey, "") + KillPower = AddPrimaryObjective(USSR, "kill-power") + InfiltrateLab = AddPrimaryObjective(USSR, "infiltrate-bio-weapons-lab-scientist") + DestroyFacility = AddPrimaryObjective(USSR, "destroy-bio-weapons-lab-missile-silos") + KillSams = AddSecondaryObjective(USSR, "destroy-all-sam-sites-strategic-bombers") + VolkovSurvive = AddPrimaryObjective(USSR, "volkov-survive") Trigger.AfterDelay(DateTime.Minutes(3), function() Media.PlaySpeechNotification(USSR, "WarningFiveMinutesRemaining") diff --git a/mods/ra/maps/soviet-01/map.yaml b/mods/ra/maps/soviet-01/map.yaml index 347d190602..5bc91c5ab3 100644 --- a/mods/ra/maps/soviet-01/map.yaml +++ b/mods/ra/maps/soviet-01/map.yaml @@ -588,3 +588,5 @@ Actors: Owner: Neutral Rules: ra|rules/campaign-rules.yaml, ra|rules/campaign-tooltips.yaml, ra|rules/campaign-palettes.yaml, rules.yaml + +Translations: ra|languages/lua/en.ftl diff --git a/mods/ra/maps/soviet-01/soviet01.lua b/mods/ra/maps/soviet-01/soviet01.lua index fe5906fe5f..9376c9edc8 100644 --- a/mods/ra/maps/soviet-01/soviet01.lua +++ b/mods/ra/maps/soviet-01/soviet01.lua @@ -74,7 +74,7 @@ WorldLoaded = function() InitObjectives(player) - VillageRaidObjective = player.AddObjective("Raze the village.") + VillageRaidObjective = AddPrimaryObjective(player, "raze-village") Trigger.OnAllRemovedFromWorld(Airfields, function() player.MarkFailedObjective(VillageRaidObjective) diff --git a/mods/ra/maps/soviet-02a/map.yaml b/mods/ra/maps/soviet-02a/map.yaml index 2ab9e6a7ee..3badde5d16 100644 --- a/mods/ra/maps/soviet-02a/map.yaml +++ b/mods/ra/maps/soviet-02a/map.yaml @@ -512,3 +512,5 @@ Actors: Owner: Neutral Rules: ra|rules/campaign-rules.yaml, ra|rules/campaign-tooltips.yaml, ra|rules/campaign-palettes.yaml, rules.yaml + +Translations: ra|languages/lua/en.ftl diff --git a/mods/ra/maps/soviet-02a/soviet02a.lua b/mods/ra/maps/soviet-02a/soviet02a.lua index 0ff785d433..e6597111ad 100644 --- a/mods/ra/maps/soviet-02a/soviet02a.lua +++ b/mods/ra/maps/soviet-02a/soviet02a.lua @@ -52,8 +52,8 @@ WorldLoaded = function() InitObjectives(player) - CommandCenterIntact = player.AddObjective("Protect the Command Center.") - DestroyAllAllied = player.AddObjective("Destroy all Allied units and structures.") + CommandCenterIntact = AddPrimaryObjective(player, "protect-command-center") + DestroyAllAllied = AddPrimaryObjective(player, "destroy-allied-units-structures") Camera.Position = CameraWaypoint.CenterPosition diff --git a/mods/ra/maps/soviet-02b/map.yaml b/mods/ra/maps/soviet-02b/map.yaml index 605ccac8b3..94479deffa 100644 --- a/mods/ra/maps/soviet-02b/map.yaml +++ b/mods/ra/maps/soviet-02b/map.yaml @@ -491,3 +491,5 @@ Actors: Owner: Neutral Rules: ra|rules/campaign-rules.yaml, ra|rules/campaign-tooltips.yaml, ra|rules/campaign-palettes.yaml, rules.yaml + +Translations: ra|languages/lua/en.ftl diff --git a/mods/ra/maps/soviet-02b/soviet02b.lua b/mods/ra/maps/soviet-02b/soviet02b.lua index 310753520a..210bd8d129 100644 --- a/mods/ra/maps/soviet-02b/soviet02b.lua +++ b/mods/ra/maps/soviet-02b/soviet02b.lua @@ -180,9 +180,9 @@ WorldLoaded = function() end) InitObjectives(player) - alliedObjective = enemy.AddObjective("Destroy all Soviet troops.") - sovietObjective1 = player.AddObjective("Protect the Command Center.") - sovietObjective2 = player.AddObjective("Destroy all Allied units and structures.") + alliedObjective = AddPrimaryObjective(enemy, "") + sovietObjective1 = AddPrimaryObjective(player, "protect-command-center") + sovietObjective2 = AddPrimaryObjective(player, "destroy-allied-units-structures") enemy.Resources = 2000 Trigger.AfterDelay(DateTime.Seconds(30), ProduceInfantry) diff --git a/mods/ra/maps/soviet-03/map.yaml b/mods/ra/maps/soviet-03/map.yaml index e655d17658..1a052d06f8 100644 --- a/mods/ra/maps/soviet-03/map.yaml +++ b/mods/ra/maps/soviet-03/map.yaml @@ -1053,3 +1053,5 @@ Actors: Rules: ra|rules/campaign-rules.yaml, ra|rules/campaign-tooltips.yaml, ra|rules/campaign-palettes.yaml, rules.yaml Notifications: notifications.yaml + +Translations: ra|languages/lua/en.ftl diff --git a/mods/ra/maps/soviet-03/soviet03.lua b/mods/ra/maps/soviet-03/soviet03.lua index a2f111b943..7dd72c67fc 100644 --- a/mods/ra/maps/soviet-03/soviet03.lua +++ b/mods/ra/maps/soviet-03/soviet03.lua @@ -340,10 +340,10 @@ WorldLoaded = function() IntroSequence() InitObjectives(player) - alliedObjective = enemy.AddObjective("Destroy all Soviet troops.") - sovietObjective1 = player.AddObjective("Kill the enemy spy.") - sovietObjective2 = player.AddObjective("Clear the nearby farm for reinforcements.", "Secondary", false) - sovietObjective3 = player.AddObjective("Scavenge the civilian buildings for supplies.", "Secondary", false) + alliedObjective = AddPrimaryObjective(enemy, "") + sovietObjective1 = AddPrimaryObjective(player, "kill-enemy-spy") + sovietObjective2 = AddSecondaryObjective(player, "clear-farm-reinforcements") + sovietObjective3 = AddSecondaryObjective(player, "scavenge-civilian-buildings") end Trigger.OnKilled(TheSpy, function() @@ -371,7 +371,10 @@ Tick = function() Media.PlaySpeechNotification(player, "WarningOneMinuteRemaining") end if remainingTime > 0 and timerstarted then - UserInterface.SetMissionText("Time Remaining: " .. Utils.FormatTime(remainingTime), player.Color) + if (remainingTime % DateTime.Seconds(1)) == 0 then + Timer = UserInterface.Translate("time-remaining", { ["time"] = Utils.FormatTime(remainingTime) }) + UserInterface.SetMissionText(Timer, player.Color) + end remainingTime = remainingTime - 1 elseif remainingTime == 0 and not spyReachedHideout4 then UserInterface.SetMissionText("") diff --git a/mods/ra/maps/soviet-04a/map.yaml b/mods/ra/maps/soviet-04a/map.yaml index f6cc5aea85..753506c34c 100644 --- a/mods/ra/maps/soviet-04a/map.yaml +++ b/mods/ra/maps/soviet-04a/map.yaml @@ -599,3 +599,5 @@ Actors: Owner: Neutral Rules: ra|rules/campaign-rules.yaml, ra|rules/campaign-tooltips.yaml, ra|rules/campaign-palettes.yaml, rules.yaml + +Translations: ra|languages/lua/en.ftl diff --git a/mods/ra/maps/soviet-04a/soviet04a.lua b/mods/ra/maps/soviet-04a/soviet04a.lua index f48446f252..0362b94fbe 100644 --- a/mods/ra/maps/soviet-04a/soviet04a.lua +++ b/mods/ra/maps/soviet-04a/soviet04a.lua @@ -134,9 +134,9 @@ WorldLoaded = function() InitObjectives(player) - KillAll = player.AddObjective("Defeat the Allied forces.") - BeatUSSR = Greece.AddObjective("Defeat the Soviet forces.") - KillRadar = player.AddObjective("Destroy Allied Radar Dome to stop enemy\nreinforcements.", "Secondary", false) + KillAll = AddPrimaryObjective(player, "defeat-allied-forces") + BeatUSSR = AddPrimaryObjective(Greece, "") + KillRadar = AddSecondaryObjective(player, "destroy-radar-dome-reinforcements") Trigger.OnKilled(RadarDome, function() player.MarkCompletedObjective(KillRadar) diff --git a/mods/ra/maps/soviet-04b/map.yaml b/mods/ra/maps/soviet-04b/map.yaml index 216ff45547..04e8d99845 100644 --- a/mods/ra/maps/soviet-04b/map.yaml +++ b/mods/ra/maps/soviet-04b/map.yaml @@ -648,3 +648,5 @@ Actors: Owner: Neutral Rules: ra|rules/campaign-rules.yaml, ra|rules/campaign-tooltips.yaml, ra|rules/campaign-palettes.yaml, rules.yaml + +Translations: ra|languages/lua/en.ftl diff --git a/mods/ra/maps/soviet-04b/soviet04b.lua b/mods/ra/maps/soviet-04b/soviet04b.lua index e05f3b21d6..233a37937e 100644 --- a/mods/ra/maps/soviet-04b/soviet04b.lua +++ b/mods/ra/maps/soviet-04b/soviet04b.lua @@ -119,9 +119,9 @@ WorldLoaded = function() InitObjectives(player) - KillAll = player.AddObjective("Defeat the Allied forces.") - BeatUSSR = Greece.AddObjective("Defeat the Soviet forces.") - KillRadar = player.AddObjective("Destroy Allied Radar Dome to stop enemy\nreinforcements.", "Secondary", false) + KillAll = AddPrimaryObjective(player, "defeat-allied-forces") + BeatUSSR = AddPrimaryObjective(Greece, "") + KillRadar = AddSecondaryObjective(player, "destroy-radar-dome-reinforcements") Trigger.OnKilled(RadarDome, function() player.MarkCompletedObjective(KillRadar) diff --git a/mods/ra/maps/soviet-05/map.yaml b/mods/ra/maps/soviet-05/map.yaml index 4675d6920a..ae9aabe1ea 100644 --- a/mods/ra/maps/soviet-05/map.yaml +++ b/mods/ra/maps/soviet-05/map.yaml @@ -587,3 +587,5 @@ Actors: Owner: Neutral Rules: ra|rules/campaign-rules.yaml, ra|rules/campaign-tooltips.yaml, ra|rules/campaign-palettes.yaml, rules.yaml + +Translations: ra|languages/lua/en.ftl diff --git a/mods/ra/maps/soviet-05/soviet05.lua b/mods/ra/maps/soviet-05/soviet05.lua index 276e89092f..9eb6d20ac0 100644 --- a/mods/ra/maps/soviet-05/soviet05.lua +++ b/mods/ra/maps/soviet-05/soviet05.lua @@ -82,7 +82,7 @@ Expand = function() ExpansionCheck = true Trigger.ClearAll(mcvGG) Trigger.ClearAll(mcvtransport) - Media.DisplayMessage("Allied MCV detected moving to the island.") + Media.DisplayMessage(UserInterface.Translate("allied-mcv-island")) Reinforcements.Reinforce(GoodGuy, { "dd", "dd" }, ShipArrivePath, 0, function(ddsquad) ddsquad.AttackMove(NearExpPoint.Location) end) @@ -188,9 +188,9 @@ WorldLoaded = function() InitObjectives(player) - CaptureObjective = player.AddObjective("Capture the Radar Dome.") - KillAll = player.AddObjective("Defeat the Allied forces.") - BeatUSSR = GoodGuy.AddObjective("Defeat the Soviet forces.") + CaptureObjective = AddPrimaryObjective(player, "capture-radar-dome") + KillAll = AddPrimaryObjective(player, "defeat-allied-forces") + BeatUSSR = AddPrimaryObjective(Greece, "") RunInitialActivities() @@ -214,15 +214,15 @@ WorldLoaded = function() return end - HoldObjective = player.AddObjective("Defend the Radar Dome.") + HoldObjective = AddPrimaryObjective(player, "defend-radar-dome") player.MarkCompletedObjective(CaptureObjective) Beacon.New(player, MCVDeploy.CenterPosition) if Difficulty == "easy" then Actor.Create("camera", true, { Owner = player, Location = MCVDeploy.Location }) - Media.DisplayMessage("Movement of an Allied expansion base discovered.") + Media.DisplayMessage(UserInterface.Translate("allied-expansion-movement-detected")) else Actor.Create("MCV.CAM", true, { Owner = player, Location = MCVDeploy.Location }) - Media.DisplayMessage("Coordinates of an Allied expansion base discovered.") + Media.DisplayMessage(UserInterface.Translate("coordinates-allied-expansion-discovered")) end if not ExpansionCheck then diff --git a/mods/ra/maps/soviet-06a/map.yaml b/mods/ra/maps/soviet-06a/map.yaml index ea79986cc1..e8f6793f48 100644 --- a/mods/ra/maps/soviet-06a/map.yaml +++ b/mods/ra/maps/soviet-06a/map.yaml @@ -827,3 +827,5 @@ Actors: Owner: Greece Rules: ra|rules/campaign-rules.yaml, ra|rules/campaign-tooltips.yaml, ra|rules/campaign-palettes.yaml, rules.yaml + +Translations: ra|languages/lua/en.ftl diff --git a/mods/ra/maps/soviet-06a/soviet06a.lua b/mods/ra/maps/soviet-06a/soviet06a.lua index c86f9352e2..e56daef4c6 100644 --- a/mods/ra/maps/soviet-06a/soviet06a.lua +++ b/mods/ra/maps/soviet-06a/soviet06a.lua @@ -137,10 +137,10 @@ WorldLoaded = function() InitObjectives(player) - alliedObjective = enemy.AddObjective("Destroy all Soviet troops.") - sovietObjective = player.AddObjective("Escort the Convoy.") - sovietObjective2 = player.AddObjective("Destroy or capture the Allied radar dome to stop\nenemy reinforcements.", "Secondary", false) - SaveAllTrucks = player.AddObjective("Keep all trucks alive.", "Secondary", false) + alliedObjective = AddPrimaryObjective(enemy, "") + sovietObjective = AddPrimaryObjective(player, "escort-convoy") + sovietObjective2 = AddSecondaryObjective(player, "destroy-capture-radar-dome-reinforcements") + SaveAllTrucks = AddSecondaryObjective(player, "Keep all trucks alive.") end Tick = function() diff --git a/mods/ra/maps/soviet-06b/map.yaml b/mods/ra/maps/soviet-06b/map.yaml index 36db72fc04..9b34589bea 100644 --- a/mods/ra/maps/soviet-06b/map.yaml +++ b/mods/ra/maps/soviet-06b/map.yaml @@ -504,3 +504,5 @@ Actors: Owner: Greece Rules: ra|rules/campaign-rules.yaml, ra|rules/campaign-tooltips.yaml, ra|rules/campaign-palettes.yaml, rules.yaml + +Translations: ra|languages/lua/en.ftl diff --git a/mods/ra/maps/soviet-06b/soviet06b.lua b/mods/ra/maps/soviet-06b/soviet06b.lua index 6174807377..3e0cd273c5 100644 --- a/mods/ra/maps/soviet-06b/soviet06b.lua +++ b/mods/ra/maps/soviet-06b/soviet06b.lua @@ -101,10 +101,10 @@ WorldLoaded = function() end) InitObjectives(player) - alliedObjective = enemy.AddObjective("Destroy all Soviet troops.") - sovietObjective = player.AddObjective("Escort the Convoy.") - sovietObjective2 = player.AddObjective("Destroy or capture the Allied radar dome to stop\nenemy reinforcements.", "Secondary", false) - SaveAllTrucks = player.AddObjective("Keep all trucks alive.", "Secondary", false) + alliedObjective = AddPrimaryObjective(enemy, "") + sovietObjective = AddPrimaryObjective(player, "escort-convoy") + sovietObjective2 = AddSecondaryObjective(player, "destroy-capture-radar-dome-reinforcements") + SaveAllTrucks = AddSecondaryObjective(player, "Keep all trucks alive.") end Tick = function() diff --git a/mods/ra/maps/soviet-07/map.yaml b/mods/ra/maps/soviet-07/map.yaml index a76fae4070..162e492563 100644 --- a/mods/ra/maps/soviet-07/map.yaml +++ b/mods/ra/maps/soviet-07/map.yaml @@ -794,3 +794,5 @@ Actors: Rules: ra|rules/campaign-rules.yaml, ra|rules/campaign-tooltips.yaml, ra|rules/campaign-palettes.yaml, rules.yaml Weapons: weapons.yaml + +Translations: ra|languages/lua/en.ftl diff --git a/mods/ra/maps/soviet-07/soviet07.lua b/mods/ra/maps/soviet-07/soviet07.lua index 9446f9e444..50fe33de8a 100644 --- a/mods/ra/maps/soviet-07/soviet07.lua +++ b/mods/ra/maps/soviet-07/soviet07.lua @@ -278,13 +278,13 @@ WorldLoaded = function() IntroSequence() InitObjectives(player) - alliedObjective = enemy.AddObjective("Destroy all Soviet troops.") - sovietObjective1 = player.AddObjective("Deactivate the security system.") - sovietObjective2 = player.AddObjective("Rescue the engineers.") - sovietObjective3 = player.AddObjective("Get the engineers to the coolant stations.") - sovietObjective4 = player.AddObjective("Use an Engineer to reprogram the security system.") - sovietObjective5 = player.AddObjective("Get an Engineer to the reactor core.") - sovietObjective6 = player.AddObjective("Free the dogs.", "Secondary", false) + alliedObjective = AddPrimaryObjective(enemy, "") + sovietObjective1 = AddPrimaryObjective(player, "deactivate-security-system") + sovietObjective2 = AddPrimaryObjective(player, "rescue-engineers") + sovietObjective3 = AddPrimaryObjective(player, "engineers-coolant-station") + sovietObjective4 = AddPrimaryObjective(player, "engineer-reprogram-security") + sovietObjective5 = AddPrimaryObjective(player, "engineer-reactor-core") + sovietObjective6 = AddSecondaryObjective(player, "free-dogs") end Tick = function() @@ -309,7 +309,10 @@ Tick = function() end if remainingTime > 0 and timerStarted then - UserInterface.SetMissionText("Time until Meltdown: " .. Utils.FormatTime(remainingTime), player.Color) + if (remainingTime % DateTime.Seconds(1)) == 0 then + Timer = UserInterface.Translate("time-until-meltdown", { ["time"] = Utils.FormatTime(remainingTime) }) + UserInterface.SetMissionText(Timer, player.Color) + end remainingTime = remainingTime - 1 elseif remainingTime == 0 then UserInterface.SetMissionText("") diff --git a/mods/ra/maps/soviet-08a/map.yaml b/mods/ra/maps/soviet-08a/map.yaml index 3d25187ea8..9ab3296b70 100644 --- a/mods/ra/maps/soviet-08a/map.yaml +++ b/mods/ra/maps/soviet-08a/map.yaml @@ -1068,3 +1068,5 @@ Actors: Owner: Neutral Rules: ra|rules/campaign-rules.yaml, ra|rules/campaign-tooltips.yaml, ra|rules/campaign-palettes.yaml, rules.yaml + +Translations: ra|languages/lua/en.ftl diff --git a/mods/ra/maps/soviet-08a/soviet08a.lua b/mods/ra/maps/soviet-08a/soviet08a.lua index adfe7b01c7..fd9820557a 100644 --- a/mods/ra/maps/soviet-08a/soviet08a.lua +++ b/mods/ra/maps/soviet-08a/soviet08a.lua @@ -121,9 +121,9 @@ WorldLoaded = function() InitObjectives(USSR) - KillAll = USSR.AddObjective("Destroy all Allied units and structures.") - DestroyVillageObjective = USSR.AddObjective("Destroy the village of Allied sympathizers.", "Secondary", false) - BeatUSSR = Greece.AddObjective("Defeat the Soviet forces.") + KillAll = AddPrimaryObjective(USSR, "destroy-allied-units-structures") + DestroyVillageObjective = AddSecondaryObjective(USSR, "destroy-allied-sympathizers-village") + BeatUSSR = AddPrimaryObjective(Greece, "") AddEastReinforcementTrigger() AddSouthReinforcementTrigger() diff --git a/mods/ra/maps/soviet-08b/map.yaml b/mods/ra/maps/soviet-08b/map.yaml index 3a4a657c3a..1a68a555e2 100644 --- a/mods/ra/maps/soviet-08b/map.yaml +++ b/mods/ra/maps/soviet-08b/map.yaml @@ -890,3 +890,5 @@ Actors: Owner: Neutral Rules: ra|rules/campaign-rules.yaml, ra|rules/campaign-tooltips.yaml, ra|rules/campaign-palettes.yaml, rules.yaml + +Translations: ra|languages/lua/en.ftl diff --git a/mods/ra/maps/soviet-08b/soviet08b.lua b/mods/ra/maps/soviet-08b/soviet08b.lua index fcb2ce9bd8..8febd07d8c 100644 --- a/mods/ra/maps/soviet-08b/soviet08b.lua +++ b/mods/ra/maps/soviet-08b/soviet08b.lua @@ -121,9 +121,9 @@ WorldLoaded = function() InitObjectives(USSR) - KillAll = USSR.AddObjective("Destroy all Allied units and structures.") - DestroyVillageObjective = USSR.AddObjective("Destroy the village of Allied sympathizers.", "Secondary", false) - BeatUSSR = Greece.AddObjective("Defeat the Soviet forces.") + KillAll = AddPrimaryObjective(USSR, "destroy-allied-units-structures") + DestroyVillageObjective = AddSecondaryObjective(USSR, "destroy-allied-sympathizers-village") + BeatUSSR = AddPrimaryObjective(Greece, "") FirstReinforcementTrigger() SecondReinforcementTrigger() diff --git a/mods/ra/maps/soviet-09/map.yaml b/mods/ra/maps/soviet-09/map.yaml index 2bee6efa07..495618af47 100644 --- a/mods/ra/maps/soviet-09/map.yaml +++ b/mods/ra/maps/soviet-09/map.yaml @@ -1496,3 +1496,5 @@ Actors: Owner: Neutral Rules: ra|rules/campaign-rules.yaml, ra|rules/campaign-tooltips.yaml, ra|rules/campaign-palettes.yaml, rules.yaml + +Translations: ra|languages/lua/en.ftl diff --git a/mods/ra/maps/soviet-09/soviet09.lua b/mods/ra/maps/soviet-09/soviet09.lua index 9e77e48fcf..df1b6d5c76 100644 --- a/mods/ra/maps/soviet-09/soviet09.lua +++ b/mods/ra/maps/soviet-09/soviet09.lua @@ -24,7 +24,7 @@ MissionStart = function() end) Trigger.AfterDelay(DateTime.Seconds(45), function() - Media.DisplayMessage("Commander, the truck has stopped at a nearby allied base.\nAllied radio intercepts say the truck has orders to flee the battlefield\nif any Soviet units approach the base.") + Media.DisplayMessage(UserInterface.Translate("trucks-stopped-near-allied-base")) end) Trigger.OnKilled(StolenTruck, function() @@ -40,7 +40,7 @@ end Trigger.OnEnteredProximityTrigger(TruckAlarm.CenterPosition, WDist.FromCells(11), function(actor, triggerflee) if actor.Owner == USSR and actor.Type ~= "badr" and actor.Type ~= "u2" and actor.Type ~= "camera.spyplane" then Trigger.RemoveProximityTrigger(triggerflee) - Media.DisplayMessage("The convoy truck is attempting to escape!") + Media.DisplayMessage(UserInterface.Translate("convoy-truck-escaping")) EscapeCamera = Actor.Create("camera", true, { Owner = USSR, Location = TruckAlarm.Location }) Media.PlaySoundNotification(USSR, "AlertBleep") Utils.Do(TruckEscape, function(waypoint) @@ -79,8 +79,8 @@ WorldLoaded = function() InitObjectives(USSR) - DestroyTruck = USSR.AddObjective("Destroy the stolen convoy truck.\nDo not let it escape.") - DefendCommand = USSR.AddObjective("Defend our forward command center.") + DestroyTruck = AddPrimaryObjective(USSR, "destroy-stolen-convoy-truck") + DefendCommand = AddPrimaryObjective(USSR, "defend-forward-command-center") Camera.Position = DefaultCameraPosition.CenterPosition diff --git a/mods/ra/maps/soviet-10/map.yaml b/mods/ra/maps/soviet-10/map.yaml index 54f29e0570..e90b2d33ce 100644 --- a/mods/ra/maps/soviet-10/map.yaml +++ b/mods/ra/maps/soviet-10/map.yaml @@ -1132,3 +1132,5 @@ Actors: Owner: Neutral Rules: ra|rules/campaign-rules.yaml, ra|rules/campaign-tooltips.yaml, ra|rules/campaign-palettes.yaml, rules.yaml + +Translations: ra|languages/lua/en.ftl diff --git a/mods/ra/maps/soviet-10/soviet10.lua b/mods/ra/maps/soviet-10/soviet10.lua index b1c1066f68..0c579c1bc6 100644 --- a/mods/ra/maps/soviet-10/soviet10.lua +++ b/mods/ra/maps/soviet-10/soviet10.lua @@ -237,7 +237,7 @@ end RunForIt = function() Running = true Media.PlaySoundNotification(USSR, "AlertBleep") - Media.DisplayMessage("RUN FOR IT!", "Convoy commander") + Media.DisplayMessage(UserInterface.Translate("run-for-it"), UserInterface.Translate("convoy-commander")) Utils.Do(Trucks, function(truck) if not truck.IsDead then truck.Stop() @@ -274,6 +274,7 @@ StartTimerFunction = function() end) end +WeAreSurrounded = UserInterface.Translate("we-are-surrounded") FinishTimer = function() for i = 0, 5, 1 do local c = TimerColor @@ -281,7 +282,7 @@ FinishTimer = function() c = HSLColor.White end - Trigger.AfterDelay(DateTime.Seconds(i), function() UserInterface.SetMissionText("We're surrounded!", c) end) + Trigger.AfterDelay(DateTime.Seconds(i), function() UserInterface.SetMissionText(WeAreSurrounded, c) end) end Trigger.AfterDelay(DateTime.Seconds(6), function() UserInterface.SetMissionText("") end) end @@ -289,7 +290,10 @@ end Tick = function() if StartTimer then if ticked > 0 then - UserInterface.SetMissionText("Corridor closes in " .. Utils.FormatTime(ticked), TimerColor) + if (ticked % DateTime.Seconds(1)) == 0 then + Timer = UserInterface.Translate("corridor-closes-in", { ["time"] = Utils.FormatTime(ticked) }) + UserInterface.SetMissionText(Timer, TimerColor) + end ticked = ticked - 1 elseif ticked == 0 then FinishTimer() @@ -310,10 +314,10 @@ WorldLoaded = function() InitObjectives(USSR) - EscortTrucks = USSR.AddObjective("Escort the convoy through the mountain pass.") - ProtectEveryTruck = USSR.AddObjective("Do not lose a single truck.", "Secondary", false) - SaveMigs = USSR.AddObjective("Do not squander any of our new MiG aircraft.", "Secondary", false) - BeatUSSR = Greece.AddObjective("Defeat the Soviet forces.") + EscortTrucks = AddPrimaryObjective(USSR, "escort-convoy-mountain-pass") + ProtectEveryTruck = AddSecondaryObjective(USSR, "protect-every-truck") + SaveMigs = AddSecondaryObjective(USSR, "save-migs") + BeatUSSR = AddPrimaryObjective(Greece, "") ConvoyEscort = ConvoyEscort[Difficulty] StartTimerDelay = StartTimerDelay[Difficulty] diff --git a/mods/ra/maps/soviet-11a/map.yaml b/mods/ra/maps/soviet-11a/map.yaml index 37347b5e35..c5269acfae 100644 --- a/mods/ra/maps/soviet-11a/map.yaml +++ b/mods/ra/maps/soviet-11a/map.yaml @@ -910,3 +910,5 @@ Actors: Owner: Neutral Rules: ra|rules/campaign-rules.yaml, ra|rules/campaign-tooltips.yaml, ra|rules/campaign-palettes.yaml, rules.yaml + +Translations: ra|languages/lua/en.ftl diff --git a/mods/ra/maps/soviet-11a/soviet11a.lua b/mods/ra/maps/soviet-11a/soviet11a.lua index 0bd23fcdf3..6ecd93d0b0 100644 --- a/mods/ra/maps/soviet-11a/soviet11a.lua +++ b/mods/ra/maps/soviet-11a/soviet11a.lua @@ -34,8 +34,8 @@ WorldLoaded = function() InitObjectives(USSR) - DestroyNavalBase = USSR.AddPrimaryObjective("Destroy all Allied units and structures.") - BeatSoviets = Greece.AddPrimaryObjective("Destroy all Soviet troops.") + DestroyNavalBase = AddPrimaryObjective(USSR, "destroy-allied-units-structures") + BeatSoviets = AddPrimaryObjective(Greece, "") Camera.Position = DefaultCameraPosition.CenterPosition InitialSovietReinforcements() diff --git a/mods/ra/maps/soviet-11b/map.yaml b/mods/ra/maps/soviet-11b/map.yaml index 180b93825f..03027d6e02 100644 --- a/mods/ra/maps/soviet-11b/map.yaml +++ b/mods/ra/maps/soviet-11b/map.yaml @@ -838,3 +838,5 @@ Actors: Owner: Neutral Rules: ra|rules/campaign-rules.yaml, ra|rules/campaign-tooltips.yaml, ra|rules/campaign-palettes.yaml, rules.yaml + +Translations: ra|languages/lua/en.ftl diff --git a/mods/ra/maps/soviet-11b/soviet11b.lua b/mods/ra/maps/soviet-11b/soviet11b.lua index 2f3ded8be4..95fd0243dc 100644 --- a/mods/ra/maps/soviet-11b/soviet11b.lua +++ b/mods/ra/maps/soviet-11b/soviet11b.lua @@ -34,8 +34,8 @@ WorldLoaded = function() InitObjectives(USSR) - DestroyNavalBase = USSR.AddPrimaryObjective("Destroy Allied naval base") - BeatSoviets = Greece.AddPrimaryObjective("Destroy all Soviet troops.") + DestroyNavalBase = AddPrimaryObjective(USSR, "destroy-allied-naval-base") + BeatSoviets = AddPrimaryObjective(Greece, "") Camera.Position = DefaultCameraPosition.CenterPosition InitialSovietReinforcements() diff --git a/mods/ra/maps/soviet-soldier-volkov-n-chitzkoi/map.yaml b/mods/ra/maps/soviet-soldier-volkov-n-chitzkoi/map.yaml index 8045fc1393..d0c05e2bf3 100644 --- a/mods/ra/maps/soviet-soldier-volkov-n-chitzkoi/map.yaml +++ b/mods/ra/maps/soviet-soldier-volkov-n-chitzkoi/map.yaml @@ -1318,3 +1318,5 @@ Rules: ra|rules/campaign-rules.yaml, ra|rules/campaign-tooltips.yaml, ra|rules/c Weapons: weapons.yaml Notifications: notifications.yaml + +Translations: ra|languages/lua/en.ftl diff --git a/mods/ra/maps/soviet-soldier-volkov-n-chitzkoi/soviet-soldier-volkov-n-chitzkoi.lua b/mods/ra/maps/soviet-soldier-volkov-n-chitzkoi/soviet-soldier-volkov-n-chitzkoi.lua index 2dc57675a5..f87bc80835 100644 --- a/mods/ra/maps/soviet-soldier-volkov-n-chitzkoi/soviet-soldier-volkov-n-chitzkoi.lua +++ b/mods/ra/maps/soviet-soldier-volkov-n-chitzkoi/soviet-soldier-volkov-n-chitzkoi.lua @@ -64,25 +64,25 @@ WorldLoaded = function() --Objectives Setup InitObjectives(player) - DestroyControlCenter = player.AddObjective("Destroy the Control Center.") - KeepTanksAlive = player.AddObjective("Your tank division must not be destroyed before\n the alloy facility is dealt with.") - KeepVolkovAlive = player.AddObjective("Keep Volkov Alive.") - KeepChitzkoiAlive = player.AddObjective("Keep Chitzkoi Alive.", "Secondary", false) + DestroyControlCenter = AddPrimaryObjective(player, "destroy-control-center") + KeepTanksAlive = AddPrimaryObjective(player, "tank-division-must-not-be-destroyed") + KeepVolkovAlive = AddPrimaryObjective(player, "volkov-survive") + KeepChitzkoiAlive = AddSecondaryObjective(player, "keep-chitzkoi-alive") Trigger.OnKilled(ControlCenter, function() Utils.Do(HeavyTurrets, function(struc) if not struc.IsDead then struc.Kill() end end) player.MarkCompletedObjective(DestroyControlCenter) - DestroyAlloyFacility = player.AddObjective("Destroy the Alloy Facility.") + DestroyAlloyFacility = AddPrimaryObjective(player, "destroy-alloy-facility") Media.PlaySpeechNotification(player, "FirstObjectiveMet") - Media.DisplayMessage("Excellent! The heavy turret control center is destroyed\n and now we can deal with the alloy facility.") + Media.DisplayMessage(UserInterface.Translate("heavy-turret-control-destroyed")) end) Trigger.OnKilled(AlloyFacility, function() if not player.IsObjectiveCompleted(DestroyControlCenter) then --Prevent a crash if the player somehow manage to cheese the mission and destroy player.MarkCompletedObjective(DestroyControlCenter) --the Alloy Facility without destroying the Control Center. - DestroyAlloyFacility = player.AddObjective("Destroy the Alloy Facility.") + DestroyAlloyFacility = AddPrimaryObjective(player, "destroy-alloy-facility") end Trigger.AfterDelay(DateTime.Seconds(2), function() player.MarkCompletedObjective(DestroyAlloyFacility) @@ -349,7 +349,7 @@ end ChitzkoiIsDead = function(a) Trigger.OnKilled(a, function() player.MarkFailedObjective(KeepChitzkoiAlive) - Media.DisplayMessage("We can rebuild Chitzkoi. We have the technology.") + Media.DisplayMessage(UserInterface.Translate("rebuild-chitzkoy")) Trigger.AfterDelay(DateTime.Seconds(1), function() Media.PlaySpeechNotification(player, "ObjectiveNotMet") end) diff --git a/mods/ra/maps/survival01/map.yaml b/mods/ra/maps/survival01/map.yaml index 7feb81533c..170698ee17 100644 --- a/mods/ra/maps/survival01/map.yaml +++ b/mods/ra/maps/survival01/map.yaml @@ -1195,3 +1195,5 @@ Actors: Owner: Neutral Rules: ra|rules/campaign-rules.yaml, ra|rules/campaign-tooltips.yaml, ra|rules/campaign-palettes.yaml, rules.yaml + +Translations: ra|languages/lua/en.ftl diff --git a/mods/ra/maps/survival01/survival01.lua b/mods/ra/maps/survival01/survival01.lua index d8b4caebde..a41386ca28 100644 --- a/mods/ra/maps/survival01/survival01.lua +++ b/mods/ra/maps/survival01/survival01.lua @@ -160,7 +160,10 @@ Tick = function() Media.PlaySpeechNotification(allies, "AlliedForcesApproaching") end - UserInterface.SetMissionText("French reinforcements arrive in " .. Utils.FormatTime(ticked), TimerColor) + if (ticked % DateTime.Seconds(1)) == 0 then + Timer = UserInterface.Translate("french-reinforcements-arrive-in", { ["time"] = Utils.FormatTime(ticked) }) + UserInterface.SetMissionText(Timer, TimerColor) + end ticked = ticked - 1 elseif ticked == 0 then FinishTimer() @@ -169,6 +172,7 @@ Tick = function() end end +FrenchAlliesArrived = UserInterface.Translate("french-allies-arrived") FinishTimer = function() for i = 0, 9, 1 do local c = TimerColor @@ -176,7 +180,7 @@ FinishTimer = function() c = HSLColor.White end - Trigger.AfterDelay(DateTime.Seconds(i), function() UserInterface.SetMissionText("Our french allies have arrived!", c) end) + Trigger.AfterDelay(DateTime.Seconds(i), function() UserInterface.SetMissionText(FrenchAlliesArrived, c) end) end Trigger.AfterDelay(DateTime.Seconds(10), function() UserInterface.SetMissionText("") end) end @@ -268,9 +272,9 @@ TimerExpired = function() Reinforcements.Reinforce(allies, FrenchReinforcements, { SovietEntryPoint7.Location, Alliesbase.Location }) if DestroyObj then - KillObj = allies.AddObjective("Take control of French reinforcements and\nkill all remaining Soviet forces.") + KillObj = AddPrimaryObjective(allies, "control-reinforcements-kill-remaining-soviet-forces") else - DestroyObj = allies.AddObjective("Take control of French reinforcements and\ndismantle the nearby Soviet base.") + DestroyObj = AddPrimaryObjective(allies, "takeover-reinforcements-dismantle-soviet-base") end allies.MarkCompletedObjective(SurviveObj) @@ -299,14 +303,14 @@ end AddObjectives = function() InitObjectives(allies) - SurviveObj = allies.AddObjective("Enforce your position and hold-out the onslaught\nuntil reinforcements arrive.") - KillSams = allies.AddObjective("Destroy the two SAM sites before reinforcements\narrive.", "Secondary", false) - Media.DisplayMessage("The Soviets are blocking our GPS. We need to investigate their new technology.") - CaptureAirfields = allies.AddObjective("Capture and hold the Soviet airbase\nin the northeast.", "Secondary", false) - SovietObj = soviets.AddObjective("Eliminate all Allied forces.") + SurviveObj = AddPrimaryObjective(allies, "enforce-position-hold-until-reinforcements") + KillSams = AddSecondaryObjective(allies, "destroy-two-sames-before-reinforcements") + Media.DisplayMessage(UserInterface.Translate("soviets-blocking-gps")) + CaptureAirfields = AddSecondaryObjective(allies, "capture-hold-soviet-airbase-northeast") + SovietObj = AddPrimaryObjective(soviets, "") Trigger.OnPlayerWon(allies, function() - Media.DisplayMessage("The French forces have survived and dismantled the Soviet presence in the area!") + Media.DisplayMessage(UserInterface.Translate("french-survived-dismantled-soviet-presence")) end) end @@ -345,11 +349,11 @@ InitMission = function() Trigger.OnAllKilledOrCaptured(SovietBuildings, function() if DestroyObj then if not soviets.HasNoRequiredUnits() then - KillObj = allies.AddObjective("Kill all remaining Soviet forces.") + KillObj = AddPrimaryObjective(allies, "kill-remaining-soviet-forces") end allies.MarkCompletedObjective(DestroyObj) else - DestroyObj = allies.AddObjective("Dismantle the nearby Soviet base.") + DestroyObj = AddPrimaryObjective(allies, "dismantle-nearby-soviet-base") allies.MarkCompletedObjective(DestroyObj) end end) diff --git a/mods/ra/maps/survival02/map.yaml b/mods/ra/maps/survival02/map.yaml index e3d506a511..6adc331392 100644 --- a/mods/ra/maps/survival02/map.yaml +++ b/mods/ra/maps/survival02/map.yaml @@ -1010,3 +1010,5 @@ Actors: Rules: ra|rules/campaign-rules.yaml, ra|rules/campaign-tooltips.yaml, ra|rules/campaign-palettes.yaml, rules.yaml Weapons: weapons.yaml + +Translations: ra|languages/lua/en.ftl diff --git a/mods/ra/maps/survival02/survival02.lua b/mods/ra/maps/survival02/survival02.lua index a2f7aaf7e4..34873bc85b 100644 --- a/mods/ra/maps/survival02/survival02.lua +++ b/mods/ra/maps/survival02/survival02.lua @@ -74,7 +74,7 @@ Tick = function() if DestroyObj then allies.MarkCompletedObjective(DestroyObj) else - DestroyObj = allies.AddObjective("Destroy all Soviet forces in the area.") + DestroyObj = AddPrimaryObjective(allies, "destroy-all-soviet-forces") allies.MarkCompletedObjective(DestroyObj) end end @@ -111,7 +111,10 @@ Tick = function() end if ticked > 0 then - UserInterface.SetMissionText("Soviet reinforcements arrive in " .. Utils.FormatTime(ticked), TimerColor) + if (ticked % DateTime.Seconds(1)) == 0 then + Timer = UserInterface.Translate("soviet-reinforcements-arrive-in", { ["time"] = Utils.FormatTime(ticked) }) + UserInterface.SetMissionText(Timer, TimerColor) + end ticked = ticked - 1 elseif ticked == 0 then FinishTimer() @@ -211,13 +214,14 @@ FinalAttack = function() Trigger.OnAllKilledOrCaptured(units, function() if not DestroyObj then - Media.DisplayMessage("Excellent work Commander! We have reinforced our position enough to initiate a counter-attack.", "Incoming Report") - DestroyObj = allies.AddObjective("Destroy the remaining Soviet forces in the area.") + Media.DisplayMessage(UserInterface.Translate("reinforced-position-initiate-counter-attack"), UserInterface.Translate("incoming-report")) + DestroyObj = AddPrimaryObjective(allies, "destroy-remaining-soviet-forces-area") end allies.MarkCompletedObjective(SurviveObj) end) end +SovietReinforcementsArrived = UserInterface.Translate("soviet-reinforcements-arrived") FinishTimer = function() for i = 0, 9, 1 do local c = TimerColor @@ -225,7 +229,7 @@ FinishTimer = function() c = HSLColor.White end - Trigger.AfterDelay(DateTime.Seconds(i), function() UserInterface.SetMissionText("Soviet reinforcements have arrived!", c) end) + Trigger.AfterDelay(DateTime.Seconds(i), function() UserInterface.SetMissionText(SovietReinforcementsArrived, c) end) end Trigger.AfterDelay(DateTime.Seconds(10), function() UserInterface.SetMissionText("") end) end @@ -251,8 +255,8 @@ SetupBridges = function() end end - Media.DisplayMessage("Commander! The Soviets destroyed the bridges to disable our reinforcements. Repair them for additional reinforcements.", "Incoming Report") - RepairBridges = allies.AddObjective("Repair the two southern bridges.", "Secondary", false) + Media.DisplayMessage(UserInterface.Translate("repair-bridges-for-reinforcement"), UserInterface.Translate("incoming-report")) + RepairBridges = AddSecondaryObjective(allies, "repair-two-southern-bridges") local bridgeA = Map.ActorsInCircle(BrokenBridge1.CenterPosition, WDist.FromCells(1), function(self) return self.Type == "bridge1" end) local bridgeB = Map.ActorsInCircle(BrokenBridge2.CenterPosition, WDist.FromCells(1), function(self) return self.Type == "bridge1" end) @@ -285,15 +289,15 @@ end AddObjectives = function() InitObjectives(allies) - SurviveObj = allies.AddObjective("Enforce your position and hold-out the onslaught.") - SovietObj = soviets.AddObjective("Eliminate all Allied forces.") + SurviveObj = AddPrimaryObjective(allies, "enforce-position-hold-out-onslaught") + SovietObj = AddPrimaryObjective(soviets, "") Trigger.AfterDelay(DateTime.Seconds(15), function() SetupBridges() end) Trigger.OnPlayerWon(allies, function() - Media.DisplayMessage("We have destroyed the remaining Soviet presence!", "Incoming Report") + Media.DisplayMessage(UserInterface.Translate("remaining-soviet-presence-destroyed"), UserInterface.Translate("incoming-report")) end) end @@ -304,7 +308,7 @@ InitMission = function() Trigger.AfterDelay(DateTime.Seconds(1), function() Media.PlaySpeechNotification(allies, "MissionTimerInitialised") end) Trigger.AfterDelay(TimerTicks, function() - Media.DisplayMessage("The Soviet reinforcements are approaching!", "Incoming Report") + Media.DisplayMessage(UserInterface.Translate("soviet-reinforcements-approaching"), UserInterface.Translate("incoming-report")) Media.PlaySpeechNotification(allies, "SovietReinforcementsArrived") SpawnSovietVehicle(NewSovietEntryPoints, NewSovietRallyPoints) FinalAttack() diff --git a/mods/ra/maps/top-o-the-world/map.yaml b/mods/ra/maps/top-o-the-world/map.yaml index 4394c21f45..08958a43c0 100644 --- a/mods/ra/maps/top-o-the-world/map.yaml +++ b/mods/ra/maps/top-o-the-world/map.yaml @@ -896,3 +896,5 @@ Actors: Rules: ra|rules/campaign-rules.yaml, ra|rules/campaign-tooltips.yaml, ra|rules/campaign-palettes.yaml, rules.yaml Weapons: weapons.yaml + +Translations: ra|languages/lua/en.ftl diff --git a/mods/ra/maps/top-o-the-world/top-o-the-world.lua b/mods/ra/maps/top-o-the-world/top-o-the-world.lua index 93e22da9a3..f6a6a732b3 100644 --- a/mods/ra/maps/top-o-the-world/top-o-the-world.lua +++ b/mods/ra/maps/top-o-the-world/top-o-the-world.lua @@ -102,10 +102,10 @@ WorldLoaded = function() --Objectives Setup InitObjectives(player) - BringSupplyTruck = player.AddObjective("Bring the supply truck to the waystation.") - ProtectWaystation = player.AddObjective("The waystation must not be destroyed.") - DestroyAAGuns = player.AddObjective("Destroy all the AA Guns to enable air support.", "Secondary", false) - PreventAlliedIncursions = player.AddObjective("Find and destroy the bridge the allies are using\nto bring their reinforcements in the area.", "Secondary", false) + BringSupplyTruck = AddPrimaryObjective(player, "supply-truck-waystation") + ProtectWaystation = AddPrimaryObjective(player, "waystation-must-not-be-destroyed") + DestroyAAGuns = AddSecondaryObjective(player, "destory-aa-guns-enable-air-support") + PreventAlliedIncursions = AddSecondaryObjective(player, "find-destroy-bridge-stop-allied-reinforcements") Trigger.OnKilled(USSRTechCenter01, function() player.MarkFailedObjective(ProtectWaystation) @@ -129,7 +129,7 @@ WorldLoaded = function() Trigger.AfterDelay(DateTime.Seconds(2), function() Actor.Create("powerproxy.spyplane", true, { Owner = player }) Actor.Create("powerproxy.parabombs", true, { Owner = player }) - Media.DisplayMessage("Very good comrade general! Our air units just took off\nand should be in your area in approximately three minutes.") + Media.DisplayMessage(UserInterface.Translate("air-support-t-minus-3")) end) end) @@ -226,7 +226,7 @@ WorldLoaded = function() player.MarkCompletedObjective(PreventAlliedIncursions) Media.PlaySpeechNotification(player, "ObjectiveMet") Trigger.AfterDelay(DateTime.Seconds(2), function() - Media.DisplayMessage("This should stop the allied forces from getting their ground based reinforcements.") + Media.DisplayMessage(UserInterface.Translate("allied-ground-reinforcements-stopped")) end) end) end) diff --git a/mods/ra/scripts/campaign.lua b/mods/ra/scripts/campaign.lua index 98616b605f..54678698ae 100644 --- a/mods/ra/scripts/campaign.lua +++ b/mods/ra/scripts/campaign.lua @@ -10,15 +10,11 @@ Difficulty = Map.LobbyOption("difficulty") InitObjectives = function(player) - Trigger.OnObjectiveAdded(player, function(p, id) - Media.DisplayMessage(p.GetObjectiveDescription(id), "New " .. string.lower(p.GetObjectiveType(id)) .. " objective") - end) - Trigger.OnObjectiveCompleted(player, function(p, id) - Media.DisplayMessage(p.GetObjectiveDescription(id), "Objective completed") + Media.DisplayMessage(p.GetObjectiveDescription(id), UserInterface.Translate("objective-completed")) end) Trigger.OnObjectiveFailed(player, function(p, id) - Media.DisplayMessage(p.GetObjectiveDescription(id), "Objective failed") + Media.DisplayMessage(p.GetObjectiveDescription(id), UserInterface.Translate("objective-failed")) end) Trigger.OnPlayerLost(player, function()