Coverage for app/quotes.py: 100%
9 statements
« prev ^ index » next coverage.py v7.15.4, created at 2026-08-31 10:13 +0000
« prev ^ index » next coverage.py v7.15.4, created at 2026-08-31 10:13 +0000
1"""Aviation quotes and jokes for email footers.
3All quotes are sourced from verifiable, attributed works. They are not
4AI-generated. French and Dutch entries remain in their original language.
5"""
7import random
9# (text, attribution) — attribution is plain text, no HTML
10_QUOTES_EN: list[tuple[str, str]] = [
11 (
12 (
13 "If you can walk away from a landing, it's a good landing. "
14 "If you use the airplane the next day, it's an outstanding landing."
15 ),
16 "Chuck Yeager",
17 ),
18 (
19 (
20 "Anyone can do the job when things are going right. "
21 "In this business we play for keeps."
22 ),
23 "Ernest K. Gann, Fate Is the Hunter",
24 ),
25 (
26 "Flying is hypnotic and all pilots are willing victims to the spell.",
27 "Ernest K. Gann, Fate Is the Hunter",
28 ),
29 (
30 "I have often said that the lure of flying is the lure of beauty.",
31 "Amelia Earhart",
32 ),
33 (
34 (
35 "Flying is hours and hours of dull monotony sprinkled with "
36 "a few moments of stark horror."
37 ),
38 'Gregory "Pappy" Boyington',
39 ),
40 (
41 (
42 "I think it is a pity to lose the romantic side of flying and simply "
43 "to accept it as a common means of transport, although that end is "
44 "what we have all ostensibly been striving to attain."
45 ),
46 "Amy Johnson",
47 ),
48 (
49 (
50 "A superior pilot uses his superior judgment to avoid situations "
51 "which require the use of his superior skill."
52 ),
53 "Frank Borman",
54 ),
55 (
56 (
57 "Aviation in itself is not inherently dangerous. But to an even "
58 "greater degree than the sea, it is terribly unforgiving of any "
59 "carelessness, incapacity or neglect."
60 ),
61 "A.G. Lamplugh, British Aviation Insurance Group",
62 ),
63 (
64 (
65 "A pilot who says he has never been frightened in an airplane is, "
66 "I'm afraid, lying."
67 ),
68 "Louise Thaden",
69 ),
70 (
71 (
72 "More than anything else the sensation is one of perfect peace, "
73 "mingled with the excitement that strains every nerve to the utmost, "
74 "if you can conceive of such a combination."
75 ),
76 "Wilbur Wright",
77 ),
78 (
79 "The gull sees farthest who flies highest.",
80 "Richard Bach, Jonathan Livingston Seagull",
81 ),
82 (
83 (
84 "My airplane is quiet, and for a moment still an alien, "
85 "still a stranger to the ground, I am home."
86 ),
87 "Richard Bach",
88 ),
89 (
90 "Thank God men cannot fly, and lay waste the sky as well as the earth.",
91 "Henry David Thoreau",
92 ),
93 (
94 (
95 "There are old pilots, and there are bold pilots, "
96 "but there are no old, bold pilots."
97 ),
98 "traditional aviation saying",
99 ),
100 (
101 "Every takeoff is optional. Every landing is mandatory.",
102 "traditional aviation saying",
103 ),
104 (
105 (
106 "There are three simple rules for making a smooth landing. "
107 "Unfortunately, no one knows what they are."
108 ),
109 "aviation humor",
110 ),
111 (
112 "Never fly the A model of anything.",
113 "traditional aviation saying",
114 ),
115 (
116 (
117 "There is an art to flying. The knack lies in learning how to "
118 "throw yourself at the ground and miss."
119 ),
120 'Douglas Adams, "The Hitchhiker\'s Guide to the Galaxy"',
121 ),
122 (
123 "There are only two emotions in a plane: boredom and terror.",
124 "Orson Welles",
125 ),
126 (
127 "The engine is the heart of an airplane, but the pilot is its soul.",
128 "Walter Raleigh",
129 ),
130 (
131 (
132 "When everything seems to be going against you, remember that "
133 "aircraft take off against the wind, not with it."
134 ),
135 "Henry Ford",
136 ),
137 (
138 "The airplane stays up because it doesn't have the time to fall.",
139 "Orville Wright",
140 ),
141 (
142 "The airplane is the closest thing to real magic that we have.",
143 "Charles Lindbergh",
144 ),
145 (
146 "There's no such thing as a routine flight.",
147 "Chesley B. Sullenberger",
148 ),
149 (
150 (
151 "The air up there in the clouds is very pure and fine, bracing and "
152 "delicious. And why shouldn't it be — "
153 "it is the same the angels breathe."
154 ),
155 "Mark Twain",
156 ),
157 (
158 "The airplane has unveiled for us the true face of the earth.",
159 "Antoine de Saint-Exupéry",
160 ),
161 (
162 (
163 "There is a big difference between a pilot and an aviator. "
164 "One is a technician; the other is an artist in love with flight."
165 ),
166 "Elrey Borge Jeppesen",
167 ),
168 (
169 "I fly because it releases my mind from the tyranny of petty things.",
170 "Antoine de Saint-Exupéry",
171 ),
172 (
173 (
174 "In flying I have learned that carelessness and overconfidence are "
175 "usually far more dangerous than deliberately accepted risks."
176 ),
177 "Wilbur Wright",
178 ),
179 (
180 (
181 "Why fly? Simple. I'm not happy unless there's some room "
182 "between me and the ground."
183 ),
184 "Richard Bach",
185 ),
186 (
187 "The only time you have too much fuel is when you're on fire.",
188 "traditional aviation saying",
189 ),
190 (
191 "Never fly in the same cockpit with someone braver than you.",
192 "traditional aviation saying",
193 ),
194 (
195 (
196 "You start with a bag full of luck and an empty bag of experience. "
197 "The trick is to fill the bag of experience before you empty the bag of luck."
198 ),
199 "traditional aviation saying",
200 ),
201 (
202 (
203 "If you're ever faced with a forced landing, "
204 "fly the thing as far into the crash as possible."
205 ),
206 "Bob Hoover",
207 ),
208 (
209 (
210 "Any pilot can describe the mechanics of flying. "
211 "What it can do for the spirit of man is beyond description."
212 ),
213 "Barry Goldwater",
214 ),
215 (
216 (
217 "Flying is more than a sport and more than a job; "
218 "flying is pure passion and desire, which fill a lifetime."
219 ),
220 "Adolf Galland",
221 ),
222 (
223 "Aviation was neither an industry nor a science. It was a miracle.",
224 "Igor Sikorsky",
225 ),
226 (
227 "Aviation is the branch of engineering that is least forgiving of mistakes.",
228 "Freeman Dyson",
229 ),
230 (
231 (
232 "To most people, the sky is the limit. "
233 "To those who love aviation, the sky is home."
234 ),
235 "Jerry Crawford",
236 ),
237 (
238 (
239 "Aviation is proof that given the will, "
240 "we have the capacity to achieve the impossible."
241 ),
242 "Edward Rickenbacker",
243 ),
244 (
245 (
246 "The highest art form of all is a human being in control of himself "
247 "and his airplane in flight, urging the spirit of a machine to match his own."
248 ),
249 "Richard Bach",
250 ),
251 (
252 (
253 "Flying was a very tangible freedom. In those days, it was beauty, "
254 "adventure, discovery, the epitome of breaking into new worlds."
255 ),
256 "Anne Morrow Lindbergh",
257 ),
258 (
259 "Flight is the only truly new sensation that men have achieved in modern history.",
260 "James Dickey",
261 ),
262 (
263 (
264 "Flying prevails whenever a man and his airplane "
265 "are put to a test of maximum performance."
266 ),
267 "Richard Bach",
268 ),
269 (
270 "Flying might not be all smooth sailing, but the fun of it is worth the price.",
271 "Amelia Earhart",
272 ),
273 (
274 (
275 "If black boxes survive air crashes, "
276 "why don't they make the whole plane out of that stuff?"
277 ),
278 "George Carlin",
279 ),
280 (
281 (
282 "If you push the stick forward, the houses get bigger. "
283 "If you pull the stick back, they get smaller. "
284 "That is, unless you keep pulling the stick all the way back, "
285 "then they get bigger again."
286 ),
287 "aviation humor",
288 ),
289]
291# French quotes — remain in French, no translation provided
292_QUOTES_FR: list[tuple[str, str]] = [
293 (
294 (
295 "Il semble que la perfection soit atteinte non quand il n'y a plus "
296 "rien à ajouter, mais quand il n'y a plus rien à retrancher."
297 ),
298 "Antoine de Saint-Exupéry, Terre des hommes",
299 ),
300 (
301 "Avec l'avion, nous avons appris la ligne droite.",
302 "Antoine de Saint-Exupéry, Terre des hommes",
303 ),
304 (
305 "L'avion est une machine sans doute, mais quel instrument d'analyse !",
306 "Antoine de Saint-Exupéry, Terre des hommes",
307 ),
308 (
309 "Le but, peut-être, ne justifie rien, mais l'action délivre de la mort.",
310 "Antoine de Saint-Exupéry, Vol de nuit",
311 ),
312 (
313 (
314 "Le beau côté de notre métier de pilote de ligne est de s'imaginer, "
315 "de temps à autre, que nous vivons loin des choses d'ici-bas, "
316 "que notre existence est faite d'une suite d'aventures."
317 ),
318 "Jean Mermoz, Mes vols",
319 ),
320 (
321 (
322 "Je savais qu'un jour, et un jour prochain, je volerais. "
323 "Rien ne pouvait me faire renoncer à cette foi. "
324 "Je ne voulais pas de profession autre que celle de pilote."
325 ),
326 "Jean Mermoz, Mes vols",
327 ),
328 (
329 (
330 "Les calculs de mes ingénieurs sont formels : le projet est irréalisable. "
331 "Il ne nous reste donc plus qu'à le réaliser."
332 ),
333 "Pierre-Georges Latécoère",
334 ),
335 (
336 (
337 "L'hélice d'un avion est en fait un ventilateur pour le pilote… "
338 "Si elle s'arrête, le pilote transpire."
339 ),
340 "humour aéronautique",
341 ),
342 (
343 "Moi si un jour je prends l'avion, je monte dans la boîte noire !",
344 "Jean-Marie Gourio",
345 ),
346 (
347 (
348 "L'avion, c'est pareil que le cinéma, il n'y a que des erreurs humaines. "
349 "Un mauvais film, c'est une erreur humaine."
350 ),
351 "Gérard Depardieu",
352 ),
353 (
354 (
355 "Au pays magique les avions tissent des guirlandes "
356 "qui restent suspendues pour décorer le ciel."
357 ),
358 "François David, Au pays magique",
359 ),
360]
362# Dutch quotes — remain in Dutch, no translation provided
363_QUOTES_NL: list[tuple[str, str]] = [
364 (
365 (
366 "Dit is mijn leer: wie eenmaal vliegen wil leren, die moet eerst leren "
367 "staan en gaan en lopen en klauteren en dansen — "
368 "vliegend leert men het vliegen niet!"
369 ),
370 "Friedrich Nietzsche, Aldus sprak Zarathoestra",
371 ),
372 (
373 "Hoe herken je een piloot in een ruimte? Hij of zij vertelt het je wel!",
374 "traditionele pilotenmop",
375 ),
376 (
377 (
378 "Wat is het verschil tussen God en een piloot? "
379 "God denkt niet dat hij piloot is."
380 ),
381 "traditionele pilotenmop",
382 ),
383 (
384 (
385 "Een gevechtspiloot landt alsof hij aangevallen wordt. "
386 "Een lijnpiloot landt alsof zijn moeder meekijkt."
387 ),
388 "traditionele pilotenmop",
389 ),
390 (
391 "De optimist vindt het vliegtuig uit, de pessimist de parachute.",
392 "populair gezegde",
393 ),
394 (
395 "Reizen per vliegtuig: om tijd te winnen zit je je uren te vervelen.",
396 "Fons Jansen",
397 ),
398]
401# Registry: map each supported non-English locale to its quote list.
402# To add a new language, create _QUOTES_XX and add it here — no other change needed.
403_LOCALE_QUOTES: dict[str, list[tuple[str, str]]] = {
404 "fr": _QUOTES_FR,
405 "nl": _QUOTES_NL,
406}
409def random_aviation_quote(locale: str = "en") -> str:
410 """Return a randomly chosen aviation quote formatted as 'text \u2014 attribution'.
412 For non-English locales the pool includes both English and that language's
413 quotes, so users may receive a quote in their own language. Quotes in other
414 languages are never translated — they stay in their original language.
415 """
416 pool = list(_QUOTES_EN) + list(_LOCALE_QUOTES.get(locale or "en", []))
417 text, attribution = random.choice(pool)
418 return f"\u201c{text}\u201d \u2014 {attribution}"