Compare commits
4 Commits
5e1bebdbd5
...
56672964b3
| Author | SHA1 | Date |
|---|---|---|
|
|
56672964b3 | |
|
|
621d9d3d51 | |
|
|
92e3466d47 | |
|
|
9ca908e88d |
|
|
@ -2245,7 +2245,7 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "pdf-presenter"
|
||||
version = "0.1.91"
|
||||
version = "0.1.95"
|
||||
dependencies = [
|
||||
"bytemuck",
|
||||
"chrono",
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ default-members = ["crates/pdf-presenter"]
|
|||
resolver = "3"
|
||||
|
||||
[workspace.package]
|
||||
version = "0.1.91"
|
||||
version = "0.1.95"
|
||||
edition = "2024"
|
||||
license = "MIT"
|
||||
repository = "https://proxy.dandaedre.com/gitea/idle-org/pdf-presenter"
|
||||
|
|
|
|||
|
|
@ -45,6 +45,7 @@ slow document operation does not have to freeze navigation.
|
|||
| **Notes that belong to the presentation** | Read notes from a sidecar or the PDF, import TXT/Markdown, and double-click the notes pane to edit the current slide. Notes automatically fit the available space. |
|
||||
| **Presentation-aware desktop behavior** | PDF Presenter asks supported operating systems to keep the display awake and reports whether protection is active. Closing Presenter also closes its Slides windows. |
|
||||
| **Portable by design** | The release binaries include the PDF renderer and application dependencies. Keep the extracted folder anywhere convenient; no Rust or separate PDF software is required. |
|
||||
| **Themes and languages** | Choose from 20 built-in palettes and English, French, Spanish, Japanese, Simplified Chinese, German or Brazilian Portuguese. System language detection stays offline. |
|
||||
|
||||
On Windows, multi-screen output, per-screen layouts, zoom, tools, and unplugging then
|
||||
reconnecting displays have been tested in extended use. Linux and macOS use the same
|
||||
|
|
|
|||
|
|
@ -4,6 +4,11 @@ the presence of a package here does not mean it is linked on every OS.
|
|||
Unmodified source packages are available at https://crates.io.
|
||||
For alternative licenses, permissive MIT/Apache alternatives are selected.
|
||||
|
||||
Noto Sans CJK 2.004
|
||||
License expression: OFL-1.1
|
||||
Source: https://github.com/notofonts/noto-cjk/releases/tag/Sans2.004
|
||||
assets/fonts/OFL.txt: text 5c0af63904410dcf
|
||||
|
||||
ab_glyph 0.2.32
|
||||
License expression: Apache-2.0
|
||||
Source: https://github.com/alexheretic/ab-glyph
|
||||
|
|
@ -7121,6 +7126,106 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|||
THE SOFTWARE.
|
||||
|
||||
|
||||
=== 5c0af63904410dcf ===
|
||||
Noto Sans: Copyright 2022 The Noto Project Authors (https://github.com/notofonts/latin-greek-cyrillic)
|
||||
Noto Sans CJK: Copyright 2014-2021 Adobe (http://www.adobe.com/).
|
||||
Noto Sans Devanagari: Copyright 2022 The Noto Project Authors (https://github.com/notofonts/devanagari)
|
||||
Noto Sans Thai: Copyright 2022 The Noto Project Authors (https://github.com/notofonts/thai)
|
||||
|
||||
This Font Software is licensed under the SIL Open Font License,
|
||||
Version 1.1.
|
||||
|
||||
This license is copied below, and is also available with a FAQ at:
|
||||
http://scripts.sil.org/OFL
|
||||
|
||||
-----------------------------------------------------------
|
||||
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
|
||||
-----------------------------------------------------------
|
||||
|
||||
PREAMBLE
|
||||
The goals of the Open Font License (OFL) are to stimulate worldwide
|
||||
development of collaborative font projects, to support the font
|
||||
creation efforts of academic and linguistic communities, and to
|
||||
provide a free and open framework in which fonts may be shared and
|
||||
improved in partnership with others.
|
||||
|
||||
The OFL allows the licensed fonts to be used, studied, modified and
|
||||
redistributed freely as long as they are not sold by themselves. The
|
||||
fonts, including any derivative works, can be bundled, embedded,
|
||||
redistributed and/or sold with any software provided that any reserved
|
||||
names are not used by derivative works. The fonts and derivatives,
|
||||
however, cannot be released under any other type of license. The
|
||||
requirement for fonts to remain under this license does not apply to
|
||||
any document created using the fonts or their derivatives.
|
||||
|
||||
DEFINITIONS
|
||||
"Font Software" refers to the set of files released by the Copyright
|
||||
Holder(s) under this license and clearly marked as such. This may
|
||||
include source files, build scripts and documentation.
|
||||
|
||||
"Reserved Font Name" refers to any names specified as such after the
|
||||
copyright statement(s).
|
||||
|
||||
"Original Version" refers to the collection of Font Software
|
||||
components as distributed by the Copyright Holder(s).
|
||||
|
||||
"Modified Version" refers to any derivative made by adding to,
|
||||
deleting, or substituting -- in part or in whole -- any of the
|
||||
components of the Original Version, by changing formats or by porting
|
||||
the Font Software to a new environment.
|
||||
|
||||
"Author" refers to any designer, engineer, programmer, technical
|
||||
writer or other person who contributed to the Font Software.
|
||||
|
||||
PERMISSION & CONDITIONS
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of the Font Software, to use, study, copy, merge, embed,
|
||||
modify, redistribute, and sell modified and unmodified copies of the
|
||||
Font Software, subject to the following conditions:
|
||||
|
||||
1) Neither the Font Software nor any of its individual components, in
|
||||
Original or Modified Versions, may be sold by itself.
|
||||
|
||||
2) Original or Modified Versions of the Font Software may be bundled,
|
||||
redistributed and/or sold with any software, provided that each copy
|
||||
contains the above copyright notice and this license. These can be
|
||||
included either as stand-alone text files, human-readable headers or
|
||||
in the appropriate machine-readable metadata fields within text or
|
||||
binary files as long as those fields can be easily viewed by the user.
|
||||
|
||||
3) No Modified Version of the Font Software may use the Reserved Font
|
||||
Name(s) unless explicit written permission is granted by the
|
||||
corresponding Copyright Holder. This restriction only applies to the
|
||||
primary font name as presented to the users.
|
||||
|
||||
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
|
||||
Software shall not be used to promote, endorse or advertise any
|
||||
Modified Version, except to acknowledge the contribution(s) of the
|
||||
Copyright Holder(s) and the Author(s) or with their explicit written
|
||||
permission.
|
||||
|
||||
5) The Font Software, modified or unmodified, in part or in whole,
|
||||
must be distributed entirely under this license, and must not be
|
||||
distributed under any other license. The requirement for fonts to
|
||||
remain under this license does not apply to any document created using
|
||||
the Font Software.
|
||||
|
||||
TERMINATION
|
||||
This license becomes null and void if any of the above conditions are
|
||||
not met.
|
||||
|
||||
DISCLAIMER
|
||||
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
|
||||
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
|
||||
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
|
||||
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
|
||||
OTHER DEALINGS IN THE FONT SOFTWARE.
|
||||
|
||||
|
||||
=== 5cc390ab5e5e6507 ===
|
||||
MIT License
|
||||
|
||||
|
|
|
|||
Binary file not shown.
|
|
@ -0,0 +1,97 @@
|
|||
Noto Sans: Copyright 2022 The Noto Project Authors (https://github.com/notofonts/latin-greek-cyrillic)
|
||||
Noto Sans CJK: Copyright 2014-2021 Adobe (http://www.adobe.com/).
|
||||
Noto Sans Devanagari: Copyright 2022 The Noto Project Authors (https://github.com/notofonts/devanagari)
|
||||
Noto Sans Thai: Copyright 2022 The Noto Project Authors (https://github.com/notofonts/thai)
|
||||
|
||||
This Font Software is licensed under the SIL Open Font License,
|
||||
Version 1.1.
|
||||
|
||||
This license is copied below, and is also available with a FAQ at:
|
||||
http://scripts.sil.org/OFL
|
||||
|
||||
-----------------------------------------------------------
|
||||
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
|
||||
-----------------------------------------------------------
|
||||
|
||||
PREAMBLE
|
||||
The goals of the Open Font License (OFL) are to stimulate worldwide
|
||||
development of collaborative font projects, to support the font
|
||||
creation efforts of academic and linguistic communities, and to
|
||||
provide a free and open framework in which fonts may be shared and
|
||||
improved in partnership with others.
|
||||
|
||||
The OFL allows the licensed fonts to be used, studied, modified and
|
||||
redistributed freely as long as they are not sold by themselves. The
|
||||
fonts, including any derivative works, can be bundled, embedded,
|
||||
redistributed and/or sold with any software provided that any reserved
|
||||
names are not used by derivative works. The fonts and derivatives,
|
||||
however, cannot be released under any other type of license. The
|
||||
requirement for fonts to remain under this license does not apply to
|
||||
any document created using the fonts or their derivatives.
|
||||
|
||||
DEFINITIONS
|
||||
"Font Software" refers to the set of files released by the Copyright
|
||||
Holder(s) under this license and clearly marked as such. This may
|
||||
include source files, build scripts and documentation.
|
||||
|
||||
"Reserved Font Name" refers to any names specified as such after the
|
||||
copyright statement(s).
|
||||
|
||||
"Original Version" refers to the collection of Font Software
|
||||
components as distributed by the Copyright Holder(s).
|
||||
|
||||
"Modified Version" refers to any derivative made by adding to,
|
||||
deleting, or substituting -- in part or in whole -- any of the
|
||||
components of the Original Version, by changing formats or by porting
|
||||
the Font Software to a new environment.
|
||||
|
||||
"Author" refers to any designer, engineer, programmer, technical
|
||||
writer or other person who contributed to the Font Software.
|
||||
|
||||
PERMISSION & CONDITIONS
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of the Font Software, to use, study, copy, merge, embed,
|
||||
modify, redistribute, and sell modified and unmodified copies of the
|
||||
Font Software, subject to the following conditions:
|
||||
|
||||
1) Neither the Font Software nor any of its individual components, in
|
||||
Original or Modified Versions, may be sold by itself.
|
||||
|
||||
2) Original or Modified Versions of the Font Software may be bundled,
|
||||
redistributed and/or sold with any software, provided that each copy
|
||||
contains the above copyright notice and this license. These can be
|
||||
included either as stand-alone text files, human-readable headers or
|
||||
in the appropriate machine-readable metadata fields within text or
|
||||
binary files as long as those fields can be easily viewed by the user.
|
||||
|
||||
3) No Modified Version of the Font Software may use the Reserved Font
|
||||
Name(s) unless explicit written permission is granted by the
|
||||
corresponding Copyright Holder. This restriction only applies to the
|
||||
primary font name as presented to the users.
|
||||
|
||||
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
|
||||
Software shall not be used to promote, endorse or advertise any
|
||||
Modified Version, except to acknowledge the contribution(s) of the
|
||||
Copyright Holder(s) and the Author(s) or with their explicit written
|
||||
permission.
|
||||
|
||||
5) The Font Software, modified or unmodified, in part or in whole,
|
||||
must be distributed entirely under this license, and must not be
|
||||
distributed under any other license. The requirement for fonts to
|
||||
remain under this license does not apply to any document created using
|
||||
the Font Software.
|
||||
|
||||
TERMINATION
|
||||
This license becomes null and void if any of the above conditions are
|
||||
not met.
|
||||
|
||||
DISCLAIMER
|
||||
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
|
||||
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
|
||||
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
|
||||
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
|
||||
OTHER DEALINGS IN THE FONT SOFTWARE.
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
# Embedded CJK font
|
||||
|
||||
`NotoSansCJK-Regular.ttc` is the unmodified Noto Sans CJK 2.004 collection used by
|
||||
Canvas Pilot, under the included [SIL Open Font License 1.1](OFL.txt). Upstream:
|
||||
<https://github.com/notofonts/noto-cjk/releases/tag/Sans2.004>.
|
||||
|
||||
SHA-256: `b76b0433203017ca80401b2ee0dd69350349871c4b19d504c34dbdd80541690a`.
|
||||
|
||||
PDF Presenter uses collection index 0 for Japanese and index 2 for Simplified
|
||||
Chinese. The collection is embedded in the executable; no runtime font lookup or
|
||||
download occurs. Font definitions are installed only when a CJK interface language
|
||||
is active and only when the language selection changes. Other interface languages
|
||||
retain egui's existing embedded fonts.
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
//! Interface catalog; diagnostic messages from workers remain in their original language.
|
||||
//! Allocation-free interface catalogs; worker diagnostics remain in their original language.
|
||||
use serde::{Deserialize, Serialize};
|
||||
#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, Serialize, Deserialize)]
|
||||
#[serde(rename_all = "snake_case")]
|
||||
|
|
@ -7,37 +7,179 @@ pub enum Language {
|
|||
System,
|
||||
En,
|
||||
Fr,
|
||||
Es,
|
||||
Ja,
|
||||
ZhCn,
|
||||
De,
|
||||
PtBr,
|
||||
}
|
||||
impl Language {
|
||||
pub const ALL: [Self; 3] = [Self::System, Self::En, Self::Fr];
|
||||
pub const ALL: [Self; 8] = [
|
||||
Self::System,
|
||||
Self::En,
|
||||
Self::Fr,
|
||||
Self::Es,
|
||||
Self::Ja,
|
||||
Self::ZhCn,
|
||||
Self::De,
|
||||
Self::PtBr,
|
||||
];
|
||||
pub fn name(self) -> &'static str {
|
||||
match self {
|
||||
Self::System => "System / Système",
|
||||
Self::System => "System language",
|
||||
Self::En => "English",
|
||||
Self::Fr => "Français",
|
||||
Self::Es => "Español",
|
||||
Self::Ja => "Japanese",
|
||||
Self::ZhCn => "Chinese (Simplified)",
|
||||
Self::De => "Deutsch",
|
||||
Self::PtBr => "Português (Brasil)",
|
||||
}
|
||||
}
|
||||
pub fn french(self) -> bool {
|
||||
self.resolved() == ResolvedLanguage::Fr
|
||||
}
|
||||
fn resolved(self) -> ResolvedLanguage {
|
||||
match self {
|
||||
Self::Fr => true,
|
||||
Self::En => false,
|
||||
Self::System => system_french(),
|
||||
Self::System => system_language(),
|
||||
Self::En => ResolvedLanguage::En,
|
||||
Self::Fr => ResolvedLanguage::Fr,
|
||||
Self::Es => ResolvedLanguage::Es,
|
||||
Self::Ja => ResolvedLanguage::Ja,
|
||||
Self::ZhCn => ResolvedLanguage::ZhCn,
|
||||
Self::De => ResolvedLanguage::De,
|
||||
Self::PtBr => ResolvedLanguage::PtBr,
|
||||
}
|
||||
}
|
||||
}
|
||||
fn system_french() -> bool {
|
||||
static FRENCH: std::sync::OnceLock<bool> = std::sync::OnceLock::new();
|
||||
*FRENCH.get_or_init(|| {
|
||||
sys_locale::get_locale().is_some_and(|s| s.to_ascii_lowercase().starts_with("fr"))
|
||||
})
|
||||
|
||||
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
|
||||
enum ResolvedLanguage {
|
||||
En,
|
||||
Fr,
|
||||
Es,
|
||||
Ja,
|
||||
ZhCn,
|
||||
De,
|
||||
PtBr,
|
||||
}
|
||||
pub fn apply(ctx: &egui::Context, language: &Language) {
|
||||
ctx.data_mut(|d| d.insert_temp(egui::Id::new("french"), language.french()));
|
||||
|
||||
fn language_id() -> egui::Id {
|
||||
egui::Id::new("pdf-presenter-language")
|
||||
}
|
||||
pub fn tr<'a>(ctx: &egui::Context, text: &'a str) -> &'a str {
|
||||
if !ctx.data(|d| d.get_temp::<bool>(egui::Id::new("french")).unwrap_or(false)) {
|
||||
return text;
|
||||
|
||||
fn resolve_system_locale(locale: Option<&str>) -> ResolvedLanguage {
|
||||
let locale = locale
|
||||
.unwrap_or("")
|
||||
.split('.')
|
||||
.next()
|
||||
.unwrap_or("")
|
||||
.replace('_', "-")
|
||||
.to_ascii_lowercase();
|
||||
let parts: Vec<_> = locale.split('-').collect();
|
||||
match parts.first().copied().unwrap_or("") {
|
||||
"fr" => ResolvedLanguage::Fr,
|
||||
"es" => ResolvedLanguage::Es,
|
||||
"ja" => ResolvedLanguage::Ja,
|
||||
"de" => ResolvedLanguage::De,
|
||||
"pt" if parts.contains(&"br") => ResolvedLanguage::PtBr,
|
||||
// Do not silently substitute Simplified Chinese for Traditional Chinese.
|
||||
"zh" if !parts
|
||||
.iter()
|
||||
.any(|part| matches!(*part, "hant" | "tw" | "hk" | "mo")) =>
|
||||
{
|
||||
ResolvedLanguage::ZhCn
|
||||
}
|
||||
_ => ResolvedLanguage::En,
|
||||
}
|
||||
}
|
||||
|
||||
fn system_language() -> ResolvedLanguage {
|
||||
static LANGUAGE: std::sync::OnceLock<ResolvedLanguage> = std::sync::OnceLock::new();
|
||||
*LANGUAGE.get_or_init(|| resolve_system_locale(sys_locale::get_locale().as_deref()))
|
||||
}
|
||||
|
||||
pub fn apply(ctx: &egui::Context, language: &Language) {
|
||||
let resolved = language.resolved();
|
||||
let previous = ctx.data(|data| data.get_temp::<ResolvedLanguage>(language_id()));
|
||||
if previous == Some(resolved) {
|
||||
return;
|
||||
}
|
||||
if matches!(resolved, ResolvedLanguage::Ja | ResolvedLanguage::ZhCn) {
|
||||
ctx.set_fonts(cjk_fonts(resolved));
|
||||
} else if previous
|
||||
.is_some_and(|language| matches!(language, ResolvedLanguage::Ja | ResolvedLanguage::ZhCn))
|
||||
{
|
||||
ctx.set_fonts(egui::FontDefinitions::default());
|
||||
}
|
||||
ctx.data_mut(|data| data.insert_temp(language_id(), resolved));
|
||||
}
|
||||
|
||||
fn cjk_fonts(language: ResolvedLanguage) -> egui::FontDefinitions {
|
||||
use egui::{FontData, FontFamily};
|
||||
let mut fonts = egui::FontDefinitions::default();
|
||||
let mut data = FontData::from_static(include_bytes!("../assets/fonts/NotoSansCJK-Regular.ttc"));
|
||||
data.index = if language == ResolvedLanguage::ZhCn {
|
||||
2
|
||||
} else {
|
||||
0
|
||||
};
|
||||
fonts.font_data.insert("noto-cjk".into(), data.into());
|
||||
for family in [FontFamily::Proportional, FontFamily::Monospace] {
|
||||
fonts
|
||||
.families
|
||||
.get_mut(&family)
|
||||
.expect("default font family")
|
||||
.insert(0, "noto-cjk".into());
|
||||
}
|
||||
fonts
|
||||
}
|
||||
|
||||
pub fn tr<'a>(ctx: &egui::Context, text: &'a str) -> &'a str {
|
||||
match ctx
|
||||
.data(|data| data.get_temp::<ResolvedLanguage>(language_id()))
|
||||
.unwrap_or(ResolvedLanguage::En)
|
||||
{
|
||||
ResolvedLanguage::En => text,
|
||||
ResolvedLanguage::Fr => fr(text),
|
||||
ResolvedLanguage::Es => es(text),
|
||||
ResolvedLanguage::Ja => ja(text),
|
||||
ResolvedLanguage::ZhCn => zh_cn(text),
|
||||
ResolvedLanguage::De => de(text),
|
||||
ResolvedLanguage::PtBr => pt_br(text),
|
||||
}
|
||||
}
|
||||
|
||||
pub fn display_revert_countdown(ctx: &egui::Context, seconds: u64) -> String {
|
||||
match ctx
|
||||
.data(|data| data.get_temp::<ResolvedLanguage>(language_id()))
|
||||
.unwrap_or(ResolvedLanguage::En)
|
||||
{
|
||||
ResolvedLanguage::Fr => {
|
||||
format!("Retour automatique dans {seconds} s. Échap pour annuler.")
|
||||
}
|
||||
ResolvedLanguage::Es => {
|
||||
format!("Se revertirá automáticamente en {seconds} s. Escape para revertir.")
|
||||
}
|
||||
ResolvedLanguage::Ja => {
|
||||
format!("{seconds}秒後に自動的に元に戻ります。Escapeキーで戻します。")
|
||||
}
|
||||
ResolvedLanguage::ZhCn => {
|
||||
format!("将在 {seconds} 秒后自动还原。按 Escape 立即还原。")
|
||||
}
|
||||
ResolvedLanguage::De => {
|
||||
format!("Automatische Rückkehr in {seconds} s. Escape zum Zurücksetzen.")
|
||||
}
|
||||
ResolvedLanguage::PtBr => {
|
||||
format!("Reversão automática em {seconds} s. Escape para reverter.")
|
||||
}
|
||||
ResolvedLanguage::En => {
|
||||
format!("Automatically reverts in {seconds} seconds. Escape to revert.")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fn fr(text: &str) -> &str {
|
||||
match text {
|
||||
"Disk cache" => "Cache disque",
|
||||
"Maximum total size (MiB)" => "Taille totale maximale (Mio)",
|
||||
|
|
@ -95,6 +237,10 @@ pub fn tr<'a>(ctx: &egui::Context, text: &'a str) -> &'a str {
|
|||
"Quick settings" => "Réglages rapides",
|
||||
"Memory and cache" => "Mémoire et cache",
|
||||
"Storage and preparation" => "Stockage et préparation",
|
||||
"Application executable" => "Exécutable de l’application",
|
||||
"This is the running portable executable. Use its containing folder to find or remove the application." => {
|
||||
"Il s’agit de l’exécutable portable en cours d’utilisation. Son dossier permet de retrouver ou supprimer l’application."
|
||||
}
|
||||
"Storage locations" => "Emplacements de stockage",
|
||||
"Preparing slide…" => "Préparation de la diapositive…",
|
||||
"Slide ready" => "Diapositive prête",
|
||||
|
|
@ -143,6 +289,13 @@ pub fn tr<'a>(ctx: &egui::Context, text: &'a str) -> &'a str {
|
|||
"Menu" => "Menu",
|
||||
"Displays" => "Écrans",
|
||||
"All slides" => "Toutes les diapositives",
|
||||
"Autoplay" => "Lecture automatique",
|
||||
"Play automatically" => "Lire automatiquement",
|
||||
"Timing" => "Durée",
|
||||
"Loop" => "Boucler",
|
||||
"Timing starts when the slide is visible." => {
|
||||
"Le décompte commence lorsque la diapositive est visible."
|
||||
}
|
||||
"Layout" => "Disposition",
|
||||
"Show slides" => "Afficher les diapositives",
|
||||
"Blank slides" => "Masquer les diapositives",
|
||||
|
|
@ -297,8 +450,590 @@ pub fn tr<'a>(ctx: &egui::Context, text: &'a str) -> &'a str {
|
|||
"Save or discard notes before closing the presentation." => {
|
||||
"Enregistrez ou abandonnez les notes avant de quitter la présentation."
|
||||
}
|
||||
"Swap displays…" => "Inverser les écrans…",
|
||||
"Go to slide" => "Aller à la diapositive",
|
||||
"Enter to show · Backspace to clear" => "Entrée : diffuser · Retour arrière : effacer",
|
||||
"Enter to show; Backspace to clear" => "Entrée : diffuser ; Retour arrière : effacer",
|
||||
"Keep these display settings?" => "Conserver ces réglages d’écran ?",
|
||||
"Confirm once on any screen to apply to all displays." => {
|
||||
"Une seule confirmation sur un écran suffit pour appliquer à tous."
|
||||
}
|
||||
"Keep changes" => "Conserver",
|
||||
"Revert now" => "Rétablir maintenant",
|
||||
"Edit layout for" => "Modifier la disposition de",
|
||||
"Layout and saves apply to this display. Timer behavior is shared." => {
|
||||
"La disposition et les sauvegardes s’appliquent à cet écran. Le fonctionnement du minuteur reste partagé."
|
||||
}
|
||||
"Apply changes" => "Appliquer les modifications",
|
||||
"Selected" => "Sélection",
|
||||
"Current" => "Actuelle",
|
||||
"Blank Slides image" => "Image des diapositives masquées",
|
||||
"Custom picture selected" => "Image personnalisée sélectionnée",
|
||||
"Solid black" => "Écran noir",
|
||||
"Choose picture…" => "Choisir une image…",
|
||||
"Use solid black" => "Utiliser un écran noir",
|
||||
"A copy is saved and fitted to all Slides screens against a black background." => {
|
||||
"Une copie est conservée et ajustée à tous les écrans de diapositives, sur fond noir."
|
||||
}
|
||||
"Default PDF application" => "Application PDF par défaut",
|
||||
"Register PDF Presenter and its icon for PDF files in your Windows account." => {
|
||||
"Enregistre PDF Presenter et son icône pour les fichiers PDF de votre compte Windows."
|
||||
}
|
||||
"Set as default PDF app…" => "Définir comme application PDF par défaut…",
|
||||
"Windows will open Default Apps; select PDF Presenter for .pdf to confirm." => {
|
||||
"Windows ouvrira Applications par défaut : sélectionnez PDF Presenter pour .pdf afin de confirmer."
|
||||
}
|
||||
"Processed slides" => "Diapositives préparées",
|
||||
"Theme" => "Thème",
|
||||
"Language" => "Langue",
|
||||
_ => text,
|
||||
}
|
||||
}
|
||||
|
||||
macro_rules! catalog {
|
||||
($text:expr; $($source:literal => $translated:literal),* $(,)?) => {
|
||||
match $text {
|
||||
$($source => $translated,)*
|
||||
_ => $text,
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
fn es(text: &str) -> &str {
|
||||
catalog!(text;
|
||||
"Cancel" => "Cancelar",
|
||||
"Close" => "Cerrar",
|
||||
"Retry" => "Reintentar",
|
||||
"Quit" => "Salir",
|
||||
"Theme" => "Tema",
|
||||
"Language" => "Idioma",
|
||||
"Appearance" => "Apariencia",
|
||||
"Preferences" => "Preferencias",
|
||||
"Preferences…" => "Preferencias…",
|
||||
"Quick settings" => "Ajustes rápidos",
|
||||
"Menu" => "Menú",
|
||||
"Displays" => "Pantallas",
|
||||
"All slides" => "Todas las diapositivas",
|
||||
"Autoplay" => "Reproducción automática",
|
||||
"Play automatically" => "Reproducir automáticamente",
|
||||
"Timing" => "Duración",
|
||||
"Loop" => "Repetir",
|
||||
"Timing starts when the slide is visible." => "El tiempo comienza cuando la diapositiva está visible.",
|
||||
"Layout" => "Diseño",
|
||||
"Layout…" => "Diseño…",
|
||||
"Presenter layout" => "Diseño del presentador",
|
||||
"Presenter" => "Presentador",
|
||||
"Slides" => "Diapositivas",
|
||||
"Single screen" => "Una sola pantalla",
|
||||
"Unused" => "Sin usar",
|
||||
"Previous" => "Anterior",
|
||||
"Current" => "Actual",
|
||||
"Next" => "Siguiente",
|
||||
"PREVIOUS" => "ANTERIOR",
|
||||
"CURRENT" => "ACTUAL",
|
||||
"NEXT" => "SIGUIENTE",
|
||||
"Previous slide" => "Diapositiva anterior",
|
||||
"Current slide" => "Diapositiva actual",
|
||||
"Next slide" => "Diapositiva siguiente",
|
||||
"No slide" => "Sin diapositiva",
|
||||
"End of slides" => "Fin de las diapositivas",
|
||||
"Notes" => "Notas",
|
||||
"No notes for this slide" => "No hay notas para esta diapositiva",
|
||||
"PRESENTER NOTES · AUTO-FIT" => "NOTAS DEL PRESENTADOR · AJUSTE AUTOMÁTICO",
|
||||
"Show slides" => "Mostrar diapositivas",
|
||||
"Blank slides" => "Ocultar diapositivas",
|
||||
"NO OUTPUT DISPLAYED" => "NO SE MUESTRA NINGUNA SALIDA",
|
||||
"PRESENTING" => "PRESENTANDO",
|
||||
"PREPARING OUTPUT" => "PREPARANDO LA SALIDA",
|
||||
"Open PDF…" => "Abrir PDF…",
|
||||
"Open picture folder…" => "Abrir carpeta de imágenes…",
|
||||
"Open a PDF or picture folder to browse slides." => "Abra un PDF o una carpeta de imágenes para explorar las diapositivas.",
|
||||
"File chooser already open" => "El selector de archivos ya está abierto",
|
||||
"Import notes…" => "Importar notas…",
|
||||
"Import notes" => "Importar notas",
|
||||
"Processing notes…" => "Procesando notas…",
|
||||
"Save notes" => "Guardar notas",
|
||||
"Edit notes" => "Editar notas",
|
||||
"Saving notes…" => "Guardando notas…",
|
||||
"Empty note" => "Nota vacía",
|
||||
"Import and save notes" => "Importar y guardar notas",
|
||||
"Discard changes and close" => "Descartar cambios y cerrar",
|
||||
"Reload (discard edits)" => "Recargar (descartar cambios)",
|
||||
"Tools" => "Herramientas",
|
||||
"Off" => "Desactivado",
|
||||
"Pointer" => "Puntero",
|
||||
"Arrow" => "Flecha",
|
||||
"Highlighter" => "Resaltador",
|
||||
"Color" => "Color",
|
||||
"Size" => "Tamaño",
|
||||
"Undo" => "Deshacer",
|
||||
"Clear" => "Borrar",
|
||||
"Balanced" => "Equilibrado",
|
||||
"Slide focus" => "Prioridad a la diapositiva",
|
||||
"Notes first" => "Prioridad a las notas",
|
||||
"Start with a preset" => "Comenzar con un diseño",
|
||||
"Slides and notes" => "Diapositivas y notas",
|
||||
"Relative size" => "Tamaño relativo",
|
||||
"Space (%)" => "Espacio (%)",
|
||||
"Text size" => "Tamaño del texto",
|
||||
"Header" => "Encabezado",
|
||||
"Header and footer" => "Encabezado y pie",
|
||||
"Keep header visible" => "Mantener visible el encabezado",
|
||||
"Keep footer visible" => "Mantener visible el pie",
|
||||
"Show both" => "Mostrar ambos",
|
||||
"Auto-hide header" => "Ocultar automáticamente el encabezado",
|
||||
"Auto-hide footer" => "Ocultar automáticamente el pie",
|
||||
"Elapsed time" => "Tiempo transcurrido",
|
||||
"Time · HH:MM" => "Hora · HH:MM",
|
||||
"Timers and progress" => "Temporizadores y progreso",
|
||||
"Slide progress bar" => "Barra de progreso",
|
||||
"Reset timer" => "Reiniciar temporizador",
|
||||
"Start timer" => "Iniciar temporizador",
|
||||
"Pause timer" => "Pausar temporizador",
|
||||
"Countdown" => "Cuenta atrás",
|
||||
"Duration" => "Duración",
|
||||
"Running" => "En marcha",
|
||||
"Stopped" => "Detenido",
|
||||
"Waiting for first action" => "Esperando la primera acción",
|
||||
"Time is up" => "Se acabó el tiempo",
|
||||
"Bar height" => "Altura de la barra",
|
||||
"Each screen has one role; repeat a role to mirror it." => "Cada pantalla tiene una función; repítala para duplicarla.",
|
||||
"Window mode" => "Modo de ventana",
|
||||
"Follow global" => "Seguir ajuste global",
|
||||
"Always fullscreen" => "Siempre a pantalla completa",
|
||||
"Always windowed" => "Siempre en ventana",
|
||||
"Swap groups" => "Intercambiar grupos",
|
||||
"Presenter fullscreen" => "Presentador a pantalla completa",
|
||||
"Slides fullscreen" => "Diapositivas a pantalla completa",
|
||||
"Apply and remember" => "Aplicar y recordar",
|
||||
"Use single-screen mode?" => "¿Usar el modo de una sola pantalla?",
|
||||
"Keep Presenter view" => "Mantener la vista Presentador",
|
||||
"Use single-screen mode" => "Usar el modo de una sola pantalla",
|
||||
"Exit fullscreen" => "Salir de pantalla completa",
|
||||
"Enter fullscreen" => "Entrar en pantalla completa",
|
||||
"Slide preview" => "Vista previa de la diapositiva",
|
||||
"Preview only — presentation unchanged" => "Solo vista previa — la presentación no cambia",
|
||||
"Show on screen" => "Mostrar en la pantalla",
|
||||
"Preview size" => "Tamaño de la vista previa",
|
||||
"Compact" => "Compacto",
|
||||
"Large" => "Grande",
|
||||
"Safe browsing" => "Exploración segura",
|
||||
"Live browsing" => "Exploración en directo",
|
||||
"Change on click" => "Cambiar al hacer clic",
|
||||
"Show selected" => "Mostrar selección",
|
||||
"Page background" => "Fondo de página",
|
||||
"Fit padding color" => "Color del margen",
|
||||
"Enable page zoom" => "Activar zoom de página",
|
||||
"Page zoom" => "Zoom de página",
|
||||
"Reset zoom" => "Restablecer zoom",
|
||||
"Disable zoom" => "Desactivar zoom",
|
||||
"Keep zoom enabled" => "Mantener zoom activado",
|
||||
"Memory and cache" => "Memoria y caché",
|
||||
"Disk cache" => "Caché de disco",
|
||||
"Storage and preparation" => "Almacenamiento y preparación",
|
||||
"Application executable" => "Ejecutable de la aplicación",
|
||||
"This is the running portable executable. Use its containing folder to find or remove the application." => "Este es el ejecutable portátil en uso. Utilice la carpeta que lo contiene para encontrar o eliminar la aplicación.",
|
||||
"Storage locations" => "Ubicaciones de almacenamiento",
|
||||
"Preparing slide…" => "Preparando diapositiva…",
|
||||
"Slide ready" => "Diapositiva lista",
|
||||
"Loading into memory…" => "Cargando en memoria…",
|
||||
"Could not load slide" => "No se pudo cargar la diapositiva",
|
||||
"Quit presentation?" => "¿Salir de la presentación?",
|
||||
"Quit presentation" => "Salir de la presentación",
|
||||
"This closes Presenter and all Slides windows." => "Esto cierra el Presentador y todas las ventanas de diapositivas.",
|
||||
"Swap displays…" => "Intercambiar pantallas…", "Go to slide" => "Ir a la diapositiva",
|
||||
"Enter to show · Backspace to clear" => "Intro: mostrar · Retroceso: borrar",
|
||||
"Enter to show; Backspace to clear" => "Intro: mostrar; Retroceso: borrar",
|
||||
"Keep these display settings?" => "¿Conservar estos ajustes de pantalla?",
|
||||
"Confirm once on any screen to apply to all displays." => "Confirme una vez en cualquier pantalla para aplicar a todas.",
|
||||
"Keep changes" => "Conservar cambios", "Revert now" => "Revertir ahora",
|
||||
"Edit layout for" => "Editar diseño de", "Apply changes" => "Aplicar cambios",
|
||||
"Selected" => "Seleccionada", "Blank Slides image" => "Imagen de diapositivas ocultas",
|
||||
"Custom picture selected" => "Imagen personalizada seleccionada", "Solid black" => "Negro sólido",
|
||||
"Choose picture…" => "Elegir imagen…", "Use solid black" => "Usar negro sólido",
|
||||
"Processed slides" => "Diapositivas procesadas"
|
||||
)
|
||||
}
|
||||
|
||||
fn ja(text: &str) -> &str {
|
||||
catalog!(text;
|
||||
"Cancel" => "キャンセル",
|
||||
"Close" => "閉じる",
|
||||
"Retry" => "再試行",
|
||||
"Quit" => "終了",
|
||||
"Theme" => "テーマ",
|
||||
"Language" => "言語",
|
||||
"Appearance" => "外観",
|
||||
"Preferences" => "設定",
|
||||
"Preferences…" => "設定…",
|
||||
"Quick settings" => "クイック設定",
|
||||
"Menu" => "メニュー",
|
||||
"Displays" => "ディスプレイ",
|
||||
"All slides" => "すべてのスライド",
|
||||
"Autoplay" => "自動再生",
|
||||
"Play automatically" => "自動的に再生",
|
||||
"Timing" => "表示時間",
|
||||
"Loop" => "ループ",
|
||||
"Timing starts when the slide is visible." => "スライドが表示されてから時間の計測を開始します。",
|
||||
"Layout" => "レイアウト",
|
||||
"Layout…" => "レイアウト…",
|
||||
"Presenter layout" => "発表者レイアウト",
|
||||
"Presenter" => "発表者",
|
||||
"Slides" => "スライド",
|
||||
"Single screen" => "シングルスクリーン",
|
||||
"Unused" => "未使用",
|
||||
"Previous" => "前へ",
|
||||
"Current" => "現在",
|
||||
"Next" => "次へ",
|
||||
"PREVIOUS" => "前のスライド",
|
||||
"CURRENT" => "現在のスライド",
|
||||
"NEXT" => "次のスライド",
|
||||
"Previous slide" => "前のスライド",
|
||||
"Current slide" => "現在のスライド",
|
||||
"Next slide" => "次のスライド",
|
||||
"No slide" => "スライドなし",
|
||||
"End of slides" => "スライドの終わり",
|
||||
"Notes" => "ノート",
|
||||
"No notes for this slide" => "このスライドにはノートがありません",
|
||||
"PRESENTER NOTES · AUTO-FIT" => "発表者ノート · 自動調整",
|
||||
"Show slides" => "スライドを表示",
|
||||
"Blank slides" => "スライドを非表示",
|
||||
"NO OUTPUT DISPLAYED" => "出力は表示されていません",
|
||||
"PRESENTING" => "プレゼンテーション中",
|
||||
"PREPARING OUTPUT" => "出力を準備中",
|
||||
"Open PDF…" => "PDFを開く…",
|
||||
"Open picture folder…" => "画像フォルダーを開く…",
|
||||
"Open a PDF or picture folder to browse slides." => "PDFまたは画像フォルダーを開いてスライドを参照します。",
|
||||
"File chooser already open" => "ファイル選択画面はすでに開いています",
|
||||
"Import notes…" => "ノートをインポート…",
|
||||
"Import notes" => "ノートをインポート",
|
||||
"Processing notes…" => "ノートを処理中…",
|
||||
"Save notes" => "ノートを保存",
|
||||
"Edit notes" => "ノートを編集",
|
||||
"Saving notes…" => "ノートを保存中…",
|
||||
"Empty note" => "空のノート",
|
||||
"Import and save notes" => "ノートをインポートして保存",
|
||||
"Discard changes and close" => "変更を破棄して閉じる",
|
||||
"Reload (discard edits)" => "再読み込み(編集を破棄)",
|
||||
"Tools" => "ツール",
|
||||
"Off" => "オフ",
|
||||
"Pointer" => "ポインター",
|
||||
"Arrow" => "矢印",
|
||||
"Highlighter" => "蛍光ペン",
|
||||
"Color" => "色",
|
||||
"Size" => "サイズ",
|
||||
"Undo" => "元に戻す",
|
||||
"Clear" => "消去",
|
||||
"Balanced" => "バランス",
|
||||
"Slide focus" => "スライド優先",
|
||||
"Notes first" => "ノート優先",
|
||||
"Start with a preset" => "プリセットから開始",
|
||||
"Slides and notes" => "スライドとノート",
|
||||
"Relative size" => "相対サイズ",
|
||||
"Space (%)" => "領域(%)",
|
||||
"Text size" => "文字サイズ",
|
||||
"Header" => "ヘッダー",
|
||||
"Header and footer" => "ヘッダーとフッター",
|
||||
"Keep header visible" => "ヘッダーを常に表示",
|
||||
"Keep footer visible" => "フッターを常に表示",
|
||||
"Show both" => "両方を表示",
|
||||
"Auto-hide header" => "ヘッダーを自動的に隠す",
|
||||
"Auto-hide footer" => "フッターを自動的に隠す",
|
||||
"Elapsed time" => "経過時間",
|
||||
"Time · HH:MM" => "時刻 · HH:MM",
|
||||
"Timers and progress" => "タイマーと進行状況",
|
||||
"Slide progress bar" => "スライド進行バー",
|
||||
"Reset timer" => "タイマーをリセット",
|
||||
"Start timer" => "タイマーを開始",
|
||||
"Pause timer" => "タイマーを一時停止",
|
||||
"Countdown" => "カウントダウン",
|
||||
"Duration" => "時間",
|
||||
"Running" => "実行中",
|
||||
"Stopped" => "停止中",
|
||||
"Waiting for first action" => "最初の操作を待機中",
|
||||
"Time is up" => "時間です",
|
||||
"Bar height" => "バーの高さ",
|
||||
"Each screen has one role; repeat a role to mirror it." => "各画面に役割を割り当てます。同じ役割を選ぶとミラー表示します。",
|
||||
"Window mode" => "ウィンドウモード",
|
||||
"Follow global" => "全体設定に従う",
|
||||
"Always fullscreen" => "常に全画面",
|
||||
"Always windowed" => "常にウィンドウ表示",
|
||||
"Swap groups" => "グループを入れ替え",
|
||||
"Presenter fullscreen" => "発表者を全画面表示",
|
||||
"Slides fullscreen" => "スライドを全画面表示",
|
||||
"Apply and remember" => "適用して保存",
|
||||
"Use single-screen mode?" => "シングルスクリーンモードを使用しますか?",
|
||||
"Keep Presenter view" => "発表者ビューを維持",
|
||||
"Use single-screen mode" => "シングルスクリーンモードを使用",
|
||||
"Exit fullscreen" => "全画面表示を終了",
|
||||
"Enter fullscreen" => "全画面表示にする",
|
||||
"Slide preview" => "スライドプレビュー",
|
||||
"Preview only — presentation unchanged" => "プレビューのみ — プレゼンテーションは変更されません",
|
||||
"Show on screen" => "表示する画面",
|
||||
"Preview size" => "プレビューサイズ",
|
||||
"Compact" => "コンパクト",
|
||||
"Large" => "大きい",
|
||||
"Safe browsing" => "安全な閲覧",
|
||||
"Live browsing" => "ライブ閲覧",
|
||||
"Change on click" => "クリックで切り替え",
|
||||
"Show selected" => "選択したものを表示",
|
||||
"Page background" => "ページ背景",
|
||||
"Fit padding color" => "余白の色",
|
||||
"Enable page zoom" => "ページズームを有効化",
|
||||
"Page zoom" => "ページズーム",
|
||||
"Reset zoom" => "ズームをリセット",
|
||||
"Disable zoom" => "ズームを無効化",
|
||||
"Keep zoom enabled" => "ズームを有効のままにする",
|
||||
"Memory and cache" => "メモリとキャッシュ",
|
||||
"Disk cache" => "ディスクキャッシュ",
|
||||
"Storage and preparation" => "保存場所と準備",
|
||||
"Application executable" => "アプリケーションの実行ファイル",
|
||||
"This is the running portable executable. Use its containing folder to find or remove the application." => "現在実行中のポータブル実行ファイルです。アプリを見つけたり削除したりするには、このファイルがあるフォルダーを使用してください。",
|
||||
"Storage locations" => "保存場所",
|
||||
"Preparing slide…" => "スライドを準備中…",
|
||||
"Slide ready" => "スライドの準備完了",
|
||||
"Loading into memory…" => "メモリに読み込み中…",
|
||||
"Could not load slide" => "スライドを読み込めませんでした",
|
||||
"Quit presentation?" => "プレゼンテーションを終了しますか?",
|
||||
"Quit presentation" => "プレゼンテーションを終了",
|
||||
"This closes Presenter and all Slides windows." => "発表者画面とすべてのスライド画面を閉じます。",
|
||||
"Swap displays…" => "画面を入れ替え…", "Go to slide" => "スライドへ移動",
|
||||
"Enter to show · Backspace to clear" => "Enterで表示 · Backspaceで消去",
|
||||
"Enter to show; Backspace to clear" => "Enterで表示、Backspaceで消去",
|
||||
"Keep these display settings?" => "このディスプレイ設定を維持しますか?",
|
||||
"Confirm once on any screen to apply to all displays." => "いずれかの画面で一度確認すると、すべてに適用されます。",
|
||||
"Keep changes" => "変更を維持", "Revert now" => "今すぐ元に戻す",
|
||||
"Edit layout for" => "レイアウトの編集対象", "Apply changes" => "変更を適用",
|
||||
"Selected" => "選択", "Blank Slides image" => "スライド非表示時の画像",
|
||||
"Custom picture selected" => "カスタム画像を選択済み", "Solid black" => "黒一色",
|
||||
"Choose picture…" => "画像を選択…", "Use solid black" => "黒一色を使用",
|
||||
"Processed slides" => "処理済みスライド"
|
||||
)
|
||||
}
|
||||
|
||||
fn zh_cn(text: &str) -> &str {
|
||||
catalog!(text;
|
||||
"Cancel" => "取消", "Close" => "关闭", "Retry" => "重试", "Quit" => "退出",
|
||||
"Theme" => "主题", "Language" => "语言", "Appearance" => "外观",
|
||||
"Preferences" => "首选项", "Preferences…" => "首选项…", "Quick settings" => "快速设置",
|
||||
"Menu" => "菜单", "Displays" => "显示器", "All slides" => "所有幻灯片",
|
||||
"Autoplay" => "自动播放", "Play automatically" => "自动播放幻灯片", "Timing" => "播放时长", "Loop" => "循环",
|
||||
"Timing starts when the slide is visible." => "幻灯片显示后才开始计时。",
|
||||
"Layout" => "布局", "Layout…" => "布局…", "Presenter layout" => "演讲者布局",
|
||||
"Presenter" => "演讲者", "Slides" => "幻灯片", "Single screen" => "单屏模式", "Unused" => "未使用",
|
||||
"Previous" => "上一张", "Current" => "当前", "Next" => "下一张",
|
||||
"PREVIOUS" => "上一张", "CURRENT" => "当前", "NEXT" => "下一张",
|
||||
"Previous slide" => "上一张幻灯片", "Current slide" => "当前幻灯片", "Next slide" => "下一张幻灯片",
|
||||
"No slide" => "无幻灯片", "End of slides" => "幻灯片结束", "Notes" => "备注",
|
||||
"No notes for this slide" => "此幻灯片没有备注", "PRESENTER NOTES · AUTO-FIT" => "演讲者备注 · 自动适应",
|
||||
"Show slides" => "显示幻灯片", "Blank slides" => "隐藏幻灯片",
|
||||
"NO OUTPUT DISPLAYED" => "未显示输出", "PRESENTING" => "正在演示", "PREPARING OUTPUT" => "正在准备输出",
|
||||
"Open PDF…" => "打开 PDF…", "Open picture folder…" => "打开图片文件夹…",
|
||||
"Open a PDF or picture folder to browse slides." => "打开 PDF 或图片文件夹以浏览幻灯片。",
|
||||
"File chooser already open" => "文件选择器已打开", "Import notes…" => "导入备注…",
|
||||
"Import notes" => "导入备注", "Processing notes…" => "正在处理备注…", "Save notes" => "保存备注",
|
||||
"Edit notes" => "编辑备注", "Saving notes…" => "正在保存备注…", "Empty note" => "空备注",
|
||||
"Import and save notes" => "导入并保存备注", "Discard changes and close" => "放弃更改并关闭",
|
||||
"Reload (discard edits)" => "重新加载(放弃编辑)", "Tools" => "工具", "Off" => "关闭",
|
||||
"Pointer" => "指针", "Arrow" => "箭头", "Highlighter" => "荧光笔", "Color" => "颜色",
|
||||
"Size" => "大小", "Undo" => "撤销", "Clear" => "清除", "Balanced" => "均衡",
|
||||
"Slide focus" => "幻灯片优先", "Notes first" => "备注优先", "Start with a preset" => "从预设开始",
|
||||
"Slides and notes" => "幻灯片和备注", "Relative size" => "相对大小", "Space (%)" => "空间 (%)",
|
||||
"Text size" => "文字大小", "Header" => "页眉", "Header and footer" => "页眉和页脚",
|
||||
"Keep header visible" => "保持页眉可见", "Keep footer visible" => "保持页脚可见", "Show both" => "两者都显示",
|
||||
"Auto-hide header" => "自动隐藏页眉", "Auto-hide footer" => "自动隐藏页脚",
|
||||
"Elapsed time" => "已用时间", "Time · HH:MM" => "时间 · HH:MM", "Timers and progress" => "计时器和进度",
|
||||
"Slide progress bar" => "幻灯片进度条", "Reset timer" => "重置计时器", "Start timer" => "启动计时器",
|
||||
"Pause timer" => "暂停计时器", "Countdown" => "倒计时", "Duration" => "时长", "Running" => "运行中",
|
||||
"Stopped" => "已停止", "Waiting for first action" => "等待首次操作", "Time is up" => "时间到",
|
||||
"Bar height" => "进度条高度", "Each screen has one role; repeat a role to mirror it." => "每个屏幕分配一个角色;重复角色可进行镜像显示。",
|
||||
"Window mode" => "窗口模式", "Follow global" => "跟随全局设置", "Always fullscreen" => "始终全屏",
|
||||
"Always windowed" => "始终窗口化", "Swap groups" => "交换分组", "Presenter fullscreen" => "演讲者全屏",
|
||||
"Slides fullscreen" => "幻灯片全屏", "Apply and remember" => "应用并记住",
|
||||
"Use single-screen mode?" => "使用单屏模式?", "Keep Presenter view" => "保留演讲者视图",
|
||||
"Use single-screen mode" => "使用单屏模式", "Exit fullscreen" => "退出全屏", "Enter fullscreen" => "进入全屏",
|
||||
"Slide preview" => "幻灯片预览", "Preview only — presentation unchanged" => "仅预览 — 演示内容不变",
|
||||
"Show on screen" => "显示在屏幕", "Preview size" => "预览大小", "Compact" => "紧凑", "Large" => "大",
|
||||
"Safe browsing" => "安全浏览", "Live browsing" => "实时浏览", "Change on click" => "点击时切换",
|
||||
"Show selected" => "显示所选项", "Page background" => "页面背景", "Fit padding color" => "边距颜色",
|
||||
"Enable page zoom" => "启用页面缩放", "Page zoom" => "页面缩放", "Reset zoom" => "重置缩放",
|
||||
"Disable zoom" => "禁用缩放", "Keep zoom enabled" => "保持缩放启用", "Memory and cache" => "内存和缓存",
|
||||
"Disk cache" => "磁盘缓存", "Storage and preparation" => "存储和准备", "Storage locations" => "存储位置",
|
||||
"Application executable" => "应用程序可执行文件",
|
||||
"This is the running portable executable. Use its containing folder to find or remove the application." => "这是当前运行的便携版可执行文件。可通过其所在文件夹查找或删除本应用程序。",
|
||||
"Preparing slide…" => "正在准备幻灯片…", "Slide ready" => "幻灯片已就绪", "Loading into memory…" => "正在加载到内存…",
|
||||
"Could not load slide" => "无法加载幻灯片", "Quit presentation?" => "退出演示?",
|
||||
"Quit presentation" => "退出演示", "This closes Presenter and all Slides windows." => "这将关闭演讲者窗口和所有幻灯片窗口。",
|
||||
"Swap displays…" => "交换显示器…", "Go to slide" => "转到幻灯片",
|
||||
"Enter to show · Backspace to clear" => "Enter 显示 · Backspace 清除",
|
||||
"Enter to show; Backspace to clear" => "Enter 显示;Backspace 清除",
|
||||
"Keep these display settings?" => "保留这些显示设置?",
|
||||
"Confirm once on any screen to apply to all displays." => "在任意屏幕确认一次即可应用到所有显示器。",
|
||||
"Keep changes" => "保留更改", "Revert now" => "立即还原", "Edit layout for" => "编辑布局:",
|
||||
"Apply changes" => "应用更改", "Selected" => "已选择", "Blank Slides image" => "隐藏幻灯片时的图片",
|
||||
"Custom picture selected" => "已选择自定义图片", "Solid black" => "纯黑",
|
||||
"Choose picture…" => "选择图片…", "Use solid black" => "使用纯黑", "Processed slides" => "已处理的幻灯片"
|
||||
)
|
||||
}
|
||||
|
||||
fn de(text: &str) -> &str {
|
||||
catalog!(text;
|
||||
"Cancel" => "Abbrechen", "Close" => "Schließen", "Retry" => "Erneut versuchen", "Quit" => "Beenden",
|
||||
"Theme" => "Design", "Language" => "Sprache", "Appearance" => "Darstellung",
|
||||
"Preferences" => "Einstellungen", "Preferences…" => "Einstellungen…", "Quick settings" => "Schnelleinstellungen",
|
||||
"Menu" => "Menü", "Displays" => "Bildschirme", "All slides" => "Alle Folien", "Layout" => "Layout",
|
||||
"Autoplay" => "Automatische Wiedergabe", "Play automatically" => "Automatisch abspielen", "Timing" => "Anzeigedauer", "Loop" => "Wiederholen",
|
||||
"Timing starts when the slide is visible." => "Die Zeitmessung beginnt, sobald die Folie sichtbar ist.",
|
||||
"Layout…" => "Layout…", "Presenter layout" => "Präsentatorlayout", "Presenter" => "Präsentator",
|
||||
"Slides" => "Folien", "Single screen" => "Einzelbildschirm", "Unused" => "Unbenutzt",
|
||||
"Previous" => "Zurück", "Current" => "Aktuell", "Next" => "Weiter", "PREVIOUS" => "VORHERIGE",
|
||||
"CURRENT" => "AKTUELL", "NEXT" => "NÄCHSTE", "Previous slide" => "Vorherige Folie",
|
||||
"Current slide" => "Aktuelle Folie", "Next slide" => "Nächste Folie", "No slide" => "Keine Folie",
|
||||
"End of slides" => "Ende der Folien", "Notes" => "Notizen", "No notes for this slide" => "Keine Notizen für diese Folie",
|
||||
"Show slides" => "Folien anzeigen", "Blank slides" => "Folien ausblenden", "NO OUTPUT DISPLAYED" => "KEINE AUSGABE ANGEZEIGT",
|
||||
"PRESENTING" => "PRÄSENTATION LÄUFT", "PREPARING OUTPUT" => "AUSGABE WIRD VORBEREITET",
|
||||
"Open PDF…" => "PDF öffnen…", "Open picture folder…" => "Bilderordner öffnen…", "Import notes…" => "Notizen importieren…",
|
||||
"Save notes" => "Notizen speichern", "Edit notes" => "Notizen bearbeiten", "Tools" => "Werkzeuge", "Off" => "Aus",
|
||||
"Pointer" => "Zeiger", "Arrow" => "Pfeil", "Highlighter" => "Textmarker", "Color" => "Farbe", "Size" => "Größe",
|
||||
"Undo" => "Rückgängig", "Clear" => "Löschen", "Balanced" => "Ausgewogen", "Slide focus" => "Folienfokus",
|
||||
"Notes first" => "Notizen zuerst", "Slides and notes" => "Folien und Notizen", "Header" => "Kopfzeile",
|
||||
"Header and footer" => "Kopf- und Fußzeile", "Keep header visible" => "Kopfzeile sichtbar lassen",
|
||||
"Keep footer visible" => "Fußzeile sichtbar lassen", "Elapsed time" => "Verstrichene Zeit", "Countdown" => "Countdown",
|
||||
"Duration" => "Dauer", "Reset timer" => "Timer zurücksetzen", "Start timer" => "Timer starten",
|
||||
"Pause timer" => "Timer pausieren", "Window mode" => "Fenstermodus", "Follow global" => "Globaler Einstellung folgen",
|
||||
"Always fullscreen" => "Immer Vollbild", "Always windowed" => "Immer im Fenster", "Swap groups" => "Gruppen tauschen",
|
||||
"Presenter fullscreen" => "Präsentator im Vollbild", "Slides fullscreen" => "Folien im Vollbild",
|
||||
"Apply and remember" => "Anwenden und merken", "Exit fullscreen" => "Vollbild verlassen",
|
||||
"Enter fullscreen" => "Vollbild öffnen", "Slide preview" => "Folienvorschau", "Preview size" => "Vorschaugröße",
|
||||
"Compact" => "Kompakt", "Large" => "Groß", "Safe browsing" => "Sicheres Durchsuchen",
|
||||
"Live browsing" => "Live-Durchsuchen", "Change on click" => "Bei Klick wechseln", "Show selected" => "Auswahl zeigen",
|
||||
"Enable page zoom" => "Seitenzoom aktivieren", "Page zoom" => "Seitenzoom", "Reset zoom" => "Zoom zurücksetzen",
|
||||
"Memory and cache" => "Speicher und Cache", "Disk cache" => "Datenträgercache",
|
||||
"Storage and preparation" => "Speicher und Vorbereitung", "Application executable" => "Anwendungsdatei",
|
||||
"This is the running portable executable. Use its containing folder to find or remove the application." => "Dies ist die aktuell ausgeführte portable Anwendungsdatei. Über ihren Ordner können Sie die Anwendung finden oder entfernen.",
|
||||
"Quit presentation?" => "Präsentation beenden?",
|
||||
"Quit presentation" => "Präsentation beenden", "This closes Presenter and all Slides windows." => "Dadurch werden der Präsentator und alle Folienfenster geschlossen.",
|
||||
"Swap displays…" => "Bildschirme tauschen…", "Go to slide" => "Zu Folie springen",
|
||||
"Keep these display settings?" => "Diese Bildschirmeinstellungen behalten?", "Keep changes" => "Änderungen behalten",
|
||||
"Revert now" => "Jetzt zurücksetzen", "Apply changes" => "Änderungen anwenden", "Selected" => "Ausgewählt",
|
||||
"Processed slides" => "Verarbeitete Folien"
|
||||
)
|
||||
}
|
||||
|
||||
fn pt_br(text: &str) -> &str {
|
||||
catalog!(text;
|
||||
"Cancel" => "Cancelar", "Close" => "Fechar", "Retry" => "Tentar novamente", "Quit" => "Sair",
|
||||
"Theme" => "Tema", "Language" => "Idioma", "Appearance" => "Aparência",
|
||||
"Preferences" => "Preferências", "Preferences…" => "Preferências…", "Quick settings" => "Configurações rápidas",
|
||||
"Menu" => "Menu", "Displays" => "Telas", "All slides" => "Todos os slides", "Layout" => "Layout",
|
||||
"Autoplay" => "Reprodução automática", "Play automatically" => "Reproduzir automaticamente", "Timing" => "Duração", "Loop" => "Repetir",
|
||||
"Timing starts when the slide is visible." => "A contagem começa quando o slide está visível.",
|
||||
"Layout…" => "Layout…", "Presenter layout" => "Layout do apresentador", "Presenter" => "Apresentador",
|
||||
"Slides" => "Slides", "Single screen" => "Tela única", "Unused" => "Não usada", "Previous" => "Anterior",
|
||||
"Current" => "Atual", "Next" => "Próximo", "PREVIOUS" => "ANTERIOR", "CURRENT" => "ATUAL", "NEXT" => "PRÓXIMO",
|
||||
"Previous slide" => "Slide anterior", "Current slide" => "Slide atual", "Next slide" => "Próximo slide",
|
||||
"No slide" => "Sem slide", "End of slides" => "Fim dos slides", "Notes" => "Notas",
|
||||
"No notes for this slide" => "Sem notas para este slide", "Show slides" => "Mostrar slides",
|
||||
"Blank slides" => "Ocultar slides", "NO OUTPUT DISPLAYED" => "NENHUMA SAÍDA EXIBIDA",
|
||||
"PRESENTING" => "APRESENTANDO", "PREPARING OUTPUT" => "PREPARANDO A SAÍDA",
|
||||
"Open PDF…" => "Abrir PDF…", "Open picture folder…" => "Abrir pasta de imagens…",
|
||||
"Import notes…" => "Importar notas…", "Save notes" => "Salvar notas", "Edit notes" => "Editar notas",
|
||||
"Tools" => "Ferramentas", "Off" => "Desativado", "Pointer" => "Ponteiro", "Arrow" => "Seta",
|
||||
"Highlighter" => "Marca-texto", "Color" => "Cor", "Size" => "Tamanho", "Undo" => "Desfazer", "Clear" => "Limpar",
|
||||
"Balanced" => "Equilibrado", "Slide focus" => "Foco no slide", "Notes first" => "Notas primeiro",
|
||||
"Slides and notes" => "Slides e notas", "Header" => "Cabeçalho", "Header and footer" => "Cabeçalho e rodapé",
|
||||
"Keep header visible" => "Manter cabeçalho visível", "Keep footer visible" => "Manter rodapé visível",
|
||||
"Elapsed time" => "Tempo decorrido", "Countdown" => "Contagem regressiva", "Duration" => "Duração",
|
||||
"Reset timer" => "Reiniciar cronômetro", "Start timer" => "Iniciar cronômetro", "Pause timer" => "Pausar cronômetro",
|
||||
"Window mode" => "Modo de janela", "Follow global" => "Seguir configuração global",
|
||||
"Always fullscreen" => "Sempre em tela cheia", "Always windowed" => "Sempre em janela",
|
||||
"Swap groups" => "Trocar grupos", "Presenter fullscreen" => "Apresentador em tela cheia",
|
||||
"Slides fullscreen" => "Slides em tela cheia", "Apply and remember" => "Aplicar e lembrar",
|
||||
"Exit fullscreen" => "Sair da tela cheia", "Enter fullscreen" => "Entrar em tela cheia",
|
||||
"Slide preview" => "Prévia do slide", "Preview size" => "Tamanho da prévia", "Compact" => "Compacto", "Large" => "Grande",
|
||||
"Safe browsing" => "Navegação segura", "Live browsing" => "Navegação ao vivo", "Change on click" => "Alterar ao clicar",
|
||||
"Show selected" => "Mostrar selecionado", "Enable page zoom" => "Ativar zoom da página", "Page zoom" => "Zoom da página",
|
||||
"Reset zoom" => "Redefinir zoom", "Memory and cache" => "Memória e cache", "Disk cache" => "Cache em disco",
|
||||
"Storage and preparation" => "Armazenamento e preparação", "Application executable" => "Executável do aplicativo",
|
||||
"This is the running portable executable. Use its containing folder to find or remove the application." => "Este é o executável portátil em uso. Use a pasta que o contém para encontrar ou remover o aplicativo.",
|
||||
"Quit presentation?" => "Sair da apresentação?",
|
||||
"Quit presentation" => "Sair da apresentação", "This closes Presenter and all Slides windows." => "Isso fecha o Apresentador e todas as janelas de slides.",
|
||||
"Swap displays…" => "Trocar telas…", "Go to slide" => "Ir para o slide",
|
||||
"Keep these display settings?" => "Manter estas configurações de tela?", "Keep changes" => "Manter alterações",
|
||||
"Revert now" => "Reverter agora", "Apply changes" => "Aplicar alterações", "Selected" => "Selecionado",
|
||||
"Processed slides" => "Slides processados"
|
||||
)
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
|
||||
#[test]
|
||||
fn system_locales_resolve_supported_languages_without_misclassifying_scripts() {
|
||||
for (locale, expected) in [
|
||||
("fr_CA.UTF-8", ResolvedLanguage::Fr),
|
||||
("es-MX", ResolvedLanguage::Es),
|
||||
("ja_JP", ResolvedLanguage::Ja),
|
||||
("zh_CN.UTF-8", ResolvedLanguage::ZhCn),
|
||||
("zh-Hans-SG", ResolvedLanguage::ZhCn),
|
||||
("de-DE", ResolvedLanguage::De),
|
||||
("pt-BR", ResolvedLanguage::PtBr),
|
||||
("zh-TW", ResolvedLanguage::En),
|
||||
("zh-Hant", ResolvedLanguage::En),
|
||||
("pt-PT", ResolvedLanguage::En),
|
||||
("C", ResolvedLanguage::En),
|
||||
] {
|
||||
assert_eq!(resolve_system_locale(Some(locale)), expected, "{locale}");
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn catalogs_translate_core_presenter_controls_and_fall_back_to_english() {
|
||||
let ctx = egui::Context::default();
|
||||
for (language, expected, autoplay) in [
|
||||
(Language::Fr, "Écrans", "Lecture automatique"),
|
||||
(Language::Es, "Pantallas", "Reproducción automática"),
|
||||
(Language::Ja, "ディスプレイ", "自動再生"),
|
||||
(Language::ZhCn, "显示器", "自动播放"),
|
||||
(Language::De, "Bildschirme", "Automatische Wiedergabe"),
|
||||
(Language::PtBr, "Telas", "Reprodução automática"),
|
||||
] {
|
||||
apply(&ctx, &language);
|
||||
assert_eq!(tr(&ctx, "Displays"), expected);
|
||||
assert_eq!(tr(&ctx, "Autoplay"), autoplay);
|
||||
assert_eq!(
|
||||
tr(&ctx, "untranslated diagnostic"),
|
||||
"untranslated diagnostic"
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn embedded_cjk_faces_render_selected_interface_scripts() {
|
||||
let ctx = egui::Context::default();
|
||||
for (language, sample) in [
|
||||
(Language::Ja, "日本語スライド"),
|
||||
(Language::ZhCn, "简体中文幻灯片"),
|
||||
] {
|
||||
apply(&ctx, &language);
|
||||
let _ = ctx.run_ui(egui::RawInput::default(), |ui| {
|
||||
ui.fonts_mut(|fonts| {
|
||||
let galley = fonts.layout_no_wrap(
|
||||
sample.into(),
|
||||
egui::FontId::proportional(18.0),
|
||||
egui::Color32::WHITE,
|
||||
);
|
||||
assert_eq!(galley.text(), sample);
|
||||
assert!(
|
||||
galley.rows[0]
|
||||
.glyphs
|
||||
.iter()
|
||||
.all(|glyph| !glyph.uv_rect.is_nothing()),
|
||||
"missing glyph in {language:?}"
|
||||
);
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -193,6 +193,8 @@ struct NativeWindow {
|
|||
zoom_watch: crate::zoom::PerformanceWatch,
|
||||
zoom_slow: bool,
|
||||
presentation_base: Option<PresentationBase>,
|
||||
applied_theme: Option<crate::theme::Theme>,
|
||||
applied_language: Option<crate::localization::Language>,
|
||||
#[cfg(target_os = "linux")]
|
||||
browser_parent: Option<WindowId>,
|
||||
}
|
||||
|
|
@ -253,6 +255,8 @@ impl NativeWindow {
|
|||
zoom_watch: Default::default(),
|
||||
zoom_slow: false,
|
||||
presentation_base: None,
|
||||
applied_theme: None,
|
||||
applied_language: None,
|
||||
#[cfg(target_os = "linux")]
|
||||
browser_parent: None,
|
||||
})
|
||||
|
|
@ -336,8 +340,14 @@ impl NativeWindow {
|
|||
return Err("Display exceeds 40 megapixels".into());
|
||||
}
|
||||
if let Some(s) = studio.as_ref() {
|
||||
s.settings.theme.apply(&self.ctx);
|
||||
crate::localization::apply(&self.ctx, &s.settings.language);
|
||||
if self.applied_theme != Some(s.settings.theme) {
|
||||
s.settings.theme.apply(&self.ctx);
|
||||
self.applied_theme = Some(s.settings.theme);
|
||||
}
|
||||
if self.applied_language != Some(s.settings.language) {
|
||||
crate::localization::apply(&self.ctx, &s.settings.language);
|
||||
self.applied_language = Some(s.settings.language);
|
||||
}
|
||||
}
|
||||
let input = self.input.take_egui_input(&self.window);
|
||||
let role = self.role;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
use crate::localization::tr;
|
||||
use crate::localization::{display_revert_countdown, tr};
|
||||
// Native controls for the approved presenter layout and safe slide browser.
|
||||
use crate::{
|
||||
settings::{Layout, TimerMode, TimerPosition},
|
||||
|
|
@ -12,6 +12,7 @@ use std::{
|
|||
time::{Duration, Instant},
|
||||
};
|
||||
const BROWSER_SCROLL_HANDLE: Color32 = Color32::from_rgb(70, 210, 175);
|
||||
const PRESENTER_FOOTER_HEIGHT: f32 = 112.;
|
||||
/// Composite a fitted slide over independent page and padding colors in every view.
|
||||
pub fn paint_slide(
|
||||
painter: &egui::Painter,
|
||||
|
|
@ -904,13 +905,7 @@ fn presenter_view(
|
|||
background.context_menu(|ui| {
|
||||
if !s.presentation_started
|
||||
&& s.route_trial.is_none()
|
||||
&& ui
|
||||
.button(if s.settings.language.french() {
|
||||
"Inverser les écrans…"
|
||||
} else {
|
||||
"Swap displays…"
|
||||
})
|
||||
.clicked()
|
||||
&& ui.button(tr(&locale, "Swap displays…")).clicked()
|
||||
{
|
||||
s.actions.push(Action::SwapRoutes);
|
||||
ui.close();
|
||||
|
|
@ -958,7 +953,7 @@ fn presenter_view(
|
|||
body.min.y += header_height;
|
||||
}
|
||||
if view.layout.footer {
|
||||
body.max.y -= 90.;
|
||||
body.max.y -= PRESENTER_FOOTER_HEIGHT;
|
||||
}
|
||||
if view.layout.slide_progress {
|
||||
let height = view
|
||||
|
|
@ -1278,15 +1273,6 @@ fn presenter_view(
|
|||
.show(ui, |ui| menu(ui, s, &mut view.preferences_open));
|
||||
});
|
||||
view.menu_open = menu_open;
|
||||
ui.add_sized(
|
||||
[100., 20.],
|
||||
egui::Label::new(
|
||||
s.deck
|
||||
.as_ref()
|
||||
.map_or("PDF Presenter", |d| d.title.as_str()),
|
||||
)
|
||||
.truncate(),
|
||||
);
|
||||
if ui.button(tr(&locale, "Displays")).clicked() {
|
||||
s.begin_display_edit();
|
||||
}
|
||||
|
|
@ -1352,8 +1338,8 @@ fn presenter_view(
|
|||
}
|
||||
if footer {
|
||||
let rect = Rect::from_min_size(
|
||||
Pos2::new(screen.left(), screen.bottom() - 90.),
|
||||
Vec2::new(screen.width(), 90.),
|
||||
Pos2::new(screen.left(), screen.bottom() - PRESENTER_FOOTER_HEIGHT),
|
||||
Vec2::new(screen.width(), PRESENTER_FOOTER_HEIGHT),
|
||||
);
|
||||
ui.painter().rect_filled(rect, 0., ui.visuals().window_fill);
|
||||
ui.scope_builder(egui::UiBuilder::new().max_rect(rect.shrink(8.)), |ui| {
|
||||
|
|
@ -1407,6 +1393,28 @@ fn presenter_view(
|
|||
.desired_height(4.),
|
||||
);
|
||||
}
|
||||
if let Some(deck) = &s.deck {
|
||||
let path = deck.path.display().to_string();
|
||||
let name = deck
|
||||
.path
|
||||
.file_name()
|
||||
.and_then(|name| name.to_str())
|
||||
.unwrap_or(&path);
|
||||
ui.horizontal(|ui| {
|
||||
ui.strong(name).on_hover_text(&path);
|
||||
ui.separator();
|
||||
ui.add_sized(
|
||||
[ui.available_width(), 18.],
|
||||
egui::Label::new(
|
||||
egui::RichText::new(&path)
|
||||
.small()
|
||||
.color(ui.visuals().weak_text_color()),
|
||||
)
|
||||
.truncate(),
|
||||
)
|
||||
.on_hover_text(&path);
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
let compact_preparation = s.loading
|
||||
|
|
@ -1443,17 +1451,9 @@ fn presenter_view(
|
|||
egui::Frame::popup(ui.style()).show(ui, |ui| {
|
||||
ui.label(format!(
|
||||
"{} {} · {}",
|
||||
if s.settings.language.french() {
|
||||
"Diapositive"
|
||||
} else {
|
||||
"Go to slide"
|
||||
},
|
||||
tr(&locale, "Go to slide"),
|
||||
s.jump,
|
||||
if s.settings.language.french() {
|
||||
"Entrée : diffuser · Retour arrière : effacer"
|
||||
} else {
|
||||
"Enter to show · Backspace to clear"
|
||||
}
|
||||
tr(&locale, "Enter to show · Backspace to clear")
|
||||
));
|
||||
});
|
||||
});
|
||||
|
|
@ -1465,39 +1465,22 @@ fn presenter_view(
|
|||
.as_secs()
|
||||
+ 1;
|
||||
egui::Modal::new(egui::Id::new("confirm-displays")).show(&ctx, |ui| {
|
||||
ui.heading(if s.settings.language.french() {
|
||||
"Conserver ces écrans ?"
|
||||
} else {
|
||||
"Keep these display settings?"
|
||||
});
|
||||
ui.label(if s.settings.language.french() {
|
||||
"Une seule confirmation suffit pour tous les écrans."
|
||||
} else {
|
||||
"Confirm once on any screen to apply to all displays."
|
||||
});
|
||||
ui.label(if s.settings.language.french() {
|
||||
format!("Retour automatique dans {seconds} s. Échap pour annuler.")
|
||||
} else {
|
||||
format!("Automatically reverts in {seconds} seconds. Escape to revert.")
|
||||
});
|
||||
ui.heading(tr(&locale, "Keep these display settings?"));
|
||||
ui.label(tr(
|
||||
&locale,
|
||||
"Confirm once on any screen to apply to all displays.",
|
||||
));
|
||||
ui.label(display_revert_countdown(&locale, seconds));
|
||||
ui.horizontal(|ui| {
|
||||
button(
|
||||
ui,
|
||||
if s.settings.language.french() {
|
||||
"Conserver"
|
||||
} else {
|
||||
"Keep changes"
|
||||
},
|
||||
tr(&locale, "Keep changes"),
|
||||
Action::KeepRoutes,
|
||||
&mut s.actions,
|
||||
);
|
||||
button(
|
||||
ui,
|
||||
if s.settings.language.french() {
|
||||
"Annuler"
|
||||
} else {
|
||||
"Revert now"
|
||||
},
|
||||
tr(&locale, "Revert now"),
|
||||
Action::RevertRoutes,
|
||||
&mut s.actions,
|
||||
);
|
||||
|
|
@ -1552,11 +1535,7 @@ fn presenter_view(
|
|||
ui.visuals_mut().slider_trailing_fill = true;
|
||||
if display.is_some() {
|
||||
ui.horizontal(|ui| {
|
||||
ui.strong(if s.settings.language.french() {
|
||||
"Modifier la disposition de"
|
||||
} else {
|
||||
"Edit layout for"
|
||||
});
|
||||
ui.strong(tr(&locale, "Edit layout for"));
|
||||
let selected = selected_layout_display
|
||||
.as_ref()
|
||||
.and_then(|selected| {
|
||||
|
|
@ -1578,11 +1557,10 @@ fn presenter_view(
|
|||
}
|
||||
});
|
||||
});
|
||||
ui.label(if s.settings.language.french() {
|
||||
"Disposition et sauvegardes propres à cet écran. Le fonctionnement du minuteur reste partagé."
|
||||
} else {
|
||||
"Layout and saves apply to this display. Timer behavior is shared."
|
||||
});
|
||||
ui.label(tr(
|
||||
&locale,
|
||||
"Layout and saves apply to this display. Timer behavior is shared.",
|
||||
));
|
||||
}
|
||||
ui.label(tr(
|
||||
&locale,
|
||||
|
|
@ -1713,14 +1691,8 @@ fn presenter_view(
|
|||
});
|
||||
layout_section(ui, tr(&locale, "Header and footer"), |ui| {
|
||||
ui.horizontal_wrapped(|ui| {
|
||||
ui.checkbox(
|
||||
&mut layout.header,
|
||||
tr(&locale, "Keep header visible"),
|
||||
);
|
||||
ui.checkbox(
|
||||
&mut layout.footer,
|
||||
tr(&locale, "Keep footer visible"),
|
||||
);
|
||||
ui.checkbox(&mut layout.header, tr(&locale, "Keep header visible"));
|
||||
ui.checkbox(&mut layout.footer, tr(&locale, "Keep footer visible"));
|
||||
});
|
||||
ui.small(tr(
|
||||
&locale,
|
||||
|
|
@ -1735,14 +1707,27 @@ fn presenter_view(
|
|||
button(
|
||||
ui,
|
||||
tr(&locale, "Save layout · This project"),
|
||||
rendered_layout_display.as_deref().map_or(Action::SaveProject, |display| Action::SaveDisplayLayout { display: display.into(), project: true, layout: layout.clone() }),
|
||||
rendered_layout_display.as_deref().map_or(
|
||||
Action::SaveProject,
|
||||
|display| Action::SaveDisplayLayout {
|
||||
display: display.into(),
|
||||
project: true,
|
||||
layout: layout.clone(),
|
||||
},
|
||||
),
|
||||
&mut s.actions,
|
||||
);
|
||||
});
|
||||
button(
|
||||
ui,
|
||||
tr(&locale, "Save layout · All projects"),
|
||||
rendered_layout_display.as_deref().map_or(Action::SaveGlobal, |display| Action::SaveDisplayLayout { display: display.into(), project: false, layout: layout.clone() }),
|
||||
rendered_layout_display
|
||||
.as_deref()
|
||||
.map_or(Action::SaveGlobal, |display| Action::SaveDisplayLayout {
|
||||
display: display.into(),
|
||||
project: false,
|
||||
layout: layout.clone(),
|
||||
}),
|
||||
&mut s.actions,
|
||||
);
|
||||
});
|
||||
|
|
@ -1751,7 +1736,11 @@ fn presenter_view(
|
|||
button(
|
||||
ui,
|
||||
tr(&locale, "Use all-projects default"),
|
||||
rendered_layout_display.as_deref().map_or(Action::UseGlobal, |display| Action::UseDisplayDefault(display.into())),
|
||||
rendered_layout_display
|
||||
.as_deref()
|
||||
.map_or(Action::UseGlobal, |display| {
|
||||
Action::UseDisplayDefault(display.into())
|
||||
}),
|
||||
&mut s.actions,
|
||||
);
|
||||
});
|
||||
|
|
@ -1889,11 +1878,7 @@ fn presenter_view(
|
|||
);
|
||||
button(
|
||||
ui,
|
||||
if s.settings.language.french() {
|
||||
"Appliquer les modifications"
|
||||
} else {
|
||||
"Apply changes"
|
||||
},
|
||||
tr(&locale, "Apply changes"),
|
||||
Action::ApplyRoutes,
|
||||
&mut s.actions,
|
||||
);
|
||||
|
|
@ -2274,37 +2259,21 @@ pub fn browser(ui: &mut Ui, s: &mut Studio, native: &mut UiState) {
|
|||
ui.add_space(4.);
|
||||
ui.label(format!(
|
||||
"{} {} · {} {}",
|
||||
if s.settings.language.french() {
|
||||
"Sélection"
|
||||
} else {
|
||||
"Selected"
|
||||
},
|
||||
tr(&locale, "Selected"),
|
||||
if s.count() == 0 {
|
||||
0
|
||||
} else {
|
||||
s.browser_selected + 1
|
||||
},
|
||||
if s.settings.language.french() {
|
||||
"Actuelle"
|
||||
} else {
|
||||
"Current"
|
||||
},
|
||||
tr(&locale, "Current"),
|
||||
if s.count() == 0 { 0 } else { s.requested + 1 },
|
||||
));
|
||||
if !s.jump.is_empty() {
|
||||
ui.label(format!(
|
||||
"{} {} — {}",
|
||||
if s.settings.language.french() {
|
||||
"Diapositive"
|
||||
} else {
|
||||
"Go to slide"
|
||||
},
|
||||
tr(&locale, "Go to slide"),
|
||||
s.jump,
|
||||
if s.settings.language.french() {
|
||||
"Entrée : diffuser, Retour arrière : effacer"
|
||||
} else {
|
||||
"Enter to show; Backspace to clear"
|
||||
}
|
||||
tr(&locale, "Enter to show; Backspace to clear")
|
||||
));
|
||||
}
|
||||
// Reserve a stable gutter, so neither thumbnail sizing nor scrollbar placement
|
||||
|
|
@ -2460,32 +2429,18 @@ fn preferences_window(ctx: &egui::Context, s: &mut Studio, open: &mut bool) {
|
|||
.show(ui, |ui| {
|
||||
layout_section(
|
||||
ui,
|
||||
if s.settings.language.french() {
|
||||
"Image des diapositives masquées"
|
||||
} else {
|
||||
"Blank Slides image"
|
||||
},
|
||||
tr(&locale, "Blank Slides image"),
|
||||
|ui| {
|
||||
ui.label(if s.settings.blank_picture {
|
||||
if s.settings.language.french() {
|
||||
"Image personnalisée sélectionnée"
|
||||
} else {
|
||||
"Custom picture selected"
|
||||
}
|
||||
} else if s.settings.language.french() {
|
||||
"Écran noir"
|
||||
tr(&locale, "Custom picture selected")
|
||||
} else {
|
||||
"Solid black"
|
||||
tr(&locale, "Solid black")
|
||||
});
|
||||
ui.horizontal_wrapped(|ui| {
|
||||
if ui
|
||||
.add_enabled(
|
||||
s.initialized && !s.dialog_busy && !s.blank_busy,
|
||||
egui::Button::new(if s.settings.language.french() {
|
||||
"Choisir une image…"
|
||||
} else {
|
||||
"Choose picture…"
|
||||
}),
|
||||
egui::Button::new(tr(&locale, "Choose picture…")),
|
||||
)
|
||||
.clicked()
|
||||
{
|
||||
|
|
@ -2496,11 +2451,7 @@ fn preferences_window(ctx: &egui::Context, s: &mut Studio, open: &mut bool) {
|
|||
s.initialized
|
||||
&& !s.dialog_busy
|
||||
&& (s.settings.blank_picture || s.blank_busy),
|
||||
egui::Button::new(if s.settings.language.french() {
|
||||
"Utiliser un écran noir"
|
||||
} else {
|
||||
"Use solid black"
|
||||
}),
|
||||
egui::Button::new(tr(&locale, "Use solid black")),
|
||||
)
|
||||
.clicked()
|
||||
{
|
||||
|
|
@ -2510,11 +2461,10 @@ fn preferences_window(ctx: &egui::Context, s: &mut Studio, open: &mut bool) {
|
|||
ui.spinner();
|
||||
}
|
||||
});
|
||||
ui.small(if s.settings.language.french() {
|
||||
"Une copie est conservée et ajustée à tous les écrans de diapositives, sur fond noir."
|
||||
} else {
|
||||
"A copy is saved and fitted to all Slides screens against a black background."
|
||||
});
|
||||
ui.small(tr(
|
||||
&locale,
|
||||
"A copy is saved and fitted to all Slides screens against a black background.",
|
||||
));
|
||||
},
|
||||
);
|
||||
#[cfg(target_os = "windows")]
|
||||
|
|
@ -2522,32 +2472,22 @@ fn preferences_window(ctx: &egui::Context, s: &mut Studio, open: &mut bool) {
|
|||
ui.add_space(8.);
|
||||
layout_section(
|
||||
ui,
|
||||
if s.settings.language.french() {
|
||||
"Application PDF par défaut"
|
||||
} else {
|
||||
"Default PDF application"
|
||||
},
|
||||
tr(&locale, "Default PDF application"),
|
||||
|ui| {
|
||||
ui.label(if s.settings.language.french() {
|
||||
"Enregistre PDF Presenter et son icône pour les fichiers PDF de votre compte Windows."
|
||||
} else {
|
||||
"Register PDF Presenter and its icon for PDF files in your Windows account."
|
||||
});
|
||||
ui.label(tr(
|
||||
&locale,
|
||||
"Register PDF Presenter and its icon for PDF files in your Windows account.",
|
||||
));
|
||||
if ui
|
||||
.button(if s.settings.language.french() {
|
||||
"Définir comme application PDF par défaut…"
|
||||
} else {
|
||||
"Set as default PDF app…"
|
||||
})
|
||||
.button(tr(&locale, "Set as default PDF app…"))
|
||||
.clicked()
|
||||
{
|
||||
s.actions.push(Action::RegisterPdfAssociation);
|
||||
}
|
||||
ui.small(if s.settings.language.french() {
|
||||
"Windows ouvrira Applications par défaut : sélectionnez PDF Presenter pour .pdf afin de confirmer."
|
||||
} else {
|
||||
"Windows will open Default Apps; select PDF Presenter for .pdf to confirm."
|
||||
});
|
||||
ui.small(tr(
|
||||
&locale,
|
||||
"Windows will open Default Apps; select PDF Presenter for .pdf to confirm.",
|
||||
));
|
||||
},
|
||||
);
|
||||
}
|
||||
|
|
@ -2616,13 +2556,24 @@ fn preferences_window(ctx: &egui::Context, s: &mut Studio, open: &mut bool) {
|
|||
layout_section(ui, tr(&locale, "Storage and preparation"), |ui| {
|
||||
ui.label(s.preparation_status());
|
||||
ui.separator();
|
||||
ui.label(
|
||||
egui::RichText::new(tr(&locale, "Application executable")).strong(),
|
||||
);
|
||||
let executable = s.executable_path().display().to_string();
|
||||
ui.add(
|
||||
egui::Label::new(egui::RichText::new(&executable).monospace())
|
||||
.selectable(true)
|
||||
.wrap(),
|
||||
)
|
||||
.on_hover_text(&executable);
|
||||
ui.small(tr(
|
||||
&locale,
|
||||
"This is the running portable executable. Use its containing folder to find or remove the application.",
|
||||
));
|
||||
ui.separator();
|
||||
ui.label(format!(
|
||||
"{}: {}",
|
||||
if s.settings.language.french() {
|
||||
"Diapositives préparées"
|
||||
} else {
|
||||
"Processed slides"
|
||||
},
|
||||
tr(&locale, "Processed slides"),
|
||||
s.cache_path.display()
|
||||
));
|
||||
ui.label(format!("Configuration: {}", s.settings_path.display()));
|
||||
|
|
@ -2681,6 +2632,35 @@ fn menu(ui: &mut Ui, s: &mut Studio, preferences_open: &mut bool) {
|
|||
Action::OpenBrowser,
|
||||
&mut s.actions,
|
||||
);
|
||||
ui.menu_button(tr(&locale, "Autoplay"), |ui| {
|
||||
ui.set_min_width(250.);
|
||||
let mut changed = ui
|
||||
.checkbox(
|
||||
&mut s.settings.autoplay_enabled,
|
||||
tr(&locale, "Play automatically"),
|
||||
)
|
||||
.changed();
|
||||
ui.horizontal(|ui| {
|
||||
ui.label(tr(&locale, "Timing"));
|
||||
changed |= ui
|
||||
.add(
|
||||
egui::DragValue::new(&mut s.settings.autoplay_seconds)
|
||||
.range(0.25..=3600.0)
|
||||
.speed(0.25)
|
||||
.max_decimals(2)
|
||||
.suffix(" s"),
|
||||
)
|
||||
.changed();
|
||||
});
|
||||
changed |= ui
|
||||
.checkbox(&mut s.settings.autoplay_loop, tr(&locale, "Loop"))
|
||||
.changed();
|
||||
ui.small(tr(&locale, "Timing starts when the slide is visible."));
|
||||
if changed {
|
||||
s.autoplay_settings_changed();
|
||||
ui.ctx().request_repaint();
|
||||
}
|
||||
});
|
||||
ui.menu_button(tr(&locale, "Appearance"), |ui| {
|
||||
ui.with_layout(egui::Layout::top_down(egui::Align::Min), |ui| {
|
||||
ui.set_min_width(250.);
|
||||
|
|
@ -2691,11 +2671,11 @@ fn menu(ui: &mut Ui, s: &mut Studio, preferences_open: &mut bool) {
|
|||
.strong()
|
||||
.color(ui.visuals().weak_text_color()),
|
||||
);
|
||||
ui.menu_button(s.settings.theme.name().to_owned(), |ui| {
|
||||
ui.menu_button(s.settings.theme.name(), |ui| {
|
||||
for theme in crate::theme::Theme::ALL {
|
||||
let name = theme.name();
|
||||
changed |= ui
|
||||
.selectable_value(&mut s.settings.theme, theme.clone(), name)
|
||||
.selectable_value(&mut s.settings.theme, theme, name)
|
||||
.changed();
|
||||
}
|
||||
});
|
||||
|
|
|
|||
|
|
@ -279,6 +279,9 @@ pub struct Settings {
|
|||
pub buffer_mib: u32,
|
||||
pub disk_cache: crate::cache::Policy,
|
||||
pub auto_show: bool,
|
||||
pub autoplay_enabled: bool,
|
||||
pub autoplay_seconds: f32,
|
||||
pub autoplay_loop: bool,
|
||||
pub blank_picture: bool,
|
||||
pub zoom_enabled: bool,
|
||||
pub zoom_keep_fitted_area: bool,
|
||||
|
|
@ -327,6 +330,9 @@ impl Default for Settings {
|
|||
buffer_mib: default_buffer_mib(),
|
||||
disk_cache: Default::default(),
|
||||
auto_show: true,
|
||||
autoplay_enabled: false,
|
||||
autoplay_seconds: 5.0,
|
||||
autoplay_loop: false,
|
||||
blank_picture: false,
|
||||
zoom_enabled: false,
|
||||
zoom_keep_fitted_area: false,
|
||||
|
|
@ -344,6 +350,9 @@ impl Settings {
|
|||
if !(64..=16384).contains(&self.buffer_mib) {
|
||||
return Err("RAM buffer must be 64–16384 MiB per process".into());
|
||||
}
|
||||
if !self.autoplay_seconds.is_finite() || !(0.25..=3600.0).contains(&self.autoplay_seconds) {
|
||||
return Err("Autoplay timing must be 0.25–3600 seconds".into());
|
||||
}
|
||||
if self.projects.len() > 4096 || !(100. ..=400.).contains(&self.thumbnail_size) {
|
||||
return Err("Invalid settings limits".into());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -161,6 +161,8 @@ pub struct Studio {
|
|||
pub cache_status: String,
|
||||
startup_cache_pending: bool,
|
||||
navigation_settle: Option<Instant>,
|
||||
autoplay_deadline: Option<Instant>,
|
||||
autoplay_finished: bool,
|
||||
pub fg: Bridge,
|
||||
pub bg: Bridge,
|
||||
pub io: Bridge,
|
||||
|
|
@ -281,6 +283,8 @@ impl Studio {
|
|||
cache_status: String::new(),
|
||||
startup_cache_pending: true,
|
||||
navigation_settle: None,
|
||||
autoplay_deadline: None,
|
||||
autoplay_finished: false,
|
||||
fg: Bridge::with_program(Duration::from_secs(30), worker_program.clone()),
|
||||
bg: Bridge::with_program(Duration::from_secs(30), worker_program.clone()),
|
||||
io,
|
||||
|
|
@ -324,6 +328,9 @@ impl Studio {
|
|||
.as_ref()
|
||||
.map_or_else(|| "empty".into(), |d| d.key.clone())
|
||||
}
|
||||
pub fn executable_path(&self) -> &std::path::Path {
|
||||
&self.worker_program
|
||||
}
|
||||
pub fn frame(&self, page: usize) -> Option<Arc<Frame>> {
|
||||
[self.target_edge, 512, 1280, 320]
|
||||
.iter()
|
||||
|
|
@ -497,6 +504,63 @@ impl Studio {
|
|||
pub fn presentation_action(&mut self) {
|
||||
self.timer
|
||||
.presentation_action(Instant::now(), self.layout.timer_autostart);
|
||||
self.restart_autoplay();
|
||||
}
|
||||
fn restart_autoplay(&mut self) {
|
||||
self.autoplay_deadline = None;
|
||||
self.autoplay_finished = false;
|
||||
}
|
||||
pub fn autoplay_settings_changed(&mut self) {
|
||||
self.restart_autoplay();
|
||||
self.save_preferences();
|
||||
}
|
||||
fn poll_autoplay_at(&mut self, now: Instant) -> bool {
|
||||
let paused = !self.settings.autoplay_enabled
|
||||
|| !self.initialized
|
||||
|| self.loading
|
||||
|| self.pending_open.is_some()
|
||||
|| self.blanked
|
||||
|| self.dialog_busy
|
||||
|| self.route_trial.is_some()
|
||||
|| self.startup_single_offer()
|
||||
|| self.notes_editor.is_some()
|
||||
|| self.notes_import.is_some()
|
||||
|| self.quit_confirmation
|
||||
|| self.count() == 0;
|
||||
if paused {
|
||||
self.autoplay_deadline = None;
|
||||
return false;
|
||||
}
|
||||
if self.autoplay_finished {
|
||||
return false;
|
||||
}
|
||||
let visible = self.displayed == Some(self.requested)
|
||||
|| (self.routes.presentation.is_empty() && self.frame(self.requested).is_some());
|
||||
if !visible {
|
||||
self.autoplay_deadline = None;
|
||||
return false;
|
||||
}
|
||||
let deadline = self
|
||||
.autoplay_deadline
|
||||
.get_or_insert_with(|| now + Duration::from_secs_f32(self.settings.autoplay_seconds));
|
||||
if now < *deadline {
|
||||
return false;
|
||||
}
|
||||
let next = if self.requested + 1 < self.count() {
|
||||
Some(self.requested + 1)
|
||||
} else if self.settings.autoplay_loop && self.count() > 1 {
|
||||
Some(0)
|
||||
} else {
|
||||
None
|
||||
};
|
||||
self.autoplay_deadline = None;
|
||||
if let Some(next) = next {
|
||||
self.execute(Action::Go(next));
|
||||
true
|
||||
} else {
|
||||
self.autoplay_finished = true;
|
||||
false
|
||||
}
|
||||
}
|
||||
pub fn execute(&mut self, action: Action) {
|
||||
match action {
|
||||
|
|
@ -675,6 +739,7 @@ impl Studio {
|
|||
return;
|
||||
}
|
||||
if page < self.count() {
|
||||
self.restart_autoplay();
|
||||
if page != self.requested
|
||||
&& self.fg_busy
|
||||
&& !self.loading
|
||||
|
|
@ -1335,6 +1400,7 @@ impl Studio {
|
|||
self.requested = 0;
|
||||
self.presentation_started = false;
|
||||
self.timer = crate::timer::Timer::default();
|
||||
self.restart_autoplay();
|
||||
self.displayed = None;
|
||||
self.layout = self.settings.for_project(&info.key);
|
||||
self.presenter_views.clear();
|
||||
|
|
@ -1528,6 +1594,7 @@ impl Studio {
|
|||
{
|
||||
self.clean_cache(false);
|
||||
}
|
||||
self.poll_autoplay_at(Instant::now());
|
||||
}
|
||||
fn schedule(&mut self, page: usize, edge: u32, foreground: bool) {
|
||||
// Reserve both worker slots before admission, including progressive previews.
|
||||
|
|
@ -1832,6 +1899,57 @@ impl Studio {
|
|||
mod tests {
|
||||
use super::*;
|
||||
|
||||
#[test]
|
||||
fn autoplay_times_visible_slides_pauses_and_loops_safely() {
|
||||
let mut s = Studio::new(true, None);
|
||||
s.initialized = true;
|
||||
s.deck = Some(DeckInfo {
|
||||
path: "test.pdf".into(),
|
||||
key: "test".into(),
|
||||
title: "Test".into(),
|
||||
names: vec![String::new(); 3],
|
||||
notes: vec![],
|
||||
warnings: vec![],
|
||||
sha256: String::new(),
|
||||
});
|
||||
s.settings.autoplay_enabled = true;
|
||||
s.settings.autoplay_seconds = 2.0;
|
||||
s.blanked = false;
|
||||
s.displayed = Some(0);
|
||||
let start = Instant::now();
|
||||
assert!(!s.poll_autoplay_at(start));
|
||||
assert!(!s.poll_autoplay_at(start + Duration::from_millis(1999)));
|
||||
assert!(s.poll_autoplay_at(start + Duration::from_secs(2)));
|
||||
assert_eq!(s.requested, 1);
|
||||
|
||||
// A render/output delay never consumes the new slide's interval.
|
||||
assert!(!s.poll_autoplay_at(start + Duration::from_secs(20)));
|
||||
assert_eq!(s.requested, 1);
|
||||
s.displayed = Some(1);
|
||||
assert!(!s.poll_autoplay_at(start + Duration::from_secs(20)));
|
||||
assert!(s.poll_autoplay_at(start + Duration::from_secs(22)));
|
||||
assert_eq!(s.requested, 2);
|
||||
|
||||
s.displayed = Some(2);
|
||||
assert!(!s.poll_autoplay_at(start + Duration::from_secs(22)));
|
||||
assert!(!s.poll_autoplay_at(start + Duration::from_secs(24)));
|
||||
assert_eq!(s.requested, 2, "autoplay stops at the final slide");
|
||||
|
||||
s.settings.autoplay_loop = true;
|
||||
s.autoplay_settings_changed();
|
||||
assert!(!s.poll_autoplay_at(start + Duration::from_secs(30)));
|
||||
assert!(s.poll_autoplay_at(start + Duration::from_secs(32)));
|
||||
assert_eq!(s.requested, 0);
|
||||
|
||||
s.displayed = Some(0);
|
||||
s.blanked = true;
|
||||
assert!(!s.poll_autoplay_at(start + Duration::from_secs(40)));
|
||||
s.blanked = false;
|
||||
assert!(!s.poll_autoplay_at(start + Duration::from_secs(50)));
|
||||
assert!(s.poll_autoplay_at(start + Duration::from_secs(52)));
|
||||
assert_eq!(s.requested, 1, "unblanking starts a fresh interval");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn repeated_navigation_coalesces_rendering_and_clamps_without_blanking() {
|
||||
let mut s = Studio::new(true, None);
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ const MUTED: Color32 = Color32::from_rgb(165, 181, 201);
|
|||
const CYAN: Color32 = Color32::from_rgb(102, 219, 239);
|
||||
const AMBER: Color32 = Color32::from_rgb(246, 197, 119);
|
||||
const PURPLE: Color32 = Color32::from_rgb(102, 85, 217);
|
||||
#[derive(Clone, Debug, Default, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
|
||||
#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
|
||||
#[serde(rename_all = "snake_case")]
|
||||
pub enum Theme {
|
||||
#[default]
|
||||
|
|
@ -76,7 +76,7 @@ impl Theme {
|
|||
Self::VerdantRebel,
|
||||
Self::WeicatIndustrial,
|
||||
];
|
||||
pub fn name(&self) -> &str {
|
||||
pub fn name(&self) -> &'static str {
|
||||
match self {
|
||||
Self::Midra => "Midra Dark",
|
||||
Self::HighContrast => "High Contrast",
|
||||
|
|
@ -276,6 +276,10 @@ impl Theme {
|
|||
}
|
||||
}
|
||||
pub fn apply(&self, ctx: &egui::Context) {
|
||||
let applied = egui::Id::new("pdf-presenter-theme");
|
||||
if ctx.data(|data| data.get_temp::<Self>(applied)) == Some(*self) {
|
||||
return;
|
||||
}
|
||||
let p = self.palette();
|
||||
let mut v = if self.is_light() {
|
||||
egui::Visuals::light()
|
||||
|
|
@ -317,6 +321,7 @@ impl Theme {
|
|||
w.fg_stroke = egui::Stroke::new(1_f32, p.text);
|
||||
}
|
||||
ctx.set_visuals(v);
|
||||
ctx.data_mut(|data| data.insert_temp(applied, *self));
|
||||
}
|
||||
}
|
||||
fn sotv_palette(colors: [u32; 8], light: bool) -> Palette {
|
||||
|
|
@ -350,3 +355,19 @@ fn sotv_palette(colors: [u32; 8], light: bool) -> Palette {
|
|||
pattern: [layer, panel],
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
|
||||
#[test]
|
||||
fn repeated_theme_application_keeps_the_existing_style() {
|
||||
let ctx = egui::Context::default();
|
||||
Theme::Midra.apply(&ctx);
|
||||
let first = ctx.global_style();
|
||||
Theme::Midra.apply(&ctx);
|
||||
assert!(std::sync::Arc::ptr_eq(&first, &ctx.global_style()));
|
||||
Theme::CorporateLight.apply(&ctx);
|
||||
assert!(!std::sync::Arc::ptr_eq(&first, &ctx.global_style()));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -505,6 +505,15 @@ fn quick_settings_and_preferences_window_remain_interactive() {
|
|||
}
|
||||
};
|
||||
click(&mut s, "Menu");
|
||||
click(&mut s, "Autoplay");
|
||||
click(&mut s, "Play automatically");
|
||||
assert!(s.settings.autoplay_enabled);
|
||||
assert!(s.menu_open);
|
||||
click(&mut s, "Loop");
|
||||
assert!(s.settings.autoplay_loop);
|
||||
assert!(s.menu_open);
|
||||
click(&mut s, "Menu");
|
||||
click(&mut s, "Menu");
|
||||
click(&mut s, "Appearance");
|
||||
click(&mut s, "Midra Dark");
|
||||
assert!(
|
||||
|
|
@ -515,7 +524,7 @@ fn quick_settings_and_preferences_window_remain_interactive() {
|
|||
assert_eq!(s.settings.theme, pdf_presenter::theme::Theme::HighContrast);
|
||||
assert!(s.menu_open);
|
||||
click(&mut s, "English");
|
||||
click(&mut s, "System / Système");
|
||||
click(&mut s, "System language");
|
||||
assert_eq!(
|
||||
s.settings.language,
|
||||
pdf_presenter::localization::Language::System
|
||||
|
|
@ -552,7 +561,7 @@ fn quick_settings_and_preferences_window_remain_interactive() {
|
|||
click(&mut s, "Pause timer");
|
||||
assert!(!s.timer.running(std::time::Instant::now(), s.timer_limit()));
|
||||
click(&mut s, "Menu");
|
||||
click(&mut s, "Demo");
|
||||
click(&mut s, "demo.pdf");
|
||||
assert!(!s.menu_open, "Outside click should dismiss the dropdown");
|
||||
click(&mut s, "Menu");
|
||||
frame(
|
||||
|
|
@ -1114,6 +1123,54 @@ fn hidden_footer_hides_routine_rolling_buffer_status() {
|
|||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn source_name_and_path_are_in_the_footer_instead_of_the_header() {
|
||||
fn contains_exact(shape: &egui::Shape, expected: &str) -> bool {
|
||||
match shape {
|
||||
egui::Shape::Text(text) => text.galley.text() == expected,
|
||||
egui::Shape::Vec(shapes) => shapes.iter().any(|shape| contains_exact(shape, expected)),
|
||||
_ => false,
|
||||
}
|
||||
}
|
||||
let ctx = Context::default();
|
||||
let mut s = studio();
|
||||
let path = std::path::PathBuf::from("shows").join("conference.pdf");
|
||||
s.deck.as_mut().unwrap().path = path.clone();
|
||||
s.layout.header = true;
|
||||
s.layout.footer = true;
|
||||
let mut native = UiState::default();
|
||||
let visible = ctx.run_ui(input(Vec2::new(1280., 900.)), |ui| {
|
||||
presenter_ui::presenter(ui, &mut s, &mut native)
|
||||
});
|
||||
for expected in ["conference.pdf", &path.display().to_string()] {
|
||||
assert!(
|
||||
visible
|
||||
.shapes
|
||||
.iter()
|
||||
.any(|shape| contains_exact(&shape.shape, expected)),
|
||||
"missing {expected}"
|
||||
);
|
||||
}
|
||||
assert!(
|
||||
!visible
|
||||
.shapes
|
||||
.iter()
|
||||
.any(|shape| contains_exact(&shape.shape, "Demo"))
|
||||
);
|
||||
|
||||
s.layout.footer = false;
|
||||
native.footer_until = std::time::Instant::now() - std::time::Duration::from_secs(1);
|
||||
let hidden = ctx.run_ui(input(Vec2::new(1280., 900.)), |ui| {
|
||||
presenter_ui::presenter(ui, &mut s, &mut native)
|
||||
});
|
||||
assert!(
|
||||
!hidden
|
||||
.shapes
|
||||
.iter()
|
||||
.any(|shape| contains_exact(&shape.shape, &path.display().to_string()))
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn fullscreen_and_routing_changes_preserve_explicit_output_visibility() {
|
||||
for blanked in [false, true] {
|
||||
|
|
@ -1746,6 +1803,42 @@ fn preferences_window_stays_on_the_presenter_that_opened_it() {
|
|||
assert!(!render(1, "two"));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn preferences_show_the_running_executable_path() {
|
||||
fn contains(shape: &egui::Shape, text: &str) -> bool {
|
||||
match shape {
|
||||
egui::Shape::Text(label) => label.galley.text() == text,
|
||||
egui::Shape::Vec(shapes) => shapes.iter().any(|shape| contains(shape, text)),
|
||||
_ => false,
|
||||
}
|
||||
}
|
||||
let ctx = Context::default();
|
||||
let mut s = studio();
|
||||
s.preferences_open = true;
|
||||
let expected = s.executable_path().display().to_string();
|
||||
let mut ui = UiState::default();
|
||||
let mut output = ctx.run_ui(input(Vec2::new(1280., 900.)), |root| {
|
||||
presenter_ui::presenter(root, &mut s, &mut ui)
|
||||
});
|
||||
for _ in 0..2 {
|
||||
output = ctx.run_ui(input(Vec2::new(1280., 900.)), |root| {
|
||||
presenter_ui::presenter(root, &mut s, &mut ui)
|
||||
});
|
||||
}
|
||||
assert!(
|
||||
output
|
||||
.shapes
|
||||
.iter()
|
||||
.any(|shape| contains(&shape.shape, "Application executable"))
|
||||
);
|
||||
assert!(
|
||||
output
|
||||
.shapes
|
||||
.iter()
|
||||
.any(|shape| contains(&shape.shape, &expected))
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn any_presenter_can_edit_and_save_another_presenter_layout() {
|
||||
fn find(shape: &egui::Shape, label: &str) -> Option<Pos2> {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,19 @@
|
|||
use pdf_presenter::settings::{self, Layout, Routes, Settings};
|
||||
|
||||
#[test]
|
||||
fn every_interface_language_round_trips_through_settings_v1() {
|
||||
let temp = tempfile::tempdir().unwrap();
|
||||
for language in pdf_presenter::localization::Language::ALL {
|
||||
let path = temp.path().join(format!("{language:?}.toml"));
|
||||
let settings = Settings {
|
||||
language,
|
||||
..Default::default()
|
||||
};
|
||||
settings::write(&path, &settings).unwrap();
|
||||
assert_eq!(settings::read(&path).unwrap().language, language);
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn settings_roundtrip_preserves_project_overrides_and_hidden_bars() {
|
||||
let temp = tempfile::tempdir().unwrap();
|
||||
|
|
@ -339,6 +354,32 @@ fn screen_modes_migrate_validate_and_roundtrip() {
|
|||
assert!(s.validate().is_ok());
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn autoplay_settings_migrate_validate_and_round_trip() {
|
||||
let legacy: Settings = toml::from_str("version = 1").unwrap();
|
||||
assert!(!legacy.autoplay_enabled);
|
||||
assert_eq!(legacy.autoplay_seconds, 5.0);
|
||||
assert!(!legacy.autoplay_loop);
|
||||
|
||||
let mut settings = legacy;
|
||||
settings.autoplay_enabled = true;
|
||||
settings.autoplay_seconds = 12.5;
|
||||
settings.autoplay_loop = true;
|
||||
let temp = tempfile::tempdir().unwrap();
|
||||
let path = temp.path().join("settings.toml");
|
||||
settings::write(&path, &settings).unwrap();
|
||||
let loaded = settings::read(&path).unwrap();
|
||||
assert!(loaded.autoplay_enabled);
|
||||
assert_eq!(loaded.autoplay_seconds, 12.5);
|
||||
assert!(loaded.autoplay_loop);
|
||||
|
||||
for invalid in [0.0, 0.24, 3600.01, f32::INFINITY, f32::NAN] {
|
||||
let mut invalid_settings = loaded.clone();
|
||||
invalid_settings.autoplay_seconds = invalid;
|
||||
assert!(invalid_settings.validate().is_err());
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn output_screen_modes_roundtrip_and_fall_back_to_global() {
|
||||
use pdf_presenter::output::HostState;
|
||||
|
|
|
|||
|
|
@ -2,6 +2,44 @@
|
|||
|
||||
## Unreleased
|
||||
|
||||
### 0.1.95
|
||||
|
||||
- Add an Autoplay menu with persistent Play automatically, per-slide timing and
|
||||
loop controls. Timing starts only once the requested slide is visible; transient
|
||||
dialogs and safety states pause playback, while manual interaction restarts the
|
||||
interval.
|
||||
- Linux formatting, warnings-denied Clippy/rustdoc, workspace tests, build and
|
||||
13 Python helper tests pass. Full GUI coverage is 83.94% against the 75% floor.
|
||||
|
||||
### 0.1.94
|
||||
|
||||
- Show the full, selectable path of the running portable executable under
|
||||
**Preferences → Storage and preparation**, with guidance for finding its folder
|
||||
when updating or removing the application.
|
||||
- Linux formatting, warnings-denied Clippy/rustdoc, workspace tests, build and
|
||||
13 Python helper tests pass. Full GUI coverage is 83.83% against the 75% floor.
|
||||
|
||||
### 0.1.93
|
||||
|
||||
- Move the open source name out of the Presenter header and into a dedicated bottom
|
||||
footer row with its full canonical path. Long paths truncate to the available
|
||||
width and remain available on hover; hiding the footer hides the source details.
|
||||
|
||||
### 0.1.92
|
||||
|
||||
- Extend the existing Canvas Pilot-inspired appearance menu with Spanish, Japanese,
|
||||
Simplified Chinese, German and Brazilian Portuguese alongside English and French;
|
||||
System follows supported native locales and safely falls back to English.
|
||||
- Embed the OFL-licensed Noto Sans CJK collection for standalone Japanese and Chinese
|
||||
interface rendering. Catalog lookup is compiled and allocation-free; CJK fonts are
|
||||
installed only when selected and never read from disk at runtime.
|
||||
- Stop rebuilding theme visuals and locale/font state on every frame. Both now update
|
||||
only when their selection changes, keeping slide preparation, navigation and output
|
||||
rendering paths unchanged.
|
||||
- Linux formatting, warnings-denied Clippy/rustdoc, workspace tests, optimized build,
|
||||
13 Python helper tests and the native-window smoke pass. Full GUI coverage is
|
||||
83.89% against the 75% floor.
|
||||
|
||||
### 0.1.91
|
||||
|
||||
- Promote releases from preview status and add recurring Linux ARM64, Apple Silicon
|
||||
|
|
|
|||
|
|
@ -90,6 +90,28 @@ This includes pipe transfer to the measurement process, not optical display late
|
|||
One sample under concurrent build load is diagnostic evidence, not a p95/worst-case
|
||||
benchmark or comparison against Pympress. The source PDF remains untracked and unchanged.
|
||||
|
||||
## 0.1.92 themes and interface languages
|
||||
|
||||
The existing 20 built-in Canvas Pilot-inspired palettes remain compile-time data.
|
||||
English, French, Spanish, Japanese, Simplified Chinese, German and Brazilian
|
||||
Portuguese are selectable, with supported native locales resolved once per process.
|
||||
Translations use static match tables: there is no catalog parsing, runtime file I/O
|
||||
or translation allocation. Detailed worker and operating-system diagnostics retain
|
||||
their original wording.
|
||||
|
||||
Theme application and locale/font setup now short-circuit when the selected value is
|
||||
already active. Japanese and Simplified Chinese share one embedded Noto Sans CJK
|
||||
collection; the appropriate face is installed once when a CJK language is selected
|
||||
and egui's default embedded fonts are restored when leaving it. This work does not
|
||||
change the independent output process, prepared-frame navigation, PDF workers or
|
||||
slide texture path.
|
||||
|
||||
Linux workspace/native tests, formatting, warnings-denied Clippy/rustdoc, optimized
|
||||
build and 13 Python helper tests pass. Whole-application GUI coverage is 83.89%
|
||||
against the 75% floor. CJK tests exercise both selected font faces and every theme/
|
||||
language combination renders the Presenter, browser and popups. This does not replace
|
||||
native Japanese/Chinese visual review or physical multi-display acceptance.
|
||||
|
||||
## Remaining acceptance and hardening
|
||||
|
||||
- User physical Windows/macOS/Linux X11/Wayland matrix: routing, swap, mixed DPI,
|
||||
|
|
|
|||
|
|
@ -2,6 +2,9 @@ version = 1
|
|||
# Optional slide-first view on an operator-owned route (0.1.89+).
|
||||
single_screens = ["Primary#1"]
|
||||
auto_show = true
|
||||
autoplay_enabled = false
|
||||
autoplay_seconds = 5.0
|
||||
autoplay_loop = false
|
||||
blank_picture = false
|
||||
zoom_enabled = false
|
||||
zoom_keep_fitted_area = false
|
||||
|
|
|
|||
|
|
@ -33,15 +33,33 @@ flushed temporary file. Unknown fields are ignored and not preserved on round tr
|
|||
document open; false starts/opens blanked. Manual navigation preserves blanking.
|
||||
Since 0.1.51, display topology/fullscreen changes and host recovery preserve
|
||||
the current output visibility; only explicit blank controls change it.
|
||||
- `autoplay_enabled`: boolean, default false; `autoplay_seconds`: finite floating
|
||||
seconds from 0.25 through 3600, default 5; and `autoplay_loop`: boolean, default
|
||||
false (0.1.95). The interval begins only after the requested slide is visible on
|
||||
Slides, so rendering delays do not consume a slide's display time. With no Slides
|
||||
route, a ready Presenter/single-screen frame counts as visible. Manual navigation,
|
||||
zoom and blank/unblank restart the interval. Blanking, loading, display trials,
|
||||
startup recovery, file dialogs, notes editing/import and quit confirmation pause
|
||||
autoplay and resume with a fresh interval. At the final slide autoplay stops unless
|
||||
loop is enabled; a one-slide deck never repeatedly navigates. The enabled state,
|
||||
timing and loop preference are global and saved immediately. Runtime deadlines and
|
||||
final-slide state are transient. Older v1 files use the defaults; older binaries
|
||||
ignore and discard these additive fields on resave.
|
||||
- `theme`: built-in palette enum in snake_case, default `midra` (0.1.14). Values:
|
||||
`midra`, `high_contrast`, `foxified_dark`, `corporate_light`, `bluecore`,
|
||||
`dupont_monsanto`, `eden_green`, `foxified_light`, `hci`, `iron_docks`, `peaceframe`,
|
||||
`rebel`, `sirius_mind`, `solarized`, `sons_of_banard`, `storm_pilot`,
|
||||
`tessier_ashpol`, `ustf`, `verdant_rebel`, `weicat_industrial`.
|
||||
- `language`: `system` (default), `en` or `fr` (0.1.14). Native OS locale selects
|
||||
French for `fr*`, English otherwise. Unknown theme/language values are rejected.
|
||||
- `language`: `system` (default), `en`, `fr`, `es`, `ja`, `zh_cn`, `de` or `pt_br`.
|
||||
Spanish, Japanese, Simplified Chinese, German and Brazilian Portuguese were added
|
||||
in 0.1.92. Native OS locale selects a supported language by language/script and
|
||||
region; Traditional Chinese and unsupported Portuguese regions fall back to
|
||||
English rather than silently selecting a different written standard.
|
||||
Unknown theme/language values are rejected.
|
||||
Missing new fields in older v1 files use these defaults; no migration is required.
|
||||
Theme, language and automatic-output changes persist asynchronously, globally.
|
||||
Catalog lookup is compiled, allocation-free and never reads files on the input or
|
||||
render path. Theme and font state is rebuilt only when the selection changes.
|
||||
- `layout`: `previous`, `current`, `next`, `notes`, `elapsed`, `clock`, each with
|
||||
boolean `show` and finite floating `size`; plus boolean `header`/`footer`.
|
||||
Previous/next sizes are relative weights 30–160, current 60–200; notes size
|
||||
|
|
|
|||
|
|
@ -27,6 +27,9 @@ To update, close PDF Presenter, download and extract the new portable release,
|
|||
and run its executable. Settings and saved layouts live in your user configuration
|
||||
directory, outside the extracted folder. If you installed the Linux launcher, rerun
|
||||
its installer from the new location so it points to the updated binary.
|
||||
**Menu → Preferences… → Storage and preparation** shows the full path of the
|
||||
currently running executable, so you can find its portable folder when updating or
|
||||
removing the application.
|
||||
|
||||
Physical display routing, sleep prevention and clean-machine compatibility still
|
||||
need broader acceptance testing. Rehearse on the displays you plan to use before a
|
||||
|
|
@ -44,6 +47,11 @@ do not queue additional dialogs.
|
|||
A single connected monitor starts presenter-only rehearsal; `--windowed` disables
|
||||
fullscreen for the session. `--list-monitors` lists CLI display numbers.
|
||||
|
||||
Use **Menu → Autoplay** to enable automatic slide changes, choose the time each
|
||||
visible slide remains on screen, and optionally loop from the final slide back to
|
||||
the first. Slow preparation never shortens a slide's display time. Manual navigation,
|
||||
zooming or blanking restarts the interval; dialogs and display confirmation pause it.
|
||||
|
||||
## Screens and presentation safety
|
||||
|
||||
When the application starts with exactly one connected screen, it offers
|
||||
|
|
@ -221,7 +229,8 @@ identity/checksums and reads frames into RAM: a restart cannot literally take ze
|
|||
time. A warm full-size cached frame appears directly, without an unnecessary preview
|
||||
render. Sources and their folders remain unchanged.
|
||||
|
||||
The footer shows the active operation, slides prepared/total, cache reuse, decoded
|
||||
The footer shows the open PDF or picture-folder name and full source path, along
|
||||
with the active operation, slides prepared/total, cache reuse, decoded
|
||||
RAM usage, and an approximate ETA once there are enough completed slides. It also
|
||||
shows output-process buffering separately. A compact progress notification remains
|
||||
visible during initial preparation if the footer is hidden. Routine rolling-buffer
|
||||
|
|
@ -291,13 +300,18 @@ The numbered screen rectangles in **Displays** reflect each monitor’s pixel as
|
|||
ratio, so portrait, standard and ultrawide displays are easier to distinguish.
|
||||
They represent proportions, not physical screen size.
|
||||
|
||||
Menu → Appearance → Theme offers the same 20 built-in palettes as Canvas Pilot, including light,
|
||||
dark and High Contrast. Menu → Appearance → Language offers System, English and Français. System
|
||||
uses the native OS locale and falls back to English for other languages. Choices are
|
||||
saved globally and apply to all presenter/browser windows; slides are never recolored.
|
||||
The controls and preparation progress are translated; detailed worker/OS diagnostics
|
||||
remain verbatim. Additional Canvas Pilot languages and external theme/language packs
|
||||
are not included in this version.
|
||||
Menu → Appearance → Theme offers the same 20 built-in palettes as Canvas Pilot,
|
||||
including light, dark and High Contrast. Menu → Appearance → Language offers System,
|
||||
English, French, Spanish, Japanese, Simplified Chinese, German and Brazilian
|
||||
Portuguese. System uses the native OS locale when it matches one of these choices and
|
||||
otherwise falls back to English. Traditional Chinese is not silently treated as
|
||||
Simplified Chinese. Choices are saved globally and apply to all presenter/browser
|
||||
windows; slides are never recolored.
|
||||
|
||||
Translations are built into the executable and need no runtime file reads. Japanese
|
||||
and Chinese use the bundled Noto Sans CJK font, loaded only when one of those languages
|
||||
is active. Theme styles and language fonts are rebuilt only when their selection
|
||||
changes. Detailed worker and operating-system diagnostics remain verbatim.
|
||||
|
||||
All slides opens a windowed browser above fullscreen windows and requests focus.
|
||||
Opening it again restores/focuses the existing browser. Its Close button dismisses it; Escape requests application quit confirmation.
|
||||
|
|
|
|||
|
|
@ -32,6 +32,14 @@ def main():
|
|||
f"License expression: {package['license']}\n"
|
||||
f"Source: {package.get('repository') or 'https://crates.io/crates/' + package['name']}\n"
|
||||
+ "\n".join(notices))
|
||||
font_license = ROOT / "crates/pdf-presenter/assets/fonts/OFL.txt"
|
||||
font_text = font_license.read_text()
|
||||
font_digest = hashlib.sha256(font_text.encode()).hexdigest()[:16]
|
||||
texts[font_digest] = font_text
|
||||
entries.insert(0, "Noto Sans CJK 2.004\n"
|
||||
"License expression: OFL-1.1\n"
|
||||
"Source: https://github.com/notofonts/noto-cjk/releases/tag/Sans2.004\n"
|
||||
f" assets/fonts/OFL.txt: text {font_digest}")
|
||||
header = ("PDF Presenter — locked dependency and font notices\n"
|
||||
"Generated by scripts/notices.py. Includes target/build-only dependencies;\n"
|
||||
"the presence of a package here does not mean it is linked on every OS.\n"
|
||||
|
|
|
|||
Loading…
Reference in New Issue