Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

localized diary topics replacement pull request #1247

Merged
merged 4 commits into from
Oct 30, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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;