🌐 启动界面进度提示加入多语言

This commit is contained in:
Liang Ding 2022-09-19 23:46:43 +08:00
parent b7faccc126
commit 899b38ab0a
No known key found for this signature in database
GPG key ID: 136F30F901A2231D
7 changed files with 19 additions and 19 deletions

View file

@ -866,9 +866,9 @@
"88": "Finished parsing [%d] data files, remaining to be processed [%d]",
"89": "Created [%d] of data indexes of block-level elements [%s]",
"90": "Created [%d] of search indexes of block-level elements [%s]",
"91": "TODO",
"92": "TODO",
"93": "TODO",
"91": "Reading block tree data...",
"92": "Parsing document tree [%s]",
"93": "Indexing document tree [%s]",
"94": "Upload failed: %s",
"95": "Exiting...",
"96": "Synchronization failed when exiting. Please manually perform a synchronization to ensure that the local data is consistent with the cloud data",

View file

@ -866,9 +866,9 @@
"88": "Se ha terminado de analizar [%d] archivos de datos, quedan por procesar [%d]",
"89": "Creado [%d] de índices de datos de elementos a nivel de bloque [%s]",
"90": "Creado [%d] de índices de búsqueda de elementos a nivel de bloque [%s]",
"91": "TODO",
"92": "TODO",
"93": "TODO",
"91": "Leyendo datos del árbol de bloques...",
"92": "Analizando el árbol del documento [%s]",
"93": "Árbol de documentos de indexación [%s]",
"94": "Carga fallida: %s",
"95": "Saliendo...",
"96": "La sincronización falló al salir. Por favor, realice manualmente una sincronización para asegurarse de que los datos locales son coherentes con los datos de la nube",

View file

@ -866,9 +866,9 @@
"88": "Fin de l'analyse des fichiers de données [%d], restant à traiter [%d]",
"89": "Créé [%d] d'index de données d'éléments de niveau bloc [%s]",
"90": "Création de [%d] index de recherche d'éléments de niveau bloc [%s]",
"91": "TODO",
"92": "TODO",
"93": "TODO",
"91": "Lecture des données de l'arborescence des blocs...",
"92": "Analyse de l'arborescence du document [%s]",
"93": "Indexation de l'arborescence du document [%s]",
"94": "Échec du téléchargement : %s",
"95": "Quitter le programme...",
"96": "La synchronisation a échoué lors de la sortie. Veuillez effectuer une synchronisation manuellement pour vous assurer que les données locales sont cohérentes avec les données du cloud",

View file

@ -866,9 +866,9 @@
"88": "已完成解析 [%d] 個數據文件,剩餘待處理 [%d]",
"89": "已經建立 [%d] 個塊級元素的數據索引 [%s]",
"90": "已經建立 [%d] 個塊級元素的搜索索引 [%s]",
"91": "TODO",
"92": "TODO",
"93": "TODO",
"91": "正在讀取塊樹數據...",
"92": "正在解析文檔樹 [%s]",
"93": "正在索引文檔樹 [%s]",
"94": "上傳失敗:%s",
"95": "正在退出...",
"96": "退出時同步失敗,請手動執行一次同步以確保本地資料和雲端資料一致",

View file

@ -867,9 +867,9 @@
"88": "已完成解析 [%d] 个数据文件,剩余待处理 [%d]",
"89": "已经建立 [%d] 个块级元素的数据索引 [%s]",
"90": "已经建立 [%d] 个块级元素的搜索索引 [%s]",
"91": "TODO",
"92": "TODO",
"93": "TODO",
"91": "正在读取块树数据...",
"92": "正在解析文档树 [%s]",
"93": "正在索引文档树 [%s]",
"94": "上传失败:%s",
"95": "正在退出...",
"96": "退出时同步失败,请手动执行一次同步以确保本地数据和云端数据一致",

View file

@ -523,11 +523,11 @@ func InitBoxes() {
initialized := false
if 1 > treenode.CountBlocks() {
if gulu.File.IsExist(util.BlockTreePath) {
util.IncBootProgress(20, "Reading block trees...")
util.IncBootProgress(20, Conf.Language(91))
go func() {
for i := 0; i < 40; i++ {
util.RandomSleep(50, 100)
util.IncBootProgress(1, "Reading block trees...")
util.IncBootProgress(1, Conf.Language(91))
}
}()

View file

@ -84,7 +84,7 @@ func (box *Box) Index(fullRebuildIndex bool) (treeCount int, treeSize int64) {
docIAL := parse.IAL2MapUnEsc(tree.Root.KramdownIAL)
cache.PutDocIAL(p, docIAL)
util.IncBootProgress(bootProgressPart, "Parsing tree "+util.ShortPathForBootingDisplay(tree.Path))
util.IncBootProgress(bootProgressPart, fmt.Sprintf(Conf.Language(92), util.ShortPathForBootingDisplay(tree.Path)))
treeSize += file.size
treeCount++
// 缓存文档标题,后面做 Path -> HPath 路径映射时需要
@ -161,7 +161,7 @@ func (box *Box) Index(fullRebuildIndex bool) (treeCount int, treeSize int64) {
continue
}
util.IncBootProgress(bootProgressPart, "Indexing tree "+util.ShortPathForBootingDisplay(tree.Path))
util.IncBootProgress(bootProgressPart, fmt.Sprintf(Conf.Language(93), util.ShortPathForBootingDisplay(tree.Path)))
tx, err := sql.BeginTx()
if nil != err {
continue