From 0b97e1f62e1d3707617414626cc29791a2ccc8ea Mon Sep 17 00:00:00 2001 From: Mikael Finstad Date: Wed, 2 Mar 2022 16:33:39 +0800 Subject: [PATCH] add i18n --- public/locales/en/translation.json | 2 ++ src/dialogs.jsx | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/public/locales/en/translation.json b/public/locales/en/translation.json index ee69274c..f566f994 100644 --- a/public/locales/en/translation.json +++ b/public/locales/en/translation.json @@ -4,6 +4,7 @@ "<0> <2> or <4>I <6>O to set cutpoints": "<0> <2> or <4>I <6>O to set cutpoints", "<0>{{durationMsFormatted}} ms, <2>{{frameCount}} frames": "<0>{{durationMsFormatted}} ms, <2>{{frameCount}} frames", "About": "About", + "About LosslessCut": "About LosslessCut", "Accurate time but could leave an empty portion at the beginning of the video. Equiv to": "Accurate time but could leave an empty portion at the beginning of the video. Equiv to", "Add cut segment": "Add cut segment", "Add metadata": "Add metadata", @@ -498,6 +499,7 @@ "Working directory": "Working directory", "XML files": "XML files", "Yes": "Yes", + "You are running version {{version}}": "You are running version {{version}}", "You can customize the file name of the output segment(s) using special variables.": "You can customize the file name of the output segment(s) using special variables.", "You do not have permission to access this file": "You do not have permission to access this file", "You have no write access to the directory of this file": "You have no write access to the directory of this file", diff --git a/src/dialogs.jsx b/src/dialogs.jsx index 0ab2e214..d4a61305 100644 --- a/src/dialogs.jsx +++ b/src/dialogs.jsx @@ -396,8 +396,8 @@ export async function labelSegmentDialog({ currentName, maxLength }) { export function openAbout() { Swal.fire({ icon: 'info', - title: 'About LosslessCut', - text: `You are running version ${app.getVersion()}`, + title: i18n.t('About LosslessCut'), + text: i18n.t('You are running version {{version}}', { version: app.getVersion() }), }); }