fix: added locales
This commit is contained in:
@@ -1073,6 +1073,7 @@
|
||||
"views.Settings.Help.github": "GitHub Issues",
|
||||
"views.Settings.Help.telegram": "Telegram (we will not DM you)",
|
||||
"views.Settings.Help.email": "Email support",
|
||||
"views.Settings.POS": "ZEUS POS",
|
||||
"views.Settings.POS.enableSquare": "Enable Square POS integration",
|
||||
"views.Settings.POS.taxPercentage.global.info": "Global tax rate applied to all products. Individual product tax rates will override this setting when specified.",
|
||||
"views.Settings.POS.taxPercentage.info": "Individual tax rate for this product. When set, this will override the global tax rate. Leave empty to use the global tax rate.",
|
||||
@@ -1108,6 +1109,7 @@
|
||||
"views.Settings.POS.0conf": "0 confirmations",
|
||||
"views.Settings.POS.1conf": "1 confirmation",
|
||||
"views.Settings.POS.lnOnly": "Lightning only",
|
||||
"views.Settings.POS.poweredByZEUS": "POS powered by ZEUS",
|
||||
"views.Settings.Seed.title": "Back up wallet",
|
||||
"views.Settings.Seed.text1": "The following 24 words are your wallet backup.",
|
||||
"views.Settings.Seed.text2": "KEEP THEM SAFE as anyone who sees these words can steal your funds.",
|
||||
|
||||
+12
-6
@@ -12,6 +12,7 @@ import Order from '../models/Order';
|
||||
import { SATS_PER_BTC } from '../utils/UnitsUtils';
|
||||
import { calculateTaxSats } from '../utils/PosUtils';
|
||||
import BackendUtils from '../utils/BackendUtils';
|
||||
import { localeString } from '../utils/LocaleUtils';
|
||||
|
||||
import Storage from '../storage';
|
||||
|
||||
@@ -130,24 +131,29 @@ export default class PosStore {
|
||||
const lineItems = currentOrder.line_items;
|
||||
|
||||
const memo = merchantName
|
||||
? `${merchantName} POS powered by ZEUS - Order ${currentOrder?.id}`
|
||||
: `ZEUS POS - Order ${currentOrder?.id}`;
|
||||
? `${merchantName} ${localeString(
|
||||
'views.Settings.POS.poweredByZEUS'
|
||||
)} - ${localeString('general.order')} ${currentOrder?.id}`
|
||||
: `${localeString('views.Settings.POS')} - ${localeString(
|
||||
'general.order'
|
||||
)} ${currentOrder?.id}`;
|
||||
|
||||
const fiatEntry =
|
||||
fiat && fiatRates
|
||||
? fiatRates.filter((entry: any) => entry.code === fiat)[0]
|
||||
: null;
|
||||
const rate =
|
||||
fiat && fiatRates && fiatEntry ? fiatEntry.rate.toFixed() : 0;
|
||||
const rate = fiat && fiatRates && fiatEntry ? fiatEntry.rate : 0;
|
||||
|
||||
const subTotalSats =
|
||||
(currentOrder?.total_money?.sats ?? 0) > 0
|
||||
? currentOrder.total_money.sats
|
||||
: new BigNumber(currentOrder?.total_money?.amount)
|
||||
: rate > 0
|
||||
? new BigNumber(currentOrder?.total_money?.amount)
|
||||
.div(100)
|
||||
.div(rate)
|
||||
.multipliedBy(SATS_PER_BTC)
|
||||
.toFixed(0);
|
||||
.toFixed(0)
|
||||
: '0';
|
||||
|
||||
const taxSats = Number(
|
||||
calculateTaxSats(lineItems, subTotalSats, rate, taxPercentage)
|
||||
|
||||
+6
-2
@@ -594,8 +594,12 @@ export default class OrderView extends React.Component<OrderProps, OrderState> {
|
||||
const lineItems = order?.line_items;
|
||||
|
||||
const memo = merchantName
|
||||
? `${merchantName} POS powered by ZEUS - Order ${order?.id}`
|
||||
: `ZEUS POS - Order ${order?.id}`;
|
||||
? `${merchantName} ${localeString(
|
||||
'views.Settings.POS.poweredByZEUS'
|
||||
)} - ${localeString('general.order')} ${order?.id}`
|
||||
: `${localeString('views.Settings.POS')} - ${localeString(
|
||||
'general.order'
|
||||
)} ${order?.id}`;
|
||||
|
||||
let subTotalSats: string;
|
||||
if (settings.pos.posEnabled === PosEnabled.Square) {
|
||||
|
||||
@@ -1,10 +1,15 @@
|
||||
import * as React from 'react';
|
||||
import { FlatList, Text, TouchableOpacity } from 'react-native';
|
||||
import Swipeable from 'react-native-gesture-handler/Swipeable';
|
||||
import { StackNavigationProp } from '@react-navigation/stack';
|
||||
|
||||
import { Spacer } from '../../components/layout/Spacer';
|
||||
import SwipeableOrderItem from '../Wallet/SwipeableOrderItem';
|
||||
|
||||
import { themeColor } from '../../utils/ThemeUtils';
|
||||
|
||||
import FiatStore from '../../stores/FiatStore';
|
||||
|
||||
import Order from '../../models/Order';
|
||||
|
||||
interface OrderListProps {
|
||||
@@ -13,8 +18,8 @@ interface OrderListProps {
|
||||
onRefresh: () => void;
|
||||
onHideOrder: (orderId: string) => void;
|
||||
onOrderClick: (order: Order) => void;
|
||||
navigation: any;
|
||||
fiatStore: any;
|
||||
navigation: StackNavigationProp<any, any>;
|
||||
fiatStore: FiatStore;
|
||||
emptyText: string;
|
||||
}
|
||||
|
||||
|
||||
@@ -167,7 +167,7 @@ export default class SquarePosPane extends React.PureComponent<
|
||||
loading={loading}
|
||||
onRefresh={() => getOrders()}
|
||||
navigation={navigation}
|
||||
fiatStore={FiatStore}
|
||||
fiatStore={FiatStore!}
|
||||
emptyText={
|
||||
selectedIndex === 0
|
||||
? localeString(
|
||||
|
||||
@@ -27,8 +27,6 @@ import { SATS_PER_BTC, getDecimalPlaceholder } from '../../utils/UnitsUtils';
|
||||
|
||||
import { PricedIn } from '../../models/Product';
|
||||
|
||||
import BigNumber from 'bignumber.js';
|
||||
|
||||
interface PosKeypadPaneProps {
|
||||
navigation: StackNavigationProp<any, any>;
|
||||
FiatStore?: FiatStore;
|
||||
|
||||
@@ -596,7 +596,7 @@ export default class StandalonePosPane extends React.PureComponent<
|
||||
loading={loading}
|
||||
onRefresh={() => getOrders()}
|
||||
navigation={navigation}
|
||||
fiatStore={FiatStore}
|
||||
fiatStore={FiatStore!}
|
||||
emptyText={
|
||||
selectedIndex === 1
|
||||
? localeString(
|
||||
|
||||
Reference in New Issue
Block a user