From 2a627cff6ea239288fc793471035c4037ea45afd Mon Sep 17 00:00:00 2001 From: DWAA1660 Date: Sat, 5 Dec 2026 09:56:20 -0700 Subject: [PATCH] fix(storage): honor platform notebook folder defaults --- android/src/activity.rs | 1 + crates/store/src/settings.lnx.rs | 88 ++++++++++++++++++ crates/store/src/settings.rs | 19 +++- crates/ui-egui/src/app.rs | 33 ++++++- crates/ui-egui/src/browse.rs | 134 ++++++++++++++++++++++++---- docs/gaps.md | 2 + i18n/ar-XB.tsv | 1 + i18n/ar.tsv | 1 + i18n/de.tsv | 1 + i18n/en-XA.tsv | 1 + i18n/en.tsv | 1 + i18n/es.tsv | 1 + i18n/fa.tsv | 1 + i18n/fr.tsv | 1 + i18n/he.tsv | 1 + i18n/hi.tsv | 1 + i18n/ja.tsv | 1 + i18n/ko.tsv | 1 + i18n/nl.tsv | 1 + i18n/ru.tsv | 1 + i18n/tr.tsv | 1 + i18n/ur.tsv | 1 + i18n/zh.tsv | 1 + packaging/installation artifacts.md | 2 +- 24 files changed, 275 insertions(+), 21 deletions(-) create mode 100644 crates/store/src/settings.lnx.rs diff --git a/android/src/activity.rs b/android/src/activity.rs index b291cf0d..3ad0a197 100644 --- a/android/src/activity.rs +++ b/android/src/activity.rs @@ -70,6 +70,7 @@ fn run(app: AndroidApp) -> Result<(), String> { notecraft_ui_egui::java::start_keyboard_waker(cc.egui_ctx.clone()); let setup_payload: PathBuf = payload.clone(); let mut app = NoteCraftApp::new(session) + .with_default_notebooks_root(layout.notebooks) .with_welcome_notebook_setup(move |notebooks_root, format| { notecraft_setup::install_edition(&setup_payload, notebooks_root, format).map_err(|error| error.to_string()) }) diff --git a/crates/store/src/settings.lnx.rs b/crates/store/src/settings.lnx.rs new file mode 100644 index 00000000..cb6447d8 --- /dev/null +++ b/crates/store/src/settings.lnx.rs @@ -0,0 +1,88 @@ +//! Linux's per-user notebook default (issue #705). + +use std::path::{Path, PathBuf}; + +pub(super) fn notebooks_dir(home: &Path, config_home: Option<&Path>) -> PathBuf { + let config = config_home.filter(|path| path.is_absolute()).map_or_else(|| home.join(".config"), Path::to_path_buf); + std::fs::read_to_string(config.join("user-dirs.dirs")) + .ok() + .and_then(|settings| documents_dir(&settings, home)) + .map_or_else(|| super::default_notebooks_dir_for_home(home), |documents| documents.join("NoteCraft")) +} + +fn documents_dir(settings: &str, home: &Path) -> Option { + let value = settings.lines().find_map(|line| { + let (key, value) = line.split_once('=')?; + (key.trim() == "XDG_DOCUMENTS_DIR").then_some(value.trim()) + })?; + let quoted = value.strip_prefix('"')?; + let relative = quoted.strip_prefix("$HOME/").or_else(|| quoted.strip_prefix("$HOME").filter(|rest| rest.starts_with('"'))); + let path = quoted_path(relative.unwrap_or(quoted))?; + if relative.is_some() { + return Some(home.join(path.trim_start_matches('/'))); + } + path.starts_with('/').then(|| PathBuf::from(path)) +} + +// XDG writes double-quoted shell assignments. Decode the path as data and expand only the +// documented leading $HOME, without running the file or expanding other shell expressions. +fn quoted_path(value: &str) -> Option { + let mut chars = value.chars(); + let mut path = String::new(); + while let Some(c) = chars.next() { + match c { + '"' => { + let tail = chars.as_str().trim_start(); + return (tail.is_empty() || tail.starts_with('#')).then_some(path); + } + '\\' => { + let escaped = chars.next()?; + if !matches!(escaped, '\\' | '"' | '$' | '`') { + path.push('\\'); + } + path.push(escaped); + } + '$' | '`' => return None, + _ => path.push(c), + } + } + None +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn linux_notebook_default_falls_back_for_missing_or_invalid_config() { + let tmp = crate::testing::TempDir::new("xdg-fallback"); + let home = tmp.path(); + let config = home.join(".config"); + assert_eq!(notebooks_dir(home, None), home.join("Documents").join("NoteCraft")); + std::fs::create_dir(&config).expect("config folder"); + let file = config.join("user-dirs.dirs"); + std::fs::write(&file, "XDG_DOCUMENTS_DIR=\"relative/folder\"\n").expect("invalid value"); + assert_eq!(notebooks_dir(home, None), home.join("Documents").join("NoteCraft")); + std::fs::write(&file, "XDG_DOCUMENTS_DIR=\"$HOME/Docs\"\n").expect("documents folder"); + assert_eq!(notebooks_dir(home, Some(Path::new("relative"))), home.join("Docs").join("NoteCraft")); + } + + #[test] + fn xdg_value_accepts_absolute_paths_and_literals() { + let home = Path::new("/home/user"); + let settings = r#"XDG_DOCUMENTS_DIR="/media/My \$avings" # mounted disk"#; + assert_eq!(documents_dir(settings, home), Some(PathBuf::from("/media/My $avings"))); + assert_eq!(documents_dir(r#"XDG_DOCUMENTS_DIR="$HOME""#, home), Some(home.to_path_buf())); + assert_eq!(documents_dir(r#"XDG_DOCUMENTS_DIR="$HOME/$(other)""#, home), None); + } + + #[test] + fn linux_notebook_default_uses_xdg_documents() { + let tmp = crate::testing::TempDir::new("xdg-notebooks"); + let home = tmp.path(); + let config = home.join("config"); + std::fs::create_dir(&config).expect("config folder"); + std::fs::write(config.join("user-dirs.dirs"), "XDG_DOCUMENTS_DIR=\"$HOME/Documentos compartidos\"\n").expect("XDG config"); + assert_eq!(notebooks_dir(home, Some(&config)), home.join("Documentos compartidos").join("NoteCraft")); + } +} diff --git a/crates/store/src/settings.rs b/crates/store/src/settings.rs index d5f3ff74..8ae4e86e 100644 --- a/crates/store/src/settings.rs +++ b/crates/store/src/settings.rs @@ -5,6 +5,10 @@ use crate::error::{Result, StoreError}; use notecraft_model::{PageFormat, kv}; use std::path::{Path, PathBuf}; +#[cfg(any(target_os = "linux", test))] +#[path = "settings.lnx.rs"] +mod linux; + /// Where the format for a new page came from. #[derive(Clone, Copy, Debug, PartialEq, Eq)] pub enum FormatSource { @@ -29,13 +33,22 @@ impl FormatSource { } } -/// The default notebooks folder: `NOTECRAFT_NOTEBOOKS`, else `Documents/NoteCraft` in the home folder. +/// The default notebooks folder: `NOTECRAFT_NOTEBOOKS`, or `NoteCraft` in the user's Documents folder. pub fn default_notebooks_dir() -> PathBuf { if let Some(p) = std::env::var_os("NOTECRAFT_NOTEBOOKS") { return PathBuf::from(p); } - let home = std::env::var_os("USERPROFILE").or_else(|| std::env::var_os("HOME")).map(PathBuf::from).unwrap_or_else(|| PathBuf::from(".")); - default_notebooks_dir_for_home(home) + #[cfg(target_os = "linux")] + { + let home = std::env::var_os("HOME").map(PathBuf::from).unwrap_or_else(|| PathBuf::from(".")); + let config = std::env::var_os("XDG_CONFIG_HOME").map(PathBuf::from); + linux::notebooks_dir(&home, config.as_deref()) + } + #[cfg(not(target_os = "linux"))] + { + let home = std::env::var_os("USERPROFILE").or_else(|| std::env::var_os("HOME")).map(PathBuf::from).unwrap_or_else(|| PathBuf::from(".")); + default_notebooks_dir_for_home(home) + } } /// The notebooks folder this build starts with: the development folder in a debug build, and the diff --git a/crates/ui-egui/src/app.rs b/crates/ui-egui/src/app.rs index a2445de2..02372013 100644 --- a/crates/ui-egui/src/app.rs +++ b/crates/ui-egui/src/app.rs @@ -1981,6 +1981,7 @@ pub struct NoteCraftApp { #[cfg(feature = "voice")] voice: voice::VoiceUi, session: Session, + host_default_notebooks_root: Option, /// Writes autosaves off the window's thread (see [`crate::saver`]). saver: crate::saver::Saver, /// The name File > Account keeps, which every save notes in the page it changed (issues @@ -2420,6 +2421,7 @@ impl NoteCraftApp { saver.set_author(author_name.clone()); NoteCraftApp { session, + host_default_notebooks_root: None, saver, author_name, hide_authors, @@ -2942,11 +2944,17 @@ impl NoteCraftApp { self.session.settings.set("last_notebooks_root", &value).map_err(|error| error.to_string()) } + /// Sets the reset destination for hosts that supply their own startup notebooks folder. + pub fn with_default_notebooks_root(mut self, root: PathBuf) -> Self { + self.host_default_notebooks_root = Some(root); + self + } + fn choose_default_notebooks_folder(&mut self) { // The dialog opens where the notebooks are now, not in Documents. if cfg!(target_os = "android") { let root = self.session.root().to_path_buf(); - self.browse(crate::tl_id!("ui.choose_the_notebooks_folder"), crate::browse::Want::Folder, Some(&root), Picked::NotebooksRoot); + self.browse(crate::tl_id!("ui.choose_the_notebooks_folder"), crate::browse::Want::NotebooksRoot, Some(&root), Picked::NotebooksRoot); return; } let Some(picked) = pick_notebooks_folder(self.session.root()) else { @@ -2958,7 +2966,9 @@ impl NoteCraftApp { /// Moves NoteCraft to the chosen notebooks folder now, or to the default folder for this build /// when `folder` is None, and remembers the choice for the next start. fn apply_notebooks_root_choice(&mut self, folder: Option<&std::path::Path>) { - let target = folder.map_or_else(notecraft_store::settings::build_default_notebooks_dir, std::path::Path::to_path_buf); + let target = folder + .or(self.host_default_notebooks_root.as_deref()) + .map_or_else(notecraft_store::settings::build_default_notebooks_dir, Path::to_path_buf); if let Err(error) = self.save_notebooks_root(folder) { let message = crate::i18n::format_message_id("ui.could_not_save_the_notebooks_folder_error", &[("error", &error)]); self.complain(&message); @@ -19672,6 +19682,25 @@ mod alert_tests { assert!(app.dialog.is_none(), "PrivacyWelcome dialog should not show after being dismissed"); } + #[test] + fn resetting_the_notebooks_folder_returns_to_the_hosts_startup_default() { + let tmp = notecraft_store::testing::TempDir::new("host-notebooks-default"); + let settings = notecraft_store::Settings::at(tmp.path().join("settings.toml")); + settings.set("privacy_welcome_seen", "true").expect("settings"); + let default = tmp.path().join("app-specific").join("NoteCraft"); + let custom = tmp.path().join("custom"); + let session = Session::new(&default, settings.clone()).expect("session"); + let mut app = NoteCraftApp::new(session).with_default_notebooks_root(default.clone()); + app.apply_notebooks_root_choice(Some(&custom)); + std::fs::write(custom.join("keep.txt"), "keep").expect("custom folder is in use"); + + app.apply_notebooks_root_choice(None); + + assert_eq!(app.session().root(), std::fs::canonicalize(&default).expect("canonical default")); + assert_eq!(settings.get("last_notebooks_root").as_deref(), Some("")); + assert_eq!(std::fs::read_to_string(custom.join("keep.txt")).expect("custom data"), "keep"); + } + #[test] fn choosing_a_notebooks_folder_moves_to_it_now() { let t = notecraft_store::testing::TempDir::new("notebooks-folder-choice"); diff --git a/crates/ui-egui/src/browse.rs b/crates/ui-egui/src/browse.rs index 92ba7af9..f93cd852 100644 --- a/crates/ui-egui/src/browse.rs +++ b/crates/ui-egui/src/browse.rs @@ -6,7 +6,7 @@ //! those folders can be read directly, so the window lists them itself: the phone's storage, an //! SD card, a folder Syncthing or a cloud app keeps in step. //! -//! The browser only lists and chooses. What happens with the choice is the caller's +//! The browser also creates folders when choosing the notebooks location. What happens with the choice is the caller's //! (`app.rs`, `Picked`). It is drawn the same everywhere; only Android opens it, where the //! desktop has its system dialogs. @@ -19,6 +19,8 @@ use std::path::{Path, PathBuf}; pub enum Want { /// A folder: the one being shown is chosen with "Use this folder". Folder, + /// Choose a notebooks folder, with the option to create a subfolder first. + NotebooksRoot, /// A file with one of these extensions (any file when empty): tapping it chooses it. File(Vec), /// Only to look at a folder's contents, as "Show notebooks folder" does on the desktop. @@ -48,6 +50,12 @@ struct Entry { folder: bool, } +#[derive(Clone, Debug, Default)] +struct NewFolder { + name: String, + error: Option, +} + /// One browser, open on one folder. #[derive(Clone, Debug)] pub struct Browser { @@ -57,11 +65,12 @@ pub struct Browser { dir: PathBuf, entries: Vec, error: Option, + new_folder: Option, } impl Browser { pub fn new(title: impl Into, want: Want, start: &Path, places: Vec) -> Browser { - let mut browser = Browser { title: title.into(), want, places, dir: PathBuf::new(), entries: Vec::new(), error: None }; + let mut browser = Browser { title: title.into(), want, places, dir: PathBuf::new(), entries: Vec::new(), error: None, new_folder: None }; browser.open(start); browser } @@ -83,6 +92,7 @@ impl Browser { /// Shows another folder. pub fn open(&mut self, dir: &Path) { + self.new_folder = None; self.dir = dir.to_path_buf(); self.reload(); } @@ -123,7 +133,7 @@ impl Browser { fn shows_file(&self, path: &Path) -> bool { match &self.want { - Want::Folder => false, + Want::Folder | Want::NotebooksRoot => false, Want::Show => true, Want::File(extensions) => { extensions.is_empty() @@ -181,25 +191,78 @@ impl Browser { } } }); - ui.add_space(10.0); - ui.horizontal(|ui| { - let close = if self.want == Want::Show { crate::tl_id!("ui.close") } else { crate::tl_id!("ui.cancel") }; - if crate::app::modal_button(ui, tokens, close, false).clicked() { - outcome = Some(Outcome::Cancelled); - } - if self.want == Want::Folder - && crate::app::modal_button_enabled(ui, tokens, crate::tl_id!("ui.browse_use_this_folder"), true, self.error.is_none()).clicked() - { - outcome = Some(Outcome::Chosen(self.dir.clone())); - } - }); if up { self.up(); } else if let Some(dir) = go { self.open(&dir); } + ui.add_space(10.0); + let mut focus_name = false; + if self.new_folder.is_none() { + ui.horizontal_wrapped(|ui| { + let close = if self.want == Want::Show { crate::tl_id!("ui.close") } else { crate::tl_id!("ui.cancel") }; + if crate::app::modal_button(ui, tokens, close, false).clicked() { + outcome = Some(Outcome::Cancelled); + } + if self.want == Want::NotebooksRoot + && crate::app::modal_button_enabled(ui, tokens, crate::tl_id!("ui.browse_new_folder"), false, self.error.is_none()).clicked() + { + self.new_folder = Some(NewFolder::default()); + focus_name = true; + } + if matches!(self.want, Want::Folder | Want::NotebooksRoot) + && crate::app::modal_button_enabled(ui, tokens, crate::tl_id!("ui.browse_use_this_folder"), true, self.error.is_none()).clicked() + { + outcome = Some(Outcome::Chosen(self.dir.clone())); + } + }); + } + self.new_folder_ui(ui, tokens, focus_name); outcome } + + fn new_folder_ui(&mut self, ui: &mut Ui, tokens: &Tokens, focus_name: bool) { + let Some(form) = self.new_folder.as_mut() else { return }; + let label = ui.label(crate::tl_id!("ui.name_2")); + let field_id = ui.make_persistent_id("new-notebooks-folder-name"); + let field = ui.add(egui::TextEdit::singleline(&mut form.name).id(field_id)).labelled_by(label.id); + if focus_name { + field.request_focus(); + } + if field.changed() { + form.error = None; + } + if let Some(error) = &form.error { + let message = crate::i18n::format_message_id("ui.could_not_complete_the_action_error", &[("error", error)]); + ui.label(RichText::new(message).color(tokens.warn)); + } + let name = form.name.trim(); + let mut create = field.lost_focus() && ui.input(|i| i.key_pressed(egui::Key::Enter)); + let mut cancel = false; + ui.horizontal_wrapped(|ui| { + cancel = crate::app::modal_button(ui, tokens, crate::tl_id!("ui.cancel"), false).clicked(); + create |= crate::app::modal_button_enabled(ui, tokens, crate::tl_id!("ui.create"), true, !name.is_empty()).clicked(); + }); + if cancel { + self.new_folder = None; + } else if create && !name.is_empty() { + match create_child_folder(&self.dir, name) { + Ok(folder) => self.open(&folder), + Err(error) => form.error = Some(error), + } + } + } +} + +fn create_child_folder(parent: &Path, name: &str) -> Result { + notecraft_model::names::validate_component(name)?; + // The browser omits hidden folders, so do not create one that cannot be picked again. + if name.starts_with('.') { + return Err(std::io::Error::from(std::io::ErrorKind::InvalidInput).to_string()); + } + let folder = parent.join(name); + std::fs::create_dir(&folder).map_err(|error| error.to_string())?; + Ok(folder) } #[cfg(test)] @@ -217,6 +280,47 @@ mod tests { root } + #[test] + fn notebooks_folder_picker_creates_and_selects_a_new_folder() { + use egui_kittest::kittest::Queryable as _; + + let root = tree(); + let browser = Browser::new("Notebooks", Want::NotebooksRoot, root.path(), Vec::new()); + let tokens = crate::theme::Theme::DEFAULT.tokens(); + let mut harness = egui_kittest::Harness::builder().with_accessibility_check(false).build_ui_state( + |ui, (browser, outcome): &mut (Browser, Option)| { + if let Some(picked) = browser.ui(ui, &tokens, false) { + *outcome = Some(picked); + } + }, + (browser, None), + ); + harness.get_by_label("New Folder").click(); + harness.run(); + + harness.input_mut().events.push(egui::Event::Text("My notes".to_owned())); + harness.run(); + assert_eq!(harness.state().0.new_folder.as_ref().expect("new-folder form").name, "My notes"); + harness.get_by_label("Create").click(); + harness.run(); + let created = root.path().join("My notes"); + assert!(created.is_dir()); + assert_eq!(harness.state().0.dir(), created); + assert!(harness.state().1.is_none(), "creation opens the new folder without choosing it"); + harness.get_by_label("Use this folder").click(); + harness.run(); + assert_eq!(harness.state().1, Some(Outcome::Chosen(created))); + } + + #[test] + fn folder_creation_rejects_paths_and_existing_folders() { + let root = tree(); + for name in ["../outside", "work/nested", ".private", "Notebook B"] { + assert!(create_child_folder(root.path(), name).is_err(), "{name}"); + } + assert_eq!(std::fs::read_dir(root.path()).expect("read parent").count(), 6); + } + #[test] fn a_folder_browser_lists_folders_only_sorted_and_without_hidden_ones() { let root = tree(); diff --git a/docs/gaps.md b/docs/gaps.md index 694813ee..a59ee9d1 100644 --- a/docs/gaps.md +++ b/docs/gaps.md @@ -38,6 +38,8 @@ built by the Packaging workflow. What it does not do yet, each said in the windo permission (8 to 10), which the browser asks for. Saving to a chosen place (a picture, a PDF, diagnostics, a backup or copy folder) still shows "Android cannot show this file dialog yet". Android's own pickers return `content://` addresses, which NoteCraft cannot read as folders. + Change notebooks folder can create a subfolder before choosing it. Use the default notebooks + folder returns to the app-specific location used at startup (issue #725). - **The system clipboard holds text and HTML** (issue #671), through the Java activity. Pictures can be pasted from it, not copied to it. Ctrl shortcuts from a hardware keyboard depend on the vendored winit's modifier report, which was not tried on a device. diff --git a/i18n/ar-XB.tsv b/i18n/ar-XB.tsv index bb97d71f..419fc14e 100644 --- a/i18n/ar-XB.tsv +++ b/i18n/ar-XB.tsv @@ -2234,3 +2234,4 @@ @id ui.ink_to_math_language [[RLI]]$$$Reads handwritten letters, digits and signs on this computer. Write fractions, roots and other layouts in TeX. Nothing is uploaded.@@@[[PDI]] @id ui.attach_page_changed [[RLI]]$$$Another page was opened before the file was added. Open the page and add the file again.@@@[[PDI]] @id ui.search_in_handwriting [[RLI]]$$$In handwriting: {words}@@@[[PDI]] +@id ui.browse_new_folder [[RLI]]$$$New Folder@@@[[PDI]] diff --git a/i18n/ar.tsv b/i18n/ar.tsv index e94e9992..f37f68bc 100644 --- a/i18n/ar.tsv +++ b/i18n/ar.tsv @@ -853,3 +853,4 @@ @id ui.template_arabesque_page أرابيسك @id ui.template_arabesque_edge_ltr_page أرابيسك (edge) @id ui.template_arabesque_edge_rtl_page أرابيسك (edge, RTL) +@id ui.browse_new_folder مجلد جديد diff --git a/i18n/de.tsv b/i18n/de.tsv index eb4367a0..8d9b5475 100644 --- a/i18n/de.tsv +++ b/i18n/de.tsv @@ -849,3 +849,4 @@ @id ui.template_arabesque_page Arabeske @id ui.template_arabesque_edge_ltr_page Arabeske (edge) @id ui.template_arabesque_edge_rtl_page Arabeske (edge, RTL) +@id ui.browse_new_folder Neuer Ordner diff --git a/i18n/en-XA.tsv b/i18n/en-XA.tsv index bb9060e6..be2a820e 100644 --- a/i18n/en-XA.tsv +++ b/i18n/en-XA.tsv @@ -2234,3 +2234,4 @@ @id ui.ink_to_math_language $$$Reads handwritten letters, digits and signs on this computer. Write fractions, roots and other layouts in TeX. Nothing is uploaded.@@@ @id ui.attach_page_changed $$$Another page was opened before the file was added. Open the page and add the file again.@@@ @id ui.search_in_handwriting $$$In handwriting: {words}@@@ +@id ui.browse_new_folder $$$New Folder@@@ diff --git a/i18n/en.tsv b/i18n/en.tsv index 7ada3aa3..c0b7c7a4 100644 --- a/i18n/en.tsv +++ b/i18n/en.tsv @@ -2234,3 +2234,4 @@ @id ui.ink_to_math_language Reads handwritten letters, digits and signs on this computer. Write fractions, roots and other layouts in TeX. Nothing is uploaded. @id ui.attach_page_changed Another page was opened before the file was added. Open the page and add the file again. @id ui.search_in_handwriting In handwriting: {words} +@id ui.browse_new_folder New Folder diff --git a/i18n/es.tsv b/i18n/es.tsv index 193f44ae..57c5c02f 100644 --- a/i18n/es.tsv +++ b/i18n/es.tsv @@ -849,3 +849,4 @@ @id ui.template_arabesque_page Arabesco @id ui.template_arabesque_edge_ltr_page Arabesco (edge) @id ui.template_arabesque_edge_rtl_page Arabesco (edge, RTL) +@id ui.browse_new_folder Nueva carpeta diff --git a/i18n/fa.tsv b/i18n/fa.tsv index 646c08e3..7e651313 100644 --- a/i18n/fa.tsv +++ b/i18n/fa.tsv @@ -849,3 +849,4 @@ @id ui.template_arabesque_page آرابسک @id ui.template_arabesque_edge_ltr_page آرابسک (edge) @id ui.template_arabesque_edge_rtl_page آرابسک (edge, RTL) +@id ui.browse_new_folder پوشهٔ جدید diff --git a/i18n/fr.tsv b/i18n/fr.tsv index ecf459f4..d84d7020 100644 --- a/i18n/fr.tsv +++ b/i18n/fr.tsv @@ -849,3 +849,4 @@ @id ui.template_arabesque_page Arabesque @id ui.template_arabesque_edge_ltr_page Arabesque (edge) @id ui.template_arabesque_edge_rtl_page Arabesque (edge, RTL) +@id ui.browse_new_folder Nouveau dossier diff --git a/i18n/he.tsv b/i18n/he.tsv index 8e893c1f..0bbdfa1b 100644 --- a/i18n/he.tsv +++ b/i18n/he.tsv @@ -849,3 +849,4 @@ @id ui.template_arabesque_page ארבסקה @id ui.template_arabesque_edge_ltr_page ארבסקה (edge) @id ui.template_arabesque_edge_rtl_page ארבסקה (edge, RTL) +@id ui.browse_new_folder תיקייה חדשה diff --git a/i18n/hi.tsv b/i18n/hi.tsv index d69c978e..68932705 100644 --- a/i18n/hi.tsv +++ b/i18n/hi.tsv @@ -849,3 +849,4 @@ @id ui.template_arabesque_page अरबेस्क @id ui.template_arabesque_edge_ltr_page अरबेस्क (edge) @id ui.template_arabesque_edge_rtl_page अरबेस्क (edge, RTL) +@id ui.browse_new_folder नया फ़ोल्डर diff --git a/i18n/ja.tsv b/i18n/ja.tsv index 841b976e..8b211110 100644 --- a/i18n/ja.tsv +++ b/i18n/ja.tsv @@ -849,3 +849,4 @@ @id ui.template_arabesque_page アラベスク @id ui.template_arabesque_edge_ltr_page アラベスク (edge) @id ui.template_arabesque_edge_rtl_page アラベスク (edge, RTL) +@id ui.browse_new_folder 新しいフォルダー diff --git a/i18n/ko.tsv b/i18n/ko.tsv index aacd2293..72a46c4c 100644 --- a/i18n/ko.tsv +++ b/i18n/ko.tsv @@ -849,3 +849,4 @@ @id ui.template_arabesque_page 아라베스크 @id ui.template_arabesque_edge_ltr_page 아라베스크 (edge) @id ui.template_arabesque_edge_rtl_page 아라베스크 (edge, RTL) +@id ui.browse_new_folder 새 폴더 diff --git a/i18n/nl.tsv b/i18n/nl.tsv index d04b3150..e76fff90 100644 --- a/i18n/nl.tsv +++ b/i18n/nl.tsv @@ -2234,3 +2234,4 @@ @id ui.ink_to_math_language Leest op deze computer handgeschreven letters, cijfers en tekens. Schrijf breuken, wortels en andere indelingen in TeX. Er wordt niets geüpload. @id ui.attach_page_changed Er is een andere pagina geopend voordat het bestand werd toegevoegd. Open de pagina en voeg het bestand opnieuw toe. @id ui.search_in_handwriting In handschrift: {words} +@id ui.browse_new_folder Nieuwe map diff --git a/i18n/ru.tsv b/i18n/ru.tsv index ffb41790..6207eede 100644 --- a/i18n/ru.tsv +++ b/i18n/ru.tsv @@ -849,3 +849,4 @@ @id ui.template_arabesque_page Арабеска @id ui.template_arabesque_edge_ltr_page Арабеска (edge) @id ui.template_arabesque_edge_rtl_page Арабеска (edge, RTL) +@id ui.browse_new_folder Новая папка diff --git a/i18n/tr.tsv b/i18n/tr.tsv index 04c3495c..e3de02bb 100644 --- a/i18n/tr.tsv +++ b/i18n/tr.tsv @@ -1445,3 +1445,4 @@ @id ui.template_arabesque_page Arabesk @id ui.template_arabesque_edge_ltr_page Arabesk (edge) @id ui.template_arabesque_edge_rtl_page Arabesk (edge, RTL) +@id ui.browse_new_folder Yeni klasör diff --git a/i18n/ur.tsv b/i18n/ur.tsv index c6f5e49e..9beca834 100644 --- a/i18n/ur.tsv +++ b/i18n/ur.tsv @@ -849,3 +849,4 @@ @id ui.template_arabesque_page عربیسک @id ui.template_arabesque_edge_ltr_page عربیسک (edge) @id ui.template_arabesque_edge_rtl_page عربیسک (edge, RTL) +@id ui.browse_new_folder نیا فولڈر diff --git a/i18n/zh.tsv b/i18n/zh.tsv index 0e3e3705..31db6594 100644 --- a/i18n/zh.tsv +++ b/i18n/zh.tsv @@ -852,3 +852,4 @@ @id ui.template_arabesque_page 阿拉伯花纹 @id ui.template_arabesque_edge_ltr_page 阿拉伯花纹 (edge) @id ui.template_arabesque_edge_rtl_page 阿拉伯花纹 (edge, RTL) +@id ui.browse_new_folder 新建文件夹 diff --git a/packaging/installation artifacts.md b/packaging/installation artifacts.md index e83aadbc..19859fe3 100644 --- a/packaging/installation artifacts.md +++ b/packaging/installation artifacts.md @@ -65,7 +65,7 @@ do not guess a home or storage path when the platform provides an API. |---|---|---|---| | Website demo | Browser app (JavaScript and WebAssembly) | `/NoteCraft/welcome-to-notecraft`, containing HTML and CMGFM | Browser prompt must ask before copying from the two-format archive | | Windows | Normal per-machine or per-user app location | Current user's Documents/NoteCraft/welcome-to-notecraft | First-use wizard copies the chosen edition from the package's bundled source after Yes | -| Linux | Normal package or portable-app location | Current user's Documents/NoteCraft/welcome-to-notecraft | First-use wizard copies the chosen edition from the package's bundled source after Yes | +| Linux | Normal package or portable-app location | Current user's XDG Documents folder, under NoteCraft/welcome-to-notecraft | First-use wizard copies the chosen edition from the package's bundled source after Yes | | macOS | `NoteCraft.app` copied to Applications | Current user's Documents/NoteCraft/welcome-to-notecraft | First-use wizard copies the chosen edition from app resources after Yes | | Android | Installed APK application package | App-specific external files/NoteCraft/welcome-to-notecraft | APK startup must ask before copying the asset formats |