mirror of
https://github.com/jxpeng98/obsidian-to-NotionNext
synced 2026-07-29 16:35:57 +08:00
update notice
This commit is contained in:
@@ -27,11 +27,11 @@ export const en = {
|
|||||||
DatabaseIDText: "Enter your Database ID",
|
DatabaseIDText: "Enter your Database ID",
|
||||||
BannerUrl: "Banner url (optional)",
|
BannerUrl: "Banner url (optional)",
|
||||||
BannerUrlDesc:
|
BannerUrlDesc:
|
||||||
"Default is empty, if you want to show a banner, please enter the url (like: https://abc.com/b.png)",
|
"Default is empty, if you want to show a banner, please enter the url (like: https://abc.com/b.png)",
|
||||||
BannerUrlText: "Enter your banner url",
|
BannerUrlText: "Enter your banner url",
|
||||||
NotionUser: "Notion ID (username, optional)",
|
NotionUser: "Notion ID (username, optional)",
|
||||||
NotionUserDesc:
|
NotionUserDesc:
|
||||||
"Collect from share link likes:https://username.notion.site. Your notion id is [username]",
|
"Collect from share link likes:https://username.notion.site. Your notion id is [username]",
|
||||||
NotionUserText: "Enter your notion ID",
|
NotionUserText: "Enter your notion ID",
|
||||||
NotionLinkDisplay: "Notion Link Display",
|
NotionLinkDisplay: "Notion Link Display",
|
||||||
NotionLinkDisplayDesc: "Default is ON, if you want to hide the link in the front matter, please turn it off",
|
NotionLinkDisplayDesc: "Default is ON, if you want to hide the link in the front matter, please turn it off",
|
||||||
@@ -48,23 +48,23 @@ export const en = {
|
|||||||
NotionCustomValues: "Customise values property",
|
NotionCustomValues: "Customise values property",
|
||||||
NotionCustomValuesDesc: "Modify the column name of the Notion database,one per line",
|
NotionCustomValuesDesc: "Modify the column name of the Notion database,one per line",
|
||||||
NotionCustomValuesText: "Enter all properties that you want to sync",
|
NotionCustomValuesText: "Enter all properties that you want to sync",
|
||||||
NotYetFinish:
|
NotYetFinish: "Not finished. This function will be available in the next version",
|
||||||
"Not finished. This function will be available in the next version",
|
|
||||||
PlaceHolder: "Enter database Name",
|
PlaceHolder: "Enter database Name",
|
||||||
"notion-logo": "Share to NotionNext",
|
"notion-logo": "Share to NotionNext",
|
||||||
"sync-success": "Sync to NotionNext success: \n",
|
"sync-preffix": "Sync to ",
|
||||||
"sync-fail": "Sync to NotionNext fail: \n",
|
"sync-success": "success",
|
||||||
|
"sync-fail": "failed",
|
||||||
"open-notion": "Please open the file that needs to be synchronized",
|
"open-notion": "Please open the file that needs to be synchronized",
|
||||||
"config-secrets-notion-api":
|
"config-secrets-notion-api":
|
||||||
"Please set up the notion API in the settings tab.",
|
"Please set up the notion API in the settings tab.",
|
||||||
"config-secrets-database-id":
|
"config-secrets-database-id":
|
||||||
"Please set up the database id in the settings tab.",
|
"Please set up the database id in the settings tab.",
|
||||||
"set-tags-fail":
|
"set-tags-fail":
|
||||||
"Set tags fail,please check the frontmatter of the file or close the tag switch in the settings tab.",
|
"Set tags fail,please check the frontmatter of the file or close the tag switch in the settings tab.",
|
||||||
NNonMissing:
|
NNonMissing:
|
||||||
"The 'NNon' property is missing in the settings. Please set it up.",
|
"The 'NNon' property is missing in the settings. Please set it up.",
|
||||||
"set-api-id":
|
"set-api-id":
|
||||||
"Please set up the notion API and database ID in the settings tab.",
|
"Please set up the notion API and database ID in the settings tab.",
|
||||||
NotionCustomSettingHeader: "Notion Custom Database Settings",
|
NotionCustomSettingHeader: "Notion Custom Database Settings",
|
||||||
NotionCustomButton: "Notion Customised command switch",
|
NotionCustomButton: "Notion Customised command switch",
|
||||||
NotionCustomButtonDesc: "Open this option, Sync to Notion Customised Database command will be displayed in the command palette",
|
NotionCustomButtonDesc: "Open this option, Sync to Notion Customised Database command will be displayed in the command palette",
|
||||||
@@ -75,4 +75,5 @@ export const en = {
|
|||||||
AddCustomProperty: "Add Custom Property",
|
AddCustomProperty: "Add Custom Property",
|
||||||
AddNewProperty: "Add New Property",
|
AddNewProperty: "Add New Property",
|
||||||
AddNewPropertyDesc: "Add new property match with your notion database",
|
AddNewPropertyDesc: "Add new property match with your notion database",
|
||||||
|
CopyErrorMessage: "Auto copy failed, please copy it manually",
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -67,4 +67,5 @@ export const ja = {
|
|||||||
AddCustomProperty: "カスタムプロパティを追加",
|
AddCustomProperty: "カスタムプロパティを追加",
|
||||||
AddNewProperty: "新しいプロパティを追加",
|
AddNewProperty: "新しいプロパティを追加",
|
||||||
AddNewPropertyDesc: "新しいプロパティを追加してください",
|
AddNewPropertyDesc: "新しいプロパティを追加してください",
|
||||||
|
CopyErrorMessage: "自動コピーに失敗しました",
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -70,4 +70,5 @@ export const zh = {
|
|||||||
AddCustomProperty: "添加自定义属性",
|
AddCustomProperty: "添加自定义属性",
|
||||||
AddNewProperty: "添加新属性",
|
AddNewProperty: "添加新属性",
|
||||||
AddNewPropertyDesc: "添加一个和Notion数据库匹配的新属性",
|
AddNewPropertyDesc: "添加一个和Notion数据库匹配的新属性",
|
||||||
|
CopyErrorMessage: "复制链接失败,请手动复制",
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
import { App, Notice, TFile } from "obsidian";
|
import { App, Notice, TFile } from "obsidian";
|
||||||
import ObsidianSyncNotionPlugin from "../main";
|
import ObsidianSyncNotionPlugin from "../main";
|
||||||
import { DatabaseDetails } from "../ui/settingTabs";
|
import { DatabaseDetails } from "../ui/settingTabs";
|
||||||
|
import { i18nConfig } from "src/lang/I18n";
|
||||||
|
|
||||||
export async function updateYamlInfo(
|
export async function updateYamlInfo(
|
||||||
yamlContent: string,
|
yamlContent: string,
|
||||||
@@ -37,6 +38,7 @@ export async function updateYamlInfo(
|
|||||||
try {
|
try {
|
||||||
await navigator.clipboard.writeText(url)
|
await navigator.clipboard.writeText(url)
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
new Notice(`复制链接失败,请手动复制${error}`)
|
console.log(error)
|
||||||
|
new Notice(`${i18nConfig.CopyErrorMessage}`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -54,9 +54,9 @@ export async function uploadCommandNext(
|
|||||||
const res = await upload.syncMarkdownToNotionNext(basename, emoji, cover, tags, type, slug, stats, category, summary, paword, favicon, datetime, markDownData, nowFile, this.app);
|
const res = await upload.syncMarkdownToNotionNext(basename, emoji, cover, tags, type, slug, stats, category, summary, paword, favicon, datetime, markDownData, nowFile, this.app);
|
||||||
|
|
||||||
if (res.status === 200) {
|
if (res.status === 200) {
|
||||||
new Notice(`${i18nConfig["sync-success"]}${basename}`);
|
new Notice(`${i18nConfig["sync-preffix"]} ${basename} ${i18nConfig["sync-success"]}`).noticeEl.style.color = "green";
|
||||||
} else {
|
} else {
|
||||||
new Notice(`${i18nConfig["sync-fail"]}${basename}`, 5000);
|
new Notice(`${i18nConfig["sync-fail"]}${basename}`, 5000).noticeEl.style.color = "red";
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -88,7 +88,7 @@ export async function uploadCommandGeneral(
|
|||||||
const res = await upload.syncMarkdownToNotionGeneral(basename, cover, tags, markDownData, nowFile, this.app);
|
const res = await upload.syncMarkdownToNotionGeneral(basename, cover, tags, markDownData, nowFile, this.app);
|
||||||
|
|
||||||
if (res.status === 200) {
|
if (res.status === 200) {
|
||||||
new Notice(`${i18nConfig["sync-success"]}${basename}`);
|
new Notice(`${i18nConfig["sync-success"]}${basename}`).noticeEl.style.color = "green";
|
||||||
} else {
|
} else {
|
||||||
new Notice(`${i18nConfig["sync-fail"]}${basename}`, 5000);
|
new Notice(`${i18nConfig["sync-fail"]}${basename}`, 5000);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -99,6 +99,7 @@ export class Upload2NotionCustom extends UploadBaseCustom {
|
|||||||
app: App,
|
app: App,
|
||||||
): Promise<any> {
|
): Promise<any> {
|
||||||
const options = {
|
const options = {
|
||||||
|
strictImageUrls: true,
|
||||||
notionLimits: {
|
notionLimits: {
|
||||||
truncate: false,
|
truncate: false,
|
||||||
}
|
}
|
||||||
@@ -123,7 +124,7 @@ export class Upload2NotionCustom extends UploadBaseCustom {
|
|||||||
} else {
|
} else {
|
||||||
res = await this.createPage(cover, customValues, file2Block);
|
res = await this.createPage(cover, customValues, file2Block);
|
||||||
}
|
}
|
||||||
if (res.status === 200) {
|
if (res && res.status === 200) {
|
||||||
await updateYamlInfo(markdown, nowFile, res, app, this.plugin, this.dbDetails);
|
await updateYamlInfo(markdown, nowFile, res, app, this.plugin, this.dbDetails);
|
||||||
} else {
|
} else {
|
||||||
new Notice(`${res.text}`);
|
new Notice(`${res.text}`);
|
||||||
@@ -228,7 +229,7 @@ export class Upload2NotionCustom extends UploadBaseCustom {
|
|||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
console.log(properties)
|
// console.log(properties)
|
||||||
|
|
||||||
return {
|
return {
|
||||||
parent: {
|
parent: {
|
||||||
|
|||||||
Reference in New Issue
Block a user