From ec2fd926a7c5ff61ab1fdc8086fa9f99d0052881 Mon Sep 17 00:00:00 2001 From: Josuan Albin Date: Tue, 7 Nov 2017 15:52:10 +0100 Subject: [PATCH] Add more translations, change how shared button text is managed --- addons/arsenal/functions/fnc_buttonExport.sqf | 6 +-- .../functions/fnc_buttonLoadoutsShare.sqf | 8 +++- .../functions/fnc_fillLoadoutsList.sqf | 1 + .../functions/fnc_loadoutsChangeTab.sqf | 6 +-- .../functions/fnc_onSelChangedLoadouts.sqf | 7 +++- addons/arsenal/stringtable.xml | 38 ++++++++++++------- addons/arsenal/ui/RscAttributes.hpp | 2 +- 7 files changed, 44 insertions(+), 24 deletions(-) diff --git a/addons/arsenal/functions/fnc_buttonExport.sqf b/addons/arsenal/functions/fnc_buttonExport.sqf index 1140ac8f2e..073e23d618 100644 --- a/addons/arsenal/functions/fnc_buttonExport.sqf +++ b/addons/arsenal/functions/fnc_buttonExport.sqf @@ -17,7 +17,7 @@ params ["_display"]; if (GVAR(shiftState)) then { if (isNil QGVAR(defaultLoadoutsList) || {GVAR(defaultLoadoutsList) isEqualTo []}) exitWIth { - [_display, "Default loadouts list is empty"] call FUNC(message); //TBL + [_display, "Default loadouts list is empty"] call FUNC(message); // TBL }; private _listLength = count GVAR(defaultLoadoutsList); @@ -40,12 +40,12 @@ if (GVAR(shiftState)) then { "ace_clipboard" callExtension "--COMPLETE--"; - [_display, "Default loadouts list exported to clipboard"] call FUNC(message); //TBL + [_display, "Default loadouts list exported to clipboard"] call FUNC(message); // TBL } else { private _export = str getUnitLoadout GVAR(center); "ace_clipboard" callExtension (_export + ";"); "ace_clipboard" callExtension "--COMPLETE--"; - [_display, "Current loadout exported to clipboard"] call FUNC(message); //TBL + [_display, "Current loadout exported to clipboard"] call FUNC(message); // TBL }; diff --git a/addons/arsenal/functions/fnc_buttonLoadoutsShare.sqf b/addons/arsenal/functions/fnc_buttonLoadoutsShare.sqf index f442daf4b6..0475f9205b 100644 --- a/addons/arsenal/functions/fnc_buttonLoadoutsShare.sqf +++ b/addons/arsenal/functions/fnc_buttonLoadoutsShare.sqf @@ -32,6 +32,7 @@ if (_loadoutIndex > -1) then { GVAR(sharedLoadoutsVars) = GVAR(sharedLoadoutsVars) - [_loadoutVar]; _contentPanelCtrl lnbSetPicture [[_contentPanelCursSel, 0], QPATHTOF(data\iconPublicBlank.paa)]; + _contentPanelCtrl lnbSetValue [[_contentPanelCursSel, 0], 0]; [QGVAR(loadoutUnshared), [_contentPanelCtrl, profileName, _loadoutName]] call CBA_fnc_remoteEvent; } else { @@ -39,8 +40,13 @@ if (_loadoutIndex > -1) then { GVAR(sharedLoadoutsVars) pushBackUnique _loadoutVar; _contentPanelCtrl lnbSetPicture [[_contentPanelCursSel, 0], QPATHTOF(data\iconPublic.paa)]; + _contentPanelCtrl lnbSetValue [[_contentPanelCursSel, 0], 1]; [QGVAR(loadoutShared), [_contentPanelCtrl, [_profileName ,_loadoutName , _loadoutData]]] call CBA_fnc_remoteEvent; }; -_control ctrlSetText (["Share", "Unshare"] select ((_contentPanelCtrl lnbText [_contentPanelCursSel, 0]) != "")); // TBL +_control ctrlSetText ( [ + localize LSTRING(buttonSharePrivateText), + localize LSTRING(buttonSharePublicText) +] select ((_contentPanelCtrl lnbValue [_contentPanelCursSel, 0]) == 1)); + publicVariable QGVAR(sharedLoadoutsVars); diff --git a/addons/arsenal/functions/fnc_fillLoadoutsList.sqf b/addons/arsenal/functions/fnc_fillLoadoutsList.sqf index 417998f5f5..2d5b488668 100644 --- a/addons/arsenal/functions/fnc_fillLoadoutsList.sqf +++ b/addons/arsenal/functions/fnc_fillLoadoutsList.sqf @@ -81,6 +81,7 @@ if (GVAR(currentLoadoutsTab) != IDC_buttonSharedLoadouts) then { if ((profileName + _loadoutName) in GVAR(sharedLoadoutsVars) && {GVAR(currentLoadoutsTab) == IDC_buttonMyLoadouts}) then { _contentListCtrl lnbSetPicture [[_newRow, 0], QPATHTOF(data\iconPublic.paa)]; + _contentListCtrl lnbSetValue [[_newRow, 0], 1]; }; } foreach ([_data, +GVAR(defaultLoadoutsList)] select (ctrlIDC _control == IDC_buttonDefaultLoadouts)); } else { diff --git a/addons/arsenal/functions/fnc_loadoutsChangeTab.sqf b/addons/arsenal/functions/fnc_loadoutsChangeTab.sqf index 9c09f9e958..7842df8704 100644 --- a/addons/arsenal/functions/fnc_loadoutsChangeTab.sqf +++ b/addons/arsenal/functions/fnc_loadoutsChangeTab.sqf @@ -46,21 +46,21 @@ _control ctrlCommit 0; switch (ctrlIDC _control) do { case IDC_buttonMyLoadouts: { - _centerBoxTitleCtrl ctrlSetText "My loadouts"; // TBL + _centerBoxTitleCtrl ctrlSetText (localize LSTRING(tabMyLoadoutsText)); _saveButtonCtrl ctrlEnable true; _saveButtonCtrl ctrlCommit 0; }; case IDC_buttonDefaultLoadouts: { - _centerBoxTitleCtrl ctrlSetText "Default loadouts"; // TBL + _centerBoxTitleCtrl ctrlSetText (localize LSTRING(tabDefaultLoadoutsText)); _saveButtonCtrl ctrlEnable (is3DEN); _saveButtonCtrl ctrlCommit 0; }; case IDC_buttonSharedLoadouts: { - _centerBoxTitleCtrl ctrlSetText "Shared loadouts"; // TBL + _centerBoxTitleCtrl ctrlSetText (localize LSTRING(tabSharedLoadoutsText)); _saveButtonCtrl ctrlEnable false; _saveButtonCtrl ctrlCommit 0; diff --git a/addons/arsenal/functions/fnc_onSelChangedLoadouts.sqf b/addons/arsenal/functions/fnc_onSelChangedLoadouts.sqf index 0697f2e388..3f4d508ae0 100644 --- a/addons/arsenal/functions/fnc_onSelChangedLoadouts.sqf +++ b/addons/arsenal/functions/fnc_onSelChangedLoadouts.sqf @@ -30,7 +30,7 @@ if (_curSel == -1) exitWith { _saveButtonCtrl ctrlCommit 0; }; - _shareButtonCtrl ctrlSetText "Share"; // TBL + _shareButtonCtrl ctrlSetText (localize LSTRING(buttonSharePrivateText)); { _x ctrlEnable false; @@ -48,7 +48,10 @@ switch (GVAR(currentLoadoutsTab)) do { _loadButtonCtrl ctrlEnable true; _loadButtonCtrl ctrlCommit 0; - _shareButtonCtrl ctrlSetText (["Share", "Unshare"] select ((_control lnbText [_curSel, 0]) != "")); // TBL + _shareButtonCtrl ctrlSetText ( [ + localize LSTRING(buttonSharePrivateText), + localize LSTRING(buttonSharePublicText) + ] select ((_control lnbValue [_curSel, 0]) == 1)); { _x ctrlEnable true; diff --git a/addons/arsenal/stringtable.xml b/addons/arsenal/stringtable.xml index 4396a59ae8..2c36550cab 100644 --- a/addons/arsenal/stringtable.xml +++ b/addons/arsenal/stringtable.xml @@ -1,11 +1,6 @@  - - Unable to open ACE arsenal - Impossible d'afficher l'interface - Kann ACE Arsenal nicht anzeigen - Hide Cacher @@ -18,7 +13,7 @@ Loadouts - Loadouts + Équipements Ausrüstungen @@ -59,6 +54,7 @@ Rename the selected loadout Ausgewählte Ausrüstung umbenennen + Renomme l'équipement sélectionné Load @@ -68,6 +64,7 @@ Load the selected loadout Ausgewählte Ausrüstung laden + Charger l'équipement sélectionné Delete @@ -77,26 +74,37 @@ Delete the selected loadout Ausgewählte Ausrüstung entfernen + Supprimer l'équipement sélectionné My loadouts Meine Ausrüstungen + Mes équipements Loadouts saved in your profile Ausrüstungen, die in deinem Profil gespeichert sind + Équipements enregistrés dans votre profil Default loadouts Standard-Ausrüstungen + Équipements de base Loadouts made available by the mission maker Ausrüstungen, die durch den Missionsersteller zur Verfügung gestellt worden sind + Équipements faits par l'auteur de la mission + + + Public loadouts + Veröffentlichte Ausrüstungen + Équipements publics Loadouts shared by you and other players Ausrüstungen, die von dir und anderen Spielern geteilt wurden + Équipements mis à disposition par vous ou les autres joueurs Sort by weight @@ -108,17 +116,19 @@ Trier par quantité Nach Menge sortieren - - Private - Privat - Share or stop sharing the selected loadout Ausgewählte Ausrüstung teilen oder nicht mehr teilen + Partager ou arrêter de partager cet équipement - - Public loadouts - Veröffentlichte Ausrüstungen + + Private + Privé + Privat + + + Public + Public - \ No newline at end of file + diff --git a/addons/arsenal/ui/RscAttributes.hpp b/addons/arsenal/ui/RscAttributes.hpp index 769a71d5d7..e51cd8f8a0 100644 --- a/addons/arsenal/ui/RscAttributes.hpp +++ b/addons/arsenal/ui/RscAttributes.hpp @@ -807,7 +807,7 @@ class GVAR(loadoutsDisplay) { class buttonShare: buttonSave { idc = IDC_buttonShare; x = QUOTE((safezoneW * 0.5) + safezoneX + (15 * GRID_W)); - text= CSTRING(buttonShareText); + text= CSTRING(buttonSharePrivateText); tooltip= CSTRING(buttonShareTooltip); onButtonClick = QUOTE([ARR_2(ctrlparent (_this select 0), _this select 0)] call FUNC(buttonLoadoutsShare)); };