diff --git a/common/kubuno-db/src/schema_admin.rs b/common/kubuno-db/src/schema_admin.rs index 721c0928..ef48c04f 100644 --- a/common/kubuno-db/src/schema_admin.rs +++ b/common/kubuno-db/src/schema_admin.rs @@ -59,21 +59,21 @@ pub enum AdminError { Sqlx(#[from] sqlx::Error), /// A row count mismatch after a copy: the destination did not receive every /// source row, so the caller must not switch the pointer to it. - #[error("copie incomplète de la table {table} : {expected} lignes attendues, {got} copiées")] + #[error("Incomplete copy of table {table}: expected {expected} rows, copied {got}")] RowCountMismatch { table: String, expected: i64, got: i64, }, - #[error("préfixe de schéma invalide : {0}")] + #[error("Invalid schema prefix: {0}")] BadPrefix(String), /// A prefix rename would land on a namespace that already exists - possibly /// another instance's on a shared server. Refused before anything moves. - #[error("le schéma cible {0} existe déjà : renommage refusé pour ne pas mélanger deux instances")] + #[error("Target schema {0} already exists: rename refused to avoid mixing two instances")] TargetExists(String), /// A MySQL database holds views, routines or events, which `RENAME TABLE` /// cannot carry and the final `DROP DATABASE` would destroy. - #[error("la base {schema} contient {count} vue(s), routine(s) ou évènement(s) qu'un renommage ne peut pas déplacer")] + #[error("Database {schema} contains {count} views, routines, or events that a rename cannot move")] UnmovableObjects { schema: String, count: i64 }, /// A type-poor source value could not be reconstructed into the destination /// column's strict logical type. Returned instead of mis-storing, so the copy diff --git a/common/kubuno-mcp/src/lib.rs b/common/kubuno-mcp/src/lib.rs index 0fd21cb8..8dfbac5c 100644 --- a/common/kubuno-mcp/src/lib.rs +++ b/common/kubuno-mcp/src/lib.rs @@ -88,7 +88,7 @@ pub async fn handle_message( let params = msg.get("params").cloned().unwrap_or(Value::Null); let name = params.get("name").and_then(|n| n.as_str()).unwrap_or(""); if name.is_empty() { - return Some(rpc_error(id, -32602, "Paramètre 'name' manquant")); + return Some(rpc_error(id, -32602, "Missing 'name' parameter")); } let args = params.get("arguments").cloned().unwrap_or(json!({})); let res = provider.call_tool(name, args, user_id).await; @@ -98,6 +98,6 @@ pub async fn handle_message( }))) } - other => Some(rpc_error(id, -32601, &format!("Méthode inconnue: {other}"))), + other => Some(rpc_error(id, -32601, &format!("Unknown method: {other}"))), } } diff --git a/common/kubuno-storage/src/backend/local.rs b/common/kubuno-storage/src/backend/local.rs index 51a3b110..13b4709a 100644 --- a/common/kubuno-storage/src/backend/local.rs +++ b/common/kubuno-storage/src/backend/local.rs @@ -35,7 +35,7 @@ impl LocalStorage { if !normalized.starts_with(&canonical_base) { return Err(StorageError::InvalidPath(format!( - "Chemin '{path}' hors de la zone de stockage autorisée" + "Path '{path}' is outside the allowed storage area" ))); } Ok(normalized) diff --git a/common/kubuno-storage/src/backend/s3.rs b/common/kubuno-storage/src/backend/s3.rs index d34cbb1a..d59cac23 100644 --- a/common/kubuno-storage/src/backend/s3.rs +++ b/common/kubuno-storage/src/backend/s3.rs @@ -9,58 +9,58 @@ pub struct S3Storage; #[async_trait] impl StorageBackend for S3Storage { async fn put(&self, _path: &str, _data: Bytes) -> StorageResult<()> { - Err(StorageError::Internal("Backend S3 non configuré".into())) + Err(StorageError::Internal("S3 backend is not configured".into())) } async fn put_stream(&self, _path: &str, _stream: ByteStream, _size_hint: Option) -> StorageResult<()> { - Err(StorageError::Internal("Backend S3 non configuré".into())) + Err(StorageError::Internal("S3 backend is not configured".into())) } async fn get(&self, _path: &str) -> StorageResult { - Err(StorageError::Internal("Backend S3 non configuré".into())) + Err(StorageError::Internal("S3 backend is not configured".into())) } async fn get_stream(&self, _path: &str) -> StorageResult { - Err(StorageError::Internal("Backend S3 non configuré".into())) + Err(StorageError::Internal("S3 backend is not configured".into())) } async fn get_range(&self, _path: &str, _start: u64, _end: u64) -> StorageResult { - Err(StorageError::Internal("Backend S3 non configuré".into())) + Err(StorageError::Internal("S3 backend is not configured".into())) } async fn delete(&self, _path: &str) -> StorageResult<()> { - Err(StorageError::Internal("Backend S3 non configuré".into())) + Err(StorageError::Internal("S3 backend is not configured".into())) } async fn delete_dir(&self, _path: &str) -> StorageResult<()> { - Err(StorageError::Internal("Backend S3 non configuré".into())) + Err(StorageError::Internal("S3 backend is not configured".into())) } async fn exists(&self, _path: &str) -> StorageResult { - Err(StorageError::Internal("Backend S3 non configuré".into())) + Err(StorageError::Internal("S3 backend is not configured".into())) } async fn size(&self, _path: &str) -> StorageResult { - Err(StorageError::Internal("Backend S3 non configuré".into())) + Err(StorageError::Internal("S3 backend is not configured".into())) } async fn list(&self, _prefix: &str) -> StorageResult> { - Err(StorageError::Internal("Backend S3 non configuré".into())) + Err(StorageError::Internal("S3 backend is not configured".into())) } async fn copy(&self, _from: &str, _to: &str) -> StorageResult<()> { - Err(StorageError::Internal("Backend S3 non configuré".into())) + Err(StorageError::Internal("S3 backend is not configured".into())) } async fn init_multipart(&self, _path: &str) -> StorageResult { - Err(StorageError::Internal("Backend S3 non configuré".into())) + Err(StorageError::Internal("S3 backend is not configured".into())) } async fn put_part(&self, _path: &str, _upload_id: &str, _part_number: u32, _data: Bytes) -> StorageResult { - Err(StorageError::Internal("Backend S3 non configuré".into())) + Err(StorageError::Internal("S3 backend is not configured".into())) } async fn complete_multipart(&self, _path: &str, _upload_id: &str, _parts: Vec) -> StorageResult<()> { - Err(StorageError::Internal("Backend S3 non configuré".into())) + Err(StorageError::Internal("S3 backend is not configured".into())) } async fn abort_multipart(&self, _path: &str, _upload_id: &str) -> StorageResult<()> { - Err(StorageError::Internal("Backend S3 non configuré".into())) + Err(StorageError::Internal("S3 backend is not configured".into())) } async fn create_dir(&self, _path: &str) -> StorageResult<()> { // S3 n'a pas de répertoires - no-op Ok(()) } async fn mv_dir(&self, _from: &str, _to: &str) -> StorageResult<()> { - Err(StorageError::Internal("mv_dir non implémenté pour S3".into())) + Err(StorageError::Internal("mv_dir is not implemented for S3".into())) } async fn presign_get(&self, _path: &str, _ttl_seconds: u64) -> StorageResult { - Err(StorageError::Internal("Backend S3 non configuré".into())) + Err(StorageError::Internal("S3 backend is not configured".into())) } } diff --git a/common/kubuno-storage/src/error.rs b/common/kubuno-storage/src/error.rs index 1bf73c37..1017c74b 100644 --- a/common/kubuno-storage/src/error.rs +++ b/common/kubuno-storage/src/error.rs @@ -1,21 +1,21 @@ #[derive(Debug, thiserror::Error)] pub enum StorageError { - #[error("Fichier introuvable: {0}")] + #[error("File not found: {0}")] NotFound(String), - #[error("Chemin invalide: {0}")] + #[error("Invalid path: {0}")] InvalidPath(String), - #[error("Erreur I/O: {0}")] + #[error("I/O error: {0}")] Io(#[from] std::io::Error), - #[error("Erreur S3: {0}")] + #[error("S3 error: {0}")] S3(String), - #[error("Upload multipart introuvable: {0}")] + #[error("Multipart upload not found: {0}")] MultipartNotFound(String), - #[error("Erreur interne: {0}")] + #[error("Internal error: {0}")] Internal(String), } diff --git a/desktop/common/kubuno-desktop-shell-common/src/services/session.rs b/desktop/common/kubuno-desktop-shell-common/src/services/session.rs index 2305fc6f..fb190041 100644 --- a/desktop/common/kubuno-desktop-shell-common/src/services/session.rs +++ b/desktop/common/kubuno-desktop-shell-common/src/services/session.rs @@ -173,10 +173,10 @@ pub fn set_event_handler(handler: impl Fn(AccountEvent) + Send + 'static) { } fn owner() -> Result<(&'static Session, Arc)> { - let session = SESSION.get().ok_or_else(|| anyhow!("les comptes ne sont pas démarrés"))?; + let session = SESSION.get().ok_or_else(|| anyhow!("Accounts have not been started"))?; match &session.mode { Mode::Owner(o) => Ok((session, o.clone())), - Mode::Client => bail!("Kubuno Desktop est déjà ouvert : utilisez sa fenêtre (zone de notification)."), + Mode::Client => bail!("Kubuno Desktop is already open: use its window from the notification area."), } } @@ -196,10 +196,10 @@ fn api_for(server: &str) -> Result { /// A user-facing reason for a failed sign-in (never the server's raw body). fn sign_in_error(e: kubuno_desktop_api_client::ApiError) -> anyhow::Error { match e.status() { - Some(401) | Some(403) => anyhow!("Identifiant, mot de passe ou code incorrect."), - Some(429) => anyhow!("Trop de tentatives : réessayez dans une minute."), - Some(code) => anyhow!("Connexion refusée par le serveur (HTTP {code})."), - None => anyhow!("Serveur injoignable : {e}"), + Some(401) | Some(403) => anyhow!("Incorrect username, password, or code."), + Some(429) => anyhow!("Too many attempts: try again in a minute."), + Some(code) => anyhow!("Sign-in refused by the server (HTTP {code})."), + None => anyhow!("Server unreachable: {e}"), } } @@ -279,10 +279,10 @@ pub enum SignOutOutcome { fn export_dir(instance: &str) -> Result { let base = match paths::sandbox_dir() { Some(s) => s.join("exports"), - None => documents_dir().ok_or_else(|| anyhow!("le dossier Documents est introuvable"))?, + None => documents_dir().ok_or_else(|| anyhow!("The Documents folder was not found"))?, }; let stamp = std::time::SystemTime::now().duration_since(std::time::UNIX_EPOCH).map(|d| d.as_secs()).unwrap_or(0); - Ok(base.join(format!("Kubuno - modifications non envoyées - {instance} - {stamp}"))) + Ok(base.join(format!("Kubuno - unsent changes - {instance} - {stamp}"))) } /// The user's Documents folder, as the platform knows it (`crate::platform::Folders`). diff --git a/desktop/common/kubuno-desktop-sync/src/api.rs b/desktop/common/kubuno-desktop-sync/src/api.rs index 1576dc72..95f038cb 100644 --- a/desktop/common/kubuno-desktop-sync/src/api.rs +++ b/desktop/common/kubuno-desktop-sync/src/api.rs @@ -24,8 +24,8 @@ pub enum AuthFailure { impl std::fmt::Display for AuthFailure { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { - AuthFailure::Genuine => write!(f, "session rejetée - reconnexion nécessaire"), - AuthFailure::Transient => write!(f, "rafraîchissement temporairement indisponible"), + AuthFailure::Genuine => write!(f, "Session rejected: sign in again"), + AuthFailure::Transient => write!(f, "Token refresh is temporarily unavailable"), } } } @@ -468,7 +468,7 @@ impl Api { pub fn delta(&mut self, cursor: i64, limit: i64) -> Result { let resp = self.get(&format!("/api/v1/drive/sync/delta?cursor={cursor}&limit={limit}"))?; if !resp.status().is_success() { - bail!("récupération du delta : HTTP {}", resp.status()); + bail!("Retrieving changes: HTTP {}", resp.status()); } Ok(resp.json()?) } @@ -478,7 +478,7 @@ impl Api { pub fn modules(&mut self) -> Result { let resp = self.get("/api/v1/modules")?; if !resp.status().is_success() { - bail!("récupération des modules : HTTP {}", resp.status()); + bail!("Retrieving modules: HTTP {}", resp.status()); } Ok(resp.json()?) } @@ -519,7 +519,7 @@ impl Api { /// One auto-refresh retry on 401, like the other helpers; transport failures are errors. pub fn request(&mut self, method: &str, path: &str, headers: &[(String, String)], body: Option>) -> Result { let url = format!("{}{}", self.base, path); - let method = reqwest::Method::from_bytes(method.as_bytes()).map_err(|e| anyhow::anyhow!("méthode HTTP invalide : {e}"))?; + let method = reqwest::Method::from_bytes(method.as_bytes()).map_err(|e| anyhow::anyhow!("Invalid HTTP method: {e}"))?; let attempt = |http: &reqwest::blocking::Client, token: &str| { let mut req = http.request(method.clone(), &url).bearer_auth(token); for (k, v) in headers { @@ -573,7 +573,7 @@ impl Api { resp }; if !resp.status().is_success() { - bail!("enregistrement des préférences : HTTP {}", resp.status()); + bail!("Saving preferences: HTTP {}", resp.status()); } Ok(()) } @@ -583,7 +583,7 @@ impl Api { pub fn get_bytes(&mut self, path: &str) -> Result> { let resp = self.get(path)?; if !resp.status().is_success() { - bail!("téléchargement : HTTP {}", resp.status()); + bail!("Download: HTTP {}", resp.status()); } Ok(resp.bytes()?.to_vec()) } @@ -592,7 +592,7 @@ impl Api { pub fn me(&mut self) -> Result<(User, Privileges)> { let resp = self.get("/api/v1/me")?; if !resp.status().is_success() { - bail!("récupération du profil : HTTP {}", resp.status()); + bail!("Retrieving profile: HTTP {}", resp.status()); } let env: MeEnvelope = resp.json()?; Ok((env.user, env.privileges)) @@ -607,7 +607,7 @@ impl Api { } let resp = self.get("/api/v1/labels")?; if !resp.status().is_success() { - bail!("étiquettes : HTTP {}", resp.status()); + bail!("Labels: HTTP {}", resp.status()); } Ok(resp.json::()?.labels) } @@ -625,7 +625,7 @@ impl Api { resp = { let token = self.bearer()?; attempt(&self.http, &token)? }; } if !resp.status().is_success() { - bail!("création d'étiquette : HTTP {}", resp.status()); + bail!("Creating label: HTTP {}", resp.status()); } Ok(()) } @@ -656,7 +656,7 @@ impl Api { resp = { let token = self.bearer()?; attempt(&self.http, &token)? }; } if !resp.status().is_success() { - bail!("modification d'étiquette : HTTP {}", resp.status()); + bail!("Updating label: HTTP {}", resp.status()); } Ok(()) } @@ -673,7 +673,7 @@ impl Api { resp = { let token = self.bearer()?; attempt(&self.http, &token)? }; } if !resp.status().is_success() && resp.status() != reqwest::StatusCode::NOT_FOUND { - bail!("suppression d'étiquette : HTTP {}", resp.status()); + bail!("Deleting label: HTTP {}", resp.status()); } Ok(()) } @@ -730,7 +730,7 @@ impl Api { } let resp = self.get("/api/v1/admin/settings")?; if !resp.status().is_success() { - bail!("paramètres : HTTP {}", resp.status()); + bail!("Settings: HTTP {}", resp.status()); } Ok(resp.json::()?.settings) } @@ -831,7 +831,7 @@ impl Api { } let resp = self.get("/api/v1/admin/org-units")?; if !resp.status().is_success() { - bail!("unités : HTTP {}", resp.status()); + bail!("Organisational units: HTTP {}", resp.status()); } Ok(resp.json::()?.org_units) } @@ -879,7 +879,7 @@ impl Api { pub fn download(&mut self, file_id: &str) -> Result> { let resp = self.get(&format!("/api/v1/drive/{file_id}/download"))?; if !resp.status().is_success() { - bail!("téléchargement {file_id} : HTTP {}", resp.status()); + bail!("Downloading {file_id}: HTTP {}", resp.status()); } Ok(resp.bytes()?.to_vec()) } @@ -980,7 +980,7 @@ impl Api { resp = { let token = self.bearer()?; attempt(&self.http, &token)? }; } if !resp.status().is_success() { - bail!("création dossier '{name}' : HTTP {}", resp.status()); + bail!("Creating folder '{name}': HTTP {}", resp.status()); } let v: serde_json::Value = resp.json()?; let f = &v["folder"]; diff --git a/desktop/common/kubuno-desktop-sync/src/daemon.rs b/desktop/common/kubuno-desktop-sync/src/daemon.rs index a5639d15..939b9677 100644 --- a/desktop/common/kubuno-desktop-sync/src/daemon.rs +++ b/desktop/common/kubuno-desktop-sync/src/daemon.rs @@ -175,16 +175,16 @@ where if p.conflicts > 0 { on_event(id, SyncEvent { kind: "conflict".into(), - title: "Conflit de synchronisation".into(), - body: format!("{} fichier(s) en conflit - une copie a été conservée.", p.conflicts), + title: "Sync conflict".into(), + body: format!("{} conflicting files: a copy was kept.", p.conflicts), }); } let sent = p.uploaded + p.modified + p.deleted; if sent > 0 { on_event(id, SyncEvent { kind: "synced".into(), - title: "Modifications envoyées".into(), - body: format!("{} créé(s), {} modifié(s), {} supprimé(s).", p.uploaded, p.modified, p.deleted), + title: "Changes uploaded".into(), + body: format!("{} created, {} modified, {} deleted.", p.uploaded, p.modified, p.deleted), }); } } @@ -194,7 +194,7 @@ where eprintln!(" push : {e}"); cycle_error = Some(SyncEvent { kind: "error".into(), - title: "Erreur de synchronisation".into(), + title: "Sync error".into(), body: e.to_string(), }); } @@ -207,8 +207,8 @@ where ); on_event(id, SyncEvent { kind: "synced".into(), - title: "Fichiers reçus".into(), - body: format!("{} téléchargé(s), {} dossier(s), {} supprimé(s).", s.downloaded, s.folders, s.deleted), + title: "Files received".into(), + body: format!("{} downloaded, {} folders, {} deleted.", s.downloaded, s.folders, s.deleted), }); } Ok(_) => {} @@ -217,7 +217,7 @@ where eprintln!(" pull : {e}"); cycle_error = Some(SyncEvent { kind: "error".into(), - title: "Erreur de synchronisation".into(), + title: "Sync error".into(), body: e.to_string(), }); } @@ -257,8 +257,8 @@ where tracing::warn!(instance = id, "session expired: file sync paused until the account signs in again"); on_event(id, SyncEvent { kind: "expired".into(), - title: "Session expirée".into(), - body: "La synchronisation est en pause : reconnectez-vous. Vos fichiers locaux sont conservés.".into(), + title: "Session expired".into(), + body: "Sync is paused: sign in again. Your local files are kept.".into(), }); } false diff --git a/desktop/windows/kubuno-desktop-ui/src/color.rs b/desktop/windows/kubuno-desktop-ui/src/color.rs index ea243e82..8735aa57 100644 --- a/desktop/windows/kubuno-desktop-ui/src/color.rs +++ b/desktop/windows/kubuno-desktop-ui/src/color.rs @@ -1899,7 +1899,7 @@ impl SwatchPicker { inner: PanelModel::new(), colors: docs_swatches(), custom: Vec::new(), - custom_label: "Personnalisé".to_string(), + custom_label: "Custom".to_string(), selected: None, hot: None, columns: m::SWATCHES_COLS, @@ -2848,7 +2848,7 @@ impl Widget for GradientPicker { // The two type buttons: `background: active ? C.accent : C.surface`, // `color: active ? '#fff' : C.textDim`, `border: 1px solid C.border`. for (rect, label, on, part) in [ - (g.linear, "Linéaire", self.gradient.kind == GradientKind::Linear, GradientPart::Linear), + (g.linear, "Linear", self.gradient.kind == GradientKind::Linear, GradientPart::Linear), (g.radial, "Radial", self.gradient.kind == GradientKind::Radial, GradientPart::Radial), ] { let fill = if on { t.accent } else { t.surface_2 }; @@ -2925,7 +2925,7 @@ impl Widget for GradientPicker { } let parts = (GradientPart::Opacity, GradientPart::OpacityBox); - self.paint_slider_row(canvas, g.opacity, "Opacité", &self.opacity_slider(), parts, alpha); + self.paint_slider_row(canvas, g.opacity, "Opacity", &self.opacity_slider(), parts, alpha); // « Ajouter un arrêt » - `px-1.5 py-1 text-[10px] rounded`, // `background: C.surface`, `color: C.textDim`, a `Plus size={11}`, `gap-1`. @@ -2934,7 +2934,7 @@ impl Widget for GradientPicker { canvas.vector_icon("Plus", &glyph, m::ICON_SM, &fade(t.text_secondary, alpha)); picker::text( canvas, - "Ajouter un arrêt", + "Add a stop", Rect::new(glyph.right + m::GRID_GAP, g.add.top, g.add.right, g.add.bottom), pm::TEXT_SM, false, diff --git a/desktop/windows/kubuno-desktop-ui/src/color/picker.rs b/desktop/windows/kubuno-desktop-ui/src/color/picker.rs index a125d71f..27e1bb4a 100644 --- a/desktop/windows/kubuno-desktop-ui/src/color/picker.rs +++ b/desktop/windows/kubuno-desktop-ui/src/color/picker.rs @@ -200,11 +200,11 @@ impl Scheme { /// The French fallback label (`FALLBACK_LABELS`), shown as its tooltip. pub fn label(self) -> &'static str { match self { - Self::Comp => "Complémentaire", + Self::Comp => "Complementary", Self::Analog => "Analogues", Self::Triad => "Triade", - Self::Tetrad => "Tétrade", - Self::Split => "Complémentaires divisées", + Self::Tetrad => "Tetradic", + Self::Split => "Split complementary", Self::Mono => "Monochrome", } } @@ -700,7 +700,7 @@ impl ColorPicker { recent: Vec::new(), swatches: picker_swatches(), title: "Couleur".to_string(), - recent_label: "Récemment utilisées".to_string(), + recent_label: "Recently used".to_string(), eyedropper: true, tools: Vec::new(), footer: None, diff --git a/desktop/windows/kubuno-desktop-ui/src/dialogs.rs b/desktop/windows/kubuno-desktop-ui/src/dialogs.rs index 5e1ffcf2..6b70e1af 100644 --- a/desktop/windows/kubuno-desktop-ui/src/dialogs.rs +++ b/desktop/windows/kubuno-desktop-ui/src/dialogs.rs @@ -1179,7 +1179,7 @@ impl ConfirmDialog { let mut window = FloatingWindow::new(title) .modal() .with_width(WIDTH_CONFIRM) - .with_actions(Actions::pair("Confirmer", "Annuler")); + .with_actions(Actions::pair("Confirm", "Cancel")); // `autoFocus: true` on the confirming action: Entrée confirms at once, // and no ring shows until the keyboard moves the focus. window.focus = window.initial_focus(); @@ -1452,7 +1452,7 @@ impl PromptDialog { let mut window = FloatingWindow::new(title) .modal() .with_width(WIDTH_PROMPT) - .with_actions(Actions::pair("OK", "Annuler")); + .with_actions(Actions::pair("OK", "Cancel")); // `el.focus()` on open: the field holds the focus from the start. window.focus = Some(DialogPart::Field); let mut p = Self { @@ -1811,7 +1811,7 @@ impl ConflictDialog { let window = FloatingWindow::new("Conflit de nom") .modal() .with_width(WIDTH_CONFLICT) - .with_actions(Actions::only_cancel("Annuler")); + .with_actions(Actions::only_cancel("Cancel")); let mut d = Self { window, name: name.into(), kind, hot: None }; d.window.focus = d.initial_focus(); d @@ -1856,20 +1856,20 @@ impl ConflictDialog { /// says today and a dialog that says something else is a different dialog. pub fn options(&self) -> [(ConflictChoice, String, String, &'static str); 2] { let folder = self.kind == ConflictKind::Folder; - let first = if folder { "Fusionner" } else { "Écraser" }; + let first = if folder { "Merge" } else { "Overwrite" }; let explain = if folder { - "Les deux dossiers seront fusionnés. Les fichiers en conflit seront remplacés." + "Both folders will be merged. Conflicting files will be replaced." .to_string() } else { - "Le fichier existant sera remplacé par le nouveau.".to_string() + "The existing file will be replaced by the new one.".to_string() }; [ (ConflictChoice::Overwrite, first.to_string(), explain, "Layers"), ( ConflictChoice::KeepBoth, - "Conserver les deux".to_string(), + "Keep both".to_string(), format!( - "Le nouvel élément sera renommé automatiquement (ex. : « {} (2) »).", + "The new item will be renamed automatically (for example, {} (2)).", self.name ), // The lucide `Copy` this row draws on the web is unreachable by @@ -1885,8 +1885,8 @@ impl ConflictDialog { /// The sentence above the options. pub fn message(&self) -> String { - let what = if self.kind == ConflictKind::Folder { "dossier" } else { "fichier" }; - format!("Un {what} nommé « {} » existe déjà à cet emplacement.", self.name) + let what = if self.kind == ConflictKind::Folder { "folder" } else { "file" }; + format!("A {what} named {} already exists in this location.", self.name) } /// The message, wrapped to the body's content width. @@ -3020,14 +3020,14 @@ mod tests { // The body then runs to the bottom edge. assert_eq!(w.body_rect(bounds).bottom, 300.0); - w.actions = Actions::pair("OK", "Annuler"); + w.actions = Actions::pair("OK", "Cancel"); assert_eq!(w.footer_height(), 2.0 * FOOTER_PAD_Y + height::BUTTON_MD); assert_eq!(w.body_rect(bounds).bottom, 300.0 - w.footer_height()); } #[test] fn the_three_bands_tile_the_window_without_a_gap() { - let w = FloatingWindow::new("t").with_actions(Actions::pair("OK", "Annuler")); + let w = FloatingWindow::new("t").with_actions(Actions::pair("OK", "Cancel")); let bounds = Rect::new(100.0, 50.0, 500.0, 400.0); let band = w.titlebar_rect(bounds); let body = w.body_rect(bounds); @@ -3086,10 +3086,10 @@ mod tests { #[test] fn the_actions_are_listed_in_paint_order() { - let a = Actions::pair("Renommer", "Annuler"); + let a = Actions::pair("Rename", "Cancel"); let ids: Vec = a.list().into_iter().map(|(id, _)| id).collect(); assert_eq!(ids, vec![ActionId::Confirm, ActionId::Cancel]); - assert!(Actions::only_cancel("Fermer").confirm.is_none()); + assert!(Actions::only_cancel("Close").confirm.is_none()); assert!(Actions::default().is_empty(), "no actions means no footer"); } @@ -3162,12 +3162,12 @@ mod tests { assert!(d.actions.confirm.as_ref().is_some_and(|a| a.danger)); assert!(d.actions.cancel.as_ref().is_some_and(|a| !a.danger)); - let n = ConfirmDialog::new("Renommer", "…"); + let n = ConfirmDialog::new("Rename", "…"); assert_eq!(n.variant.icon(), "AlertTriangle"); assert!(n.actions.confirm.as_ref().is_some_and(|a| !a.danger)); // …and the pairing survives a label change. - let relabelled = ConfirmDialog::danger("Supprimer", "…").labels("Supprimer", "Annuler"); + let relabelled = ConfirmDialog::danger("Supprimer", "…").labels("Supprimer", "Cancel"); assert!(relabelled.actions.confirm.as_ref().is_some_and(|a| a.danger)); } @@ -3206,7 +3206,7 @@ mod tests { #[test] fn a_prompt_opens_with_its_default_value_selected() { - let p = PromptDialog::new("Renommer").with_value("Rapport.pdf"); + let p = PromptDialog::new("Rename").with_value("Rapport.pdf"); assert_eq!(p.field.text(), "Rapport.pdf"); assert_eq!(p.field.selection_start(), 0); assert_eq!(p.field.selection_length(), "Rapport.pdf".chars().count() as i32); @@ -3216,10 +3216,10 @@ mod tests { fn a_folder_conflict_offers_to_merge_and_a_file_conflict_to_overwrite() { let file = ConflictDialog::new("Rapport.pdf", ConflictKind::File); let folder = ConflictDialog::new("Photos", ConflictKind::Folder); - assert_eq!(file.options()[0].1, "Écraser"); - assert_eq!(folder.options()[0].1, "Fusionner"); - assert!(file.message().contains("fichier")); - assert!(folder.message().contains("dossier")); + assert_eq!(file.options()[0].1, "Overwrite"); + assert_eq!(folder.options()[0].1, "Merge"); + assert!(file.message().contains("file")); + assert!(folder.message().contains("folder")); // The rename hint quotes the name it will rename. assert!(file.options()[1].2.contains("Rapport.pdf (2)")); assert_eq!(file.options()[0].0, ConflictChoice::Overwrite); @@ -3483,7 +3483,7 @@ mod tests { #[test] fn typing_replaces_the_initial_selection_then_appends() { - let mut p = PromptDialog::new("Renommer").with_value("Rapport.pdf"); + let mut p = PromptDialog::new("Rename").with_value("Rapport.pdf"); assert!(p.edit(FieldEdit::Insert("Bilan".into())), "the selected default is replaced"); assert_eq!(p.field.text(), "Bilan"); p.edit(FieldEdit::Insert(" 2026".into())); @@ -3634,7 +3634,7 @@ mod tests { #[test] fn a_toast_lists_its_action_before_its_close() { assert_eq!(Toast::info("x").focus_order(), vec![ToastPart::Close]); - assert_eq!(Toast::info("x").with_action("Annuler").focus_order(), vec![ToastPart::Action, ToastPart::Close]); + assert_eq!(Toast::info("x").with_action("Cancel").focus_order(), vec![ToastPart::Action, ToastPart::Close]); } // ── The trap every family in this crate is tested against ───────────── diff --git a/desktop/windows/kubuno-desktop-ui/src/dock.rs b/desktop/windows/kubuno-desktop-ui/src/dock.rs index 76bd49b7..a31130a9 100644 --- a/desktop/windows/kubuno-desktop-ui/src/dock.rs +++ b/desktop/windows/kubuno-desktop-ui/src/dock.rs @@ -809,17 +809,17 @@ pub struct DockStrings { impl Default for DockStrings { fn default() -> Self { Self { - float: "Détacher (flottant)".into(), - dock_left: "Ancrer à gauche".into(), - dock_right: "Ancrer à droite".into(), - close_panel: "Fermer le panneau".into(), - reset: "Réinitialiser la disposition".into(), - close: "Fermer".into(), - roll: "Enrouler".into(), - unroll: "Dérouler".into(), - maximize: "Agrandir".into(), - restore: "Restaurer".into(), - reopen: "Panneaux fermés".into(), + float: "Undock (floating)".into(), + dock_left: "Dock left".into(), + dock_right: "Dock right".into(), + close_panel: "Close panel".into(), + reset: "Reset layout".into(), + close: "Close".into(), + roll: "Roll up".into(), + unroll: "Unroll".into(), + maximize: "Maximize".into(), + restore: "Restore".into(), + reopen: "Closed panels".into(), } } } diff --git a/desktop/windows/kubuno-desktop-ui/src/editors.rs b/desktop/windows/kubuno-desktop-ui/src/editors.rs index bbbeb85c..3a786d2e 100644 --- a/desktop/windows/kubuno-desktop-ui/src/editors.rs +++ b/desktop/windows/kubuno-desktop-ui/src/editors.rs @@ -2260,7 +2260,7 @@ impl FontPicker { let is_recent = |f: &str| self.recent.iter().any(|r| r.eq_ignore_ascii_case(f)); let recent: Vec<&String> = self.inner.items.iter().filter(|f| is_recent(f)).collect(); if !recent.is_empty() { - rows.push(FontRow::Header("Récentes")); + rows.push(FontRow::Header("Recent")); for f in recent { push(&mut rows, &mut seen, f); } @@ -2903,7 +2903,7 @@ impl FontPicker { c.pop_clip(); if rows.is_empty() { // `Aucune police pour « {q} »`, centred. - let text = format!("Aucune police pour « {} »", self.query.trim()); + let text = format!("No fonts for {}", self.query.trim()); let r = Rect::new(list.left + font_metrics::EMPTY_PAD_H, list.top, list.right - font_metrics::EMPTY_PAD_H, list.bottom); c.push_clip(&r); c.text_ellipsis_center(&text, &r, &f.caption, &t.text_tertiary); @@ -2938,7 +2938,7 @@ impl FontPicker { } /// The search box's placeholder, verbatim. -const SEARCH_PLACEHOLDER: &str = "Rechercher une police…"; +const SEARCH_PLACEHOLDER: &str = "Search fonts..."; /// The clear button's label, verbatim (`aria-label="Effacer la recherche"`). const CLEAR_LABEL: &str = "Effacer"; @@ -3671,17 +3671,17 @@ impl RichTextCommand { /// The `title` / `aria-label` the web gives the button, verbatim. pub const fn label(self) -> &'static str { match self { - Self::Bold => "Gras", - Self::Italic => "Italique", - Self::Underline => "Souligné", - Self::OrderedList => "Liste numérotée", - Self::BulletList => "Liste à puces", - Self::Link => "Insérer un lien", - Self::ClearFormat => "Effacer la mise en forme", - Self::AlignLeft => "Aligner à gauche", - Self::AlignCenter => "Centrer", - Self::AlignRight => "Aligner à droite", - Self::AlignJustify => "Justifier", + Self::Bold => "Bold", + Self::Italic => "Italic", + Self::Underline => "Underline", + Self::OrderedList => "Numbered list", + Self::BulletList => "Bulleted list", + Self::Link => "Insert link", + Self::ClearFormat => "Clear formatting", + Self::AlignLeft => "Align left", + Self::AlignCenter => "Center", + Self::AlignRight => "Align right", + Self::AlignJustify => "Justify", } } @@ -4358,7 +4358,7 @@ mod tests { assert_eq!( rows, vec![ - FontRow::Header("Récentes"), + FontRow::Header("Recent"), FontRow::Option { font: "Verdana".into(), index: 0 }, FontRow::Header("Sans Serif"), FontRow::Option { font: "Arial".into(), index: 1 }, @@ -4783,9 +4783,9 @@ mod tests { assert!(!e.editing); e.begin_edit(); - e.type_text("Nouveau"); + e.type_text("New"); assert_eq!(e.key_down(vk::ENTER, Modifiers::NONE), EditKey::Committed); - assert_eq!(e.text(), "Nouveau"); + assert_eq!(e.text(), "New"); assert!(!e.editing); // Read-only: the caret moves, the text does not change. @@ -4793,7 +4793,7 @@ mod tests { e.begin_edit(); assert!(!e.type_text("x")); assert_eq!(e.key_down(vk::BACK, Modifiers::NONE), EditKey::Moved); - assert_eq!(e.text(), "Nouveau"); + assert_eq!(e.text(), "New"); } #[test] @@ -4951,7 +4951,7 @@ mod tests { assert_eq!(bar.key_down(vk::ENTER, Modifiers::NONE), ToolbarKey::Activated(0)); assert!(bar.is_active(RichTextCommand::Bold)); assert_eq!(bar.key_down(vk::TAB, Modifiers::NONE), ToolbarKey::Ignored); - assert_eq!(bar.tooltip_of(0), Some("Gras")); + assert_eq!(bar.tooltip_of(0), Some("Bold")); assert_eq!(bar.tooltip_of(3), None, "a rule has no title"); assert_eq!(bar.command_at(5), Some(RichTextCommand::BulletList)); } diff --git a/desktop/windows/kubuno-desktop-ui/src/ribbon.rs b/desktop/windows/kubuno-desktop-ui/src/ribbon.rs index 94accdac..cf3842b6 100644 --- a/desktop/windows/kubuno-desktop-ui/src/ribbon.rs +++ b/desktop/windows/kubuno-desktop-ui/src/ribbon.rs @@ -2244,12 +2244,12 @@ impl Default for RibbonTexts { fn default() -> Self { Self { automatic: "Automatique".into(), - theme_colors: "Couleurs du thème".into(), - qat_add: "Ajouter à la barre d'outils Accès rapide".into(), - qat_remove: "Supprimer de la barre d'outils Accès rapide".into(), + theme_colors: "Theme colors".into(), + qat_add: "Add to Quick Access Toolbar".into(), + qat_remove: "Remove from Quick Access Toolbar".into(), more: "Plus".into(), - scroll_up: "Ligne précédente".into(), - scroll_down: "Ligne suivante".into(), + scroll_up: "Previous row".into(), + scroll_down: "Next row".into(), launcher: "Plus d'options".into(), } } @@ -2283,8 +2283,8 @@ impl Ribbon { tabs, theme, strip_actions: Vec::new(), - collapse_label: "Réduire le ruban (Ctrl+F1)".to_string(), - expand_label: "Développer le ruban (Ctrl+F1)".to_string(), + collapse_label: "Collapse ribbon (Ctrl+F1)".to_string(), + expand_label: "Expand ribbon (Ctrl+F1)".to_string(), owns_caption: true, qat_position: QatPosition::InTabStrip, display_mode: DisplayMode::Classic, @@ -4245,7 +4245,7 @@ mod tests { #[test] fn wide_items_take_a_column_of_their_own() { let items = vec![ - RibbonItem::button("paste", "Coller", "ClipboardPaste").large(), + RibbonItem::button("paste", "Paste", "ClipboardPaste").large(), small("cut"), small("copy"), RibbonItem::dropdown("font", vec![RibbonOption::new("a", "A")], "a", 120.0), @@ -4256,9 +4256,9 @@ mod tests { #[test] fn the_tooltip_joins_label_and_shortcut() { - let it = RibbonItem::button("copy", "Copier", "Copy").shortcut("Ctrl+C"); + let it = RibbonItem::button("copy", "Copy", "Copy").shortcut("Ctrl+C"); assert_eq!(it.tip_text().as_deref(), Some("Copier · Ctrl+C")); - let it = RibbonItem::button("copy", "Copier", "Copy").tooltip("Copier la sélection"); + let it = RibbonItem::button("copy", "Copy", "Copy").tooltip("Copier la sélection"); assert_eq!(it.tip_text().as_deref(), Some("Copier la sélection")); } @@ -4279,8 +4279,8 @@ mod tests { fn an_idle_design_frame_is_stable_and_asks_for_no_repaint() { use crate::graphics::testing::RecordingCanvas; let tabs = vec![ - RibbonTab::file("file", "Fichier"), - RibbonTab::new("home", "Accueil", vec![RibbonGroup::new("clip", "Presse-papiers", vec![RibbonItem::button("paste", "Coller", "ClipboardPaste").large(), RibbonItem::button("cut", "Couper", "Scissors")])]), + RibbonTab::file("file", "File"), + RibbonTab::new("home", "Accueil", vec![RibbonGroup::new("clip", "Presse-papiers", vec![RibbonItem::button("paste", "Paste", "ClipboardPaste").large(), RibbonItem::button("cut", "Cut", "Scissors")])]), RibbonTab::new("pic", "Image", vec![]).contextual(hex(0xb7472a), false), ]; let mut r = Ribbon::new(tabs, RibbonTheme::default()); @@ -4316,7 +4316,7 @@ mod tests { #[test] fn a_new_contextual_tab_takes_the_focus_and_its_loss_falls_back() { let tabs = vec![ - RibbonTab::file("file", "Fichier"), + RibbonTab::file("file", "File"), RibbonTab::new("home", "Accueil", vec![]), RibbonTab::new("pic", "Image", vec![]).contextual(hex(0xb7472a), false), ]; diff --git a/desktop/windows/kubuno-desktop-ui/src/splash/art.rs b/desktop/windows/kubuno-desktop-ui/src/splash/art.rs index ac994539..19c51093 100644 --- a/desktop/windows/kubuno-desktop-ui/src/splash/art.rs +++ b/desktop/windows/kubuno-desktop-ui/src/splash/art.rs @@ -105,9 +105,9 @@ impl Artwork { /// Its default tagline. pub fn tagline(self) -> &'static str { match self { - Artwork::Kubuno => "Votre cloud souverain, à portée de bureau.", - Artwork::Drive => "Vos fichiers, partout, synchronisés chez vous.", - Artwork::Chat => "Messages et réunions, sans intermédiaire.", + Artwork::Kubuno => "Your sovereign cloud, right on your desktop.", + Artwork::Drive => "Your files everywhere, synced on your own server.", + Artwork::Chat => "Messages and meetings, directly connected.", Artwork::Documents => "Écrire, mettre en page, partager.", } } diff --git a/desktop/windows/kubuno-desktop-ui/src/splash/mod.rs b/desktop/windows/kubuno-desktop-ui/src/splash/mod.rs index ac78e2e2..7124dcf4 100644 --- a/desktop/windows/kubuno-desktop-ui/src/splash/mod.rs +++ b/desktop/windows/kubuno-desktop-ui/src/splash/mod.rs @@ -93,7 +93,7 @@ impl SplashContent { product: artwork.product().to_string(), version: String::new(), tagline: artwork.tagline().to_string(), - status: format!("Démarrage de {}…", artwork.product()), + status: format!("Starting {}...", artwork.product()), progress: None, legal: legal_line("AGPL-3.0-or-later"), credits: DEFAULT_CREDITS.to_string(), @@ -109,7 +109,7 @@ impl SplashContent { } /// The credits line every application shows unless it sets its own. -pub const DEFAULT_CREDITS: &str = "Logiciel libre et auto-hébergé, conçu par la communauté Kubuno."; +pub const DEFAULT_CREDITS: &str = "Free, self-hosted software built by the Kubuno community."; /// « © Kubuno contributors · ». pub fn legal_line(license: &str) -> String { @@ -307,7 +307,7 @@ impl SplashScreen { /// The artwork, and with it the default product name and tagline (set them after). pub fn artwork(mut self, artwork: Artwork) -> Self { - let status_default = self.content.status == format!("Démarrage de {}…", self.content.product); + let status_default = self.content.status == format!("Starting {}...", self.content.product); if self.content.product == self.content.artwork.product() { self.content.product = artwork.product().to_string(); } @@ -316,17 +316,17 @@ impl SplashScreen { } self.content.artwork = artwork; if status_default { - self.content.status = format!("Démarrage de {}…", self.content.product); + self.content.status = format!("Starting {}...", self.content.product); } self } /// The product name, « Kubuno Drive ». pub fn product(mut self, name: impl Into) -> Self { - let status_default = self.content.status == format!("Démarrage de {}…", self.content.product); + let status_default = self.content.status == format!("Starting {}...", self.content.product); self.content.product = name.into(); if status_default { - self.content.status = format!("Démarrage de {}…", self.content.product); + self.content.status = format!("Starting {}...", self.content.product); } self } diff --git a/desktop/windows/kubuno-desktop-ui/src/splash/tests.rs b/desktop/windows/kubuno-desktop-ui/src/splash/tests.rs index 71d4ef67..f79837eb 100644 --- a/desktop/windows/kubuno-desktop-ui/src/splash/tests.rs +++ b/desktop/windows/kubuno-desktop-ui/src/splash/tests.rs @@ -32,11 +32,11 @@ fn the_legal_line_names_the_licence() { fn the_builder_follows_the_artwork_until_told_otherwise() { let s = SplashScreen::new().artwork(Artwork::Chat); assert_eq!(s.content().product, "Kubuno Chat"); - assert_eq!(s.content().status, "Démarrage de Kubuno Chat…"); + assert_eq!(s.content().status, "Starting Kubuno Chat..."); assert_eq!(s.content().tagline, Artwork::Chat.tagline()); let s = SplashScreen::new().product("Kubuno Messagerie").artwork(Artwork::Chat).version("1.2.3").build("1.2.3-5.g0ff1ce").license("MIT"); assert_eq!(s.content().product, "Kubuno Messagerie", "a product set by hand is kept"); - assert_eq!(s.content().status, "Démarrage de Kubuno Messagerie…"); + assert_eq!(s.content().status, "Starting Kubuno Messagerie..."); assert_eq!(s.content().version, "Version 1.2.3 · build 5.g0ff1ce"); assert_eq!(s.content().legal, "© Kubuno contributors · MIT"); let s = SplashScreen::new().status("Préparation…").artwork(Artwork::Drive); diff --git a/desktop/windows/kubuno-desktop-ui/src/splash/window.rs b/desktop/windows/kubuno-desktop-ui/src/splash/window.rs index e00c20fe..2ec7dad5 100644 --- a/desktop/windows/kubuno-desktop-ui/src/splash/window.rs +++ b/desktop/windows/kubuno-desktop-ui/src/splash/window.rs @@ -613,7 +613,7 @@ fn access_tree(content: &SplashContent, scale: f32) -> TreeUpdate { status.set_live(Live::Polite); status.set_bounds(bounds(l.status)); let mut progress = Node::new(Role::ProgressIndicator); - progress.set_label("Progression du démarrage"); + progress.set_label("Startup progress"); progress.set_bounds(bounds(l.progress)); if let Some(p) = content.progress { progress.set_min_numeric_value(0.0); diff --git a/desktop/windows/kubuno-desktop-ui/src/tables.rs b/desktop/windows/kubuno-desktop-ui/src/tables.rs index 37d20905..79e5467b 100644 --- a/desktop/windows/kubuno-desktop-ui/src/tables.rs +++ b/desktop/windows/kubuno-desktop-ui/src/tables.rs @@ -893,26 +893,26 @@ pub struct Wording { impl Default for Wording { fn default() -> Self { Self { - selected: "en sélection".into(), - columns: "Colonnes".into(), - rows_per_page: "Lignes par page".into(), - copy_cell: "Copier cette cellule".into(), - copy_row: "Copier cette ligne".into(), - copy_column: "Copier la colonne « {name} »".into(), + selected: "selected".into(), + columns: "Columns".into(), + rows_per_page: "Rows per page".into(), + copy_cell: "Copy this cell".into(), + copy_row: "Copy this row".into(), + copy_column: "Copy column {name}".into(), empty: EmptyWording::new( - "Rien pour l’instant", - "Les éléments que vous ajouterez apparaîtront dans ce tableau.", + "Nothing yet", + "Items you add will appear in this table.", None, ), no_results: EmptyWording::new( - "Aucun résultat", - "Aucune ligne ne correspond aux filtres actifs.", - Some("Effacer les filtres"), + "No results", + "No rows match the active filters.", + Some("Clear filters"), ), error: EmptyWording::new( - "Chargement impossible", - "La requête a échoué. Vérifiez la connexion, puis réessayez.", - Some("Réessayer"), + "Could not load", + "The request failed. Check your connection and try again.", + Some("Retry"), ), } } diff --git a/desktop/windows/kubuno-desktop-ui/src/workspace.rs b/desktop/windows/kubuno-desktop-ui/src/workspace.rs index 0dc09849..c4d6f718 100644 --- a/desktop/windows/kubuno-desktop-ui/src/workspace.rs +++ b/desktop/windows/kubuno-desktop-ui/src/workspace.rs @@ -254,38 +254,38 @@ pub struct WorkspaceMenuActions { pub fn build_workspace_menus(a: &WorkspaceMenuActions, extra: Vec) -> Vec { let act = |id: &str, label: &str, on: bool| WsMenuItem::action(id, label).enabled(on); let file = vec![ - act("ws.new", a.new_label.as_deref().unwrap_or("Nouveau"), a.new).shortcut("Ctrl+N"), - act("ws.open", "Ouvrir", a.open).shortcut("Ctrl+O"), - act("ws.duplicate", "Créer une copie", a.duplicate), + act("ws.new", a.new_label.as_deref().unwrap_or("New"), a.new).shortcut("Ctrl+N"), + act("ws.open", "Open", a.open).shortcut("Ctrl+O"), + act("ws.duplicate", "Create a copy", a.duplicate), WsMenuItem::Separator, if a.download_items.is_empty() { - act("ws.download", "Télécharger", false) + act("ws.download", "Download", false) } else { - WsMenuItem::Submenu { label: "Télécharger".into(), items: a.download_items.clone() } + WsMenuItem::Submenu { label: "Download".into(), items: a.download_items.clone() } }, - act("ws.rename", "Renommer", a.rename), - act("ws.trash", "Mettre à la corbeille", a.trash), + act("ws.rename", "Rename", a.rename), + act("ws.trash", "Move to trash", a.trash), WsMenuItem::Separator, - act("ws.details", a.details_label.as_deref().unwrap_or("Détails"), a.details), + act("ws.details", a.details_label.as_deref().unwrap_or("Details"), a.details), ]; let edit = vec![ - act("ws.undo", "Annuler", a.undo && a.can_undo).shortcut("Ctrl+Z"), - act("ws.redo", "Rétablir", a.redo && a.can_redo).shortcut("Ctrl+Shift+Z"), + act("ws.undo", "Undo", a.undo && a.can_undo).shortcut("Ctrl+Z"), + act("ws.redo", "Redo", a.redo && a.can_redo).shortcut("Ctrl+Shift+Z"), WsMenuItem::Separator, - act("ws.cut", "Couper", a.cut).shortcut("Ctrl+X"), - act("ws.copy", "Copier", a.copy).shortcut("Ctrl+C"), - act("ws.paste", "Coller", a.paste).shortcut("Ctrl+V"), + act("ws.cut", "Cut", a.cut).shortcut("Ctrl+X"), + act("ws.copy", "Copy", a.copy).shortcut("Ctrl+C"), + act("ws.paste", "Paste", a.paste).shortcut("Ctrl+V"), WsMenuItem::Separator, - act("ws.find_replace", "Rechercher et remplacer", a.find_replace).shortcut("Ctrl+H"), + act("ws.find_replace", "Find and replace", a.find_replace).shortcut("Ctrl+H"), ]; - let view = vec![WsMenuItem::action("ws.fullscreen", "Plein écran").shortcut("F11")]; + let view = vec![WsMenuItem::action("ws.fullscreen", "Full screen").shortcut("F11")]; let help = vec![ - WsMenuItem::action("ws.help", "Aide en ligne"), + WsMenuItem::action("ws.help", "Online help"), WsMenuItem::action("ws.forum", "Forum"), WsMenuItem::Separator, - WsMenuItem::action("ws.about", "À propos"), + WsMenuItem::action("ws.about", "About"), ]; - let mut out = vec![WsMenu::new("Fichier", file), WsMenu::new("Édition", edit), WsMenu::new("Affichage", view)]; + let mut out = vec![WsMenu::new("File", file), WsMenu::new("Edit", edit), WsMenu::new("View", view)]; out.extend(extra); out.push(WsMenu::new("Aide", help)); out @@ -820,7 +820,7 @@ mod tests { fn standard_menus_follow_the_web_order_and_grey_missing_actions() { let menus = build_workspace_menus(&WorkspaceMenuActions { undo: true, can_undo: true, ..Default::default() }, vec![WsMenu::new("Insertion", vec![])]); let labels: Vec<&str> = menus.iter().map(|m| m.label.as_str()).collect(); - assert_eq!(labels, ["Fichier", "Édition", "Affichage", "Insertion", "Aide"]); + assert_eq!(labels, ["File", "Edit", "View", "Insertion", "Aide"]); let enabled = |m: &WsMenu, id: &str| { m.items.iter().find_map(|i| match i { WsMenuItem::Action { id: x, enabled, .. } if x == id => Some(*enabled), diff --git a/mobile/android/core-ui/src/main/res/values-fr/strings.xml b/mobile/android/core-ui/src/main/res/values-fr/strings.xml new file mode 100644 index 00000000..1da79de3 --- /dev/null +++ b/mobile/android/core-ui/src/main/res/values-fr/strings.xml @@ -0,0 +1,33 @@ + + + Menu + Rechercher + Rechercher… + Effacer + Retour + Notifications + Paramètres + Kubuno + + Ajouter un compte + Gérer les comptes sur cet appareil + Se déconnecter + Fermer + Bonjour %1$s ! + Gérer votre compte + + + 1 modification non synchronisée + %1$d modifications non synchronisées + Nouvel essai automatique en cours. + Le serveur en a refusé : réessayez ou abandonnez-les. + Détails + Modifications non synchronisées + Tout est synchronisé. + Réessayer + Abandonner + Refusée par le serveur + Pas encore synchronisée, nouvel essai automatique + Abandonner cette modification ? + « %1$s » ne sera jamais envoyée au serveur et la modification locale sera annulée. + diff --git a/mobile/android/core-ui/src/main/res/values/strings.xml b/mobile/android/core-ui/src/main/res/values/strings.xml index 1da79de3..e9bb954b 100644 --- a/mobile/android/core-ui/src/main/res/values/strings.xml +++ b/mobile/android/core-ui/src/main/res/values/strings.xml @@ -1,33 +1,33 @@ Menu - Rechercher - Rechercher… - Effacer - Retour + Search + Search… + Clear + Back Notifications - Paramètres + Settings Kubuno - Ajouter un compte - Gérer les comptes sur cet appareil - Se déconnecter - Fermer - Bonjour %1$s ! - Gérer votre compte + Add an account + Manage accounts on this device + Sign out + Close + Hello %1$s! + Manage your account - 1 modification non synchronisée - %1$d modifications non synchronisées - Nouvel essai automatique en cours. - Le serveur en a refusé : réessayez ou abandonnez-les. - Détails - Modifications non synchronisées - Tout est synchronisé. - Réessayer - Abandonner - Refusée par le serveur - Pas encore synchronisée, nouvel essai automatique - Abandonner cette modification ? - « %1$s » ne sera jamais envoyée au serveur et la modification locale sera annulée. + 1 unsynced change + %1$d unsynced changes + An automatic retry is in progress. + The server rejected some changes. Retry or discard them. + Details + Unsynced changes + Everything is synced. + Retry + Discard + Rejected by the server + Not synced yet; retrying automatically + Discard this change? + “%1$s” will never be sent to the server, and the local change will be undone. diff --git a/mobile/android/core-viewer/src/main/kotlin/com/kubuno/android/viewer/FileViewer.kt b/mobile/android/core-viewer/src/main/kotlin/com/kubuno/android/viewer/FileViewer.kt index 839502e7..fe12fdea 100644 --- a/mobile/android/core-viewer/src/main/kotlin/com/kubuno/android/viewer/FileViewer.kt +++ b/mobile/android/core-viewer/src/main/kotlin/com/kubuno/android/viewer/FileViewer.kt @@ -30,6 +30,7 @@ import androidx.compose.runtime.setValue import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier import androidx.compose.ui.graphics.Color +import androidx.compose.ui.res.stringResource import androidx.compose.ui.text.font.FontWeight import androidx.compose.ui.text.style.TextOverflow import androidx.compose.ui.unit.dp @@ -104,7 +105,7 @@ fun FileViewer( .padding(horizontal = 4.dp), verticalAlignment = Alignment.CenterVertically, ) { - BarIcon(Icons.Outlined.Close, "Fermer", onClose) + BarIcon(Icons.Outlined.Close, stringResource(R.string.viewer_close), onClose) Column(Modifier.weight(1f).padding(horizontal = 4.dp)) { Text( current.name, @@ -122,10 +123,10 @@ fun FileViewer( } } if (previewKind(current.name, current.mime) == ViewerKind.TEXT) { - BarIcon(Icons.AutoMirrored.Outlined.WrapText, "Retour à la ligne") { wrap = !wrap } + BarIcon(Icons.AutoMirrored.Outlined.WrapText, stringResource(R.string.viewer_wrap)) { wrap = !wrap } } - BarIcon(Icons.Outlined.OpenInNew, "Ouvrir avec") { onOpenExternally(pager.currentPage) } - BarIcon(Icons.Outlined.FileDownload, "Télécharger") { onDownload(pager.currentPage) } + BarIcon(Icons.Outlined.OpenInNew, stringResource(R.string.viewer_open_with)) { onOpenExternally(pager.currentPage) } + BarIcon(Icons.Outlined.FileDownload, stringResource(R.string.viewer_download)) { onDownload(pager.currentPage) } } } } @@ -195,13 +196,13 @@ private fun Unsupported( modifier = Modifier.size(48.dp), ) Text( - if (failed) "Aperçu indisponible" else "Ce type de fichier ne peut pas être affiché", + stringResource(if (failed) R.string.viewer_preview_unavailable else R.string.viewer_unsupported), color = Color.White.copy(alpha = 0.85f), modifier = Modifier.padding(top = 12.dp), ) Row(Modifier.padding(top = 16.dp)) { BarIcon(Icons.Outlined.OpenInNew, "Ouvrir avec", onOpenExternally) - BarIcon(Icons.Outlined.FileDownload, "Télécharger", onDownload) + BarIcon(Icons.Outlined.FileDownload, stringResource(R.string.viewer_download), onDownload) } } } diff --git a/mobile/android/core-viewer/src/main/res/values-fr/strings.xml b/mobile/android/core-viewer/src/main/res/values-fr/strings.xml new file mode 100644 index 00000000..59f6df6f --- /dev/null +++ b/mobile/android/core-viewer/src/main/res/values-fr/strings.xml @@ -0,0 +1,9 @@ + + + Fermer + Retour à la ligne + Ouvrir avec + Télécharger + Aperçu indisponible + Ce type de fichier ne peut pas être affiché + diff --git a/mobile/android/core-viewer/src/main/res/values/strings.xml b/mobile/android/core-viewer/src/main/res/values/strings.xml new file mode 100644 index 00000000..43056799 --- /dev/null +++ b/mobile/android/core-viewer/src/main/res/values/strings.xml @@ -0,0 +1,9 @@ + + + Close + Word wrap + Open with + Download + Preview unavailable + This file type cannot be displayed + diff --git a/mobile/common/kubuno-mobile-render/src/views/home.kbview b/mobile/common/kubuno-mobile-render/src/views/home.kbview index d61201a8..a87c1fa8 100644 --- a/mobile/common/kubuno-mobile-render/src/views/home.kbview +++ b/mobile/common/kubuno-mobile-render/src/views/home.kbview @@ -12,6 +12,6 @@