Skip to content

Commit

Permalink
Merge pull request #1247 from CBATeam/NoDatedDiaryRecord2
Browse files Browse the repository at this point in the history
localized diary topics replacement pull request
  • Loading branch information
commy2 authored Oct 30, 2019
2 parents a2b02af + 5fe929e commit 389ff69
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions addons/help/XEH_postInit.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,12 @@ if (!hasInterface) exitWith {};
{
(EGVAR(keybinding,addons) getVariable _x) params ["_addon", "_addonActions"];

_keys = _keys + format ["%1:<br/>", _addon];
private _name = _addon;
if (isLocalized _name) then {
_name = localize _name;
};

_keys = _keys + format ["%1:<br/>", _name];

{
(EGVAR(keybinding,actions) getVariable (_addon + "$" + _x)) params ["_displayName", "", "_keybinds"];
Expand All @@ -37,7 +42,7 @@ if (!hasInterface) exitWith {};
// delete last line breaks
_keys = _keys select [0, count _keys - 10];

_unit createDiaryRecord [QGVAR(docs), [localize "STR_CBA_Help_Keys", _keys]];
_unit createDiaryRecord [QGVAR(docs), [localize "STR_CBA_Credits", call (uiNamespace getVariable QGVAR(credits))]];
_unit createDiaryRecord [QGVAR(docs), [localize "STR_CBA_Addons", call (uiNamespace getVariable QGVAR(mods))]];
GVAR(DiaryRecordKeys) = _unit createDiaryRecord [QGVAR(docs), [localize "STR_CBA_Help_Keys", format ["<font size=20>%1</font><br/>%2", localize "STR_CBA_Help_Keys", _keys]], taskNull, "", false];
GVAR(DiaryRecordCredits) = _unit createDiaryRecord [QGVAR(docs), [localize "STR_CBA_Credits", format ["<font size=20>%1</font><br/>%2", localize "STR_CBA_Credits", call (uiNamespace getVariable QGVAR(credits))]], taskNull, "", false];
GVAR(DiaryRecordAddons) = _unit createDiaryRecord [QGVAR(docs), [localize "STR_CBA_Addons", format ["<font size=20>%1</font><br/>%2", localize "STR_CBA_Addons", call (uiNamespace getVariable QGVAR(mods))]], taskNull, "", false];
} call CBA_fnc_execNextFrame;

0 comments on commit 389ff69

Please sign in to comment.