ChessPenguin 0.6.1
Some checks failed
CI / check (push) Waiting to run
CI / windows-build (push) Waiting to run
CI / macos-build (push) Waiting to run
Release / version (push) Has been cancelled
Release / linux (push) Has been cancelled
Release / flatpak (push) Has been cancelled
Release / windows (push) Has been cancelled
Release / macos (push) Has been cancelled
Release / publish (push) Has been cancelled
Some checks failed
CI / check (push) Waiting to run
CI / windows-build (push) Waiting to run
CI / macos-build (push) Waiting to run
Release / version (push) Has been cancelled
Release / linux (push) Has been cancelled
Release / flatpak (push) Has been cancelled
Release / windows (push) Has been cancelled
Release / macos (push) Has been cancelled
Release / publish (push) Has been cancelled
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
9f661c9e3c
commit
383d34cab5
7 changed files with 49 additions and 11 deletions
|
|
@ -10,8 +10,14 @@ use crate::settings::Settings;
|
|||
|
||||
fn files() -> [(&'static str, &'static str); 2] {
|
||||
[
|
||||
(tr("Classic games"), include_str!("../../../examples/classics.pgn")),
|
||||
(tr("Alekhine"), include_str!("../../../examples/alekhine.pgn")),
|
||||
(
|
||||
tr("Classic games"),
|
||||
include_str!("../../../examples/classics.pgn"),
|
||||
),
|
||||
(
|
||||
tr("Alekhine"),
|
||||
include_str!("../../../examples/alekhine.pgn"),
|
||||
),
|
||||
]
|
||||
}
|
||||
|
||||
|
|
@ -69,7 +75,12 @@ mod tests {
|
|||
assert!(db.len() >= 30, "{name}: {} games", db.len());
|
||||
for i in 0..db.len() {
|
||||
let parsed = db.load_game(i).unwrap();
|
||||
assert!(parsed.diagnostics.is_empty(), "{name} #{}: {:?}", i + 1, parsed.diagnostics);
|
||||
assert!(
|
||||
parsed.diagnostics.is_empty(),
|
||||
"{name} #{}: {:?}",
|
||||
i + 1,
|
||||
parsed.diagnostics
|
||||
);
|
||||
}
|
||||
let _ = std::fs::remove_dir_all(&dir);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -44,7 +44,11 @@ impl Lang {
|
|||
.into_iter()
|
||||
.find_map(|l| {
|
||||
// "ru-RU", "ru_RU.UTF-8", "de-CH", "es-419", "fr".
|
||||
let code = l.as_ref().split(['-', '_', '.', '@']).next()?.to_ascii_lowercase();
|
||||
let code = l
|
||||
.as_ref()
|
||||
.split(['-', '_', '.', '@'])
|
||||
.next()?
|
||||
.to_ascii_lowercase();
|
||||
match code.as_str() {
|
||||
"en" => Some(Lang::En),
|
||||
"ru" => Some(Lang::Ru),
|
||||
|
|
@ -2680,7 +2684,14 @@ const ROWS: &[[&str; 6]] = &[
|
|||
"Partidas clásicas",
|
||||
"Partite classiche",
|
||||
],
|
||||
["Alekhine", "Алехин", "Alekhine", "Aljechin", "Alekhine", "Aljechin"],
|
||||
[
|
||||
"Alekhine",
|
||||
"Алехин",
|
||||
"Alekhine",
|
||||
"Aljechin",
|
||||
"Alekhine",
|
||||
"Aljechin",
|
||||
],
|
||||
];
|
||||
|
||||
#[cfg(test)]
|
||||
|
|
|
|||
|
|
@ -266,7 +266,9 @@ impl LargeView {
|
|||
// `CP_FILTER="player=carlsen;years=2015-2026;elo=2600"` (screenshots).
|
||||
if let Ok(spec) = std::env::var("CP_FILTER") {
|
||||
for part in spec.split(';') {
|
||||
let Some((k, v)) = part.split_once('=') else { continue };
|
||||
let Some((k, v)) = part.split_once('=') else {
|
||||
continue;
|
||||
};
|
||||
match k.trim() {
|
||||
"player" => form.player.text = v.to_string(),
|
||||
"years" => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue