The truly free, open-source, local-first, cross-platform CapCut replacement. Scriptable through a JSON-RPC API & MCP.
Rust ffmpegfree-video-editormodel-context-protocolnon-linear-editoroffline-firstopen-source-video-editorself-hostedvideo-editingvideo-editing-automationvideo-editing-softwarevideo-editing-toolsvideo-editorvoice-cloningyoutube-automationyoutube-shorts
fix(captions): SubRip on phones, a named and unique export, and the captions' lane (#281)
Jareerd1bf34ee4321
diff --git a/src/crates/concat-android/java/ConcatFiles.java b/src/crates/concat-android/java/ConcatFiles.javaindex 573906e3..57751efb 100644--- a/src/crates/concat-android/java/ConcatFiles.java+++ b/src/crates/concat-android/java/ConcatFiles.java@@ -85,14 +85,34 @@ public class ConcatFiles extends Fragment {if (folder == null) {return new String[] {null, "this phone has no media store to put it in"};}+ return publish(activity, path, "video/mp4", folder,+ MediaStore.Video.Media.getContentUri(MediaStore.VOLUME_EXTERNAL_PRIMARY));+ }++ /**+ * {@link #publishVideo} for a small file that is not a video - a+ * subtitle file - of MIME type {@code mime}: moved into the phone's+ * Download/Concat, which every file manager shows, under its own name+ * or "name (1)" where that is taken. The same two strings come back.+ */+ public static String[] publishDocument(Activity activity, String path, String mime) {+ if (Build.VERSION.SDK_INT < Build.VERSION_CODES.Q) {+ return new String[] {null, "this phone has no media store to put it in"};+ }+ return publish(activity, path, mime, Environment.DIRECTORY_DOWNLOADS + "/Concat",+ MediaStore.Downloads.getContentUri(MediaStore.VOLUME_EXTERNAL_PRIMARY));+ }++ /** Moves the file at {@code path} into {@code collection}, under {@code folder}. */+ private static String[] publish(+ Activity activity, String path, String mime, String folder, Uri collection) {File file = new File(path);ContentResolver resolver = activity.getContentResolver();ContentValues values = new ContentValues();- values.put(MediaStore.Video.Media.DISPLAY_NAME, file.getName());- values.put(MediaStore.Video.Media.MIME_TYPE, "video/mp4");- values.put(MediaStore.Video.Media.RELATIVE_PATH, folder);- values.put(MediaStore.Video.Media.IS_PENDING, 1);- Uri collection = MediaStore.Video.Media.getContentUri(MediaStore.VOLUME_EXTERNAL_PRIMARY);+ values.put(MediaStore.MediaColumns.DISPLAY_NAME, file.getName());+ values.put(MediaStore.MediaColumns.MIME_TYPE, mime);+ values.put(MediaStore.MediaColumns.RELATIVE_PATH, folder);+ values.put(MediaStore.MediaColumns.IS_PENDING, 1);Uri uri;try {uri = resolver.insert(collection, values);@@ -118,7 +138,7 @@ public class ConcatFiles extends Fragment {out.close();out = null;values.clear();- values.put(MediaStore.Video.Media.IS_PENDING, 0);+ values.put(MediaStore.MediaColumns.IS_PENDING, 0);resolver.update(uri, values, null, null);} catch (Exception e) {try {@@ -168,8 +188,12 @@ public class ConcatFiles extends Fragment {/** Registered from Rust: the picked files' paths, or none. */public static native void filesPicked(String[] paths);- /** Shows the picker. From any thread; the fragment is added on the UI thread. */- public static void pick(final Activity activity) {+ /**+ * Shows the picker, offering the MIME types in {@code types} - comma+ * separated, "video/*,audio/*" - or every file when it is empty. From+ * any thread; the fragment is added on the UI thread.+ */+ public static void pick(final Activity activity, final String types) {activity.runOnUiThread(new Runnable() {@Overridepublic void run() {@@ -183,7 +207,9 @@ public class ConcatFiles extends Fragment {Intent intent = new Intent(Intent.ACTION_OPEN_DOCUMENT);intent.addCategory(Intent.CATEGORY_OPENABLE);intent.setType("*/*");- intent.putExtra(Intent.EXTRA_MIME_TYPES, new String[] {"video/*", "audio/*", "image/*"});+ if (types != null && !types.isEmpty()) {+ intent.putExtra(Intent.EXTRA_MIME_TYPES, types.split(","));+ }intent.putExtra(Intent.EXTRA_ALLOW_MULTIPLE, true);try {fragment.startActivityForResult(intent, REQUEST_PICK);diff --git a/src/crates/concat-android/src/lib.rs b/src/crates/concat-android/src/lib.rsindex a5edc6d1..446e4789 100644--- a/src/crates/concat-android/src/lib.rs+++ b/src/crates/concat-android/src/lib.rs@@ -220,7 +220,7 @@ mod picker {/// Hands the window's crate a picker that runs on this activity.pub fn install(app: &AndroidApp) {let app = app.clone();- concat::install_file_picker(Box::new(move |on_picked| {+ concat::install_file_picker(Box::new(move |kinds, on_picked| {let previous = PENDING.lock().map(|mut slot| slot.replace(on_picked))@@ -231,7 +231,7 @@ mod picker {// it got nothing rather than left waiting for ever.previous(Vec::new());}- if let Err(error) = pick(&app) {+ if let Err(error) = pick(&app, &kinds) {log::error!("could not show the document picker: {error}");if let Some(pending) = PENDING.lock().ok().and_then(|mut slot| slot.take()) {pending(Vec::new());@@ -240,18 +240,44 @@ mod picker {}));}- fn pick(app: &AndroidApp) -> jni::errors::Result<()> {+ fn pick(app: &AndroidApp, kinds: &concat::PickKinds) -> jni::errors::Result<()> {+ let types = mime_types(kinds).join(",");super::java::with_class(app, |env, activity, class| {+ let types = env.new_string(&types)?;env.call_static_method(class,jni_str!("pick"),- jni_sig!("(Landroid/app/Activity;)V"),- &[activity.into()],+ jni_sig!("(Landroid/app/Activity;Ljava/lang/String;)V"),+ &[activity.into(), (&types).into()],)?;Ok(())})}+ /// The picker's MIME types for what is asked: media by its families,+ /// and none at all - every file - for anything else. A subtitle or a+ /// font is typed so variously by the phone's providers+ /// (application/x-subrip, text/plain, application/octet-stream...)+ /// that a list would hide the very file asked for; what is picked is+ /// read for what it is, and a wrong file says so.+ pub(super) fn mime_types(kinds: &concat::PickKinds) -> Vec<&'static str> {+ match kinds {+ concat::PickKinds::Media {+ video,+ audio,+ image,+ } => [+ (*video, "video/*"),+ (*audio, "audio/*"),+ (*image, "image/*"),+ ]+ .into_iter()+ .filter_map(|(on, kind)| on.then_some(kind))+ .collect(),+ concat::PickKinds::Files(_) => Vec::new(),+ }+ }+/// `ConcatFiles.filesPicked`, on whichever thread the Java copied on.pub(super) unsafe extern "system" fn files_picked(_env: *mut sys::JNIEnv,@@ -318,9 +344,11 @@ mod publisher {}};let app = app.clone();+ let documents = app.clone();concat::install_export_publisher(concat::ExportPublisher {folder,publish: Box::new(move |path| publish(&app, path)),+ publish_document: Box::new(move |path, mime| publish_document(&documents, path, mime)),});}@@ -346,7 +374,7 @@ mod publisher {/// `ConcatFiles.publishVideo`: the file's path under the phone's/// storage once it is in Movies, or why it could not be moved.fn publish(app: &AndroidApp, path: &Path) -> Result<String, String> {- let answer = super::java::with_class(app, |env, activity, class| {+ answer(super::java::with_class(app, |env, activity, class| {let path = env.new_string(path.to_string_lossy())?;let answer = env.call_static_method(@@ -356,19 +384,51 @@ mod publisher {&[activity.into(), (&path).into()],)?.l()?;- let answer = env.cast_local::<JObjectArray<JString>>(answer)?;- let mut out = Vec::new();- for index in 0..answer.len(env)? {- let item = answer.get_element(env, index)?;- out.push(if item.is_null() {- None- } else {- Some(item.mutf8_chars(env)?.to_string())- });- }- Ok(out)- })- .map_err(|error| format!("could not reach the phone's media store: {error}"))?;+ strings(env, answer)+ }))+ }++ /// `ConcatFiles.publishDocument`: the file's path under the phone's+ /// storage once it is in Download/Concat, or why it could not be moved.+ fn publish_document(app: &AndroidApp, path: &Path, mime: &str) -> Result<String, String> {+ answer(super::java::with_class(app, |env, activity, class| {+ let path = env.new_string(path.to_string_lossy())?;+ let mime = env.new_string(mime)?;+ let answer = env+ .call_static_method(+ class,+ jni_str!("publishDocument"),+ jni_sig!("(Landroid/app/Activity;Ljava/lang/String;Ljava/lang/String;)[Ljava/lang/String;"),+ &[activity.into(), (&path).into(), (&mime).into()],+ )?+ .l()?;+ strings(env, answer)+ }))+ }++ /// A Java `String[]` as Rust's, a null element as None.+ fn strings<'local>(+ env: &mut jni::Env<'local>,+ answer: jni::objects::JObject<'local>,+ ) -> jni::errors::Result<Vec<Option<String>>> {+ let answer = env.cast_local::<JObjectArray<JString>>(answer)?;+ let mut out = Vec::new();+ for index in 0..answer.len(env)? {+ let item = answer.get_element(env, index)?;+ out.push(if item.is_null() {+ None+ } else {+ Some(item.mutf8_chars(env)?.to_string())+ });+ }+ Ok(out)+ }++ /// What `publishVideo` and `publishDocument` answer: where the file is+ /// now, or why it is still where it was.+ fn answer(answer: jni::errors::Result<Vec<Option<String>>>) -> Result<String, String> {+ let answer =+ answer.map_err(|error| format!("could not reach the phone's media store: {error}"))?;match answer.as_slice() {[Some(path), _] => Ok(path.clone()),[None, Some(why)] => Err(why.clone()),diff --git a/src/crates/concat-project/src/srt.rs b/src/crates/concat-project/src/srt.rsindex 00b3bbb2..06ad7b2b 100644--- a/src/crates/concat-project/src/srt.rs+++ b/src/crates/concat-project/src/srt.rs@@ -174,9 +174,46 @@ pub fn title_cues(timeline: &Timeline, track_id: Option<&str>) -> Vec<Cue> {cues}+/// The lane with the most titles on it - the first such lane, top down,+/// when two have as many - or None when the timeline has no title.+///+/// A title made as a caption is a title like any other: nothing in the+/// document says which lane is the captions'. But captions come many to+/// a lane, one after another, where a title card is one or two; so with+/// no title selected to name a lane, the busiest lane is the captions'.+/// A title card on a lane of its own is never written out with them.+pub fn busiest_title_lane(timeline: &Timeline) -> Option<String> {+ let mut best: Option<(&str, usize)> = None;+ for track in &timeline.tracks {+ let count = timeline+ .clips+ .iter()+ .filter(|clip| clip.kind == ClipKind::Text && clip.track_id == track.id)+ .count();+ if count > 0 && best.is_none_or(|(_, most)| count > most) {+ best = Some((&track.id, count));+ }+ }+ best.map(|(id, _)| id.to_owned())+}++/// How many lanes have titles on them.+pub fn title_lanes(timeline: &Timeline) -> usize {+ timeline+ .tracks+ .iter()+ .filter(|track| {+ timeline+ .clips+ .iter()+ .any(|clip| clip.kind == ClipKind::Text && clip.track_id == track.id)+ })+ .count()+}+#[cfg(test)]mod tests {- use super::{Cue, parse, title_cues, write};+ use super::{Cue, busiest_title_lane, parse, title_cues, title_lanes, write};use crate::commands::Command;use crate::editor::Editor;use crate::model::TextStyle;@@ -349,5 +386,9 @@ mod tests {[cue(1.0, 2.5, "First"), cue(4.0, 5.5, "Second")]);assert_eq!(title_cues(timeline, None).len(), 3);+ // The captions' lane is the busy one, not the title card's.+ assert_eq!(busiest_title_lane(timeline).as_deref(), Some(lane.as_str()));+ assert_eq!(title_lanes(timeline), 2);+ assert_eq!(busiest_title_lane(Editor::new().project().active()), None);}}diff --git a/src/crates/concat/locales/ar.json b/src/crates/concat/locales/ar.jsonindex eef061dd..7cf4d47d 100644--- a/src/crates/concat/locales/ar.json+++ b/src/crates/concat/locales/ar.json@@ -8,16 +8,18 @@"captions.centre": "الوسط","captions.clipHasNoFile": "لا يحتوي هذا المقطع على ملف لتفريغه نصيًا","captions.clipNoLongerTimeline": "لم يعد المقطع على المخطط الزمني",- "captions.couldNotReadSubtitles": "Could not read the subtitles: {0}",- "captions.couldNotWriteSubtitles": "Could not write the subtitles: {0}",+ "captions.couldNotPublishSubtitles": "تمت كتابة الترجمات إلى {0}، لكن تعذّر نقلها إلى حيث يعرضها الهاتف: {1}",+ "captions.couldNotReadSubtitles": "تعذّرت قراءة الترجمات: {0}",+ "captions.couldNotWriteSubtitles": "تعذّرت كتابة الترجمات: {0}","captions.downloadTranscriberModelFirst": "نزّل أولًا نموذج تفريغ نصي من الإعدادات › التفريغ النصي.",- "captions.exportSrt": "Export SRT…",- "captions.exportedCaptions": "Wrote {0} captions",+ "captions.exportSrt": "تصدير SRT…",+ "captions.exportedBusiestLane": "تمت كتابة {0} من التسميات التوضيحية إلى {1}، من المسار الذي يضم أكبر عدد من العناوين. لكتابة مسار آخر، حدّد أحد عناوينه أولًا.",+ "captions.exportedCaptions": "تمت كتابة {0} من التسميات التوضيحية إلى {1}","captions.generateCaptions": "إنشاء تسميات توضيحية",- "captions.importSrt": "Import SRT…",+ "captions.importSrt": "استيراد SRT…","captions.loadingTheModel": "جارٍ تحميل النموذج",- "captions.noCaptionsToExport": "No captions on the timeline to export",- "captions.noSubtitlesInFile": "The file has no subtitles",+ "captions.noCaptionsToExport": "لا توجد تسميات توضيحية على المخطط الزمني لتصديرها",+ "captions.noSubtitlesInFile": "لا يحتوي الملف على ترجمات","captions.noVoiceOnTimeline": "لا يوجد مقطع بصوت في المخطط الزمني","captions.nothingSaidClip": "لم يُقَل شيء في ذلك المقطع","captions.nothingToCaptionYet": "لا يوجد ما يُضاف له تسميات توضيحية بعد",@@ -25,7 +27,7 @@"captions.oneTitlePerSentence": "عنوان لكل جملة، يبقى طوال المدة اللازمة لقراءته، واحدًا تلو الآخر على أول مسار فيه متّسع.","captions.placement": "الموضع","captions.readingTheSound": "جارٍ قراءة صوت المقطع",- "captions.subRipSubtitles": "SubRip subtitles",+ "captions.subRipSubtitles": "ترجمات SubRip","captions.transcribing": "جارٍ التفريغ النصي","captions.typeWordsPutScreen": "اكتب الكلمات التي ستظهر على الشاشة…","captions.useVoiceFromTimeline": "استخدام الصوت من المخطط الزمني",diff --git a/src/crates/concat/locales/bn.json b/src/crates/concat/locales/bn.jsonindex 83772ce9..eb55742b 100644--- a/src/crates/concat/locales/bn.json+++ b/src/crates/concat/locales/bn.json@@ -8,16 +8,18 @@"captions.centre": "কেন্দ্রে","captions.clipHasNoFile": "এই ক্লিপে ট্রান্সক্রাইব করার মতো কোনো ফাইল নেই","captions.clipNoLongerTimeline": "ক্লিপটি আর টাইমলাইনে নেই",- "captions.couldNotReadSubtitles": "Could not read the subtitles: {0}",- "captions.couldNotWriteSubtitles": "Could not write the subtitles: {0}",+ "captions.couldNotPublishSubtitles": "সাবটাইটেল {0}-এ লেখা হয়েছে, কিন্তু ফোন যেখানে দেখায় সেখানে সরানো যায়নি: {1}",+ "captions.couldNotReadSubtitles": "সাবটাইটেল পড়া যায়নি: {0}",+ "captions.couldNotWriteSubtitles": "সাবটাইটেল লেখা যায়নি: {0}","captions.downloadTranscriberModelFirst": "আগে সেটিংস › ট্রান্সক্রাইবার থেকে একটি ট্রান্সক্রাইবার মডেল ডাউনলোড করুন।",- "captions.exportSrt": "Export SRT…",- "captions.exportedCaptions": "Wrote {0} captions",+ "captions.exportSrt": "SRT এক্সপোর্ট…",+ "captions.exportedBusiestLane": "{0}টি ক্যাপশন {1}-এ লেখা হয়েছে, সবচেয়ে বেশি টাইটেল থাকা লেন থেকে। অন্য লেন লিখতে আগে সেটির একটি টাইটেল সিলেক্ট করুন।",+ "captions.exportedCaptions": "{0}টি ক্যাপশন {1}-এ লেখা হয়েছে","captions.generateCaptions": "ক্যাপশন তৈরি করুন",- "captions.importSrt": "Import SRT…",+ "captions.importSrt": "SRT ইমপোর্ট…","captions.loadingTheModel": "মডেল লোড হচ্ছে",- "captions.noCaptionsToExport": "No captions on the timeline to export",- "captions.noSubtitlesInFile": "The file has no subtitles",+ "captions.noCaptionsToExport": "টাইমলাইনে এক্সপোর্ট করার মতো কোনো ক্যাপশন নেই",+ "captions.noSubtitlesInFile": "ফাইলটিতে কোনো সাবটাইটেল নেই","captions.noVoiceOnTimeline": "টাইমলাইনে শব্দসহ কোনো ক্লিপ নেই","captions.nothingSaidClip": "ঐ ক্লিপে কিছু বলা হয়নি","captions.nothingToCaptionYet": "এখনও ক্যাপশন করার মতো কিছু নেই",@@ -25,7 +27,7 @@"captions.oneTitlePerSentence": "প্রতিটি বাক্যের জন্য একটি করে টাইটেল, পড়তে যতক্ষণ লাগে ততক্ষণ ধরে রাখা হয়, জায়গা আছে এমন প্রথম লেনে একের পর এক।","captions.placement": "অবস্থান","captions.readingTheSound": "ক্লিপের শব্দ পড়া হচ্ছে",- "captions.subRipSubtitles": "SubRip subtitles",+ "captions.subRipSubtitles": "SubRip সাবটাইটেল","captions.transcribing": "ট্রান্সক্রাইব করা হচ্ছে","captions.typeWordsPutScreen": "স্ক্রিনে দেখানোর শব্দগুলো লিখুন…","captions.useVoiceFromTimeline": "টাইমলাইনের কণ্ঠ ব্যবহার করুন",diff --git a/src/crates/concat/locales/de.json b/src/crates/concat/locales/de.jsonindex 3ca8f4c6..fab6aa67 100644--- a/src/crates/concat/locales/de.json+++ b/src/crates/concat/locales/de.json@@ -8,16 +8,18 @@"captions.centre": "Mitte","captions.clipHasNoFile": "Dieser Clip hat keine Datei zum Transkribieren","captions.clipNoLongerTimeline": "The clip is no longer on the timeline",- "captions.couldNotReadSubtitles": "Could not read the subtitles: {0}",- "captions.couldNotWriteSubtitles": "Could not write the subtitles: {0}",+ "captions.couldNotPublishSubtitles": "Die Untertitel wurden nach {0} geschrieben, konnten aber nicht dorthin verschoben werden, wo das Telefon sie anzeigt: {1}",+ "captions.couldNotReadSubtitles": "Die Untertitel konnten nicht gelesen werden: {0}",+ "captions.couldNotWriteSubtitles": "Die Untertitel konnten nicht geschrieben werden: {0}","captions.downloadTranscriberModelFirst": "Lade zuerst ein Transkriptionsmodell unter Einstellungen › Transkription herunter.",- "captions.exportSrt": "Export SRT…",- "captions.exportedCaptions": "Wrote {0} captions",+ "captions.exportSrt": "SRT exportieren…",+ "captions.exportedBusiestLane": "{0} Untertitel nach {1} geschrieben, aus der Spur mit den meisten Titeln. Um eine andere Spur zu schreiben, wähle zuerst einen ihrer Titel aus.",+ "captions.exportedCaptions": "{0} Untertitel nach {1} geschrieben","captions.generateCaptions": "Untertitel erzeugen",- "captions.importSrt": "Import SRT…",+ "captions.importSrt": "SRT importieren…","captions.loadingTheModel": "Modell wird geladen",- "captions.noCaptionsToExport": "No captions on the timeline to export",- "captions.noSubtitlesInFile": "The file has no subtitles",+ "captions.noCaptionsToExport": "Keine Untertitel auf der Zeitleiste zum Exportieren",+ "captions.noSubtitlesInFile": "Die Datei enthält keine Untertitel","captions.noVoiceOnTimeline": "Kein Clip auf der Zeitleiste hat Ton","captions.nothingSaidClip": "In diesem Clip wurde nichts gesagt","captions.nothingToCaptionYet": "Nothing to caption yet",@@ -25,7 +27,7 @@"captions.oneTitlePerSentence": "One title per sentence, held for as long as it takes to read, one after another on the first lane with room.","captions.placement": "Platzierung","captions.readingTheSound": "Ton des Clips wird gelesen",- "captions.subRipSubtitles": "SubRip subtitles",+ "captions.subRipSubtitles": "SubRip-Untertitel","captions.transcribing": "Wird transkribiert","captions.typeWordsPutScreen": "Type the words to put on screen…","captions.useVoiceFromTimeline": "Stimme aus der Zeitleiste verwenden",diff --git a/src/crates/concat/locales/en.json b/src/crates/concat/locales/en.jsonindex d3e84814..ec065e20 100644--- a/src/crates/concat/locales/en.json+++ b/src/crates/concat/locales/en.json@@ -8,11 +8,13 @@"captions.centre": "Centre","captions.clipHasNoFile": "This clip has no file to transcribe","captions.clipNoLongerTimeline": "The clip is no longer on the timeline",+ "captions.couldNotPublishSubtitles": "Wrote the subtitles to {0}, but could not move them where the phone shows them: {1}","captions.couldNotReadSubtitles": "Could not read the subtitles: {0}","captions.couldNotWriteSubtitles": "Could not write the subtitles: {0}","captions.downloadTranscriberModelFirst": "Download a transcriber model in Settings › Transcriber first.","captions.exportSrt": "Export SRT…",- "captions.exportedCaptions": "Wrote {0} captions",+ "captions.exportedBusiestLane": "Wrote {0} captions to {1}, from the lane with the most titles. To write another lane, select one of its titles first.",+ "captions.exportedCaptions": "Wrote {0} captions to {1}","captions.generateCaptions": "Generate captions","captions.importSrt": "Import SRT…","captions.loadingTheModel": "Loading the model",diff --git a/src/crates/concat/locales/es.json b/src/crates/concat/locales/es.jsonindex 27354812..70e5e2b1 100644--- a/src/crates/concat/locales/es.json+++ b/src/crates/concat/locales/es.json@@ -8,16 +8,18 @@"captions.centre": "Centro","captions.clipHasNoFile": "Este clip no tiene archivo que transcribir","captions.clipNoLongerTimeline": "The clip is no longer on the timeline",- "captions.couldNotReadSubtitles": "Could not read the subtitles: {0}",- "captions.couldNotWriteSubtitles": "Could not write the subtitles: {0}",+ "captions.couldNotPublishSubtitles": "Los subtítulos se escribieron en {0}, pero no se pudieron mover adonde el teléfono los muestra: {1}",+ "captions.couldNotReadSubtitles": "No se pudieron leer los subtítulos: {0}",+ "captions.couldNotWriteSubtitles": "No se pudieron escribir los subtítulos: {0}","captions.downloadTranscriberModelFirst": "Descarga primero un modelo de transcripción en Ajustes › Transcriptor.",- "captions.exportSrt": "Export SRT…",- "captions.exportedCaptions": "Wrote {0} captions",+ "captions.exportSrt": "Exportar SRT…",+ "captions.exportedBusiestLane": "{0} subtítulos escritos en {1}, de la pista con más títulos. Para escribir otra pista, selecciona primero uno de sus títulos.",+ "captions.exportedCaptions": "{0} subtítulos escritos en {1}","captions.generateCaptions": "Generar subtítulos",- "captions.importSrt": "Import SRT…",+ "captions.importSrt": "Importar SRT…","captions.loadingTheModel": "Cargando el modelo",- "captions.noCaptionsToExport": "No captions on the timeline to export",- "captions.noSubtitlesInFile": "The file has no subtitles",+ "captions.noCaptionsToExport": "No hay subtítulos en la línea de tiempo para exportar",+ "captions.noSubtitlesInFile": "El archivo no tiene subtítulos","captions.noVoiceOnTimeline": "Ningún clip de la línea de tiempo tiene sonido","captions.nothingSaidClip": "No se dijo nada en ese clip","captions.nothingToCaptionYet": "Nothing to caption yet",@@ -25,7 +27,7 @@"captions.oneTitlePerSentence": "One title per sentence, held for as long as it takes to read, one after another on the first lane with room.","captions.placement": "Posición","captions.readingTheSound": "Leyendo el sonido del clip",- "captions.subRipSubtitles": "SubRip subtitles",+ "captions.subRipSubtitles": "Subtítulos SubRip","captions.transcribing": "Transcribiendo","captions.typeWordsPutScreen": "Type the words to put on screen…","captions.useVoiceFromTimeline": "Usar la voz de la línea de tiempo",diff --git a/src/crates/concat/locales/fa.json b/src/crates/concat/locales/fa.jsonindex ea0734e6..7d70a080 100644--- a/src/crates/concat/locales/fa.json+++ b/src/crates/concat/locales/fa.json@@ -8,16 +8,18 @@"captions.centre": "مرکز","captions.clipHasNoFile": "این کلیپ هیچ فایلای برای رونویسی ندارد","captions.clipNoLongerTimeline": "این کلیپ دیگر روی تایملاین نیست",- "captions.couldNotReadSubtitles": "Could not read the subtitles: {0}",- "captions.couldNotWriteSubtitles": "Could not write the subtitles: {0}",+ "captions.couldNotPublishSubtitles": "زیرنویسها در {0} نوشته شدند، اما انتقالشان به جایی که گوشی نشانشان میدهد ممکن نبود: {1}",+ "captions.couldNotReadSubtitles": "خواندن زیرنویسها ممکن نبود: {0}",+ "captions.couldNotWriteSubtitles": "نوشتن زیرنویسها ممکن نبود: {0}","captions.downloadTranscriberModelFirst": "ابتدا یک مدل Transcriber را از «تنظیمات › Transcriber» دانلود کنید.",- "captions.exportSrt": "Export SRT…",- "captions.exportedCaptions": "Wrote {0} captions",+ "captions.exportSrt": "خروجی SRT…",+ "captions.exportedBusiestLane": "{0} زیرنویس در {1} نوشته شد، از لاینی که بیشترین عنوان را دارد. برای نوشتن لاین دیگر، اول یکی از عنوانهایش را انتخاب کنید.",+ "captions.exportedCaptions": "{0} زیرنویس در {1} نوشته شد","captions.generateCaptions": "ساخت زیرنویسها",- "captions.importSrt": "Import SRT…",+ "captions.importSrt": "وارد کردن SRT…","captions.loadingTheModel": "در حال بارگذاری مدل",- "captions.noCaptionsToExport": "No captions on the timeline to export",- "captions.noSubtitlesInFile": "The file has no subtitles",+ "captions.noCaptionsToExport": "هیچ زیرنویسی روی تایملاین برای خروجی گرفتن نیست",+ "captions.noSubtitlesInFile": "این فایل هیچ زیرنویسی ندارد","captions.noVoiceOnTimeline": "هیچ کلیپی در خط زمان صدا ندارد","captions.nothingSaidClip": "در آن کلیپ چیزی گفته نشده است","captions.nothingToCaptionYet": "هنوز چیزی برای زیرنویس کردن وجود ندارد",@@ -25,7 +27,7 @@"captions.oneTitlePerSentence": "برای هر جمله یک عنوان ساخته میشود و بهاندازه زمان لازم برای خواندن نمایش داده میشود؛ پشت سر هم روی اولین لاین دارای فضای کافی.","captions.placement": "جایگذاری","captions.readingTheSound": "در حال خواندن صدای کلیپ",- "captions.subRipSubtitles": "SubRip subtitles",+ "captions.subRipSubtitles": "زیرنویسهای SubRip","captions.transcribing": "در حال رونویسی","captions.typeWordsPutScreen": "متنی را که باید روی صفحه نمایش داده شود وارد کنید…","captions.useVoiceFromTimeline": "استفاده از صدای خط زمان",diff --git a/src/crates/concat/locales/fr.json b/src/crates/concat/locales/fr.jsonindex bea020cf..d0ab4c88 100644--- a/src/crates/concat/locales/fr.json+++ b/src/crates/concat/locales/fr.json@@ -8,16 +8,18 @@"captions.centre": "Centre","captions.clipHasNoFile": "Ce clip n'a pas de fichier à transcrire","captions.clipNoLongerTimeline": "The clip is no longer on the timeline",- "captions.couldNotReadSubtitles": "Could not read the subtitles: {0}",- "captions.couldNotWriteSubtitles": "Could not write the subtitles: {0}",+ "captions.couldNotPublishSubtitles": "Les sous-titres ont été écrits dans {0}, mais n’ont pas pu être déplacés là où le téléphone les affiche : {1}",+ "captions.couldNotReadSubtitles": "Impossible de lire les sous-titres : {0}",+ "captions.couldNotWriteSubtitles": "Impossible d’écrire les sous-titres : {0}","captions.downloadTranscriberModelFirst": "Téléchargez d'abord un modèle de transcription dans Réglages › Transcription.",- "captions.exportSrt": "Export SRT…",- "captions.exportedCaptions": "Wrote {0} captions",+ "captions.exportSrt": "Exporter en SRT…",+ "captions.exportedBusiestLane": "{0} sous-titres écrits dans {1}, depuis la piste qui a le plus de titres. Pour écrire une autre piste, sélectionnez d’abord l’un de ses titres.",+ "captions.exportedCaptions": "{0} sous-titres écrits dans {1}","captions.generateCaptions": "Générer les sous-titres",- "captions.importSrt": "Import SRT…",+ "captions.importSrt": "Importer un SRT…","captions.loadingTheModel": "Chargement du modèle",- "captions.noCaptionsToExport": "No captions on the timeline to export",- "captions.noSubtitlesInFile": "The file has no subtitles",+ "captions.noCaptionsToExport": "Aucun sous-titre à exporter sur la timeline",+ "captions.noSubtitlesInFile": "Le fichier ne contient aucun sous-titre","captions.noVoiceOnTimeline": "Aucun clip de la timeline n'a de son","captions.nothingSaidClip": "Rien n'a été dit dans ce clip","captions.nothingToCaptionYet": "Nothing to caption yet",@@ -25,7 +27,7 @@"captions.oneTitlePerSentence": "One title per sentence, held for as long as it takes to read, one after another on the first lane with room.","captions.placement": "Position","captions.readingTheSound": "Lecture du son du clip",- "captions.subRipSubtitles": "SubRip subtitles",+ "captions.subRipSubtitles": "Sous-titres SubRip","captions.transcribing": "Transcription en cours","captions.typeWordsPutScreen": "Type the words to put on screen…","captions.useVoiceFromTimeline": "Utiliser la voix de la timeline",diff --git a/src/crates/concat/locales/he.json b/src/crates/concat/locales/he.jsonindex f9518f7e..1da61673 100644--- a/src/crates/concat/locales/he.json+++ b/src/crates/concat/locales/he.json@@ -8,16 +8,18 @@"captions.centre": "מרכז","captions.clipHasNoFile": "לקליפ הזה אין קובץ לתמלול","captions.clipNoLongerTimeline": "הקליפ כבר לא נמצא בציר הזמן",- "captions.couldNotReadSubtitles": "Could not read the subtitles: {0}",- "captions.couldNotWriteSubtitles": "Could not write the subtitles: {0}",+ "captions.couldNotPublishSubtitles": "הכתוביות נכתבו אל {0}, אבל לא ניתן היה להעביר אותן למקום שבו הטלפון מציג אותן: {1}",+ "captions.couldNotReadSubtitles": "לא ניתן לקרוא את הכתוביות: {0}",+ "captions.couldNotWriteSubtitles": "לא ניתן לכתוב את הכתוביות: {0}","captions.downloadTranscriberModelFirst": "יש להוריד קודם מודל תמלול בהגדרות › מתמלל.",- "captions.exportSrt": "Export SRT…",- "captions.exportedCaptions": "Wrote {0} captions",+ "captions.exportSrt": "ייצוא SRT…",+ "captions.exportedBusiestLane": "{0} כתוביות נכתבו אל {1}, מהערוץ שיש בו הכי הרבה כותרות. כדי לכתוב ערוץ אחר, בחרו קודם אחת מהכותרות שלו.",+ "captions.exportedCaptions": "{0} כתוביות נכתבו אל {1}","captions.generateCaptions": "יצירת כתוביות",- "captions.importSrt": "Import SRT…",+ "captions.importSrt": "ייבוא SRT…","captions.loadingTheModel": "טוען את המודל",- "captions.noCaptionsToExport": "No captions on the timeline to export",- "captions.noSubtitlesInFile": "The file has no subtitles",+ "captions.noCaptionsToExport": "אין כתוביות בציר הזמן לייצוא",+ "captions.noSubtitlesInFile": "אין כתוביות בקובץ","captions.noVoiceOnTimeline": "אין בציר הזמן קליפ עם קול","captions.nothingSaidClip": "לא נאמר דבר בקליפ הזה","captions.nothingToCaptionYet": "אין עדיין למה להוסיף כתוביות",@@ -25,7 +27,7 @@"captions.oneTitlePerSentence": "כותרת אחת לכל משפט, מוצגת כל עוד צריך כדי לקרוא אותה, בזו אחר זו בערוץ הראשון שיש בו מקום.","captions.placement": "מיקום","captions.readingTheSound": "קורא את הצליל של הקליפ",- "captions.subRipSubtitles": "SubRip subtitles",+ "captions.subRipSubtitles": "כתוביות SubRip","captions.transcribing": "מתמלל","captions.typeWordsPutScreen": "יש להקליד את המילים שיופיעו על המסך…","captions.useVoiceFromTimeline": "שימוש בקול מציר הזמן",diff --git a/src/crates/concat/locales/hi.json b/src/crates/concat/locales/hi.jsonindex bb0a0ae3..a8939e98 100644--- a/src/crates/concat/locales/hi.json+++ b/src/crates/concat/locales/hi.json@@ -8,16 +8,18 @@"captions.centre": "बीच में","captions.clipHasNoFile": "इस क्लिप में ट्रांसक्राइब करने के लिए कोई फ़ाइल नहीं है","captions.clipNoLongerTimeline": "यह क्लिप अब टाइमलाइन पर नहीं है",- "captions.couldNotReadSubtitles": "Could not read the subtitles: {0}",- "captions.couldNotWriteSubtitles": "Could not write the subtitles: {0}",+ "captions.couldNotPublishSubtitles": "सबटाइटल {0} में लिखे गए, लेकिन उन्हें वहाँ नहीं ले जाया जा सका जहाँ फ़ोन उन्हें दिखाता है: {1}",+ "captions.couldNotReadSubtitles": "सबटाइटल पढ़े नहीं जा सके: {0}",+ "captions.couldNotWriteSubtitles": "सबटाइटल लिखे नहीं जा सके: {0}","captions.downloadTranscriberModelFirst": "पहले सेटिंग › ट्रांसक्राइबर में एक ट्रांसक्राइबर मॉडल डाउनलोड करें।",- "captions.exportSrt": "Export SRT…",- "captions.exportedCaptions": "Wrote {0} captions",+ "captions.exportSrt": "SRT एक्सपोर्ट करें…",+ "captions.exportedBusiestLane": "{0} कैप्शन {1} में लिखे गए, सबसे ज़्यादा टाइटल वाली लेन से। कोई दूसरी लेन लिखने के लिए पहले उसका कोई टाइटल चुनें।",+ "captions.exportedCaptions": "{0} कैप्शन {1} में लिखे गए","captions.generateCaptions": "कैप्शन बनाएं",- "captions.importSrt": "Import SRT…",+ "captions.importSrt": "SRT इम्पोर्ट करें…","captions.loadingTheModel": "मॉडल लोड हो रहा है",- "captions.noCaptionsToExport": "No captions on the timeline to export",- "captions.noSubtitlesInFile": "The file has no subtitles",+ "captions.noCaptionsToExport": "टाइमलाइन पर एक्सपोर्ट करने के लिए कोई कैप्शन नहीं है",+ "captions.noSubtitlesInFile": "इस फ़ाइल में कोई सबटाइटल नहीं है","captions.noVoiceOnTimeline": "टाइमलाइन पर किसी क्लिप में आवाज़ नहीं है","captions.nothingSaidClip": "उस क्लिप में कुछ नहीं बोला गया","captions.nothingToCaptionYet": "अभी कैप्शन बनाने के लिए कुछ नहीं है",@@ -25,7 +27,7 @@"captions.oneTitlePerSentence": "हर वाक्य के लिए एक टाइटल, जितनी देर पढ़ने में लगे उतनी देर तक, एक के बाद एक, खाली जगह वाली पहली लेन पर।","captions.placement": "स्थान","captions.readingTheSound": "क्लिप की आवाज़ पढ़ी जा रही है",- "captions.subRipSubtitles": "SubRip subtitles",+ "captions.subRipSubtitles": "SubRip सबटाइटल","captions.transcribing": "ट्रांसक्राइब हो रहा है","captions.typeWordsPutScreen": "स्क्रीन पर दिखाने के लिए शब्द लिखें…","captions.useVoiceFromTimeline": "टाइमलाइन की आवाज़ इस्तेमाल करें",diff --git a/src/crates/concat/locales/hr.json b/src/crates/concat/locales/hr.jsonindex ab13687f..093cf9d4 100644--- a/src/crates/concat/locales/hr.json+++ b/src/crates/concat/locales/hr.json@@ -8,16 +8,18 @@"captions.centre": "Sredina","captions.clipHasNoFile": "Ovaj klip nema datoteku za transkripciju","captions.clipNoLongerTimeline": "Klip više nije na vremenskoj liniji",- "captions.couldNotReadSubtitles": "Could not read the subtitles: {0}",- "captions.couldNotWriteSubtitles": "Could not write the subtitles: {0}",+ "captions.couldNotPublishSubtitles": "Titlovi su zapisani u {0}, ali ih nije bilo moguće premjestiti tamo gdje ih telefon prikazuje: {1}",+ "captions.couldNotReadSubtitles": "Titlove nije moguće pročitati: {0}",+ "captions.couldNotWriteSubtitles": "Titlove nije moguće zapisati: {0}","captions.downloadTranscriberModelFirst": "Prvo preuzmite model za transkripciju u Postavke › Transkriber.",- "captions.exportSrt": "Export SRT…",- "captions.exportedCaptions": "Wrote {0} captions",+ "captions.exportSrt": "Izvezi SRT…",+ "captions.exportedBusiestLane": "Zapisano {0} titlova u {1}, s trake s najviše naslova. Za drugu traku najprije odaberite jedan od njezinih naslova.",+ "captions.exportedCaptions": "Zapisano {0} titlova u {1}","captions.generateCaptions": "Generiraj titlove",- "captions.importSrt": "Import SRT…",+ "captions.importSrt": "Uvezi SRT…","captions.loadingTheModel": "Učitavanje modela",- "captions.noCaptionsToExport": "No captions on the timeline to export",- "captions.noSubtitlesInFile": "The file has no subtitles",+ "captions.noCaptionsToExport": "Na vremenskoj crti nema titlova za izvoz",+ "captions.noSubtitlesInFile": "Datoteka nema titlova","captions.noVoiceOnTimeline": "Nijedan isječak na vremenskoj crti nema zvuk","captions.nothingSaidClip": "U tom klipu ništa nije rečeno","captions.nothingToCaptionYet": "Još ništa za titlove",@@ -25,7 +27,7 @@"captions.oneTitlePerSentence": "Jedan naslov po rečenici, držan dok se ne pročita, jedan za drugim na prvoj traci s mjesta.","captions.placement": "Smještaj","captions.readingTheSound": "Čitanje zvuka isječka",- "captions.subRipSubtitles": "SubRip subtitles",+ "captions.subRipSubtitles": "SubRip titlovi","captions.transcribing": "Transkripcija","captions.typeWordsPutScreen": "Upišite riječi za prikaz na zaslonu…","captions.useVoiceFromTimeline": "Koristi glas s vremenske crte",diff --git a/src/crates/concat/locales/id.json b/src/crates/concat/locales/id.jsonindex ad761a27..8e5620e9 100644--- a/src/crates/concat/locales/id.json+++ b/src/crates/concat/locales/id.json@@ -8,16 +8,18 @@"captions.centre": "Tengah","captions.clipHasNoFile": "Klip ini tidak punya file untuk ditranskripsi","captions.clipNoLongerTimeline": "Klip sudah tidak ada di linimasa",- "captions.couldNotReadSubtitles": "Could not read the subtitles: {0}",- "captions.couldNotWriteSubtitles": "Could not write the subtitles: {0}",+ "captions.couldNotPublishSubtitles": "Subtitel ditulis ke {0}, tetapi tidak dapat dipindahkan ke tempat yang ditampilkan ponsel: {1}",+ "captions.couldNotReadSubtitles": "Tidak dapat membaca subtitel: {0}",+ "captions.couldNotWriteSubtitles": "Tidak dapat menulis subtitel: {0}","captions.downloadTranscriberModelFirst": "Unduh dulu model transkripsi di Pengaturan › Transkripsi.",- "captions.exportSrt": "Export SRT…",- "captions.exportedCaptions": "Wrote {0} captions",+ "captions.exportSrt": "Ekspor SRT…",+ "captions.exportedBusiestLane": "{0} subtitel ditulis ke {1}, dari lajur dengan judul terbanyak. Untuk menulis lajur lain, pilih dulu salah satu judulnya.",+ "captions.exportedCaptions": "{0} subtitel ditulis ke {1}","captions.generateCaptions": "Buat subtitel",- "captions.importSrt": "Import SRT…",+ "captions.importSrt": "Impor SRT…","captions.loadingTheModel": "Memuat model",- "captions.noCaptionsToExport": "No captions on the timeline to export",- "captions.noSubtitlesInFile": "The file has no subtitles",+ "captions.noCaptionsToExport": "Tidak ada subtitel di timeline untuk diekspor",+ "captions.noSubtitlesInFile": "File ini tidak berisi subtitel","captions.noVoiceOnTimeline": "Tidak ada klip bersuara di linimasa","captions.nothingSaidClip": "Tidak ada ucapan di klip itu","captions.nothingToCaptionYet": "Belum ada yang bisa diberi subtitel",@@ -25,7 +27,7 @@"captions.oneTitlePerSentence": "Satu judul untuk setiap kalimat, ditampilkan selama waktu yang dibutuhkan untuk membacanya, berurutan di lajur pertama yang masih lowong.","captions.placement": "Penempatan","captions.readingTheSound": "Membaca suara klip",- "captions.subRipSubtitles": "SubRip subtitles",+ "captions.subRipSubtitles": "Subtitel SubRip","captions.transcribing": "Mentranskripsi","captions.typeWordsPutScreen": "Ketik kata-kata yang akan tampil di layar…","captions.useVoiceFromTimeline": "Gunakan suara dari linimasa",diff --git a/src/crates/concat/locales/it.json b/src/crates/concat/locales/it.jsonindex bb71c208..4e45d446 100644--- a/src/crates/concat/locales/it.json+++ b/src/crates/concat/locales/it.json@@ -8,16 +8,18 @@"captions.centre": "Centro","captions.clipHasNoFile": "Questa clip non ha un file da trascrivere","captions.clipNoLongerTimeline": "The clip is no longer on the timeline",- "captions.couldNotReadSubtitles": "Could not read the subtitles: {0}",- "captions.couldNotWriteSubtitles": "Could not write the subtitles: {0}",+ "captions.couldNotPublishSubtitles": "I sottotitoli sono stati scritti in {0}, ma non è stato possibile spostarli dove il telefono li mostra: {1}",+ "captions.couldNotReadSubtitles": "Impossibile leggere i sottotitoli: {0}",+ "captions.couldNotWriteSubtitles": "Impossibile scrivere i sottotitoli: {0}","captions.downloadTranscriberModelFirst": "Scarica prima un modello di trascrizione in Impostazioni › Trascrizione.",- "captions.exportSrt": "Export SRT…",- "captions.exportedCaptions": "Wrote {0} captions",+ "captions.exportSrt": "Esporta SRT…",+ "captions.exportedBusiestLane": "{0} sottotitoli scritti in {1}, dalla traccia con più titoli. Per scrivere un’altra traccia, selezionane prima uno dei titoli.",+ "captions.exportedCaptions": "{0} sottotitoli scritti in {1}","captions.generateCaptions": "Genera sottotitoli",- "captions.importSrt": "Import SRT…",+ "captions.importSrt": "Importa SRT…","captions.loadingTheModel": "Caricamento del modello",- "captions.noCaptionsToExport": "No captions on the timeline to export",- "captions.noSubtitlesInFile": "The file has no subtitles",+ "captions.noCaptionsToExport": "Nessun sottotitolo da esportare nella timeline",+ "captions.noSubtitlesInFile": "Il file non contiene sottotitoli","captions.noVoiceOnTimeline": "Nessuna clip nella timeline ha audio","captions.nothingSaidClip": "In quella clip non è stato detto nulla","captions.nothingToCaptionYet": "Nothing to caption yet",@@ -25,7 +27,7 @@"captions.oneTitlePerSentence": "One title per sentence, held for as long as it takes to read, one after another on the first lane with room.","captions.placement": "Posizione","captions.readingTheSound": "Lettura del suono della clip",- "captions.subRipSubtitles": "SubRip subtitles",+ "captions.subRipSubtitles": "Sottotitoli SubRip","captions.transcribing": "Trascrizione in corso","captions.typeWordsPutScreen": "Type the words to put on screen…","captions.useVoiceFromTimeline": "Usa la voce dalla timeline",diff --git a/src/crates/concat/locales/ja.json b/src/crates/concat/locales/ja.jsonindex 05f51a8e..ebbf8a54 100644--- a/src/crates/concat/locales/ja.json+++ b/src/crates/concat/locales/ja.json@@ -8,16 +8,18 @@"captions.centre": "中央","captions.clipHasNoFile": "このクリップには文字起こしするファイルがありません","captions.clipNoLongerTimeline": "クリップはタイムライン上にありません",- "captions.couldNotReadSubtitles": "Could not read the subtitles: {0}",- "captions.couldNotWriteSubtitles": "Could not write the subtitles: {0}",+ "captions.couldNotPublishSubtitles": "字幕を {0} に書き出しましたが、スマートフォンで表示される場所へ移動できませんでした: {1}",+ "captions.couldNotReadSubtitles": "字幕を読み込めませんでした: {0}",+ "captions.couldNotWriteSubtitles": "字幕を書き出せませんでした: {0}","captions.downloadTranscriberModelFirst": "まず「設定 › 文字起こし」でモデルをダウンロードしてください。",- "captions.exportSrt": "Export SRT…",- "captions.exportedCaptions": "Wrote {0} captions",+ "captions.exportSrt": "SRT を書き出す…",+ "captions.exportedBusiestLane": "タイトルが最も多いレーンから {0} 件の字幕を {1} に書き出しました。別のレーンを書き出すには、先にそのレーンのタイトルを選択してください。",+ "captions.exportedCaptions": "{0} 件の字幕を {1} に書き出しました","captions.generateCaptions": "字幕を生成",- "captions.importSrt": "Import SRT…",+ "captions.importSrt": "SRT を読み込む…","captions.loadingTheModel": "モデルを読み込み中",- "captions.noCaptionsToExport": "No captions on the timeline to export",- "captions.noSubtitlesInFile": "The file has no subtitles",+ "captions.noCaptionsToExport": "書き出せる字幕がタイムラインにありません",+ "captions.noSubtitlesInFile": "このファイルには字幕がありません","captions.noVoiceOnTimeline": "音声のあるクリップがタイムラインにありません","captions.nothingSaidClip": "そのクリップには発話がありませんでした","captions.nothingToCaptionYet": "まだ字幕を付けるものがありません",@@ -25,7 +27,7 @@"captions.oneTitlePerSentence": "一文ごとにタイトルを一つ、読み終えるのに必要な時間だけ表示し、空いている最初のレーンに順番に並べます。","captions.placement": "配置","captions.readingTheSound": "クリップの音声を読み込み中",- "captions.subRipSubtitles": "SubRip subtitles",+ "captions.subRipSubtitles": "SubRip 字幕","captions.transcribing": "文字起こし中","captions.typeWordsPutScreen": "画面に表示する言葉を入力…","captions.useVoiceFromTimeline": "タイムラインの音声を使う",diff --git a/src/crates/concat/locales/ko.json b/src/crates/concat/locales/ko.jsonindex 9adea2c4..5706c2cf 100644--- a/src/crates/concat/locales/ko.json+++ b/src/crates/concat/locales/ko.json@@ -8,16 +8,18 @@"captions.centre": "가운데","captions.clipHasNoFile": "이 클립에는 받아쓸 파일이 없습니다","captions.clipNoLongerTimeline": "The clip is no longer on the timeline",- "captions.couldNotReadSubtitles": "Could not read the subtitles: {0}",- "captions.couldNotWriteSubtitles": "Could not write the subtitles: {0}",+ "captions.couldNotPublishSubtitles": "자막을 {0}에 썼지만 휴대폰에 표시되는 위치로 옮기지 못했습니다: {1}",+ "captions.couldNotReadSubtitles": "자막을 읽을 수 없습니다: {0}",+ "captions.couldNotWriteSubtitles": "자막을 쓸 수 없습니다: {0}","captions.downloadTranscriberModelFirst": "먼저 설정 › 받아쓰기에서 모델을 다운로드하세요.",- "captions.exportSrt": "Export SRT…",- "captions.exportedCaptions": "Wrote {0} captions",+ "captions.exportSrt": "SRT 내보내기…",+ "captions.exportedBusiestLane": "제목이 가장 많은 트랙에서 자막 {0}개를 {1}에 썼습니다. 다른 트랙을 쓰려면 먼저 그 트랙의 제목 하나를 선택하세요.",+ "captions.exportedCaptions": "자막 {0}개를 {1}에 썼습니다","captions.generateCaptions": "자막 생성",- "captions.importSrt": "Import SRT…",+ "captions.importSrt": "SRT 가져오기…","captions.loadingTheModel": "모델 불러오는 중",- "captions.noCaptionsToExport": "No captions on the timeline to export",- "captions.noSubtitlesInFile": "The file has no subtitles",+ "captions.noCaptionsToExport": "타임라인에 내보낼 자막이 없습니다",+ "captions.noSubtitlesInFile": "파일에 자막이 없습니다","captions.noVoiceOnTimeline": "타임라인에 소리가 있는 클립이 없습니다","captions.nothingSaidClip": "그 클립에는 말소리가 없습니다","captions.nothingToCaptionYet": "Nothing to caption yet",@@ -25,7 +27,7 @@"captions.oneTitlePerSentence": "One title per sentence, held for as long as it takes to read, one after another on the first lane with room.","captions.placement": "배치","captions.readingTheSound": "클립 소리 읽는 중",- "captions.subRipSubtitles": "SubRip subtitles",+ "captions.subRipSubtitles": "SubRip 자막","captions.transcribing": "받아쓰는 중","captions.typeWordsPutScreen": "Type the words to put on screen…","captions.useVoiceFromTimeline": "타임라인의 음성 사용",diff --git a/src/crates/concat/locales/nl.json b/src/crates/concat/locales/nl.jsonindex a31db204..58b26372 100644--- a/src/crates/concat/locales/nl.json+++ b/src/crates/concat/locales/nl.json@@ -8,16 +8,18 @@"captions.centre": "Midden","captions.clipHasNoFile": "Deze clip heeft geen bestand om te transcriberen","captions.clipNoLongerTimeline": "De clip staat niet meer op de tijdlijn",- "captions.couldNotReadSubtitles": "Could not read the subtitles: {0}",- "captions.couldNotWriteSubtitles": "Could not write the subtitles: {0}",+ "captions.couldNotPublishSubtitles": "De ondertitels zijn naar {0} geschreven, maar konden niet worden verplaatst naar waar de telefoon ze toont: {1}",+ "captions.couldNotReadSubtitles": "Kan de ondertitels niet lezen: {0}",+ "captions.couldNotWriteSubtitles": "Kan de ondertitels niet schrijven: {0}","captions.downloadTranscriberModelFirst": "Download eerst een transcriptiemodel via Instellingen › Transcriptie.",- "captions.exportSrt": "Export SRT…",- "captions.exportedCaptions": "Wrote {0} captions",+ "captions.exportSrt": "SRT exporteren…",+ "captions.exportedBusiestLane": "{0} ondertitels geschreven naar {1}, van het spoor met de meeste titels. Selecteer eerst een van de titels van een ander spoor om dat te schrijven.",+ "captions.exportedCaptions": "{0} ondertitels geschreven naar {1}","captions.generateCaptions": "Ondertitels genereren",- "captions.importSrt": "Import SRT…",+ "captions.importSrt": "SRT importeren…","captions.loadingTheModel": "Model laden",- "captions.noCaptionsToExport": "No captions on the timeline to export",- "captions.noSubtitlesInFile": "The file has no subtitles",+ "captions.noCaptionsToExport": "Geen ondertitels op de tijdlijn om te exporteren",+ "captions.noSubtitlesInFile": "Het bestand bevat geen ondertitels","captions.noVoiceOnTimeline": "Geen clip op de tijdlijn heeft geluid","captions.nothingSaidClip": "Er wordt niets gezegd in die clip","captions.nothingToCaptionYet": "Nog niets om te ondertitelen",@@ -25,7 +27,7 @@"captions.oneTitlePerSentence": "Eén titel per zin, zo lang in beeld als nodig is om hem te lezen, na elkaar op het eerste spoor met ruimte.","captions.placement": "Plaatsing","captions.readingTheSound": "Geluid van de clip lezen",- "captions.subRipSubtitles": "SubRip subtitles",+ "captions.subRipSubtitles": "SubRip-ondertitels","captions.transcribing": "Transcriberen","captions.typeWordsPutScreen": "Typ de woorden die in beeld moeten komen…","captions.useVoiceFromTimeline": "Stem uit de tijdlijn gebruiken",diff --git a/src/crates/concat/locales/pl.json b/src/crates/concat/locales/pl.jsonindex 4258f089..691c580f 100644--- a/src/crates/concat/locales/pl.json+++ b/src/crates/concat/locales/pl.json@@ -8,16 +8,18 @@"captions.centre": "Środek","captions.clipHasNoFile": "Ten klip nie ma pliku do transkrypcji","captions.clipNoLongerTimeline": "Klipu nie ma już na osi czasu",- "captions.couldNotReadSubtitles": "Could not read the subtitles: {0}",- "captions.couldNotWriteSubtitles": "Could not write the subtitles: {0}",+ "captions.couldNotPublishSubtitles": "Napisy zapisano w {0}, ale nie udało się ich przenieść tam, gdzie pokazuje je telefon: {1}",+ "captions.couldNotReadSubtitles": "Nie udało się odczytać napisów: {0}",+ "captions.couldNotWriteSubtitles": "Nie udało się zapisać napisów: {0}","captions.downloadTranscriberModelFirst": "Najpierw pobierz model transkrypcji w Ustawienia › Transkrypcja.",- "captions.exportSrt": "Export SRT…",- "captions.exportedCaptions": "Wrote {0} captions",+ "captions.exportSrt": "Eksportuj SRT…",+ "captions.exportedBusiestLane": "Zapisane napisy: {0}, w {1}, ze ścieżki z największą liczbą napisów. Aby zapisać inną ścieżkę, najpierw zaznacz jeden z jej napisów.",+ "captions.exportedCaptions": "Zapisane napisy: {0}, w {1}","captions.generateCaptions": "Generuj napisy",- "captions.importSrt": "Import SRT…",+ "captions.importSrt": "Importuj SRT…","captions.loadingTheModel": "Ładowanie modelu",- "captions.noCaptionsToExport": "No captions on the timeline to export",- "captions.noSubtitlesInFile": "The file has no subtitles",+ "captions.noCaptionsToExport": "Na osi czasu nie ma napisów do eksportu",+ "captions.noSubtitlesInFile": "Plik nie zawiera napisów","captions.noVoiceOnTimeline": "Żaden klip na osi czasu nie ma dźwięku","captions.nothingSaidClip": "W tym klipie nic nie zostało powiedziane","captions.nothingToCaptionYet": "Na razie nie ma czego podpisać",@@ -25,7 +27,7 @@"captions.oneTitlePerSentence": "Jeden napis na zdanie, widoczny tak długo, jak trzeba, by go przeczytać, jeden po drugim na pierwszej ścieżce z wolnym miejscem.","captions.placement": "Położenie","captions.readingTheSound": "Odczytywanie dźwięku klipu",- "captions.subRipSubtitles": "SubRip subtitles",+ "captions.subRipSubtitles": "Napisy SubRip","captions.transcribing": "Transkrypcja","captions.typeWordsPutScreen": "Wpisz słowa, które pojawią się na ekranie…","captions.useVoiceFromTimeline": "Użyj głosu z osi czasu",diff --git a/src/crates/concat/locales/pt-BR.json b/src/crates/concat/locales/pt-BR.jsonindex 6ef0b30d..ef88d8cf 100644--- a/src/crates/concat/locales/pt-BR.json+++ b/src/crates/concat/locales/pt-BR.json@@ -8,11 +8,13 @@"captions.centre": "Centro","captions.clipHasNoFile": "Este clipe não tem arquivo para transcrever","captions.clipNoLongerTimeline": "O clipe não está mais na linha do tempo",+ "captions.couldNotPublishSubtitles": "As legendas foram gravadas em {0}, mas não foi possível movê-las para onde o celular as mostra: {1}","captions.couldNotReadSubtitles": "Não foi possível ler as legendas: {0}","captions.couldNotWriteSubtitles": "Não foi possível gravar as legendas: {0}","captions.downloadTranscriberModelFirst": "Baixe primeiro um modelo de transcrição em Configurações › Transcrição.","captions.exportSrt": "Exportar SRT…",- "captions.exportedCaptions": "{0} legendas gravadas",+ "captions.exportedBusiestLane": "{0} legendas gravadas em {1}, da faixa com mais títulos. Para gravar outra faixa, selecione antes um dos títulos dela.",+ "captions.exportedCaptions": "{0} legendas gravadas em {1}","captions.generateCaptions": "Gerar legendas","captions.importSrt": "Importar SRT…","captions.loadingTheModel": "Carregando o modelo",diff --git a/src/crates/concat/locales/ru.json b/src/crates/concat/locales/ru.jsonindex e99b072f..e5d4a766 100644--- a/src/crates/concat/locales/ru.json+++ b/src/crates/concat/locales/ru.json@@ -8,16 +8,18 @@"captions.centre": "Центр","captions.clipHasNoFile": "У этого клипа нет файла для распознавания","captions.clipNoLongerTimeline": "Клипа больше нет на таймлайне",- "captions.couldNotReadSubtitles": "Could not read the subtitles: {0}",- "captions.couldNotWriteSubtitles": "Could not write the subtitles: {0}",+ "captions.couldNotPublishSubtitles": "Субтитры записаны в {0}, но их не удалось перенести туда, где их показывает телефон: {1}",+ "captions.couldNotReadSubtitles": "Не удалось прочитать субтитры: {0}",+ "captions.couldNotWriteSubtitles": "Не удалось записать субтитры: {0}","captions.downloadTranscriberModelFirst": "Сначала скачайте модель распознавания в Настройки › Распознавание.",- "captions.exportSrt": "Export SRT…",- "captions.exportedCaptions": "Wrote {0} captions",+ "captions.exportSrt": "Экспорт SRT…",+ "captions.exportedBusiestLane": "Субтитры ({0}) записаны в {1} с дорожки, где больше всего титров. Чтобы записать другую дорожку, сначала выделите один из её титров.",+ "captions.exportedCaptions": "Субтитры ({0}) записаны в {1}","captions.generateCaptions": "Создать субтитры",- "captions.importSrt": "Import SRT…",+ "captions.importSrt": "Импорт SRT…","captions.loadingTheModel": "Загрузка модели",- "captions.noCaptionsToExport": "No captions on the timeline to export",- "captions.noSubtitlesInFile": "The file has no subtitles",+ "captions.noCaptionsToExport": "На таймлайне нет субтитров для экспорта",+ "captions.noSubtitlesInFile": "В файле нет субтитров","captions.noVoiceOnTimeline": "На таймлайне нет клипов со звуком","captions.nothingSaidClip": "В этом клипе ничего не сказано","captions.nothingToCaptionYet": "Пока нечего субтитровать",@@ -25,7 +27,7 @@"captions.oneTitlePerSentence": "Один титр на предложение, держится столько, сколько нужно, чтобы прочитать, один за другим на первой свободной дорожке.","captions.placement": "Расположение","captions.readingTheSound": "Чтение звука клипа",- "captions.subRipSubtitles": "SubRip subtitles",+ "captions.subRipSubtitles": "Субтитры SubRip","captions.transcribing": "Распознавание","captions.typeWordsPutScreen": "Введите слова, которые появятся на экране…","captions.useVoiceFromTimeline": "Использовать голос с таймлайна",diff --git a/src/crates/concat/locales/th.json b/src/crates/concat/locales/th.jsonindex 7115f389..ef9c3946 100644--- a/src/crates/concat/locales/th.json+++ b/src/crates/concat/locales/th.json@@ -8,16 +8,18 @@"captions.centre": "กึ่งกลาง","captions.clipHasNoFile": "คลิปนี้ไม่มีไฟล์ให้ถอดเสียง","captions.clipNoLongerTimeline": "คลิปนี้ไม่อยู่บนไทม์ไลน์แล้ว",- "captions.couldNotReadSubtitles": "Could not read the subtitles: {0}",- "captions.couldNotWriteSubtitles": "Could not write the subtitles: {0}",+ "captions.couldNotPublishSubtitles": "เขียนคำบรรยายไปที่ {0} แล้ว แต่ย้ายไปยังที่ที่โทรศัพท์แสดงไม่ได้: {1}",+ "captions.couldNotReadSubtitles": "อ่านคำบรรยายไม่ได้: {0}",+ "captions.couldNotWriteSubtitles": "เขียนคำบรรยายไม่ได้: {0}","captions.downloadTranscriberModelFirst": "ดาวน์โหลดโมเดลถอดเสียงก่อนที่ การตั้งค่า › ตัวถอดเสียง",- "captions.exportSrt": "Export SRT…",- "captions.exportedCaptions": "Wrote {0} captions",+ "captions.exportSrt": "ส่งออก SRT…",+ "captions.exportedBusiestLane": "เขียนคำบรรยาย {0} รายการไปที่ {1} แล้ว จากเลนที่มีไตเติลมากที่สุด หากต้องการเขียนเลนอื่น ให้เลือกไตเติลหนึ่งในเลนนั้นก่อน",+ "captions.exportedCaptions": "เขียนคำบรรยาย {0} รายการไปที่ {1} แล้ว","captions.generateCaptions": "สร้างคำบรรยาย",- "captions.importSrt": "Import SRT…",+ "captions.importSrt": "นำเข้า SRT…","captions.loadingTheModel": "กำลังโหลดโมเดล",- "captions.noCaptionsToExport": "No captions on the timeline to export",- "captions.noSubtitlesInFile": "The file has no subtitles",+ "captions.noCaptionsToExport": "ไม่มีคำบรรยายบนไทม์ไลน์ให้ส่งออก",+ "captions.noSubtitlesInFile": "ไฟล์นี้ไม่มีคำบรรยาย","captions.noVoiceOnTimeline": "ไม่มีคลิปที่มีเสียงบนไทม์ไลน์","captions.nothingSaidClip": "ไม่มีเสียงพูดในคลิปนั้น","captions.nothingToCaptionYet": "ยังไม่มีอะไรให้ใส่คำบรรยาย",@@ -25,7 +27,7 @@"captions.oneTitlePerSentence": "ไตเติลหนึ่งรายการต่อหนึ่งประโยค แสดงค้างไว้นานพอให้อ่านทัน เรียงต่อกันบนเลนแรกที่มีที่ว่าง","captions.placement": "ตำแหน่งที่วาง","captions.readingTheSound": "กำลังอ่านเสียงของคลิป",- "captions.subRipSubtitles": "SubRip subtitles",+ "captions.subRipSubtitles": "คำบรรยาย SubRip","captions.transcribing": "กำลังถอดเสียง","captions.typeWordsPutScreen": "พิมพ์ข้อความที่จะแสดงบนจอ…","captions.useVoiceFromTimeline": "ใช้เสียงพูดจากไทม์ไลน์",diff --git a/src/crates/concat/locales/tr.json b/src/crates/concat/locales/tr.jsonindex b051d29d..e9514d38 100644--- a/src/crates/concat/locales/tr.json+++ b/src/crates/concat/locales/tr.json@@ -8,16 +8,18 @@"captions.centre": "Orta","captions.clipHasNoFile": "Bu klibin yazıya dökülecek dosyası yok","captions.clipNoLongerTimeline": "The clip is no longer on the timeline",- "captions.couldNotReadSubtitles": "Could not read the subtitles: {0}",- "captions.couldNotWriteSubtitles": "Could not write the subtitles: {0}",+ "captions.couldNotPublishSubtitles": "Altyazılar {0} konumuna yazıldı, ancak telefonun gösterdiği yere taşınamadı: {1}",+ "captions.couldNotReadSubtitles": "Altyazılar okunamadı: {0}",+ "captions.couldNotWriteSubtitles": "Altyazılar yazılamadı: {0}","captions.downloadTranscriberModelFirst": "Önce Ayarlar › Yazıya dökme bölümünden bir model indirin.",- "captions.exportSrt": "Export SRT…",- "captions.exportedCaptions": "Wrote {0} captions",+ "captions.exportSrt": "SRT dışa aktar…",+ "captions.exportedBusiestLane": "{0} altyazı, en çok başlık içeren parçadan {1} konumuna yazıldı. Başka bir parçayı yazmak için önce o parçanın başlıklarından birini seçin.",+ "captions.exportedCaptions": "{0} altyazı {1} konumuna yazıldı","captions.generateCaptions": "Altyazı oluştur",- "captions.importSrt": "Import SRT…",+ "captions.importSrt": "SRT içe aktar…","captions.loadingTheModel": "Model yükleniyor",- "captions.noCaptionsToExport": "No captions on the timeline to export",- "captions.noSubtitlesInFile": "The file has no subtitles",+ "captions.noCaptionsToExport": "Zaman çizelgesinde dışa aktarılacak altyazı yok",+ "captions.noSubtitlesInFile": "Dosyada altyazı yok","captions.noVoiceOnTimeline": "Zaman çizelgesinde sesi olan klip yok","captions.nothingSaidClip": "O klipte hiçbir şey söylenmedi","captions.nothingToCaptionYet": "Nothing to caption yet",@@ -25,7 +27,7 @@"captions.oneTitlePerSentence": "One title per sentence, held for as long as it takes to read, one after another on the first lane with room.","captions.placement": "Yerleşim","captions.readingTheSound": "Klibin sesi okunuyor",- "captions.subRipSubtitles": "SubRip subtitles",+ "captions.subRipSubtitles": "SubRip altyazıları","captions.transcribing": "Yazıya dökülüyor","captions.typeWordsPutScreen": "Type the words to put on screen…","captions.useVoiceFromTimeline": "Zaman çizelgesindeki sesi kullan",diff --git a/src/crates/concat/locales/uk.json b/src/crates/concat/locales/uk.jsonindex 5c41d27e..12bd0ed6 100644--- a/src/crates/concat/locales/uk.json+++ b/src/crates/concat/locales/uk.json@@ -8,16 +8,18 @@"captions.centre": "Центр","captions.clipHasNoFile": "У цього кліпу немає файлу для розпізнавання","captions.clipNoLongerTimeline": "Кліпу більше немає на часовій шкалі",- "captions.couldNotReadSubtitles": "Could not read the subtitles: {0}",- "captions.couldNotWriteSubtitles": "Could not write the subtitles: {0}",+ "captions.couldNotPublishSubtitles": "Субтитри записано в {0}, але їх не вдалося перенести туди, де їх показує телефон: {1}",+ "captions.couldNotReadSubtitles": "Не вдалося прочитати субтитри: {0}",+ "captions.couldNotWriteSubtitles": "Не вдалося записати субтитри: {0}","captions.downloadTranscriberModelFirst": "Спершу завантажте модель розпізнавання в Налаштування › Розпізнавання.",- "captions.exportSrt": "Export SRT…",- "captions.exportedCaptions": "Wrote {0} captions",+ "captions.exportSrt": "Експорт SRT…",+ "captions.exportedBusiestLane": "Субтитри ({0}) записано в {1} з доріжки, де найбільше титрів. Щоб записати іншу доріжку, спершу виділіть один з її титрів.",+ "captions.exportedCaptions": "Субтитри ({0}) записано в {1}","captions.generateCaptions": "Створити субтитри",- "captions.importSrt": "Import SRT…",+ "captions.importSrt": "Імпорт SRT…","captions.loadingTheModel": "Завантаження моделі",- "captions.noCaptionsToExport": "No captions on the timeline to export",- "captions.noSubtitlesInFile": "The file has no subtitles",+ "captions.noCaptionsToExport": "На таймлайні немає субтитрів для експорту",+ "captions.noSubtitlesInFile": "У файлі немає субтитрів","captions.noVoiceOnTimeline": "На часовій шкалі немає кліпів зі звуком","captions.nothingSaidClip": "У цьому кліпі нічого не сказано","captions.nothingToCaptionYet": "Поки немає тексту для субтитрів",@@ -25,7 +27,7 @@"captions.oneTitlePerSentence": "Один титр на речення, рівно стільки, скільки треба, щоб його прочитати, один за одним на першій вільній доріжці.","captions.placement": "Розташування","captions.readingTheSound": "Читання звуку кліпу",- "captions.subRipSubtitles": "SubRip subtitles",+ "captions.subRipSubtitles": "Субтитри SubRip","captions.transcribing": "Розпізнавання","captions.typeWordsPutScreen": "Введіть слова, які з’являться на екрані…","captions.useVoiceFromTimeline": "Використати голос із часової шкали",diff --git a/src/crates/concat/locales/ur.json b/src/crates/concat/locales/ur.jsonindex 7c9bbc88..7aa594b9 100644--- a/src/crates/concat/locales/ur.json+++ b/src/crates/concat/locales/ur.json@@ -8,16 +8,18 @@"captions.centre": "درمیان","captions.clipHasNoFile": "اس کلپ میں ٹرانسکرائب کرنے کے لیے کوئی فائل نہیں","captions.clipNoLongerTimeline": "یہ کلپ اب ٹائم لائن پر نہیں ہے",- "captions.couldNotReadSubtitles": "Could not read the subtitles: {0}",- "captions.couldNotWriteSubtitles": "Could not write the subtitles: {0}",+ "captions.couldNotPublishSubtitles": "سب ٹائٹلز {0} میں لکھے گئے، لیکن انہیں وہاں منتقل نہیں کیا جا سکا جہاں فون انہیں دکھاتا ہے: {1}",+ "captions.couldNotReadSubtitles": "سب ٹائٹلز پڑھے نہیں جا سکے: {0}",+ "captions.couldNotWriteSubtitles": "سب ٹائٹلز لکھے نہیں جا سکے: {0}","captions.downloadTranscriberModelFirst": "پہلے ترتیبات › ٹرانسکرائبر میں سے کوئی ٹرانسکرائبر ماڈل ڈاؤن لوڈ کریں۔",- "captions.exportSrt": "Export SRT…",- "captions.exportedCaptions": "Wrote {0} captions",+ "captions.exportSrt": "SRT ایکسپورٹ کریں…",+ "captions.exportedBusiestLane": "{0} کیپشن {1} میں لکھے گئے، اس لین سے جس میں سب سے زیادہ ٹائٹل ہیں۔ کوئی اور لین لکھنے کے لیے پہلے اس کا کوئی ٹائٹل منتخب کریں۔",+ "captions.exportedCaptions": "{0} کیپشن {1} میں لکھے گئے","captions.generateCaptions": "کیپشن بنائیں",- "captions.importSrt": "Import SRT…",+ "captions.importSrt": "SRT امپورٹ کریں…","captions.loadingTheModel": "ماڈل لوڈ ہو رہا ہے",- "captions.noCaptionsToExport": "No captions on the timeline to export",- "captions.noSubtitlesInFile": "The file has no subtitles",+ "captions.noCaptionsToExport": "ٹائم لائن پر ایکسپورٹ کرنے کے لیے کوئی کیپشن نہیں",+ "captions.noSubtitlesInFile": "اس فائل میں کوئی سب ٹائٹل نہیں","captions.noVoiceOnTimeline": "ٹائم لائن پر کسی کلپ میں آواز نہیں","captions.nothingSaidClip": "اس کلپ میں کچھ نہیں بولا گیا","captions.nothingToCaptionYet": "ابھی کیپشن کے لیے کچھ نہیں",@@ -25,7 +27,7 @@"captions.oneTitlePerSentence": "ہر جملے کے لیے ایک ٹائٹل، جو پڑھنے میں لگنے والے وقت تک رہتا ہے، ایک کے بعد ایک پہلی ایسی لین پر جس میں جگہ ہو۔","captions.placement": "جگہ","captions.readingTheSound": "کلپ کی آواز پڑھی جا رہی ہے",- "captions.subRipSubtitles": "SubRip subtitles",+ "captions.subRipSubtitles": "SubRip سب ٹائٹلز","captions.transcribing": "ٹرانسکرائب ہو رہا ہے","captions.typeWordsPutScreen": "اسکرین پر دکھانے کے لیے الفاظ لکھیں…","captions.useVoiceFromTimeline": "ٹائم لائن کی آواز استعمال کریں",diff --git a/src/crates/concat/locales/vi.json b/src/crates/concat/locales/vi.jsonindex 0610758a..a8972a27 100644--- a/src/crates/concat/locales/vi.json+++ b/src/crates/concat/locales/vi.json@@ -8,16 +8,18 @@"captions.centre": "Căn giữa","captions.clipHasNoFile": "Đoạn này không có tệp để phiên âm","captions.clipNoLongerTimeline": "Đoạn phim không còn nằm trên dòng thời gian nữa",- "captions.couldNotReadSubtitles": "Could not read the subtitles: {0}",- "captions.couldNotWriteSubtitles": "Could not write the subtitles: {0}",+ "captions.couldNotPublishSubtitles": "Đã ghi phụ đề vào {0}, nhưng không thể chuyển đến nơi điện thoại hiển thị: {1}",+ "captions.couldNotReadSubtitles": "Không thể đọc phụ đề: {0}",+ "captions.couldNotWriteSubtitles": "Không thể ghi phụ đề: {0}","captions.downloadTranscriberModelFirst": "Trước tiên, hãy tải mô hình phiên âm trong Cài đặt › Công cụ phiên âm.",- "captions.exportSrt": "Export SRT…",- "captions.exportedCaptions": "Wrote {0} captions",+ "captions.exportSrt": "Xuất SRT…",+ "captions.exportedBusiestLane": "Đã ghi {0} phụ đề vào {1}, từ làn có nhiều tiêu đề nhất. Để ghi làn khác, hãy chọn trước một tiêu đề của làn đó.",+ "captions.exportedCaptions": "Đã ghi {0} phụ đề vào {1}","captions.generateCaptions": "Tạo phụ đề",- "captions.importSrt": "Import SRT…",+ "captions.importSrt": "Nhập SRT…","captions.loadingTheModel": "Đang tải mô hình",- "captions.noCaptionsToExport": "No captions on the timeline to export",- "captions.noSubtitlesInFile": "The file has no subtitles",+ "captions.noCaptionsToExport": "Không có phụ đề nào trên timeline để xuất",+ "captions.noSubtitlesInFile": "Tệp không có phụ đề","captions.noVoiceOnTimeline": "Không có clip nào trên dòng thời gian có âm thanh","captions.nothingSaidClip": "Không có lời thoại nào trong đoạn phim đó","captions.nothingToCaptionYet": "Chưa có gì để tạo phụ đề",@@ -25,7 +27,7 @@"captions.oneTitlePerSentence": "Tạo một tiêu đề cho mỗi câu, giữ đủ lâu để người xem đọc, lần lượt trên track đầu tiên còn chỗ.","captions.placement": "Vị trí","captions.readingTheSound": "Đang đọc âm thanh của clip",- "captions.subRipSubtitles": "SubRip subtitles",+ "captions.subRipSubtitles": "Phụ đề SubRip","captions.transcribing": "Đang chuyển đổi","captions.typeWordsPutScreen": "Nhập các từ muốn hiển thị trên màn hình…","captions.useVoiceFromTimeline": "Dùng giọng nói từ dòng thời gian",diff --git a/src/crates/concat/locales/zh-Hans.json b/src/crates/concat/locales/zh-Hans.jsonindex b0f10c80..0239f48f 100644--- a/src/crates/concat/locales/zh-Hans.json+++ b/src/crates/concat/locales/zh-Hans.json@@ -8,16 +8,18 @@"captions.centre": "中心","captions.clipHasNoFile": "此片段没有可转录的文件","captions.clipNoLongerTimeline": "该片段已不在时间线上",- "captions.couldNotReadSubtitles": "Could not read the subtitles: {0}",- "captions.couldNotWriteSubtitles": "Could not write the subtitles: {0}",+ "captions.couldNotPublishSubtitles": "字幕已写入 {0},但无法移动到手机显示文件的位置:{1}",+ "captions.couldNotReadSubtitles": "无法读取字幕:{0}",+ "captions.couldNotWriteSubtitles": "无法写入字幕:{0}","captions.downloadTranscriberModelFirst": "请先在“设置 › 转录器”中下载转录模型。",- "captions.exportSrt": "Export SRT…",- "captions.exportedCaptions": "Wrote {0} captions",+ "captions.exportSrt": "导出 SRT…",+ "captions.exportedBusiestLane": "已从标题最多的轨道将 {0} 条字幕写入 {1}。要写出其他轨道,请先选中该轨道上的一个标题。",+ "captions.exportedCaptions": "已将 {0} 条字幕写入 {1}","captions.generateCaptions": "生成字幕",- "captions.importSrt": "Import SRT…",+ "captions.importSrt": "导入 SRT…","captions.loadingTheModel": "正在加载模型",- "captions.noCaptionsToExport": "No captions on the timeline to export",- "captions.noSubtitlesInFile": "The file has no subtitles",+ "captions.noCaptionsToExport": "时间线上没有可导出的字幕",+ "captions.noSubtitlesInFile": "该文件中没有字幕","captions.noVoiceOnTimeline": "时间线上没有带声音的片段","captions.nothingSaidClip": "该片段中没有语音","captions.nothingToCaptionYet": "暂无可添加字幕的内容",@@ -25,7 +27,7 @@"captions.oneTitlePerSentence": "每句一个标题,停留足够阅读的时长,依次排列在第一条有空位的轨道上。","captions.placement": "位置","captions.readingTheSound": "正在读取片段的声音",- "captions.subRipSubtitles": "SubRip subtitles",+ "captions.subRipSubtitles": "SubRip 字幕","captions.transcribing": "正在转录","captions.typeWordsPutScreen": "输入要显示在屏幕上的文字…","captions.useVoiceFromTimeline": "使用时间线中的语音",diff --git a/src/crates/concat/locales/zh-TW.json b/src/crates/concat/locales/zh-TW.jsonindex c0f8a327..63ef81e9 100644--- a/src/crates/concat/locales/zh-TW.json+++ b/src/crates/concat/locales/zh-TW.json@@ -8,16 +8,18 @@"captions.centre": "中心","captions.clipHasNoFile": "此片段沒有可轉錄的檔案","captions.clipNoLongerTimeline": "該片段已不在時間軸上",- "captions.couldNotReadSubtitles": "Could not read the subtitles: {0}",- "captions.couldNotWriteSubtitles": "Could not write the subtitles: {0}",+ "captions.couldNotPublishSubtitles": "字幕已寫入 {0},但無法移到手機顯示檔案的位置:{1}",+ "captions.couldNotReadSubtitles": "無法讀取字幕:{0}",+ "captions.couldNotWriteSubtitles": "無法寫入字幕:{0}","captions.downloadTranscriberModelFirst": "請先在「設定 › 轉錄器」中下載轉錄模型。",- "captions.exportSrt": "Export SRT…",- "captions.exportedCaptions": "Wrote {0} captions",+ "captions.exportSrt": "匯出 SRT…",+ "captions.exportedBusiestLane": "已從標題最多的軌道將 {0} 則字幕寫入 {1}。若要寫出其他軌道,請先選取該軌道上的一個標題。",+ "captions.exportedCaptions": "已將 {0} 則字幕寫入 {1}","captions.generateCaptions": "產生字幕",- "captions.importSrt": "Import SRT…",+ "captions.importSrt": "匯入 SRT…","captions.loadingTheModel": "正在載入模型",- "captions.noCaptionsToExport": "No captions on the timeline to export",- "captions.noSubtitlesInFile": "The file has no subtitles",+ "captions.noCaptionsToExport": "時間軸上沒有可匯出的字幕",+ "captions.noSubtitlesInFile": "此檔案中沒有字幕","captions.noVoiceOnTimeline": "時間軸上沒有帶聲音的片段","captions.nothingSaidClip": "該片段中沒有語音","captions.nothingToCaptionYet": "尚無可加上字幕的內容",@@ -25,7 +27,7 @@"captions.oneTitlePerSentence": "每句一個標題,停留足夠閱讀的時間,依序排列在第一條有空位的軌道上。","captions.placement": "位置","captions.readingTheSound": "正在讀取片段的聲音",- "captions.subRipSubtitles": "SubRip subtitles",+ "captions.subRipSubtitles": "SubRip 字幕","captions.transcribing": "正在轉錄","captions.typeWordsPutScreen": "輸入要顯示在螢幕上的文字…","captions.useVoiceFromTimeline": "使用時間軸中的語音",diff --git a/src/crates/concat/src/ios.rs b/src/crates/concat/src/ios.rsindex 676ba389..f6b9e50d 100644--- a/src/crates/concat/src/ios.rs+++ b/src/crates/concat/src/ios.rs@@ -35,6 +35,7 @@ use objc2::{MainThreadMarker, MainThreadOnly, class, define_class, msg_send};use objc2_foundation::{NSArray, NSError, NSString, NSURL};use crate::i18n::t;+use crate::platform::PickKinds;#[link(name = "PhotosUI", kind = "framework")]#[link(name = "Photos", kind = "framework")]@@ -73,6 +74,19 @@ type Picked = Box<dyn FnOnce(Vec<PathBuf>) + Send>;/// The pick in flight, waiting for a picker to answer.static PENDING: Mutex<Option<Picked>> = Mutex::new(None);+/// What the pick in flight asked for: media, which comes from Photos or+/// Files, or files by extension - subtitles, fonts - which only Files has.+static WANTED: Mutex<Option<PickKinds>> = Mutex::new(None);++/// What the pick in flight asked for; every kind of media when unsaid.+fn wanted() -> PickKinds {+ WANTED+ .lock()+ .ok()+ .and_then(|slot| slot.clone())+ .unwrap_or_else(|| PickKinds::of(None))+}+thread_local! {/// The pickers' delegate. A view controller holds its delegate weakly,/// so something else has to; one for the life of the app, made on the@@ -84,7 +98,7 @@ thread_local! {/// Installs the iPhone's picker and its export publisher into the window's/// crate. Before the window runs; see `platform::install_file_picker`.pub fn install() {- crate::platform::install_file_picker(Box::new(|on_picked| {+ crate::platform::install_file_picker(Box::new(|kinds, on_picked| {let previous = PENDING.lock().map(|mut slot| slot.replace(on_picked))@@ -95,9 +109,19 @@ pub fn install() {// got nothing rather than left waiting for ever.previous(Vec::new());}+ // Files by extension, and sound, are not in Photos: straight to+ // Files.+ let files_only = match &kinds {+ PickKinds::Files(_) => true,+ PickKinds::Media { video, image, .. } => !video && !image,+ };+ if let Ok(mut slot) = WANTED.lock() {+ *slot = Some(kinds);+ }// `pick_files_async` is called from the event loop, which on iOS// is the main thread; UIKit is not to be touched from any other.let shown = match MainThreadMarker::new() {+ Some(mtm) if files_only => show_files(mtm),Some(mtm) => choose(mtm),None => Err("asked for a picker off the main thread"),};@@ -109,6 +133,7 @@ pub fn install() {crate::platform::install_export_publisher(crate::platform::ExportPublisher {folder: "Photos".into(),publish: Box::new(save_to_photos),+ publish_document: Box::new(|path, _mime| keep_in_exports(path)),});}@@ -302,9 +327,22 @@ fn show_photos(mtm: MainThreadMarker) -> Result<(), &'static str> {let config: Retained<AnyObject> = msg_send![config, init];let _: () = msg_send![&config, setSelectionLimit: 0isize];let _: () = msg_send![&config, setPreferredAssetRepresentationMode: 1isize];- let videos: Retained<AnyObject> = msg_send![class!(PHPickerFilter), videosFilter];- let images: Retained<AnyObject> = msg_send![class!(PHPickerFilter), imagesFilter];- let both = NSArray::from_retained_slice(&[videos, images]);+ // Photos holds videos and pictures; a pick for sound alone never+ // comes here (`install` goes straight to Files for it).+ let (video, image) = match wanted() {+ PickKinds::Media { video, image, .. } => (video, image),+ PickKinds::Files(_) => (false, false),+ };+ let mut filters: Vec<Retained<AnyObject>> = Vec::new();+ if video || !image {+ let videos: Retained<AnyObject> = msg_send![class!(PHPickerFilter), videosFilter];+ filters.push(videos);+ }+ if image || !video {+ let images: Retained<AnyObject> = msg_send![class!(PHPickerFilter), imagesFilter];+ filters.push(images);+ }+ let both = NSArray::from_retained_slice(&filters);let filter: Retained<AnyObject> =msg_send![class!(PHPickerFilter), anyFilterMatchingSubfilters: &*both];let _: () = msg_send![&config, setFilter: &*filter];@@ -318,18 +356,52 @@ fn show_photos(mtm: MainThreadMarker) -> Result<(), &'static str> {Ok(())}-/// The document picker: videos, sounds and pictures from Files - iCloud-/// Drive, the phone, a USB drive, anything a file provider offers. The-/// picker copies each into the app's tmp/ (`asCopy`), so nothing needs a-/// security-scoped bookmark to be read.+/// The document picker: what the pick asked for from Files - iCloud+/// Drive, the phone, a USB drive, anything a file provider offers. Media+/// by its families; anything else - a subtitle, a font - by the type its+/// extension names, which for one the system has never heard of is a+/// type made from the extension, and still matches a file that has it.+/// The picker copies each into the app's tmp/ (`asCopy`), so nothing+/// needs a security-scoped bookmark to be read.fn show_files(mtm: MainThreadMarker) -> Result<(), &'static str> {let top = top_view_controller()?;let delegate = PickDelegate::shared(mtm);// SAFETY: UIKit and UniformTypeIdentifiers on the main thread.unsafe {let mut types = Vec::new();- for identifier in ["public.movie", "public.audio", "public.image"] {- let identifier = NSString::from_str(identifier);+ match wanted() {+ PickKinds::Media {+ video,+ audio,+ image,+ } => {+ for (on, identifier) in [+ (video, "public.movie"),+ (audio, "public.audio"),+ (image, "public.image"),+ ] {+ if !on {+ continue;+ }+ let identifier = NSString::from_str(identifier);+ let kind: Option<Retained<AnyObject>> =+ msg_send![class!(UTType), typeWithIdentifier: &*identifier];+ types.extend(kind);+ }+ }+ PickKinds::Files(extensions) => {+ for extension in extensions {+ let extension = NSString::from_str(&extension);+ let kind: Option<Retained<AnyObject>> =+ msg_send![class!(UTType), typeWithFilenameExtension: &*extension];+ types.extend(kind);+ }+ }+ }+ if types.is_empty() {+ // Nothing the system could name: any file at all, rather than+ // a picker with nothing in it.+ let identifier = NSString::from_str("public.item");let kind: Option<Retained<AnyObject>> =msg_send![class!(UTType), typeWithIdentifier: &*identifier];types.extend(kind);@@ -467,6 +539,30 @@ fn adopt(from: &Path, name: &str) -> Option<PathBuf> {}}+/// Moves a written document - a subtitle file - into Documents/Exports,+/// beside the exported videos, under its own name or `name (2)` where that+/// is taken; and answers with where Files shows it: On My iPhone, Concat,+/// Exports.+fn keep_in_exports(from: &Path) -> Result<String, String> {+ let home = std::env::home_dir().ok_or("no home folder to keep it in")?;+ let dir = home.join("Documents").join("Exports");+ std::fs::create_dir_all(&dir).map_err(|error| error.to_string())?;+ let name = from+ .file_name()+ .map(|name| name.to_string_lossy().into_owned())+ .ok_or("the file has no name")?;+ let to = unique(&dir, &name);+ if std::fs::rename(from, &to).is_err() {+ std::fs::copy(from, &to).map_err(|error| error.to_string())?;+ let _ = std::fs::remove_file(from);+ }+ let kept = to+ .file_name()+ .map(|name| name.to_string_lossy().into_owned())+ .unwrap_or(name);+ Ok(format!("Concat › Exports › {kept}"))+}+/// `name`, or `name (2)`, `name (3)`... until nothing is overwritten.fn unique(dir: &Path, name: &str) -> PathBuf {let first = dir.join(name);diff --git a/src/crates/concat/src/lib.rs b/src/crates/concat/src/lib.rsindex d4973011..c636c2bf 100644--- a/src/crates/concat/src/lib.rs+++ b/src/crates/concat/src/lib.rs@@ -51,7 +51,9 @@ mod platform;/// phone shows it. See `platform::pick_files_async` and/// `platform::publish_export`.#[cfg(any(target_os = "android", target_os = "ios"))]-pub use platform::{ExportPublisher, FilePicker, install_export_publisher, install_file_picker};+pub use platform::{+ ExportPublisher, FilePicker, PickKinds, install_export_publisher, install_file_picker,+};#[cfg(any(target_os = "android", target_os = "ios"))]pub use platform::{MicrophoneAccess, install_microphone_access};mod panes;diff --git a/src/crates/concat/src/panes/captions.rs b/src/crates/concat/src/panes/captions.rsindex daff84a6..3c15f6fc 100644--- a/src/crates/concat/src/panes/captions.rs+++ b/src/crates/concat/src/panes/captions.rs@@ -267,31 +267,36 @@ impl CaptionsPane {studio.notify(&tf("captions.addedCaptions", &[&count]), false);}- /// Asks where to write the captions, offering the project's folder; a- /// phone, with no such dialog, writes them there.+ /// Asks where to write the captions, offering the project's folder+ /// and its name. A phone has no such dialog: the file is written+ /// beside the project under a name nothing there has, and handed to+ /// the phone to put where its file manager shows it.fn ask_export_srt(&mut self, studio: &mut Studio) {- if srt::title_cues(studio.timeline(), export_lane(studio).as_deref()).is_empty() {+ if export_lane(studio).is_none() {self.message = t("captions.noCaptionsToExport");return;}- let Some(folder) = studio+ let name = format!("{}.srt", file_stem(studio));+ // No project, no project folder: Documents, as anywhere else a+ // file is written with nothing better to offer.+ let folder = studio.session.as_ref().map(|session| PathBuf::from(session.path()))- else {+ .unwrap_or_else(|| PathBuf::from(crate::studio::home_folder("Documents")));+ if cfg!(any(target_os = "android", target_os = "ios")) {+ let path = unique_path(&folder, &name);+ self.export_srt(studio, &path);return;- };+ }let title = t("captions.exportSrt");let family = t("captions.subRipSubtitles");crate::host::after_dialog(move || {- if cfg!(any(target_os = "android", target_os = "ios")) {- return Some(folder.join("captions.srt"));- }let chosen = crate::platform::save_file(&title,&folder,- "captions.srt",+ &name,(family.as_str(), &["srt"]),)?;Some(@@ -309,23 +314,61 @@ impl CaptionsPane {);}- /// Writes the captions to `path` as SubRip.+ /// Writes the captions to `path` as SubRip, and says how many and+ /// where - on a phone, once the phone has put the file where it shows+ /// it.fn export_srt(&mut self, studio: &mut Studio, path: &Path) {- let cues = srt::title_cues(studio.timeline(), export_lane(studio).as_deref());- match std::fs::write(path, srt::write(&cues)) {- Ok(()) => {- log::info!(- "captions: wrote {} cue(s) to {}",- cues.len(),- path.display()- );- self.open = false;- studio.notify(&tf("captions.exportedCaptions", &[&cues.len()]), false);- }- Err(error) => {- log::warn!("captions: could not write {}: {error}", path.display());- self.message = tf("captions.couldNotWriteSubtitles", &[&error]);- }+ let Some(lane) = export_lane(studio) else {+ self.message = t("captions.noCaptionsToExport");+ return;+ };+ let cues = srt::title_cues(studio.timeline(), Some(&lane.track_id));+ if let Err(error) = std::fs::write(path, srt::write(&cues)) {+ log::warn!("captions: could not write {}: {error}", path.display());+ self.message = tf("captions.couldNotWriteSubtitles", &[&error]);+ return;+ }+ log::info!(+ "captions: wrote {} cue(s) to {}",+ cues.len(),+ path.display()+ );+ self.open = false;+ let count = cues.len();+ // Which lane was written goes without saying when it was the+ // selected title's, or the only lane with titles; otherwise the+ // notice says it was the busiest, and how to pick another.+ let busiest = lane.busiest && srt::title_lanes(studio.timeline()) > 1;+ let say = move |studio: &mut Studio, place: &str| {+ let key = if busiest {+ "captions.exportedBusiestLane"+ } else {+ "captions.exportedCaptions"+ };+ studio.notify(&tf(key, &[&count, &place]), false);+ };+ let written = path.to_path_buf();+ let handed = crate::platform::publish_document(+ path.to_path_buf(),+ "application/x-subrip",+ move |result| {+ crate::host::on_ui(move |studio, _, _| match result {+ Ok(place) => say(studio, &place),+ Err(error) => {+ log::warn!("captions: could not publish {}: {error}", written.display());+ studio.notify(+ &tf(+ "captions.couldNotPublishSubtitles",+ &[&written.display(), &error],+ ),+ true,+ );+ }+ });+ },+ );+ if !handed {+ say(studio, &path.display().to_string());}}@@ -517,14 +560,78 @@ fn srt_commands(cues: Vec<srt::Cue>, look: (f64, f64), base: Option<&TextStyle>).collect()}+/// The lane an SRT export writes out.+struct ExportLane {+ track_id: String,+ /// Chosen as the lane with the most titles, not by a selected title.+ busiest: bool,+}+/// The lane whose titles are written out as captions: the selected-/// title's, or None - every lane - when no title is selected.-fn export_lane(studio: &Studio) -> Option<String> {- studio+/// title's; or with no title selected, the lane with the most titles -+/// captions come many to a lane, a title card one or two, and nothing+/// else in the document tells them apart (see `srt::busiest_title_lane`).+/// None when the timeline has no title.+fn export_lane(studio: &Studio) -> Option<ExportLane> {+ let selected = studio.sole_selection().and_then(|id| studio.clip(&id)).filter(|clip| clip.kind == ClipKind::Text)- .map(|clip| clip.track_id.clone())+ .map(|clip| clip.track_id.clone());+ match selected {+ Some(track_id) => Some(ExportLane {+ track_id,+ busiest: false,+ }),+ None => srt::busiest_title_lane(studio.timeline()).map(|track_id| ExportLane {+ track_id,+ busiest: true,+ }),+ }+}++/// The name an export is offered under: the project's, as one file name,+/// or "captions" with no project or no usable name.+fn file_stem(studio: &Studio) -> String {+ let name = studio+ .session+ .as_ref()+ .map(|session| session.settings().name)+ .unwrap_or_default();+ let stem: String = name+ .trim()+ .chars()+ .map(|c| {+ if matches!(c, '/' | '\\' | ':' | '*' | '?' | '"' | '<' | '>' | '|') || c.is_control() {+ '_'+ } else {+ c+ }+ })+ .collect();+ let stem = stem.trim_matches(|c: char| c == '.' || c.is_whitespace());+ if stem.is_empty() {+ "captions".to_owned()+ } else {+ stem.to_owned()+ }+}++/// `name` in `dir`, or `name (2)`, `name (3)`... until nothing there is+/// written over.+fn unique_path(dir: &Path, name: &str) -> PathBuf {+ let first = dir.join(name);+ if !first.exists() {+ return first;+ }+ let (stem, ext) = match name.rfind('.') {+ Some(dot) if dot > 0 => (&name[..dot], &name[dot..]),+ _ => (name, ""),+ };+ (2..)+ .map(|n| dir.join(format!("{stem} ({n}){ext}")))+ .find(|path| !path.exists())+ .unwrap_or(first)}/// A clip on the timeline whose voice can be captioned, as the sheet'sdiff --git a/src/crates/concat/src/platform.rs b/src/crates/concat/src/platform.rsindex 0f96af2e..a0fc8764 100644--- a/src/crates/concat/src/platform.rs+++ b/src/crates/concat/src/platform.rs@@ -701,12 +701,90 @@ fn existing_folder(start: &str) -> Option<&std::path::Path> {.find(|folder| folder.is_dir())}-/// What a phone does when asked for files: shows the system's picker and-/// calls back, later, with what was chosen - an empty list for nothing.-/// Installed by the phone's own crate before the window runs; see-/// [`install_file_picker`].+/// What a phone does when asked for files: shows the system's picker for+/// the kinds asked for (see [`PickKinds`]) and calls back, later, with what+/// was chosen - an empty list for nothing. Installed by the phone's own+/// crate before the window runs; see [`install_file_picker`].#[cfg(any(target_os = "android", target_os = "ios"))]-pub type FilePicker = Box<dyn Fn(Box<dyn FnOnce(Vec<PathBuf>) + Send>) + Send + Sync>;+pub type FilePicker = Box<dyn Fn(PickKinds, Box<dyn FnOnce(Vec<PathBuf>) + Send>) + Send + Sync>;++/// What a phone's picker is asked to offer, from the desktop dialog's+/// list of extensions: media - some of video, sound and pictures - which+/// the phone's own pickers know by kind, or files by their extensions+/// (subtitles, fonts), which a phone's providers type so variously that+/// the extensions are all there is to go on.+#[cfg(any(target_os = "android", target_os = "ios", test))]+#[derive(Clone, Debug, PartialEq, Eq)]+pub enum PickKinds {+ /// Media, by kind; every kind when no list was given.+ Media {+ video: bool,+ audio: bool,+ image: bool,+ },+ /// Anything else, by extension, lowercase and without the dot.+ Files(Vec<String>),+}++#[cfg(any(target_os = "android", target_os = "ios", test))]+impl PickKinds {+ /// The kinds a dialog filter's extensions ask for. No filter is every+ /// kind of media, as Import asks.+ pub fn of(extensions: Option<&[&str]>) -> Self {+ let Some(extensions) = extensions.filter(|list| !list.is_empty()) else {+ return PickKinds::Media {+ video: true,+ audio: true,+ image: true,+ };+ };+ let (mut video, mut audio, mut image) = (false, false, false);+ for extension in extensions {+ match media_kind(extension) {+ Some(MediaKind::Video) => video = true,+ Some(MediaKind::Audio) => audio = true,+ Some(MediaKind::Image) => image = true,+ None => {+ return PickKinds::Files(+ extensions+ .iter()+ .map(|ext| ext.to_ascii_lowercase())+ .collect(),+ );+ }+ }+ }+ PickKinds::Media {+ video,+ audio,+ image,+ }+ }+}++#[cfg(any(target_os = "android", target_os = "ios", test))]+enum MediaKind {+ Video,+ Audio,+ Image,+}++#[cfg(any(target_os = "android", target_os = "ios", test))]+/// Which kind of media a file with this extension is, if it is media.+fn media_kind(extension: &str) -> Option<MediaKind> {+ match extension.to_ascii_lowercase().as_str() {+ "mp4" | "mov" | "mkv" | "webm" | "avi" | "m4v" | "mts" | "m2ts" | "3gp" => {+ Some(MediaKind::Video)+ }+ "mp3" | "wav" | "aac" | "m4a" | "flac" | "ogg" | "opus" | "aif" | "aiff" => {+ Some(MediaKind::Audio)+ }+ "png" | "jpg" | "jpeg" | "webp" | "gif" | "bmp" | "tif" | "tiff" | "heic" | "heif" => {+ Some(MediaKind::Image)+ }+ _ => None,+ }+}#[cfg(any(target_os = "android", target_os = "ios"))]static FILE_PICKER: std::sync::OnceLock<FilePicker> = std::sync::OnceLock::new();@@ -732,6 +810,13 @@ pub struct ExportPublisher {/// storage, or with why it could not, leaving the file where it was./// It copies a whole video, so it is called off the window's thread.pub publish: Box<dyn Fn(&std::path::Path) -> Result<String, String> + Send + Sync>,+ /// The same for a small file that is not a video - a subtitle file -+ /// with its MIME type: moved to where the phone's file manager shows+ /// it (Android's Download/Concat, the iPhone's Files), never over+ /// another file, and answered with where, as the person would look+ /// for it.+ pub publish_document:+ Box<dyn Fn(&std::path::Path, &str) -> Result<String, String> + Send + Sync>,}#[cfg(any(target_os = "android", target_os = "ios"))]@@ -818,6 +903,33 @@ pub fn publish_export(}}+/// [`publish_export`] for a document - a subtitle file - of MIME type+/// `mime`: handed to the phone on a thread of its own, `on_done` told+/// where it went or why not. False when there is nothing to hand it to -+/// a desktop, where the file was written where the person chose, or a+/// phone too old to be asked - and `on_done` is never called.+pub fn publish_document(+ path: std::path::PathBuf,+ mime: &'static str,+ on_done: impl FnOnce(Result<String, String>) + Send + 'static,+) -> bool {+ #[cfg(any(target_os = "android", target_os = "ios"))]+ {+ let Some(publisher) = EXPORT_PUBLISHER.get() else {+ return false;+ };+ std::thread::Builder::new()+ .name("document publish".into())+ .spawn(move || on_done((publisher.publish_document)(&path, mime)))+ .is_ok()+ }+ #[cfg(not(any(target_os = "android", target_os = "ios")))]+ {+ let _ = (path, mime, on_done);+ false+ }+}+/// Asks for files and calls `on_picked` with them, on whichever thread the/// platform answers from - the caller hops to the window's thread itself.///@@ -825,7 +937,8 @@ pub fn publish_export(/// returns. On a phone the system's picker is another screen: this returns/// at once and the callback comes when the picker is dismissed, through/// the picker the phone's crate installed. `filter` is the desktop-/// dialog's; a phone's picker offers every kind of media on its own.+/// dialog's; a phone's picker is asked for the same kinds of file, as+/// [`PickKinds`] reads them from it.pub fn pick_files_async(title: &str,filter: Option<(&str, &[&str])>,@@ -839,9 +952,10 @@ pub fn pick_files_async(}#[cfg(any(target_os = "android", target_os = "ios"))]{- let _ = (title, filter);+ let _ = title;+ let kinds = PickKinds::of(filter.map(|(_, extensions)| extensions));match FILE_PICKER.get() {- Some(picker) => picker(Box::new(on_picked)),+ Some(picker) => picker(kinds, Box::new(on_picked)),None => log::warn!("no file picker on this platform yet"),}}@@ -965,4 +1079,34 @@ mod tests {assert_eq!(existing_folder(""), None);std::fs::remove_dir_all(&root).unwrap();}++ /// A phone's picker is asked for what the desktop dialog would show:+ /// media by kind, and subtitles or fonts by their extensions - an+ /// .srt is not media, and a picker that offered only media hid it.+ #[test]+ fn a_phone_picker_is_asked_for_the_dialogs_kinds() {+ let every = PickKinds::Media {+ video: true,+ audio: true,+ image: true,+ };+ assert_eq!(PickKinds::of(None), every);+ assert_eq!(PickKinds::of(Some(&["mp4", "WAV", "png"])), every);+ assert_eq!(+ PickKinds::of(Some(&["mp3", "flac"])),+ PickKinds::Media {+ video: false,+ audio: true,+ image: false,+ }+ );+ assert_eq!(+ PickKinds::of(Some(&["SRT"])),+ PickKinds::Files(vec!["srt".to_owned()])+ );+ assert_eq!(+ PickKinds::of(Some(&["ttf", "otf"])),+ PickKinds::Files(vec!["ttf".to_owned(), "otf".to_owned()])+ );+ }}diff --git a/src/crates/concat/ui/dialogs/captions.slint b/src/crates/concat/ui/dialogs/captions.slintindex b62d4cc7..d82964c8 100644--- a/src/crates/concat/ui/dialogs/captions.slint+++ b/src/crates/concat/ui/dialogs/captions.slint@@ -339,9 +339,9 @@ export component CaptionsDialog inherits Modal {}// Captions as a SubRip file: one read in as titles with the- // look above, timed as the file says; or the timeline's titles- // written out, only the selected title's lane when one is- // selected.+ // look above, timed as the file says; or a lane of titles+ // written out: the selected title's lane, or with none+ // selected the lane with the most titles, the captions'.if !root.data.running: HorizontalLayout {spacing: 8px;