i18n: Update zh-tw & refactor various strings (#1998)

* Fix incorrect tense in toast
* Rename create_entity to emphasize past tense
* Localize "Started XXX" toasts
* Localize new zh-tw texts
* Refactor "continue" into the "actions" group
This commit is contained in:
Still Hsu 2021-11-17 08:56:22 +08:00 committed by GitHub
parent fa077517d4
commit 89c7c022f6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
16 changed files with 703 additions and 668 deletions

View file

@ -24,7 +24,7 @@ export const DeleteGalleriesDialog: React.FC<IDeleteGalleryDialogProps> = (
{ count: props.selected.length, singularEntity, pluralEntity }
);
const toastMessage = intl.formatMessage(
{ id: "toast.delete_entity" },
{ id: "toast.delete_past_tense" },
{ count: props.selected.length, singularEntity, pluralEntity }
);
const message = intl.formatMessage(

View file

@ -200,7 +200,16 @@ export const GalleryEditPanel: React.FC<
});
if (result.data?.galleryCreate) {
history.push(`/galleries/${result.data.galleryCreate.id}`);
Toast.success({ content: "Created gallery" });
Toast.success({
content: intl.formatMessage(
{ id: "toast.created_entity" },
{
entity: intl
.formatMessage({ id: "gallery" })
.toLocaleLowerCase(),
}
),
});
}
} else {
const result = await updateGallery({

View file

@ -24,7 +24,7 @@ export const DeleteImagesDialog: React.FC<IDeleteImageDialogProps> = (
{ count: props.selected.length, singularEntity, pluralEntity }
);
const toastMessage = intl.formatMessage(
{ id: "toast.delete_entity" },
{ id: "toast.delete_past_tense" },
{ count: props.selected.length, singularEntity, pluralEntity }
);
const message = intl.formatMessage(

View file

@ -1,6 +1,6 @@
import { Button } from "react-bootstrap";
import React from "react";
import { FormattedMessage } from "react-intl";
import { FormattedMessage, useIntl } from "react-intl";
import * as GQL from "src/core/generated-graphql";
import { mutateMetadataAutoTag } from "src/core/StashService";
import { useToast } from "src/hooks";
@ -13,11 +13,14 @@ export const PerformerOperationsPanel: React.FC<IPerformerOperationsProps> = ({
performer,
}) => {
const Toast = useToast();
const intl = useIntl();
async function onAutoTag() {
try {
await mutateMetadataAutoTag({ performers: [performer.id] });
Toast.success({ content: "Started auto tagging" });
Toast.success({
content: intl.formatMessage({ id: "toast.started_auto_tagging" }),
});
} catch (e) {
Toast.error(e);
}

View file

@ -24,7 +24,7 @@ export const DeleteScenesDialog: React.FC<IDeleteSceneDialogProps> = (
{ count: props.selected.length, singularEntity, pluralEntity }
);
const toastMessage = intl.formatMessage(
{ id: "toast.delete_entity" },
{ id: "toast.delete_past_tense" },
{ count: props.selected.length, singularEntity, pluralEntity }
);
const message = intl.formatMessage(

View file

@ -79,7 +79,9 @@ export const SceneGenerateDialog: React.FC<ISceneGenerateDialogProps> = (
previewExcludeEnd,
},
});
Toast.success({ content: "Started generating" });
Toast.success({
content: intl.formatMessage({ id: "toast.started_generating" }),
});
} catch (e) {
Toast.error(e);
} finally {

View file

@ -102,7 +102,9 @@ export const ImportDialog: React.FC<IImportDialogProps> = (
file,
});
setIsRunning(false);
Toast.success({ content: "Started importing" });
Toast.success({
content: intl.formatMessage({ id: "toast.started_importing" }),
});
} catch (e) {
Toast.error(e);
} finally {

View file

@ -581,7 +581,6 @@
"toast": {
"added_entity": "{entity} hinzugefügt",
"added_generation_job_to_queue": "Generierungsaufgabe zur Warteschlange hinzugefügt",
"create_entity": "{entity} erstellt",
"default_filter_set": "Standardfiltersatz",
"delete_entity": "{count, plural, one {{singularEntity}} other {{pluralEntity}}} löschen",
"delete_past_tense": "{count, plural, one {{singularEntity}} other {{pluralEntity}}} gelöscht",
@ -590,7 +589,8 @@
"rescanning_entity": "Erneutes Scannen von {count, plural, one {{singularEntity}} other {{pluralEntity}}}…",
"started_auto_tagging": "Automatisches Tagging gestartet",
"saved_entity": "{entity} gespeichert",
"updated_entity": "{entity} aktualisiert"
"updated_entity": "{entity} aktualisiert",
"created_entity": "{entity} erstellt"
},
"total": "Gesamt",
"twitter": "Twitter",

View file

@ -95,7 +95,8 @@
"previous_action": "Back",
"finish": "Finish",
"use_default": "Use default",
"ignore": "Ignore"
"ignore": "Ignore",
"continue": "Continue"
},
"actions_name": "Actions",
"age": "Age",
@ -463,7 +464,6 @@
}
},
"configuration": "Configuration",
"continue": "Continue",
"countables": {
"galleries": "{count, plural, one {Gallery} other {Galleries}}",
"images": "{count, plural, one {Image} other {Images}}",
@ -737,7 +737,6 @@
"toast": {
"added_entity": "Added {entity}",
"added_generation_job_to_queue": "Added generation job to queue",
"create_entity": "Created {entity}",
"default_filter_set": "Default filter set",
"delete_entity": "Delete {count, plural, one {{singularEntity}} other {{pluralEntity}}}",
"delete_past_tense": "Deleted {count, plural, one {{singularEntity}} other {{pluralEntity}}}",
@ -746,7 +745,10 @@
"rescanning_entity": "Rescanning {count, plural, one {{singularEntity}} other {{pluralEntity}}}…",
"started_auto_tagging": "Started auto tagging",
"saved_entity": "Saved {entity}",
"updated_entity": "Updated {entity}"
"updated_entity": "Updated {entity}",
"started_generating": "Started generating",
"started_importing": "Started importing",
"created_entity": "Created {entity}"
},
"total": "Total",
"true": "True",

View file

@ -676,7 +676,6 @@
"toast": {
"added_entity": "{entity} añadida",
"added_generation_job_to_queue": "Tarea de generación añadida a la cola",
"create_entity": "{entity} creada",
"default_filter_set": "Establecer como filtro por defecto",
"delete_entity": "Eliminar {count, plural, one {{singularEntity}} other {{pluralEntity}}}",
"delete_past_tense": "Eliminado {count, plural, one {{singularEntity}} other {{pluralEntity}}}",
@ -685,7 +684,8 @@
"rescanning_entity": "Reescanear {count, plural, one {{singularEntity}} other {{pluralEntity}}}…",
"started_auto_tagging": "Auto-etiquetado iniciado",
"saved_entity": "{entity} guardada",
"updated_entity": "{entity} actualizada"
"updated_entity": "{entity} actualizada",
"created_entity": "{entity} creada"
},
"total": "Total",
"twitter": "Twitter",

View file

@ -728,7 +728,6 @@
"toast": {
"added_entity": "{entity} ajouté(e)",
"added_generation_job_to_queue": "Tâche de génération ajoutée dans la file des tâches",
"create_entity": "Créé(e) {entity}",
"default_filter_set": "Filtre par défaut enregistré",
"delete_entity": "Suppression de {count, plural, one {{singularEntity}} other {{pluralEntity}}}",
"delete_past_tense": "{count, plural, one {{singularEntity}} other {{pluralEntity}}} supprimé(e)(s)",
@ -737,7 +736,8 @@
"rescanning_entity": "Rescan de {count, plural, one {{singularEntity}} other {{pluralEntity}}}…",
"started_auto_tagging": "Démarrage du Taggage automatique",
"saved_entity": "{entity} sauvegardé(e)",
"updated_entity": "{entity} mis(e) à jour"
"updated_entity": "{entity} mis(e) à jour",
"created_entity": "Créé(e) {entity}"
},
"total": "Total",
"true": "Vrai",

View file

@ -675,7 +675,6 @@
"toast": {
"added_entity": "Aggiunto {entity}",
"added_generation_job_to_queue": "Aggiunto lavoro di creazione alla coda",
"create_entity": "Creato/a {entity}",
"default_filter_set": "Filtro predefinito impostato",
"delete_entity": "Cancella {count, plural, one {{singularEntity}} other {{pluralEntity}}}",
"delete_past_tense": "Cancellato/a {count, plural, one {{singularEntity}} other {{pluralEntity}}}",
@ -684,7 +683,8 @@
"rescanning_entity": "Riscansionando {count, plural, one {{singularEntity}} other {{pluralEntity}}}…",
"started_auto_tagging": "Inizato il tag automatico",
"saved_entity": "Salvato/a {entity}",
"updated_entity": "Aggiornato/a {entity}"
"updated_entity": "Aggiornato/a {entity}",
"created_entity": "Creato/a {entity}"
},
"total": "Totale",
"twitter": "Twitter",

View file

@ -581,7 +581,6 @@
"toast": {
"added_entity": "{entity} adicionado(a)",
"added_generation_job_to_queue": "Trabalho de geração adicionado para fila",
"create_entity": "Criar {entity}",
"default_filter_set": "Filtragem padrão definada",
"delete_entity": "Excluir {count, plural, one {{singularEntity}} other {{pluralEntity}}}",
"delete_past_tense": "Excluída {count, plural, one {{singularEntity}} other {{pluralEntity}}}",
@ -590,7 +589,8 @@
"rescanning_entity": "Reescaneando {count, plural, one {{singularEntity}} other {{pluralEntity}}}…",
"started_auto_tagging": "Auto tagging iniciado",
"saved_entity": "{entity} salvo(a)",
"updated_entity": "{entity} atualizado(a)"
"updated_entity": "{entity} atualizado(a)",
"created_entity": "Criar {entity}"
},
"total": "Total",
"twitter": "Twitter",

File diff suppressed because it is too large Load diff

View file

@ -610,7 +610,6 @@
"toast": {
"added_entity": "已添加{entity}",
"added_generation_job_to_queue": "已添加至队列",
"create_entity": "已经创建{entity}",
"default_filter_set": "默认过滤器",
"delete_entity": "删除 {count, plural, one {{singularEntity}} other {{pluralEntity}}}",
"delete_past_tense": "已经删除 {count, plural, one {{singularEntity}} other {{pluralEntity}}}",
@ -619,7 +618,8 @@
"rescanning_entity": "正在重新扫描 {count, plural, one {{singularEntity}} other {{pluralEntity}}}…",
"started_auto_tagging": "已经开始自动生成标签",
"saved_entity": "已经保存 {entity}",
"updated_entity": "已经更新 {entity}"
"updated_entity": "已经更新 {entity}",
"created_entity": "已经创建{entity}"
},
"total": "数量",
"twitter": "Twitter",

View file

@ -95,7 +95,8 @@
"identify": "辨認",
"save_delete_settings": "當刪除項目時,使用下列設定",
"use_default": "使用預設選項",
"ignore": "忽略"
"ignore": "忽略",
"continue": "繼續"
},
"actions_name": "動作",
"age": "年齡",
@ -390,7 +391,15 @@
"scene_player": {
"heading": "短片播放器",
"options": {
"auto_start_video": "自動播放"
"auto_start_video": "自動播放",
"auto_start_video_on_play_selected": {
"description": "開啟所選短片或隨機播放時,自動開始播放影片",
"heading": "自動播放所選短片"
},
"continue_playlist_default": {
"description": "當影片播放完畢時,自動跳至下一個短片",
"heading": "持續播放播放清單"
}
}
},
"scene_wall": {
@ -439,6 +448,11 @@
},
"description": "刪除圖片、圖庫、及短片時的預設設定",
"heading": "刪除選項"
},
"desktop_integration": {
"desktop_integration": "桌面整合",
"skip_opening_browser": "關閉瀏覽器自動開啟",
"skip_opening_browser_on_startup": "伺服器啟動時,不要自動開啟瀏覽器"
}
},
"plugins": {
@ -693,16 +707,18 @@
"toast": {
"added_entity": "已新增{singularEntity}",
"added_generation_job_to_queue": "已將『生成作業』加入至工作排程",
"default_filter_set": "已設定預設過濾選項",
"delete_entity": "刪除{singularEntity}",
"delete_past_tense": "已刪除{singularEntity}",
"generating_screenshot": "產生截圖中…",
"rescanning_entity": "重新掃描{singularEntity}中…",
"started_auto_tagging": "已將『自動套用標籤』加入至工作排程",
"updated_entity": "已更新{entity}",
"merged_tags": "已合併的標籤",
"create_entity": "已建立 {entity}",
"default_filter_set": "已設定預設過濾選項",
"saved_entity": "已儲存 {entity}"
"rescanning_entity": "重新掃描{singularEntity}中…",
"saved_entity": "已儲存{entity}",
"started_auto_tagging": "自動套用標籤中…",
"started_generating": "生成檔案中…",
"started_importing": "匯入中…",
"updated_entity": "已更新{entity}",
"created_entity": "已建立{entity}"
},
"total": "總計",
"up-dir": "往上一層",
@ -768,7 +784,8 @@
"database_filename_empty_for_default": "資料庫檔案名稱(留空以使用預設)",
"where_can_stash_store_its_generated_content": "Stash 可以在哪裡儲存其生成內容?",
"where_can_stash_store_its_generated_content_description": "為提供縮略圖、預覽和其他預覽資料Stash 將自動生成圖片和影片資訊。這包括不支援的檔案格式之轉碼。預設情況下Stash 將在包含您設定檔案的資料夾中建立一個新的 <code>generated</code> 資料夾。如果要更改此生成媒體的儲存位置請在此輸入絕對或相對路徑相對於當前工作目錄。如果該資料夾不存在Stash 將自動建立此目錄。",
"path_to_generated_directory_empty_for_default": "生成媒體資料夾路徑(留空以使用預設)"
"path_to_generated_directory_empty_for_default": "生成媒體資料夾路徑(留空以使用預設)",
"stash_alert": "您尚未選取任何路徑Stash 將無法掃描你的檔案。你確定要繼續嗎?"
},
"confirm": {
"almost_ready": "我們快要設定完了,請確認以下設定是否正確。若有任何不正確的內容,您可以回上一步進行修改。若一切看起來正確,請點選下方的「確認」按鈕以完成設定。",