Skip to content
This repository has been archived by the owner on Sep 26, 2024. It is now read-only.

Commit

Permalink
[translators] Update translators branch with master 📚 (#5954)
Browse files Browse the repository at this point in the history
* fix: removed telegram from footer and faq (#5950)

Co-authored-by: Fasih Ali <[email protected]>

* Fasih/without translation PR enable firebase live price trans (#5794)

* chore: reenabled live pricing

* auto-pull-translation

* auto-pull-translation

* auto-pull

* fix: fetched translations

* fix: trying to generate message json file

* chore: updated text

* auto-pull-translation

* auto-pull-translation

* chore: removed EU condition

* auto-pull-translation

* empty: 🏗️ trigger build

* auto-pull-translation

* translation: 📚 sync translations from crowdin feature branch

* fix: fixed button sizing with parent padding

---------

Co-authored-by: Fasih Ali <[email protected]>
Co-authored-by: DerivFE <[email protected]>
Co-authored-by: Fasih Ali <[email protected]>

---------

Co-authored-by: fasihali-deriv <[email protected]>
Co-authored-by: Fasih Ali <[email protected]>
Co-authored-by: Fasih Ali <[email protected]>
Co-authored-by: DerivFE <[email protected]>
  • Loading branch information
5 people authored Nov 16, 2023
1 parent 2de5df0 commit 9854f62
Show file tree
Hide file tree
Showing 29 changed files with 423 additions and 380 deletions.
2 changes: 1 addition & 1 deletion crowdin/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,6 @@
"274438767": "The order amount is locked in escrow until both parties confirm that the transaction has been completed from their end.",
"275116637": "Deriv X",
"275316510": "Impersonators ask you to send confidential information over an unsecure platform, for example via SMS, WhatsApp, email, etc.",
"276089446": "All spreads are indicative. To view real-time spreads, please refer to your terminal.",
"276482397": "No, you can't.",
"278499050": "Use your local currency to make deposits into and withdrawals from your Deriv account.",
"281247370": "Margin Calculator",
Expand Down Expand Up @@ -3162,6 +3161,7 @@
"-1026502273": "One broker,",
"-1981735781": "One broker, countless trading opportunities",
"-1722031734": "Check trading specs",
"-61718257": "Speculate on the price movements of popular exchange-traded funds (ETFs). Diversify your portfolio with assets that track bonds, commodities, and indices, without the high cost of owning the underlying assets.",
"-777850431": "View all >",
"-1384760133": "Bid price",
"-1882694284": "Ask price",
Expand Down
2 changes: 1 addition & 1 deletion src/common/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -191,5 +191,5 @@ export const bannerTypes = {
}

export const firebaseConfig = {
databaseURL: 'https://deriv-static-pricingfeed.firebaseio.com',
databaseURL: 'https://deriv-static-pricingfeedv2.firebaseio.com',
}
351 changes: 183 additions & 168 deletions src/components/elements/symbols-shortcode.ts

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/components/hooks/use-pricing-feed.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const usePricingFeed = () => {
const app = initializeApp(firebaseConfig)
const db = getDatabase(app)

const commoditiesRef = ref(db, is_eu ? 'eu/market' : 'row/market')
const commoditiesRef = ref(db, is_eu ? 'eu/mkt' : 'row/mkt')
const unsubscribe = onValue(
commoditiesRef,
(snapshot) => {
Expand Down
34 changes: 18 additions & 16 deletions src/features/components/templates/footer/social-icons/data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -332,20 +332,22 @@ export const socialMediaAccounts: SmartSocialAccount[] = [
is_career_page: true,
},
},
{
id: 13,
data: {
url: {
type: 'non-company',
target: '_blank',
href: 'https://t.me/derivdotcomofficial',
},
icon: Telegram,
image_alt: '_t_Telegram_t_',
},
visibility: {
is_eu: false,
is_career_page: false,
},
},
//temp removal of telegram : Start
// {
// id: 13,
// data: {
// url: {
// type: 'non-company',
// target: '_blank',
// href: 'https://t.me/derivdotcomofficial',
// },
// icon: Telegram,
// image_alt: '_t_Telegram_t_',
// },
// visibility: {
// is_eu: false,
// is_career_page: false,
// },
// },
//temp removal of telegram : End
]
11 changes: 1 addition & 10 deletions src/features/pages/home/live-pricing/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,21 +18,12 @@ const LivePricing = () => {
return (
<Container.Fixed as="section" pt="16x" pb="16x" md={{ padding_block: '40x' }}>
<MarketTab />
<Flex.Box justify="center" align="center" padding="16x">
<Typography.Paragraph
align="center"
font_family="UBUNTU"
textcolor="secondary"
size="medium"
>
<Localize translate_text="_t_All spreads are indicative. To view real-time spreads, please refer to your terminal._t_" />
</Typography.Paragraph>
</Flex.Box>
<Flex.Box
justify="center"
align="center"
gap="4x"
direction="col"
pt="16x"
md={{ direction: 'row', gap: '10x' }}
>
<LinkButton.Primary
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import TabMenu from 'features/components/templates/tabs/menu'
import { PathType } from 'features/types'

const MarketTab = () => {
const [selected_market, setSelectedMarket] = useState<TAvailableLiveMarkets>('forex')
const [selected_market, setSelectedMarket] = useState<TAvailableLiveMarkets>('fx')
const [tab_name, setTabName] = useState('Forex')
const [linkToMarketPage, setLinkToMarketPage] = useState<PathType>('/markets/forex/')
const onMarketButtonClick = (selected) => {
Expand Down
21 changes: 16 additions & 5 deletions src/features/pages/home/live-pricing/market-tabs/utils.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,13 @@ import { TMarketButtons } from '../types'
import Forex from 'images/svg/home/ts_fx_icon.svg'
import Derived from 'images/svg/home/ts_derived_icon.svg'
import Stocks from 'images/svg/home/ts_stocks_icon.svg'
import ETFS from 'images/svg/home/ts_etfs.svg'
import Crypto from 'images/svg/home/ts_crypto_icon.svg'
import Commodities from 'images/svg/home/ts_commodities_icon.svg'
import SelectedForex from 'images/svg/home/selected_ts_fx_icon.svg'
import SelectedDerived from 'images/svg/home/selected_ts_derived_icon.svg'
import SelectedStocks from 'images/svg/home/selected_ts_stocks_icon.svg'
import SelectedETFS from 'images/svg/home/selected_etfs.svg'
import SelectedCrypto from 'images/svg/home/selected_ts_crypto_icon.svg'
import SelectedCommodities from 'images/svg/home/selected_ts_commodities_icon.svg'

Expand All @@ -15,7 +17,7 @@ export const market_buttons: TMarketButtons[] = [
src: Forex,
selected_src: SelectedForex,
button_text: 'Forex',
market_name: 'forex',
market_name: 'fx',
market_description:
'_t_Benefit from round-the-clock trading hours (Monday to Friday), high liquidity, low barriers to entry, a wide range of offerings, and opportunities to trade on world events._t_',
to: '/markets/forex/',
Expand All @@ -24,7 +26,7 @@ export const market_buttons: TMarketButtons[] = [
src: Derived,
selected_src: SelectedDerived,
button_text: 'Derived indices',
market_name: 'derived',
market_name: 'der',
market_description:
'_t_Trade on asset prices derived from real-world or simulated markets. Manage your exposure by selecting the volatility level to suit your risk appetite. Choose from our 24/7 synthetics, derived FX, and baskets._t_',
to: '/markets/synthetic/',
Expand All @@ -33,16 +35,25 @@ export const market_buttons: TMarketButtons[] = [
src: Stocks,
selected_src: SelectedStocks,
button_text: 'Stocks & indices',
market_name: 'indices',
market_name: 'ind',
market_description:
'_t_Trade global stocks of your favourite household brands and international stock market indices on Deriv. Expand your trading opportunities with access to a wide range of stocks and indices at competitive prices, and the convenience to trade indices beyond standard market hours._t_',
to: '/markets/stock/',
},
{
src: ETFS,
selected_src: SelectedETFS,
button_text: 'ETFs',
market_name: 'etfs',
market_description:
'_t_Speculate on the price movements of popular exchange-traded funds (ETFs). Diversify your portfolio with assets that track bonds, commodities, and indices, without the high cost of owning the underlying assets._t_',
to: '/markets/exchange-traded-funds/',
},
{
src: Crypto,
selected_src: SelectedCrypto,
button_text: 'Cryptocurrencies',
market_name: 'cryptocurrency',
market_name: 'cry',
market_description:
"_t_Take advantage of a highly liquid market with round-the-clock trading. Profit from correctly predicting the movement of world's most popular cryptocurrencies._t_",
to: '/markets/cryptocurrencies/',
Expand All @@ -51,7 +62,7 @@ export const market_buttons: TMarketButtons[] = [
src: Commodities,
selected_src: SelectedCommodities,
button_text: 'Commodities',
market_name: 'commodities',
market_name: 'com',
market_description:
'_t_Speculate on the price movements of silver, gold, oil and more. Profit from the price difference when the market moves in the direction that you have predicted._t_',
to: '/markets/commodities/',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,10 @@ const LiveMarketTable = ({ selected_market, link_to }: TLiveMarketTableProps) =>

const markets_data = useMemo(() => {
if (rawMarketsData) {
const stocks = rawMarketsData['stocks']
const indices = rawMarketsData['indices']
const stocks = rawMarketsData['stk']
const indices = rawMarketsData['ind']
const stocks_indices = { ...stocks, ...indices }
const res = { ...rawMarketsData, indices: stocks_indices }
const res = { ...rawMarketsData, ind: stocks_indices }

if (res[selected_market]) {
return Object.values(res[selected_market])
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ import * as icons from 'components/elements/symbols-shortcode'
import Image from 'features/components/atoms/image'

const SymbolIcon = ({ icon_src, alt }: { icon_src: string; alt?: string }) => {
if (icon_src === '1HZ150V')
if (icon_src === 'Volatility_150_(1s)_Index')
return <Image src={icons['Vol_1HZ150V']} width="24px" height="24px" alt={alt} />
if (icon_src === '1HZ250V')
if (icon_src === 'Volatility_250_(1s)_Index')
return <Image src={icons['Vol_1HZ250V']} width="24px" height="24px" alt={alt} />
else return <Image src={icons[icon_src]} width="24px" height="24px" alt={alt} />
}
Expand Down
23 changes: 6 additions & 17 deletions src/features/pages/home/live-pricing/types.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,14 @@ import { TString } from 'types/generics'
export type TMarketData = {
ask: number
bid: number
day_percentage_change: number
market: string
spread: number
symbol: string
shortcode: string
chng: number
mkt: string
sprd: number
sym: string
code: string
}

export type TMarketDataResponse = {
trading_platform_asset_listing: any
active_symbols: TMarketData[]
req_id: number
}

export type TAvailableLiveMarkets =
| 'forex'
| 'derived'
| 'indices'
| 'cryptocurrency'
| 'commodities'
export type TAvailableLiveMarkets = 'fx' | 'der' | 'ind' | 'cry' | 'com' | 'etfs'

export type TMarketButtons = {
src: string
Expand Down
20 changes: 12 additions & 8 deletions src/features/pages/home/live-pricing/use-live-columns.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const useLiveColumns = () => {
const { is_mobile } = useBreakpoints()
const columns = useMemo(() => {
return [
liveMarketColumnHelper.accessor('shortcode', {
liveMarketColumnHelper.accessor('code', {
header: () => (
<Flex.Box>
<Typography.Paragraph
Expand All @@ -28,14 +28,18 @@ const useLiveColumns = () => {
),
cell: (info) => (
<Flex.Box>
<SymbolIcon
icon_src={info.getValue()}
alt={info.row._valuesCache.sym as string}
/>
{info.row.original.mkt !== 'etfs' ? (
<SymbolIcon
icon_src={info.getValue()}
alt={info.row._valuesCache.sym as string}
/>
) : (
<SymbolIcon icon_src="ETFSICON" />
)}
</Flex.Box>
),
}),
liveMarketColumnHelper.accessor('symbol', {
liveMarketColumnHelper.accessor('sym', {
header: () => (
<Flex.Box>
<p className="sr-only">Symbol</p>
Expand Down Expand Up @@ -91,7 +95,7 @@ const useLiveColumns = () => {
</Flex.Box>
),
}),
liveMarketColumnHelper.accessor('spread', {
liveMarketColumnHelper.accessor('sprd', {
header: () => (
<Flex.Box>
<Typography.Paragraph
Expand All @@ -112,7 +116,7 @@ const useLiveColumns = () => {
</Flex.Box>
),
}),
liveMarketColumnHelper.accessor('day_percentage_change', {
liveMarketColumnHelper.accessor('chng', {
header: () => (
<Flex.Box>
<Typography.Paragraph
Expand Down
16 changes: 16 additions & 0 deletions src/images/svg/symbols/etf-usd-500.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 9854f62

Please sign in to comment.