RoosterDragon 0bfa53b58d Teach CheckTranslationReference about translations in Lua scripts
Using the glory of regex, we can scrape any Lua script files that a map includes and locate calls to the UserInterface.Translate method. We can then treat them in the same way as C# fields marked with a TranslationReferenceAttribute. This allows the lint check to validate the translation invoked in the .lua script has a matching entry in the translation .ftl files, with all the required arguments (if any).

We can also locate any calls to AddPrimaryObjective or AddSecondaryObjective defined by the utils.lua script, which also accept translation keys.

The are a couple of restrictions:
- When linting the map, we don't check for keys in the ftl file that are unused. This is because the linter doesn't load all the keys when checking maps.
- In order to validate translation arguments with the regex, we require the Lua script to pass the table of arguments inline at the callsite. If it does not, we raise a warning so the user can adjust the code.
2024-07-22 17:27:58 +02:00
2024-06-03 10:25:06 +02:00
2024-06-29 00:09:13 +03:00
2023-11-15 19:13:17 +02:00
2023-11-16 09:29:17 +02:00
2024-06-03 10:25:06 +02:00
2024-06-03 10:25:06 +02:00
2022-01-09 18:58:37 +01:00
2024-06-03 10:25:06 +02:00
2024-06-03 10:25:06 +02:00
2024-06-03 10:25:06 +02:00
2024-06-03 10:25:06 +02:00
2024-06-03 10:25:06 +02:00
2023-10-30 15:30:10 +01:00
2024-06-03 10:25:06 +02:00
2024-06-03 10:25:06 +02:00
2023-04-15 12:50:06 +02:00
2023-04-15 12:50:06 +02:00
2024-06-03 10:25:06 +02:00
2017-06-29 16:56:21 +02:00
2023-06-01 12:43:10 +02:00
2021-11-08 14:41:34 +01:00
2023-10-10 17:40:47 +03:00
2017-06-04 13:21:27 +02:00

OpenRA

A Libre/Free Real Time Strategy game engine supporting early Westwood classics.

Please read the FAQ in our Wiki and report problems at https://github.com/OpenRA/OpenRA/issues.

Join the Forum for discussion.

Play

Distributed mods include a reimagining of

  • Command & Conquer: Red Alert
  • Command & Conquer: Tiberian Dawn
  • Dune 2000

EA has not endorsed and does not support this product.

Check our Playing the Game Guide to win multiplayer matches.

Contribute

Mapping

  • We offer a Mapping Tutorial as you can change gameplay drastically with custom rules.
  • For scripted mission have a look at the Lua API.
  • If you want to share your maps with the community, upload them at the OpenRA Resource Center.

Modding

Support

  • Sponsor a mirror server if you have some bandwidth to spare.
  • You can immediately set up a Dedicated Game Server.

License

Copyright (c) OpenRA Developers and Contributors This file is part of OpenRA, which is free software. It is made available to you under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. For more information, see COPYING.

Description
No description provided
Readme 234 MiB
Languages
C# 79.3%
Lua 16%
Fluent 3.1%
Shell 0.6%
Objective-C 0.2%
Other 0.5%