Skip to content

Commit

Permalink
Stringtables (#84)
Browse files Browse the repository at this point in the history
* Add First Stringtable work

* move more strings to stringtable

* add Localization support to showDialog

* move some more stuff to stringtables

* move some more stuff to stringtables

* fix a regex issue

* add some more L10n

* add some more L10n

* add some more L10n

* add stringtable_validator

* add StringtableValidator to github Actions

* update step name

* add translation issue autoupdate

* update

* move stringtables to main workflow

* STRINGTABLES

* STRINGTABLES

* STRINGTABLES

* STRINGTABLES

* STRINGTABLES

* STRINGTABLES

* STRINGTABLES

* STRINGTABLES

* STRINGTABLES

* STRINGTABLES

* linter fix

* STRINGTABLES

* STRINGTABLES

* add CfgSettings for CBA min Version Requirment

fix some Case issues

* - Fixed missing module descriptions (damned brs!)
- Fixed missing taskReset module description

* add 2 missed Strings

* update Arma Workflow

Co-authored-by: nkenny <[email protected]>
  • Loading branch information
jokoho48 and nk3nny authored Mar 26, 2020
1 parent ce25ae8 commit f76cc50
Show file tree
Hide file tree
Showing 36 changed files with 1,152 additions and 240 deletions.
23 changes: 21 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: CI
name: Arma

on: [push]
on: [push, pull_request]

jobs:
validate:
Expand Down Expand Up @@ -43,3 +43,22 @@ jobs:
with:
name: '@LambsDanger'
path: 'releases/@LambsDanger.zip'

stringtables:
runs-on: ubuntu-latest
steps:
- name: Install Python packages
run: |
pip3 install wheel
pip3 install setuptools
pip3 install pygithub
pip3 install pygithub3
- name: Checkout the source code
uses: actions/checkout@master
- name: Validate Stringtables
run: python3 tools/stringtable_validator.py
- name: Update Translation issue
if: github.repository == 'nk3nny/LambsDanger' && github.branch == 'master' && ! contains(github.event.head_commit.message, '[ci skip]')
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: python3 tools/stringtableDeploy.py
8 changes: 4 additions & 4 deletions addons/danger/Cfg3DEN.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ class Cfg3DEN {
class GVAR(disableAI) {
property = QGVAR(disableAI);
control = "Checkbox";
displayName = "AI Disabled";
tooltip = "Unit has advanced danger.fsm features disabled\n\nWARNING checking this will add mod dependency";
displayName = CSTRING(3DEN_Attributes_DisableAI_DisplayName);
tooltip = CSTRING(3DEN_Attributes_DisableAI_ToolTip);
expression = "if (_value) then { _this setVariable ['%s', _value, true]; }";
typeName = "BOOL";
condition = "objectBrain";
Expand All @@ -18,8 +18,8 @@ class Cfg3DEN {
class GVAR(dangerRadio) {
property = QGVAR(dangerRadio);
control = "Checkbox";
displayName = "Has Radio";
tooltip = "Unit counts as carrying backpack radio for information sharing\n\nWARNING checking this will add mod dependency";
displayName = CSTRING(3DEN_Attributes_HasRadio_DisplayName);
tooltip = CSTRING(3DEN_Attributes_HasRadio_ToolTip);
expression = "if (_value) then { _this setVariable ['%s', _value, true]; }";
typeName = "BOOL";
condition = "objectBrain";
Expand Down
6 changes: 3 additions & 3 deletions addons/danger/CfgVehicles.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ class CfgVehicles {
_generalMacro = QGVAR(SetRadio);
scope = 1;
scopeCurator = 2;
displayName = CSTRING(Module_SetRadio_DisplayName);
isGlobal = 0;
displayName = "Configure Long-range Radio";
category = "Lambs_Danger_Cat";
icon = "\A3\ui_f\data\igui\cfg\simpleTasks\types\intel_ca.paa";
function = QFUNC(moduleSetRadio);
Expand All @@ -39,8 +39,8 @@ class CfgVehicles {
_generalMacro = QGVAR(DisableAI);
scope = 1;
scopeCurator = 2;
displayName = CSTRING(Module_DisableAI_DisplayName);
isGlobal = 0;
displayName = "Disable Unit AI";
category = "Lambs_Danger_Cat";
icon = "\A3\ui_f\data\igui\cfg\simpleTasks\types\intel_ca.paa";
function = QFUNC(moduleDisableAI);
Expand All @@ -56,8 +56,8 @@ class CfgVehicles {
_generalMacro = QGVAR(DisableGroupAI);
scope = 1;
scopeCurator = 2;
displayName = CSTRING(Module_DisableGroupAI_DisplayName);
isGlobal = 0;
displayName = "Configure Group AI";
category = "Lambs_Danger_Cat";
icon = "\A3\ui_f\data\igui\cfg\simpleTasks\types\intel_ca.paa";
function = QFUNC(moduleDisableGroupAI);
Expand Down
2 changes: 1 addition & 1 deletion addons/danger/config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ class CfgPatches {
weapons[] = {};
requiredVersion = REQUIRED_VERSION;
requiredAddons[] = {"lambs_main"};
author = "LAMBS Dev Team";
author = ECSTRING(main,Team);
VERSION_CONFIG;
};
};
Expand Down
10 changes: 5 additions & 5 deletions addons/danger/functions/ZeusModules/fnc_moduleDisableAI.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@ if (_activated && local _logic) then {
//--- Check if the unit is suitable
private _error = "";
if (isNull _unit) then {
_error = "No Unit Selected";
_error = ELSTRING(main,NoUnitSelected);
};
if (isPlayer _unit) then {
_error = "Players are not Valid Selections";
_error = ELSTRING(main,PlayerNotValid);
};
if (_error == "") then {
["Disable Unit AI",
[LSTRING(Module_DisableAI_DisplayName),
[
["Disable LAMBS unit AI", "BOOLEAN", "Toggle advanced danger.fsm features on this unit", _unit getVariable [QGVAR(disableAI), false]]
[LSTRING(Module_DisableAI_SettingName), "BOOLEAN", LSTRING(Module_DisableAI_SettingToolTip), _unit getVariable [QGVAR(disableAI), false]]
], {
params ["_data", "_args"];
_args params ["_unit", "_logic"];
Expand All @@ -34,7 +34,7 @@ if (_activated && local _logic) then {
}, [_unit, _logic]
] call EFUNC(main,showDialog);
} else {
[objNull, _error] call BIS_fnc_showCuratorFeedbackMessage;
[objNull, localize _error] call BIS_fnc_showCuratorFeedbackMessage;
deleteVehicle _logic;
};
};
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ if (_activated && local _logic) then {
//--- Check if the unit is suitable
private _error = "";
if (isNull _group) then {
_error = "No Group Selected";
_error = ELSTRING(main,NoGroupSelected);
};

if (_error == "") then {
["Configure Group AI",
[LSTRING(Module_DisableGroupAI_DisplayName),
[
["Disable LAMBS group AI", "BOOLEAN", "Disables LAMBS group AI\nDisabling this feature prevents autonomous building assaults and clearing, as well as hiding from aircraft and tanks", _group getVariable [QGVAR(disableGroupAI), false], ""]
[LSTRING(Module_DisableGroupAI_SettingName), "BOOLEAN", LSTRING(Module_DisableGroupAI_SettingToolTip), _group getVariable [QGVAR(disableGroupAI), false], ""]
], {
params ["_data", "_args"];
_args params ["_group", "_logic"];
Expand All @@ -32,7 +32,7 @@ if (_activated && local _logic) then {
}, [_group, _logic]
] call EFUNC(main,showDialog);
} else {
[objNull, _error] call BIS_fnc_showCuratorFeedbackMessage;
[objNull, localize _error] call BIS_fnc_showCuratorFeedbackMessage;
deleteVehicle _logic;
};
};
10 changes: 5 additions & 5 deletions addons/danger/functions/ZeusModules/fnc_moduleSetRadio.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@ if (_activated && local _logic) then {
//--- Check if the unit is suitable
private _error = "";
if (isNull _unit) then {
_error = "No Unit Seleted";
_error = ELSTRING(main,NoUnitSelected);
};
if (isPlayer _unit) then {
_error = "Players are not Valid Selections";
_error = ELSTRING(main,PlayerNotValid);
};
if (_error == "") then {
["Configure Long-range Radio",
[LSTRING(Module_SetRadio_DisplayName),
[
["Toggle boosted communication range on unit", "BOOLEAN", "Unit with radio toggled have boosted communications range when sharing information\nThis effect is also achieved by equipping the unit with a Vanilla Radio Backpack or TFAR-mod enabled radio.", _unit getVariable [QGVAR(dangerRadio), false]]
[LSTRING(Module_SetRadio_SettingName), "BOOLEAN", LSTRING(Module_SetRadio_SettingToolTip), _unit getVariable [QGVAR(dangerRadio), false]]
], {
params ["_data", "_args"];
_args params ["_unit", "_logic"];
Expand All @@ -34,7 +34,7 @@ if (_activated && local _logic) then {
}, [_unit, _logic]
] call EFUNC(main,showDialog);
} else {
[objNull, _error] call BIS_fnc_showCuratorFeedbackMessage;
[objNull, localize _error] call BIS_fnc_showCuratorFeedbackMessage;
deleteVehicle _logic;
};
};
Loading

0 comments on commit f76cc50

Please sign in to comment.