mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-10-24 09:46:59 -06:00
.ai import: the variable-library note reads its counts after a colon and is translated in every complete language (#2842)
This commit is contained in:
@@ -188,7 +188,7 @@ fn what_the_reader_doesnt_read_opens_as_before_with_a_warning() {
|
||||
/// data sets weren't read, whether its layers are read or it comes in as its PDF part.
|
||||
#[test]
|
||||
fn an_ai_file_with_a_variable_library_says_its_variables_werent_read() {
|
||||
const NOTE: &str = "the file's variables and data sets weren't read (2 variables, 3 data sets): the Variables panel doesn't list them";
|
||||
const NOTE: &str = "the file's variables and data sets weren't read (variables: 2, data sets: 3): the Variables panel doesn't list them";
|
||||
let library = ai::variable_library(&["Name", "Number"], &["One", "Two", "Three"]);
|
||||
let square = format!("0 1 1 0 1 0 0 Xa\n{}f\n", ai::rect(10.0, 50.0, 40.0, 90.0));
|
||||
let notes =
|
||||
|
||||
@@ -200,13 +200,9 @@ impl VariableLibrary {
|
||||
/// The import's note that the library wasn't read, when it has a variable or a data set.
|
||||
pub fn note(self) -> Option<String> {
|
||||
let Self { variables, data_sets } = self;
|
||||
let s = |n: usize| if n == 1 { "" } else { "s" };
|
||||
// Counts after a colon need no plural, so every language can translate the note whole.
|
||||
(variables + data_sets > 0).then(|| {
|
||||
format!(
|
||||
"the file's variables and data sets weren't read ({variables} variable{}, {data_sets} data set{}): the Variables panel doesn't list them",
|
||||
s(variables),
|
||||
s(data_sets)
|
||||
)
|
||||
format!("the file's variables and data sets weren't read (variables: {variables}, data sets: {data_sets}): the Variables panel doesn't list them")
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
@@ -548,11 +548,11 @@ fn a_variable_library_is_noted_with_its_counts() {
|
||||
let notes = |library: &str| read_ok(&format!("{library}{square}")).warnings.into_iter().filter(|w| w.contains("variables")).collect::<Vec<_>>();
|
||||
assert_eq!(
|
||||
notes(&variable_library(&["variable", "Team"], &["Home", "Away", "Third"])),
|
||||
["the file's variables and data sets weren't read (2 variables, 3 data sets): the Variables panel doesn't list them"]
|
||||
["the file's variables and data sets weren't read (variables: 2, data sets: 3): the Variables panel doesn't list them"]
|
||||
);
|
||||
assert_eq!(
|
||||
notes(&variable_library(&["Team"], &["Home"])),
|
||||
["the file's variables and data sets weren't read (1 variable, 1 data set): the Variables panel doesn't list them"]
|
||||
["the file's variables and data sets weren't read (variables: 1, data sets: 1): the Variables panel doesn't list them"]
|
||||
);
|
||||
assert!(notes(&variable_library(&[], &[])).is_empty(), "an empty library gives no warning");
|
||||
assert!(notes("").is_empty());
|
||||
|
||||
@@ -5169,3 +5169,4 @@ theme Appearance Външен вид
|
||||
Full Justify Пълно двустранно
|
||||
Minimum must not exceed Desired, nor Desired Maximum. Минималната стойност не може да надвишава желаната, нито желаната – максималната.
|
||||
Justification Подравняване
|
||||
@msg the file's variables and data sets weren't read (variables: {variables}, data sets: {data_sets}): the Variables panel doesn't list them променливите и наборите от данни на файла не бяха прочетени (променливи: {variables}, набори от данни: {data_sets}): панелът „Променливи“ не ги показва
|
||||
|
||||
|
Can't render this file because it contains an unexpected character in line 2 and column 73.
|
@@ -5204,3 +5204,4 @@ mark-style Japanese Japonské
|
||||
Full Justify Zarovnat do bloku
|
||||
Minimum must not exceed Desired, nor Desired Maximum. Minimum nesmí překročit požadovanou hodnotu ani požadovaná hodnota maximum.
|
||||
Justification Zarovnání do bloku
|
||||
@msg the file's variables and data sets weren't read (variables: {variables}, data sets: {data_sets}): the Variables panel doesn't list them proměnné a sady dat souboru nebyly načteny (proměnné: {variables}, sady dat: {data_sets}): panel Proměnné je nezobrazuje
|
||||
|
||||
|
Can't render this file because it contains an unexpected character in line 2 and column 73.
|
@@ -4780,3 +4780,4 @@ effect Regular Regelmäßig
|
||||
Minimum must not exceed Desired, nor Desired Maximum. Das Minimum darf den optimalen Wert nicht übersteigen, der optimale Wert nicht das Maximum.
|
||||
Minimum Minimum
|
||||
Justification Abstände
|
||||
@msg the file's variables and data sets weren't read (variables: {variables}, data sets: {data_sets}): the Variables panel doesn't list them die Variablen und Datensätze der Datei wurden nicht gelesen (Variablen: {variables}, Datensätze: {data_sets}): Das Bedienfeld „Variablen“ listet sie nicht auf
|
||||
|
||||
|
Can't render this file because it contains an unexpected character in line 2 and column 73.
|
@@ -5156,3 +5156,4 @@ effect Points Σημεία
|
||||
Full Justify Στοίχιση και στα δύο άκρα
|
||||
Minimum must not exceed Desired, nor Desired Maximum. Το ελάχιστο δεν πρέπει να υπερβαίνει το επιθυμητό, ούτε το επιθυμητό το μέγιστο.
|
||||
Justification Πλήρης στοίχιση
|
||||
@msg the file's variables and data sets weren't read (variables: {variables}, data sets: {data_sets}): the Variables panel doesn't list them οι μεταβλητές και τα σύνολα δεδομένων του αρχείου δεν διαβάστηκαν (μεταβλητές: {variables}, σύνολα δεδομένων: {data_sets}): ο πίνακας Μεταβλητές δεν τα εμφανίζει
|
||||
|
||||
|
Can't render this file because it contains an unexpected character in line 2006 and column 19.
|
@@ -5146,3 +5146,4 @@ mark-style Japanese Japonesas
|
||||
Full Justify Justificar completamente
|
||||
Minimum must not exceed Desired, nor Desired Maximum. El mínimo no puede superar el deseado, ni el deseado el máximo.
|
||||
Justification Justificación
|
||||
@msg the file's variables and data sets weren't read (variables: {variables}, data sets: {data_sets}): the Variables panel doesn't list them no se leyeron las variables ni los conjuntos de datos del archivo (variables: {variables}, conjuntos de datos: {data_sets}): el panel Variables no los muestra
|
||||
|
||||
|
Can't render this file because it contains an unexpected character in line 2 and column 73.
|
@@ -5168,3 +5168,4 @@ mark-style Japanese Japanilainen
|
||||
Full Justify Täysi tasaus
|
||||
Minimum must not exceed Desired, nor Desired Maximum. Minimi ei saa ylittää haluttua arvoa eikä haluttu arvo maksimia.
|
||||
Justification Tasaus
|
||||
@msg the file's variables and data sets weren't read (variables: {variables}, data sets: {data_sets}): the Variables panel doesn't list them tiedoston muuttujia ja tietojoukkoja ei luettu (muuttujia: {variables}, tietojoukkoja: {data_sets}): Muuttujat-paneeli ei näytä niitä
|
||||
|
||||
|
Can't render this file because it contains an unexpected character in line 2 and column 73.
|
@@ -5203,3 +5203,4 @@ theme Appearance Apparence
|
||||
Full Justify Justification complète
|
||||
Minimum must not exceed Desired, nor Desired Maximum. Le minimum ne doit pas dépasser la valeur optimale, ni la valeur optimale le maximum.
|
||||
Justification Justification
|
||||
@msg the file's variables and data sets weren't read (variables: {variables}, data sets: {data_sets}): the Variables panel doesn't list them les variables et jeux de données du fichier n’ont pas été lus (variables : {variables}, jeux de données : {data_sets}) : le panneau Variables ne les affiche pas
|
||||
|
||||
|
Can't render this file because it contains an unexpected character in line 2 and column 73.
|
@@ -5190,3 +5190,4 @@ imageTrace Outline Körvonal
|
||||
Full Justify Teljes sorkizárás
|
||||
Minimum must not exceed Desired, nor Desired Maximum. A minimum nem haladhatja meg a kívánt értéket, sem a kívánt érték a maximumot.
|
||||
Justification Sorkizárás
|
||||
@msg the file's variables and data sets weren't read (variables: {variables}, data sets: {data_sets}): the Variables panel doesn't list them a fájl változói és adatkészletei nem lettek beolvasva (változók: {variables}, adatkészletek: {data_sets}): a Változók panel nem listázza őket
|
||||
|
||||
|
Can't render this file because it contains an unexpected character in line 2 and column 73.
|
@@ -4818,3 +4818,4 @@ lighting Light Luce
|
||||
Minimum must not exceed Desired, nor Desired Maximum. Il minimo non può superare il valore desiderato, né il desiderato il massimo.
|
||||
Minimum Minimo
|
||||
Justification Giustificazione
|
||||
@msg the file's variables and data sets weren't read (variables: {variables}, data sets: {data_sets}): the Variables panel doesn't list them le variabili e i set di dati del file non sono stati letti (variabili: {variables}, set di dati: {data_sets}): il pannello Variabili non li elenca
|
||||
|
||||
|
Can't render this file because it contains an unexpected character in line 2 and column 73.
|
@@ -4858,3 +4858,4 @@ lighting Light ライト
|
||||
Minimum must not exceed Desired, nor Desired Maximum. 最小値は最適値を、最適値は最大値を超えることはできません。
|
||||
Minimum 最小
|
||||
Justification 文字組み
|
||||
@msg the file's variables and data sets weren't read (variables: {variables}, data sets: {data_sets}): the Variables panel doesn't list them ファイルの変数とデータセットは読み込まれませんでした (変数: {variables}、データセット: {data_sets})。変数パネルには表示されません
|
||||
|
||||
|
Can't render this file because it contains an unexpected character in line 2 and column 73.
|
@@ -4781,3 +4781,4 @@ lighting Light 광원
|
||||
Minimum must not exceed Desired, nor Desired Maximum. 최소값은 희망값을, 희망값은 최대값을 넘을 수 없습니다.
|
||||
Minimum 최소
|
||||
Justification 양끝 맞춤
|
||||
@msg the file's variables and data sets weren't read (variables: {variables}, data sets: {data_sets}): the Variables panel doesn't list them 파일의 변수와 데이터 세트를 읽지 않았습니다(변수: {variables}, 데이터 세트: {data_sets}). 변수 패널에 표시되지 않습니다
|
||||
|
||||
|
Can't render this file because it contains an unexpected character in line 2 and column 73.
|
@@ -5056,3 +5056,4 @@ mark-style Japanese Japońskie
|
||||
Full Justify Pełne justowanie
|
||||
Minimum must not exceed Desired, nor Desired Maximum. Minimum nie może przekraczać wartości optymalnej, a wartość optymalna maksimum.
|
||||
Justification Justowanie
|
||||
@msg the file's variables and data sets weren't read (variables: {variables}, data sets: {data_sets}): the Variables panel doesn't list them zmienne i zestawy danych pliku nie zostały wczytane (zmienne: {variables}, zestawy danych: {data_sets}): panel Zmienne ich nie wyświetla
|
||||
|
||||
|
Can't render this file because it contains an unexpected character in line 2 and column 73.
|
@@ -5121,3 +5121,4 @@ mark-style Japanese Japonesas
|
||||
Full Justify Justificação Completa
|
||||
Minimum must not exceed Desired, nor Desired Maximum. O mínimo não pode passar do desejado, nem o desejado do máximo.
|
||||
Justification Justificação
|
||||
@msg the file's variables and data sets weren't read (variables: {variables}, data sets: {data_sets}): the Variables panel doesn't list them as variáveis e os conjuntos de dados do arquivo não foram lidos (variáveis: {variables}, conjuntos de dados: {data_sets}): o painel Variáveis não os lista
|
||||
|
||||
|
Can't render this file because it contains an unexpected character in line 6 and column 47.
|
@@ -4814,3 +4814,4 @@ lighting Light Свет
|
||||
Minimum must not exceed Desired, nor Desired Maximum. Минимум не может превышать желательное значение, а желательное — максимум.
|
||||
Minimum Минимум
|
||||
Justification Выключка
|
||||
@msg the file's variables and data sets weren't read (variables: {variables}, data sets: {data_sets}): the Variables panel doesn't list them переменные и наборы данных файла не прочитаны (переменных: {variables}, наборов данных: {data_sets}): панель «Переменные» их не показывает
|
||||
|
||||
|
Can't render this file because it contains an unexpected character in line 2 and column 73.
|
@@ -5160,3 +5160,4 @@ theme Appearance Utseende
|
||||
Full Justify Fullständig marginaljustering
|
||||
Minimum must not exceed Desired, nor Desired Maximum. Minimum får inte överstiga Önskat, och Önskat inte Maximum.
|
||||
Justification Justering
|
||||
@msg the file's variables and data sets weren't read (variables: {variables}, data sets: {data_sets}): the Variables panel doesn't list them filens variabler och datauppsättningar lästes inte (variabler: {variables}, datauppsättningar: {data_sets}): panelen Variabler visar dem inte
|
||||
|
||||
|
Can't render this file because it contains an unexpected character in line 5 and column 25.
|
@@ -1738,6 +1738,7 @@ fn unread_layers_notes_are_translated() {
|
||||
"the file's layers weren't read from its editing data (its zlib compression is damaged): they come from its PDF part",
|
||||
"the file's layers weren't read from its editing data (its Zstandard compression is damaged): they come from its PDF part",
|
||||
"the file's layers weren't read from its editing data (it decompresses to more than 256 MB): they come from its PDF part",
|
||||
"the file's variables and data sets weren't read (variables: 2, data sets: 3): the Variables panel doesn't list them",
|
||||
] {
|
||||
let status = format!("Opened with 1 note(s): {note}");
|
||||
for code in COMPLETE_MESSAGES.iter().chain(&["pt-br"]) {
|
||||
|
||||
@@ -4798,3 +4798,4 @@ lighting Light Світло
|
||||
Minimum must not exceed Desired, nor Desired Maximum. Мінімум не може перевищувати бажане значення, а бажане — максимум.
|
||||
Minimum Мінімум
|
||||
Justification Вирівнювання за шириною
|
||||
@msg the file's variables and data sets weren't read (variables: {variables}, data sets: {data_sets}): the Variables panel doesn't list them змінні та набори даних файлу не прочитано (змінних: {variables}, наборів даних: {data_sets}): панель «Змінні» їх не показує
|
||||
|
||||
|
Can't render this file because it contains an unexpected character in line 725 and column 40.
|
@@ -4798,3 +4798,4 @@ theme Appearance Giao diện
|
||||
Minimum must not exceed Desired, nor Desired Maximum. Giá trị tối thiểu không được vượt quá giá trị mong muốn, và giá trị mong muốn không được vượt quá tối đa.
|
||||
Minimum Tối thiểu
|
||||
Justification Căn đều
|
||||
@msg the file's variables and data sets weren't read (variables: {variables}, data sets: {data_sets}): the Variables panel doesn't list them các biến và tập dữ liệu của tệp chưa được đọc (biến: {variables}, tập dữ liệu: {data_sets}): bảng Biến không liệt kê chúng
|
||||
|
||||
|
Can't render this file because it contains an unexpected character in line 3948 and column 10.
|
@@ -5040,3 +5040,4 @@ lighting Light 光源
|
||||
Minimum must not exceed Desired, nor Desired Maximum. 最小值不能超过所需值,所需值不能超过最大值。
|
||||
Minimum 最小值
|
||||
Justification 对齐设置
|
||||
@msg the file's variables and data sets weren't read (variables: {variables}, data sets: {data_sets}): the Variables panel doesn't list them 文件的变量和数据集未被读取(变量:{variables},数据集:{data_sets}):“变量”面板不会列出它们
|
||||
|
||||
|
Can't render this file because it contains an unexpected character in line 2 and column 73.
|
Reference in New Issue
Block a user