Merge pull request #1938 from MBRjun/dev

Bug Fix & Translation Updates
This commit is contained in:
Mike Cao 2023-04-20 11:24:59 -07:00 committed by GitHub
commit 5f30cbd789
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 9 deletions

View File

@ -1,12 +1,13 @@
import { TextArea } from 'react-basics';
import { TRACKER_SCRIPT_URL } from 'lib/constants';
import useMessages from 'hooks/useMessages';
import useConfig from 'hooks/useConfig';
export default function TrackingCode({ websiteId }) {
const { formatMessage, messages } = useMessages();
const url = TRACKER_SCRIPT_URL.startsWith('http')
? TRACKER_SCRIPT_URL
: `${location.origin}${TRACKER_SCRIPT_URL}`;
const { trackerScriptName } = useConfig();
const url = trackerScriptName.startsWith('http')
? trackerScriptName
: `${location.origin}/${trackerScriptName}.js`;
const code = `<script async src="${url}" data-website-id="${websiteId}"></script>`;

View File

@ -1,7 +1,7 @@
{
"label.access-code": "访问代码",
"label.actions": "用户行为",
"label.activity-log": "Activity log",
"label.activity-log": "活动日志",
"label.add-website": "添加网站",
"label.admin": "管理员",
"label.all": "所有",
@ -13,7 +13,7 @@
"label.browsers": "浏览器",
"label.cancel": "取消",
"label.change-password": "更新密码",
"label.cities": "市",
"label.cities": "/县",
"label.clear-all": "清除全部",
"label.confirm": "确认",
"label.confirm-password": "确认密码",
@ -32,7 +32,7 @@
"label.delete-team": "删除团队",
"label.delete-user": "删除用户",
"label.delete-website": "删除网站",
"label.desktop": "桌面电脑",
"label.desktop": "台式机",
"label.details": "详细信息",
"label.devices": "设备",
"label.dismiss": "关闭",
@ -41,7 +41,7 @@
"label.edit-dashboard": "编辑仪表板",
"label.enable-share-url": "启用共享链接",
"label.events": "行为类别",
"label.filter-combined": "总和",
"label.filter-combined": "合并",
"label.filter-raw": "原始",
"label.join": "加入",
"label.join-team": "加入团队",
@ -72,7 +72,7 @@
"label.referrers": "来源域名",
"label.refresh": "刷新",
"label.regenerate": "重新生成",
"label.regions": "地区",
"label.regions": "州/省",
"label.remove": "移除",
"label.required": "必填",
"label.reset": "重置",