From a22dcdc92c2592fad7a674147694456f23044203 Mon Sep 17 00:00:00 2001 From: Mikael Finstad Date: Sat, 18 Feb 2023 23:47:22 +0800 Subject: [PATCH] pluralize english vars --- public/locales/en/translation.json | 23 +++++++++++++++-------- src/App.jsx | 2 +- src/ExportConfirm.jsx | 6 +++--- src/components/OutSegTemplateEditor.jsx | 4 ++-- src/dialogs/index.jsx | 4 ++-- 5 files changed, 23 insertions(+), 16 deletions(-) diff --git a/public/locales/en/translation.json b/public/locales/en/translation.json index fc38f39f..07bae557 100644 --- a/public/locales/en/translation.json +++ b/public/locales/en/translation.json @@ -185,15 +185,17 @@ "Export": "Export", "Export {{ num }} segments": "Export {{ num }} segments", "Export each track as individual files": "Export each track as individual files", - "Export finished with warning(s)": "Export finished with warning(s)", + "Export finished with warning(s)_one": "Export finished with a warning", + "Export finished with warning(s)_other": "Export finished with warnings", "Export is done!": "Export is done!", + "Export mode": "Export mode", "Export options": "Export options", "Export options are not shown. You can enable export options by clicking the icon right next to the export button.": "Export options are not shown. You can enable export options by clicking the icon right next to the export button.", "Export options will be shown before exporting.": "Export options will be shown before exporting.", "Export options will not be shown before exporting.": "Export options will not be shown before exporting.", "Export project": "Export project", "Export project (LLC)...": "Export project (LLC)…", - "Export segment(s)": "Export segment(s)", + "Export segment(s)": "Export segments", "Export selection": "Export selection", "Export to separate files": "Export to separate files", "Export+merge": "Export+merge", @@ -205,7 +207,8 @@ "Extract frames of the selected segment as images?": "Extract frames of the selected segment as images?", "Extract this track as file": "Extract this track as file", "Extract unprocessable tracks to separate files or discard them?": "Extract unprocessable tracks to separate files or discard them?", - "Extracting {{numTracks}} unprocessable tracks(s)": "Extracting {{numTracks}} unprocessable tracks(s)", + "Extracting {{count}} unprocessable tracks_one": "Extracting one unprocessable track", + "Extracting {{count}} unprocessable tracks_other": "Extracting {{count}} unprocessable tracks", "Extracting all streams": "Extracting all streams", "Extracting frames": "Extracting frames", "Extracting track": "Extracting track", @@ -241,7 +244,8 @@ "File names of extracted video frames": "File names of extracted video frames", "File not natively supported. Preview may have no audio or low quality. The final export will however be lossless with audio. You may convert it from the menu for a better preview with audio.": "File not natively supported. Preview may have no audio or low quality. The final export will however be lossless with audio. You may convert it from the menu for a better preview with audio.", "File number": "File number", - "Files merged with warning(s)": "Files merged with warning(s)", + "Files merged with warning(s)_one": "Files merged with a warning", + "Files merged with warning(s)_other": "Files merged with warnings", "Files merged!": "Files merged!", "Fill gaps between segments": "Fill gaps between segments", "Final Cut Pro FCPX / FCPXML": "Final Cut Pro FCPX / FCPXML", @@ -277,7 +281,7 @@ "Increase segment order": "Increase segment order", "Input has {{numStreamsTotal}} tracks - <3>Keeping {{numStreamsToCopy}} tracks": "Input has {{numStreamsTotal}} tracks - <3>Keeping {{numStreamsToCopy}} tracks", "Instead of video apparently starting at 0, you can offset by a specified value. This only applies to the preview inside LosslessCut and does not modify the file in any way. (Useful for viewing/cutting videos according to timecodes)": "Instead of video apparently starting at 0, you can offset by a specified value. This only applies to the preview inside LosslessCut and does not modify the file in any way. (Useful for viewing/cutting videos according to timecodes)", - "Invalid character(s) found in key": "Invalid character(s) found in key", + "Invalid character(s) found in key": "Invalid character found in key", "Invalid EDL data found": "Invalid EDL data found", "Invalid input": "Invalid input", "Invalid JSON": "Invalid JSON", @@ -386,7 +390,8 @@ "Output file name will not be sanitized, and any special characters will be preserved. This may cause the export to fail and can cause other funny issues. Use at your own risk!": "Output file name will not be sanitized, and any special characters will be preserved. This may cause the export to fail and can cause other funny issues. Use at your own risk!", "Output file names are not sanitized. Try to enable sanitazion or check your segment labels for invalid characters.": "Output file names are not sanitized. Try to enable sanitazion or check your segment labels for invalid characters.", "Output format": "Output format", - "Output name(s):": "Output name(s):", + "Output name(s):_one": "Output file name:", + "Output name(s):_other": "Output file names:", "Overwrite existing files": "Overwrite existing files", "Overwrite files when exporting, if a file with the same name as the output file name exists?": "Overwrite files when exporting, if a file with the same name as the output file name exists?", "Pan timeline": "Pan timeline", @@ -434,7 +439,8 @@ "Report an error": "Report an error", "Report error": "Report error", "Reset": "Reset", - "Resulting segment file names": "Resulting segment file names", + "Resulting segment file names_one": "Resulting file name", + "Resulting segment file names_other": "Resulting file names", "Rotation preview": "Rotation preview", "Same directory as input file": "Same directory as input file", "Sanitize": "Sanitize", @@ -617,7 +623,8 @@ "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 can customize the file name of the output segment(s) using special variables._one": "You can customize the file name of the output using special variables.", + "You can customize the file name of the output segment(s) using special variables._other": "You can customize the file name of the output segments using special variables.", "You do not have permission to access this file": "You do not have permission to access this file", "You have enabled the "invert segments" mode <1> which will cut away selected segments instead of keeping them. But there is no space between any segments, or at least two segments are overlapping. This would not produce any output. Either make room between segments or click the Yinyang <3> symbol below to disable this mode. Alternatively you may combine overlapping segments from the menu.": "You have enabled the "invert segments" mode <1> which will cut away selected segments instead of keeping them. But there is no space between any segments, or at least two segments are overlapping. This would not produce any output. Either make room between segments or click the Yinyang <3> symbol below to disable this mode. Alternatively you may combine overlapping segments from the menu.", "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/App.jsx b/src/App.jsx index 90d4cd1e..85bf4901 100644 --- a/src/App.jsx +++ b/src/App.jsx @@ -1165,7 +1165,7 @@ const App = memo(() => { if (exportExtraStreams) { try { setCutProgress(); // If extracting extra streams takes a long time, prevent loader from being stuck at 100% - setWorking(i18n.t('Extracting {{numTracks}} unprocessable tracks(s)', { numTracks: nonCopiedExtraStreams.length })); + setWorking(i18n.t('Extracting {{count}} unprocessable tracks', { count: nonCopiedExtraStreams.length })); await extractStreams({ filePath, customOutDir, streams: nonCopiedExtraStreams, enableOverwriteOutput }); notices.push(i18n.t('Unprocessable streams were exported as separate files.')); } catch (err) { diff --git a/src/ExportConfirm.jsx b/src/ExportConfirm.jsx index 77fd0301..c0d548b8 100644 --- a/src/ExportConfirm.jsx +++ b/src/ExportConfirm.jsx @@ -97,8 +97,8 @@ const ExportConfirm = memo(({ }, []); const onOutSegTemplateHelpPress = useCallback(() => { - toast.fire({ icon: 'info', timer: 10000, text: i18n.t('You can customize the file name of the output segment(s) using special variables.') }); - }, []); + toast.fire({ icon: 'info', timer: 10000, text: i18n.t('You can customize the file name of the output segment(s) using special variables.', { count: segmentsToExport.length }) }); + }, [segmentsToExport.length]); const onExportModeHelpPress = useCallback(() => { toast.fire({ icon: 'info', timer: 10000, text: exportModeDescription }); @@ -139,7 +139,7 @@ const ExportConfirm = memo(({