From b56d9a1543d744e827682ab1f8c76d5e63c56f34 Mon Sep 17 00:00:00 2001
From: Master Mind <70486873+SOH69@users.noreply.github.com>
Date: Mon, 11 Dec 2023 22:42:28 +0530
Subject: [PATCH] fix for latest ox_lib build
---
client/event.lua | 2 +-
client/function.lua | 2 +-
ui/src/components/body.svelte | 14 +++++++-------
ui/src/components/channel.svelte | 4 ++--
ui/src/components/connect.svelte | 2 +-
ui/src/components/playerlist.svelte | 2 +-
6 files changed, 13 insertions(+), 13 deletions(-)
diff --git a/client/event.lua b/client/event.lua
index 715cca9..a35543c 100644
--- a/client/event.lua
+++ b/client/event.lua
@@ -40,7 +40,7 @@ RegisterNetEvent('mm_radio:client:use', function()
time = Radio:CalculateTimeToDisplay(),
street = Radio:getCrossroads(),
maxChannel = Shared.MaxFrequency,
- locale = Radio.locale.ui
+ locale = Radio.locale
})
updateTime()
diff --git a/client/function.lua b/client/function.lua
index 66df290..38ee30d 100644
--- a/client/function.lua
+++ b/client/function.lua
@@ -85,7 +85,7 @@ function Radio:update()
userData = Radio.userData,
time = self:CalculateTimeToDisplay(),
street = self:getCrossroads(),
- locale = self.locale.ui
+ locale = self.locale
})
end
diff --git a/ui/src/components/body.svelte b/ui/src/components/body.svelte
index 16452c7..d239bb9 100644
--- a/ui/src/components/body.svelte
+++ b/ui/src/components/body.svelte
@@ -56,11 +56,11 @@
{#if $RADIODATA.onRadio}
-
{$RADIODATA.locale.header}
-
{$RADIODATA.locale.frequency}: {$RADIODATA.channel} MHz
-
SendNUI('leave')}>{$RADIODATA.locale.disconnect}
+
{$RADIODATA.locale['ui.header']}
+
{$RADIODATA.locale['ui.frequency']}: {$RADIODATA.channel} MHz
+
SendNUI('leave')}>{$RADIODATA.locale['ui.disconnect']}
{:else}
-
{$RADIODATA.locale.notconnected}
+
{$RADIODATA.locale['ui.notconnected']}
{/if}
@@ -81,15 +81,15 @@
- {$RADIODATA.locale.channels}
+ {$RADIODATA.locale['ui.channels']}
- {$RADIODATA.locale.radio}
+ {$RADIODATA.locale['ui.radio']}
- {$RADIODATA.locale.members}
+ {$RADIODATA.locale['ui.members']}
diff --git a/ui/src/components/channel.svelte b/ui/src/components/channel.svelte
index 130bb0e..332392c 100644
--- a/ui/src/components/channel.svelte
+++ b/ui/src/components/channel.svelte
@@ -18,10 +18,10 @@
changeTab('favourite')}>
- {$RADIODATA.locale.favorites}
+ {$RADIODATA.locale['ui.favorites']}
changeTab('recomended')}>
- {$RADIODATA.locale.recommended}
+ {$RADIODATA.locale['ui.recommended']}
\ No newline at end of file
diff --git a/ui/src/components/connect.svelte b/ui/src/components/connect.svelte
index 939aeee..bd588d3 100644
--- a/ui/src/components/connect.svelte
+++ b/ui/src/components/connect.svelte
@@ -63,7 +63,7 @@
0
removeNumber()}>
- {$RADIODATA.locale.clear}
+ {$RADIODATA.locale['ui.clear']}
\ No newline at end of file
diff --git a/ui/src/components/playerlist.svelte b/ui/src/components/playerlist.svelte
index 7dc58d5..d0f110d 100644
--- a/ui/src/components/playerlist.svelte
+++ b/ui/src/components/playerlist.svelte
@@ -28,6 +28,6 @@
- showPlayerList()}>{$SHOWPLAYERLIST? $RADIODATA.locale.hide_overlay:$RADIODATA.locale.show_overlay}
+ showPlayerList()}>{$SHOWPLAYERLIST? $RADIODATA.locale['ui.hide_overlay']:$RADIODATA.locale['ui.show_overlay']}
{/if}
\ No newline at end of file