chore: sentry,i18n,buyvip

This commit is contained in:
liuweiqing 2024-02-12 13:28:16 +08:00
parent b983427721
commit bab4e2b90e
7 changed files with 103 additions and 18 deletions

81
.vscode/settings.json vendored
View File

@ -1,19 +1,68 @@
{
"sqltools.connections": [
{
"mysqlOptions": {
"authProtocol": "default",
"enableSsl": "Disabled"
},
"previewLimit": 50,
"server": "localhost",
"port": 3306,
"driver": "MySQL",
"name": "local",
"database": "b3log_symphony",
"username": "root",
"password": "123456"
}
"sqltools.connections": [
{
"mysqlOptions": {
"authProtocol": "default",
"enableSsl": "Disabled"
},
"previewLimit": 50,
"server": "localhost",
"port": 3306,
"driver": "MySQL",
"name": "local",
"database": "b3log_symphony",
"username": "root",
"password": "123456"
}
],
"commentTranslate.targetLanguage": "zh-CN",
"i18n-ally.localesPaths": ["../../../git-program/paper-ai/app/i18n"],
"i18n-ally.keystyle": "nested",
"i18n-ally.namespace": true,
"i18n-ally.enabledParsers": ["json", "js"],
"i18n-ally.sortKeys": true,
"i18n-ally.sourceLanguage": "zh-CN",
"i18n-ally.displayLanguage": "en",
"i18n-ally.editor.preferEditor": true,
"i18n-ally.extract.keygenStyle": "camelCase",
"i18n-ally.enabledFrameworks": ["i18next"],
// Parser options for extracting HTML, see https://github.com/lokalise/i18n-ally/blob/master/src/extraction/parsers/options.ts
"i18n-ally.extract.parsers.html": {
"attributes": [
"text",
"title",
"alt",
"placeholder",
"label",
"aria-label",
"button"
],
"commentTranslate.targetLanguage": "zh-CN"
"ignoredTags": ["script", "style"],
"vBind": true,
"inlineText": true
},
// Enables hard-coded strings detection automatically whenever opening supported a file
"i18n-ally.extract.autoDetect": true,
// Make sure that particular refactoring templates would be picked up be the bulk extraction depending on the context
"i18n-ally.refactor.templates": [
{
// affect scope (optional)
// see https://github.com/lokalise/i18n-ally/blob/master/src/core/types.ts#L156-L156
"source": "html-attribute",
"templates": ["i18n.t('{key}'{args})", "custom.t('{key}'{args})"],
// accept globs, resolved to project root (optional)
"include": ["app/**/*.{vue,ts,js,tsx}", "index.html"],
"exclude": ["src/config/**"]
}
// ...
]
}

0
app/i18n/en.json Normal file
View File

0
app/i18n/zh-CN.json Normal file
View File

View File

@ -4,7 +4,7 @@ import { sendGAEvent } from "@next/third-parties/google";
// BuyVipButton 组件
function BuyVipButton() {
// 这是购买VIP的目标URL
const targetUrl = "https://store.paperai.life/checkout";
const targetUrl = "https://store.paperai.life";
return (
<a href={targetUrl} target="_blank" className="no-underline">
<button

31
package-lock.json generated
View File

@ -22,6 +22,7 @@
"file-saver": "^2.0.5",
"geist": "^1.0.0",
"i": "^0.3.7",
"i18next": "^23.8.2",
"lodash": "^4.17.21",
"next": "latest",
"next-redux-wrapper": "^8.1.0",
@ -1998,6 +1999,28 @@
"node": ">=0.4"
}
},
"node_modules/i18next": {
"version": "23.8.2",
"resolved": "https://registry.npmjs.org/i18next/-/i18next-23.8.2.tgz",
"integrity": "sha512-Z84zyEangrlERm0ZugVy4bIt485e/H8VecGUZkZWrH7BDePG6jT73QdL9EA1tRTTVVMpry/MgWIP1FjEn0DRXA==",
"funding": [
{
"type": "individual",
"url": "https://locize.com"
},
{
"type": "individual",
"url": "https://locize.com/i18next.html"
},
{
"type": "individual",
"url": "https://www.i18next.com/how-to/faq#i18next-is-awesome.-how-can-i-support-the-project"
}
],
"dependencies": {
"@babel/runtime": "^7.23.2"
}
},
"node_modules/iconv-lite": {
"version": "0.6.3",
"resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz",
@ -5485,6 +5508,14 @@
"resolved": "https://registry.npmjs.org/i/-/i-0.3.7.tgz",
"integrity": "sha512-FYz4wlXgkQwIPqhzC5TdNMLSE5+GS1IIDJZY/1ZiEPCT2S3COUVZeT5OW4BmW4r5LHLQuOosSwsvnroG9GR59Q=="
},
"i18next": {
"version": "23.8.2",
"resolved": "https://registry.npmjs.org/i18next/-/i18next-23.8.2.tgz",
"integrity": "sha512-Z84zyEangrlERm0ZugVy4bIt485e/H8VecGUZkZWrH7BDePG6jT73QdL9EA1tRTTVVMpry/MgWIP1FjEn0DRXA==",
"requires": {
"@babel/runtime": "^7.23.2"
}
},
"iconv-lite": {
"version": "0.6.3",
"resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz",

View File

@ -21,6 +21,7 @@
"file-saver": "^2.0.5",
"geist": "^1.0.0",
"i": "^0.3.7",
"i18next": "^23.8.2",
"lodash": "^4.17.21",
"next": "latest",
"next-redux-wrapper": "^8.1.0",

View File

@ -26,5 +26,9 @@ Sentry.init({
maskAllText: true,
blockAllMedia: true,
}),
Sentry.feedbackIntegration({
// Additional SDK configuration goes in here, for example:
colorScheme: "light",
}),
],
});