Skip to content

Commit

Permalink
fix issue with translated setting categories (#814)
Browse files Browse the repository at this point in the history
  • Loading branch information
commy2 authored Dec 8, 2017
1 parent d955c74 commit cb4e052
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
7 changes: 6 additions & 1 deletion addons/settings/fnc_initDisplayGameOptions.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,12 @@ private _categories = [];
(GVAR(default) getVariable _x) params ["", "", "", "", "_category"];

if !(_category in _categories) then {
private _index = _ctrlAddonList lbAdd _category;
private _categoryLocalized = _category;
if (isLocalized _category) then {
_categoryLocalized = localize _category;
};

private _index = _ctrlAddonList lbAdd _categoryLocalized;
_ctrlAddonList lbSetData [_index, str _index];
_display setVariable [str _index, _category];

Expand Down
4 changes: 0 additions & 4 deletions addons/settings/gui_createCategory.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,6 @@ private _lists = _display getVariable QGVAR(lists);
(GVAR(default) getVariable _x) params ["_defaultValue", "_setting", "_settingType", "_settingData", "_category", "_displayName", "_tooltip", "_isGlobal"];

if (_category == _selectedAddon) then {
if (isLocalized _category) then {
_category = localize _category;
};

if (isLocalized _displayName) then {
_displayName = localize _displayName;
};
Expand Down

0 comments on commit cb4e052

Please sign in to comment.