Menu F12 traduit dans la langue de la version du jeu (fr, en, es, de, pl)

- runtime/texts.h : macro TR(fr, en, es, de, pl), choisie à la compilation
  comme les adresses ; bulles en polonais avec leurs vraies lettres.
- menu.c, report.c (types de rapport), saves.c (raisons du refus) : tous les
  textes affichés passent par TR. rapport.txt reste en français.
- Police du menu : lettres espagnoles, allemandes, polonaises et « » ajoutées
  (tools/gen_font.py), glyphes existants inchangés.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
linkatplugandClaude Opus 5.5 committed 2026-12-06 04:30:38 +01:00
1 parent b2d5477916
commit 094477a2b9
7 files changed
+1342 -120

No files matched your search

+4 -2
View File
@@ -77,9 +77,11 @@ Rapport du traducteur, mêmes chiffres partout sauf les instructions non traduit
| Sauvegarde du menu F12, puis rechargement | ok | ok | ok | ok | ok |
| Sauvegarde française `SAVEGM.07` chargée | ok | titre « PART TWO » d'abord | ok, cuisine | titre « TEIL II » d'abord | |
## Bulles en jeu
## Menu F12 et bulles dans la langue du jeu
Les bulles en bas à droite (« F12 : réglages » au démarrage, pack HD avec F10, sous-titres avec F2) sont dans la langue de la version du jeu (`runtime/texts.h`). La police du menu ne couvre que Latin-1 : en polonais, « TAK / NIE » remplace « włączone / wyłączone ». Le menu F12 lui-même reste en français.
Le menu F12 (réglages, parties sauvegardées, rapport de bug) et les bulles en bas à droite (« F12 : réglages » au démarrage, pack HD avec F10, sous-titres avec F2) sont dans la langue de la version du jeu. Chaque texte passe par la macro TR(fr, en, es, de, pl) de runtime/texts.h, qui garde à la compilation celui de la version, comme pour les adresses. La police du menu (tools/gen_font.py) couvre les lettres de ces cinq langues. Le contenu de rapport.txt reste en français : c'est un fichier technique, lu aussi par le launcher (ligne « Version »).
Pour ajouter un texte au menu : l'écrire avec TR(...) dans ses cinq langues, puis vérifier les pages avec tucker_headless --menu-bmp dans chaque version.
## Reste à faire
+203 -86
View File
@@ -12,6 +12,7 @@
#include "saves.h"
#include "rt.h"
#include "addr.h"
#include "texts.h"
#ifdef _WIN32
#include <direct.h>
#define MKDIR(d) _mkdir(d)
@@ -426,10 +427,11 @@ static int text(const MenuFont *f, int x, int y, const char *s, uint32_t rgb, in
enum { IT_SLIDER, IT_SWITCH, IT_CHOICE, IT_BUTTONS, IT_ACTION };
typedef struct { const char *label; int type; int *val; int lo, hi, step; const char *const *names; } Item;
static const char *const filter_labels[FILTER_COUNT] = {"Net", "Lissé", "xBR", "CRT"};
static const char *const walk_labels[3] = {"Normale", "× 1,5", "× 2"};
static const char *const filter_labels[FILTER_COUNT] = {TR("Net", "Sharp", "Nítido", "Scharf", "Ostry"),
TR("Lissé", "Smooth", "Suave", "Weich", "Gładki"), "xBR", "CRT"};
static const char *const walk_labels[3] = {TR("Normale", "Normal", "Normal", "Normal", "Normalna"), "× 1,5", "× 2"};
#ifdef ADR_SOUSTITRES
static const char *const subs_labels[3] = {"Auto", "Oui", "Non"};
static const char *const subs_labels[3] = {"Auto", TR("Oui", "Yes", "Sí", "Ja", "Tak"), TR("Non", "No", "No", "Nein", "Nie")};
#endif
/* tailles de fenêtre proposées : résolutions courantes qui tiennent à l'écran, celle de l'écran, et la taille
@@ -440,29 +442,29 @@ static char res_lab[MAX_RES][32];
static const char *res_names[MAX_RES];
static Item items[] = {
{"Volume général", IT_SLIDER, &settings.vol[VOL_GENERAL], 0, 100, 5, NULL},
{"Musique", IT_SLIDER, &settings.vol[VOL_MUSIQUE], 0, 100, 5, NULL},
{"Voix", IT_SLIDER, &settings.vol[VOL_VOIX], 0, 100, 5, NULL},
{"Bruitages", IT_SLIDER, &settings.vol[VOL_BRUITAGES], 0, 100, 5, NULL},
{"Plein écran", IT_SWITCH, &settings.fullscreen, 0, 1, 1, NULL},
{"Taille de la fenêtre", IT_CHOICE, &res_index, 0, 0, 1, res_names}, /* liste : menu_open */
{"Filtre d'image", IT_CHOICE, &settings.filter, 0, FILTER_COUNT - 1, 1, filter_labels},
{"Format d'origine 4:3", IT_SWITCH, &settings.aspect_43, 0, 1, 1, NULL},
{"Bords flous (écran large)", IT_SWITCH, &settings.wide_fill, 0, 1, 1, NULL},
{"Synchro verticale", IT_SWITCH, &settings.vsync, 0, 1, 1, NULL},
{"Zones cliquables (Espace)", IT_SWITCH, &settings.hotspots, 0, 1, 1, NULL},
{"Pack HD (mods)", IT_SWITCH, &settings.hd_pack, 0, 1, 1, NULL},
{" Décors HD", IT_SWITCH, &settings.hd_decors, 0, 1, 1, NULL},
{" Personnages et objets HD", IT_SWITCH, &settings.hd_sprites, 0, 1, 1, NULL},
{" Barre d'actions HD", IT_SWITCH, &settings.hd_panel, 0, 1, 1, NULL},
{"Passer les dialogues au clic", IT_SWITCH, &settings.skip_speech, 0, 1, 1, NULL},
{"Vitesse de marche de Bud", IT_CHOICE, &settings.walk_speed, 0, 2, 1, walk_labels},
{TR("Volume général", "Master volume", "Volumen general", "Gesamtlautstärke", "Głośność ogólna"), IT_SLIDER, &settings.vol[VOL_GENERAL], 0, 100, 5, NULL},
{TR("Musique", "Music", "Música", "Musik", "Muzyka"), IT_SLIDER, &settings.vol[VOL_MUSIQUE], 0, 100, 5, NULL},
{TR("Voix", "Voices", "Voces", "Stimmen", "Głosy"), IT_SLIDER, &settings.vol[VOL_VOIX], 0, 100, 5, NULL},
{TR("Bruitages", "Sound effects", "Efectos de sonido", "Geräusche", "Efekty dźwiękowe"), IT_SLIDER, &settings.vol[VOL_BRUITAGES], 0, 100, 5, NULL},
{TR("Plein écran", "Fullscreen", "Pantalla completa", "Vollbild", "Pełny ekran"), IT_SWITCH, &settings.fullscreen, 0, 1, 1, NULL},
{TR("Taille de la fenêtre", "Window size", "Tamaño de ventana", "Fenstergröße", "Rozmiar okna"), IT_CHOICE, &res_index, 0, 0, 1, res_names}, /* liste : menu_open */
{TR("Filtre d'image", "Image filter", "Filtro de imagen", "Bildfilter", "Filtr obrazu"), IT_CHOICE, &settings.filter, 0, FILTER_COUNT - 1, 1, filter_labels},
{TR("Format d'origine 4:3", "Original 4:3 aspect", "Formato original 4:3", "Originalformat 4:3", "Oryginalny format 4:3"), IT_SWITCH, &settings.aspect_43, 0, 1, 1, NULL},
{TR("Bords flous (écran large)", "Blurred edges (widescreen)", "Bordes difuminados", "Unscharfe Ränder (breit)", "Rozmyte brzegi (panorama)"), IT_SWITCH, &settings.wide_fill, 0, 1, 1, NULL},
{TR("Synchro verticale", "Vertical sync", "Sincronía vertical", "V-Sync", "Synchronizacja pionowa"), IT_SWITCH, &settings.vsync, 0, 1, 1, NULL},
{TR("Zones cliquables (Espace)", "Clickable areas (Space)", "Zonas clicables (Espacio)", "Klickzonen (Leertaste)", "Strefy klikalne (Spacja)"), IT_SWITCH, &settings.hotspots, 0, 1, 1, NULL},
{TR("Pack HD (mods)", "HD pack (mods)", "Pack HD (mods)", "HD-Paket (Mods)", "Pakiet HD (mody)"), IT_SWITCH, &settings.hd_pack, 0, 1, 1, NULL},
{TR(" Décors HD", " HD backgrounds", " Fondos HD", " HD-Hintergründe", " Tła HD"), IT_SWITCH, &settings.hd_decors, 0, 1, 1, NULL},
{TR(" Personnages et objets HD", " HD characters and objects", " Personajes y objetos HD", " HD-Figuren und -Objekte", " Postacie i obiekty HD"), IT_SWITCH, &settings.hd_sprites, 0, 1, 1, NULL},
{TR(" Barre d'actions HD", " HD action bar", " Barra de acciones HD", " HD-Aktionsleiste", " Pasek akcji HD"), IT_SWITCH, &settings.hd_panel, 0, 1, 1, NULL},
{TR("Passer les dialogues au clic", "Click to skip dialogue", "Saltar diálogos con un clic", "Dialoge per Klick überspringen", "Pomijanie dialogów kliknięciem"), IT_SWITCH, &settings.skip_speech, 0, 1, 1, NULL},
{TR("Vitesse de marche de Bud", "Bud's walking speed", "Velocidad al andar de Bud", "Laufgeschwindigkeit", "Szybkość chodu Buda"), IT_CHOICE, &settings.walk_speed, 0, 2, 1, walk_labels},
#ifdef ADR_SOUSTITRES /* la version française affiche toujours le texte : pas de réglage */
{"Sous-titres (F2)", IT_CHOICE, &settings.subtitles, 0, 2, 1, subs_labels},
{TR("Sous-titres (F2)", "Subtitles (F2)", "Subtítulos (F2)", "Untertitel (F2)", "Napisy (F2)"), IT_CHOICE, &settings.subtitles, 0, 2, 1, subs_labels},
#endif
{"Sauvegarde automatique", IT_SWITCH, &settings.autosave, 0, 1, 1, NULL},
{"Sauvegarder la partie", IT_ACTION, NULL, 0, 0, 0, NULL},
{"Parties sauvegardées", IT_ACTION, NULL, 0, 0, 0, NULL},
{TR("Sauvegarde automatique", "Autosave", "Guardado automático", "Automatisch speichern", "Autozapis"), IT_SWITCH, &settings.autosave, 0, 1, 1, NULL},
{TR("Sauvegarder la partie", "Save the game", "Guardar la partida", "Spiel speichern", "Zapisz grę"), IT_ACTION, NULL, 0, 0, 0, NULL},
{TR("Parties sauvegardées", "Saved games", "Partidas guardadas", "Gespeicherte Spiele", "Zapisane gry"), IT_ACTION, NULL, 0, 0, 0, NULL},
{NULL, IT_BUTTONS, NULL, 0, 1, 1, NULL},
};
#define N_ITEMS ((int)(sizeof items / sizeof items[0]))
@@ -482,7 +484,8 @@ static Item items[] = {
/* onglets : chacun montre une suite d'éléments ; la rangée des boutons est commune */
#define N_TABS 3
#define SEL_TABS (-1) /* sel : la rangée des onglets */
static const char *const tab_names[N_TABS] = {"Son", "Affichage", "Jeu"};
static const char *const tab_names[N_TABS] = {TR("Son", "Sound", "Sonido", "Ton", "Dźwięk"),
TR("Affichage", "Display", "Pantalla", "Anzeige", "Obraz"), TR("Jeu", "Game", "Juego", "Spiel", "Gra")};
static const int tab_first[N_TABS + 1] = {0, FIRST_DISPLAY, FIRST_GAME, N_ITEMS - 1};
static int tab = 1; /* gardé d'une ouverture du menu à l'autre */
@@ -564,15 +567,16 @@ static int action_ready(int i, char *why, size_t n) {
}
{
int c = count_saves();
if (c == 0) snprintf(why, n, "aucune pour l'instant");
else snprintf(why, n, c == 1 ? "%d partie" : "%d parties", c);
if (c == 0) snprintf(why, n, TR("aucune pour l'instant", "none yet", "ninguna todavía", "noch keine", "jeszcze brak"));
else snprintf(why, n, c == 1 ? TR("%d partie", "%d game", "%d partida", "%d Spielstand", "%d zapis")
: TR("%d parties", "%d games", "%d partidas", "%d Spielstände", "zapisy: %d"), c);
return 1; /* la page s'ouvre même vide */
}
}
static int save_now(void) {
SaveInfo si;
if (!saves_write(&si)) { snprintf(saved_msg, sizeof saved_msg, "échec de l'écriture"); return MENU_STAY; }
if (!saves_write(&si)) { snprintf(saved_msg, sizeof saved_msg, TR("échec de l'écriture", "could not write", "error al guardar", "Schreibfehler", "błąd zapisu")); return MENU_STAY; }
{
time_t t = (time_t)si.time;
struct tm tm;
@@ -581,7 +585,8 @@ static int save_now(void) {
#else
localtime_r(&t, &tm);
#endif
snprintf(saved_msg, sizeof saved_msg, "sauvegardée à %02d:%02d:%02d", tm.tm_hour, tm.tm_min, tm.tm_sec);
snprintf(saved_msg, sizeof saved_msg, TR("sauvegardée à %02d:%02d:%02d", "saved at %02d:%02d:%02d", "guardada a las %02d:%02d:%02d",
"gespeichert um %02d:%02d:%02d", "zapisano o %02d:%02d:%02d"), tm.tm_hour, tm.tm_min, tm.tm_sec);
}
saves_count = -1;
return MENU_STAY;
@@ -617,7 +622,7 @@ void menu_open(int screen_w, int screen_h, int usable_w, int usable_h) {
n_res = 0;
for (i = 0; i < (int)(sizeof common / sizeof common[0]); i++)
if (common[i][0] <= usable_w && common[i][1] <= usable_h) add_res(common[i][0], common[i][1], "");
add_res(screen_w, screen_h, " (écran)");
add_res(screen_w, screen_h, TR(" (écran)", " (screen)", " (pantalla)", " (Bildschirm)", " (ekran)"));
add_res(cur_w, cur_h, "");
for (i = 0; i < n_res; i++) {
res_names[i] = res_lab[i];
@@ -767,14 +772,14 @@ static void draw_slider(int y, const Item *it, int active) {
round_rect(CTRL_X0, cy - 3, SLIDER_X1, cy + 3, 3, C_TRACK, 255);
if (v > it->lo) round_rect(CTRL_X0, cy - 3, fx, cy + 3, 3, active ? C_ACCENT : C_MUTED, 255);
disc(fx, cy, active ? 10.f : 8.f, active ? C_ACCENT : C_TEXT, 255);
if (v == 0) snprintf(buf, sizeof buf, "Coupé");
if (v == 0) snprintf(buf, sizeof buf, TR("Coupé", "Off", "Apagado", "Aus", "Wył."));
else snprintf(buf, sizeof buf, "%d %%", v);
text(&font_small, CTRL_X1 - text_width(&font_small, buf), cy - font_small.height / 2, buf, v ? C_TEXT : C_MUTED, 255);
}
static void draw_switch(int y, int on, int active) {
int cy = y + ROW_H / 2, x1 = CTRL_X1, x0 = x1 - 54;
const char *lab = on ? "Oui" : "Non";
const char *lab = on ? TR("Oui", "On", "Sí", "An", "Tak") : TR("Non", "Off", "No", "Aus", "Nie");
round_rect(x0, cy - 14, x1, cy + 14, 14, on ? C_ACCENT : C_TRACK, 255);
disc(on ? x1 - 14 : x0 + 14, cy, 10, on ? C_DARK : (active ? C_TEXT : C_MUTED), 255);
text(&font_small, x0 - 14 - text_width(&font_small, lab), cy - font_small.height / 2, lab, active ? C_TEXT : C_MUTED, 255);
@@ -813,6 +818,38 @@ static void draw_action(int y, int ready, int active, const char *label, const c
text(&font_small, x0 - text_width(&font_small, info), cy - font_small.height / 2, info, C_MUTED, 255);
}
/* texte d'aide de l'onglet Jeu */
#define HELP_WALK TR("La marche accélérée ne joue que sur les déplacements demandés, pas sur les scènes. ", \
"Faster walking only applies to the moves you ask for, not to cutscenes. ", \
"La marcha rápida solo se aplica a los desplazamientos que pides, no a las escenas. ", \
"Schnelleres Laufen gilt nur für Wege, die du anklickst, nicht für Zwischenszenen. ", \
"Szybszy chód działa tylko przy ruchach zleconych przez gracza, nie w scenkach. ")
#ifdef ADR_SOUSTITRES
#define HELP_SUBS TR("Sous-titres : Auto les affiche quand le jeu n'a pas de voix ; F2 les montre ou les cache en jeu. ", \
"Subtitles: Auto shows them when the game has no voices; F2 shows or hides them in game. ", \
"Subtítulos: Auto los muestra si el juego no tiene voces; F2 los muestra u oculta durante el juego. ", \
"Untertitel: Auto zeigt sie, wenn das Spiel keine Sprachausgabe hat; F2 blendet sie im Spiel ein oder aus. ", \
"Napisy: Auto pokazuje je, gdy gra nie ma głosów; F2 włącza je lub wyłącza w trakcie gry. ")
#else
#define HELP_SUBS ""
#endif
#define HELP_SAVES TR("La sauvegarde automatique est écrite à chaque changement de lieu, dans un emplacement à part : " \
"elle ne remplace aucune de vos parties. Les parties sauvegardées ici sont en nombre illimité, " \
"chacune avec sa miniature, dans le dossier \"parties\" à côté des réglages ; celles du jeu " \
"(panneau d'options) restent à leur place.", \
"The autosave is written at each change of location, in a separate slot: it never replaces one of your " \
"games. Games saved here are unlimited, each with its thumbnail, in the \"parties\" folder next to the " \
"settings; the game's own saves (options panel) stay where they are.", \
"El guardado automático se escribe en cada cambio de lugar, en una ranura aparte: nunca sustituye a tus " \
"partidas. Las partidas guardadas aquí son ilimitadas, cada una con su miniatura, en la carpeta \"parties\" " \
"junto a los ajustes; las del juego (panel de opciones) siguen en su sitio.", \
"Der automatische Spielstand wird bei jedem Ortswechsel in einen eigenen Platz geschrieben: er ersetzt " \
"keinen deiner Spielstände. Hier gespeicherte Spiele sind unbegrenzt, jedes mit Vorschaubild, im Ordner " \
"\"parties\" neben den Einstellungen; die Spielstände des Spiels (Optionsmenü) bleiben, wo sie sind.", \
"Autozapis powstaje przy każdej zmianie miejsca, w osobnym miejscu: nie zastępuje żadnej z twoich gier. " \
"Zapisów robionych tutaj może być dowolnie wiele, każdy z miniaturą, w folderze \"parties\" obok " \
"ustawień; zapisy samej gry (panel opcji) zostają na swoim miejscu.")
void menu_draw(uint32_t *px) {
int i;
fb = px;
@@ -822,7 +859,7 @@ void menu_draw(uint32_t *px) {
outline_rect(PANEL_X0, PANEL_Y0, PANEL_X1, PANEL_Y1, 22, 2, C_BORDER, 255);
if (page == PAGE_SAVES) { saves_draw(); return; }
if (page != PAGE_MAIN) { report_draw(); return; }
text(&font_title, PANEL_X0 + 44, PANEL_Y0 + 26, "Réglages", C_ACCENT, 255);
text(&font_title, PANEL_X0 + 44, PANEL_Y0 + 26, TR("Réglages", "Settings", "Ajustes", "Einstellungen", "Ustawienia"), C_ACCENT, 255);
round_rect(PANEL_X0 + 44, 114, PANEL_X1 - 44, 116, 1, C_BORDER, 255);
for (i = 0; i < N_TABS; i++) {
int x0 = tab_x(i), x1 = x0 + tab_w(i), on = i == tab;
@@ -833,21 +870,16 @@ void menu_draw(uint32_t *px) {
}
if (tab == 2)
wrap_text(PANEL_X0 + 44, row_y(tab_first[3] - 1) + ROW_H + 18, PANEL_X1 - PANEL_X0 - 88,
"La marche accélérée ne joue que sur les déplacements demandés, pas sur les scènes. "
#ifdef ADR_SOUSTITRES
"Sous-titres : Auto les affiche quand le jeu n'a pas de voix ; F2 les montre ou les cache en jeu. "
#endif
"La sauvegarde automatique est écrite à chaque changement de lieu, dans un emplacement à part : "
"elle ne remplace aucune de vos parties. Les parties sauvegardées ici sont en nombre illimité, "
"chacune avec sa miniature, dans le dossier \"parties\" à côté des réglages ; celles du jeu "
"(panneau d'options) restent à leur place.", C_MUTED);
HELP_WALK HELP_SUBS HELP_SAVES, C_MUTED);
for (i = 0; i < N_ITEMS; i++) {
const Item *it = &items[i];
int y = row_y(i), active = i == sel;
if (!visible(i)) continue;
if (it->type == IT_BUTTONS) {
static const char *lab[N_BTN] = {"Reprendre", "Signaler un bug", "Quitter le jeu"};
static const char *lab[N_BTN] = {TR("Reprendre", "Resume", "Continuar", "Weiter", "Wznów"),
TR("Signaler un bug", "Report a bug", "Reportar fallo", "Fehler melden", "Zgłoś błąd"),
TR("Quitter le jeu", "Quit game", "Salir del juego", "Spiel beenden", "Wyjdź z gry")};
int b;
for (b = 0; b < N_BTN; b++) {
int x0 = button_x(b), on = active && button == b;
@@ -871,17 +903,22 @@ void menu_draw(uint32_t *px) {
int lw = text(&font_normal, PANEL_X0 + 44, y + (ROW_H - font_normal.height) / 2, it->label,
dim ? C_MUTED : C_TEXT, 255);
if (i == ITEM_HD && !menu_hd_available)
text(&font_small, PANEL_X0 + 44 + lw + 14, y + (ROW_H - font_small.height) / 2, "aucun pack installé", C_MUTED, 255);
text(&font_small, PANEL_X0 + 44 + lw + 14, y + (ROW_H - font_small.height) / 2, TR("aucun pack installé", "no pack installed", "ningún pack instalado", "kein Paket installiert", "brak pakietu"), C_MUTED, 255);
switch (it->type) {
case IT_SLIDER: draw_slider(y, it, active); break;
case IT_SWITCH: draw_switch(y, *it->val, active); break;
case IT_CHOICE: draw_choice(y, it, active, dim); break;
case IT_ACTION: draw_action(y, ready, active, i == ITEM_SAVE_NOW ? "Sauvegarder" : "Ouvrir", why); break;
case IT_ACTION: draw_action(y, ready, active, i == ITEM_SAVE_NOW ? TR("Sauvegarder", "Save", "Guardar", "Speichern", "Zapisz")
: TR("Ouvrir", "Open", "Abrir", "Öffnen", "Otwórz"), why); break;
}
}
}
{
const char *hint = "Tab : onglet · Flèches : choisir, régler · Entrée : valider · Échap : reprendre";
const char *hint = TR("Tab : onglet · Flèches : choisir, régler · Entrée : valider · Échap : reprendre",
"Tab: tab · Arrows: choose, adjust · Enter: confirm · Esc: resume",
"Tab: pestaña · Flechas: elegir, ajustar · Intro: aceptar · Esc: continuar",
"Tab: Reiter · Pfeile: wählen, einstellen · Enter: bestätigen · Esc: weiter",
"Tab: karta · Strzałki: wybór, zmiana · Enter: zatwierdź · Esc: wznów");
text(&font_small, (MENU_W - text_width(&font_small, hint)) / 2, PANEL_Y1 - 26, hint, C_MUTED, 255);
}
}
@@ -898,7 +935,10 @@ void menu_draw_toast(uint32_t *px, const char *msg) {
void menu_draw_zones(uint32_t *px, const Zone *z, int n, float gx, float gy, float sx, float sy) {
static const uint32_t col[4] = { RGB(255, 216, 74), RGB(64, 224, 255), RGB(106, 255, 122), RGB(255, 106, 216) };
static const char *const lab[4] = { "décor", "sortie", "objet", "personnage" };
static const char *const lab[4] = { TR("décor", "scenery", "decorado", "Kulisse", "dekoracja"),
TR("sortie", "exit", "salida", "Ausgang", "wyjście"),
TR("objet", "object", "objeto", "Objekt", "obiekt"),
TR("personnage", "character", "personaje", "Figur", "postać") };
int i, k, seen[4] = {0};
fb = px;
memset(px, 0, (size_t)MENU_W * MENU_H * 4);
@@ -1089,33 +1129,62 @@ static int wrap_text(int x, int y, int w, const char *s, uint32_t rgb) {
return y;
}
#define HINT_BACK TR("Flèches : choisir · Entrée : valider · Échap : retour", \
"Arrows: choose · Enter: confirm · Esc: back", \
"Flechas: elegir · Intro: aceptar · Esc: volver", \
"Pfeile: wählen · Enter: bestätigen · Esc: zurück", \
"Strzałki: wybór · Enter: zatwierdź · Esc: wstecz")
static void report_draw(void) {
int i, fx0 = PANEL_X0 + 44, fx1 = PANEL_X1 - 44;
if (page == PAGE_DONE) {
int y = 140;
text(&font_title, PANEL_X0 + 44, PANEL_Y0 + 26, done_ok ? "Rapport écrit" : "Rapport non écrit", C_ACCENT, 255);
text(&font_title, PANEL_X0 + 44, PANEL_Y0 + 26, done_ok ? TR("Rapport écrit", "Report written", "Informe guardado", "Bericht geschrieben", "Raport zapisany")
: TR("Rapport non écrit", "Report not written", "Informe no guardado", "Bericht nicht geschrieben", "Raport niezapisany"), C_ACCENT, 255);
round_rect(PANEL_X0 + 44, 114, PANEL_X1 - 44, 116, 1, C_BORDER, 255);
if (done_ok) {
text(&font_small, fx0, y, "DOSSIER", C_MUTED, 255);
text(&font_small, fx0, y, TR("DOSSIER", "FOLDER", "CARPETA", "ORDNER", "FOLDER"), C_MUTED, 255);
y = wrap_text(fx0, y + 26, fx1 - fx0, done_dir, C_TEXT) + 22;
text(&font_small, fx0, y, "CONTENU", C_MUTED, 255);
y = wrap_text(fx0, y + 26, fx1 - fx0, "rapport.txt (type, commentaire, lieu, positions, zones, réglages), "
text(&font_small, fx0, y, TR("CONTENU", "CONTENTS", "CONTENIDO", "INHALT", "ZAWARTOŚĆ"), C_MUTED, 255);
y = wrap_text(fx0, y + 26, fx1 - fx0, TR("rapport.txt (type, commentaire, lieu, positions, zones, réglages), "
"jeu.bmp et ecran.bmp (captures), SAVEGM.98 (la partie à cet instant), settings.ini, "
"memoire.bin (variables du jeu).", C_TEXT) + 22;
wrap_text(fx0, y, fx1 - fx0, "Pour signaler le bug, joindre ce dossier (ou un zip du dossier) au message. "
"Rien n'a été envoyé.", C_MUTED);
r_buttons("Ouvrir le dossier", "Reprendre");
"memoire.bin (variables du jeu).",
"rapport.txt (type, comment, location, positions, areas, settings), "
"jeu.bmp and ecran.bmp (screenshots), SAVEGM.98 (the game at that moment), settings.ini, "
"memoire.bin (game variables).",
"rapport.txt (tipo, comentario, lugar, posiciones, zonas, ajustes), "
"jeu.bmp y ecran.bmp (capturas), SAVEGM.98 (la partida en ese momento), settings.ini, "
"memoire.bin (variables del juego).",
"rapport.txt (Art, Kommentar, Ort, Positionen, Zonen, Einstellungen), "
"jeu.bmp und ecran.bmp (Bildschirmfotos), SAVEGM.98 (das Spiel in diesem Moment), settings.ini, "
"memoire.bin (Spielvariablen).",
"rapport.txt (typ, komentarz, miejsce, pozycje, strefy, ustawienia), "
"jeu.bmp i ecran.bmp (zrzuty ekranu), SAVEGM.98 (gra w tej chwili), settings.ini, "
"memoire.bin (zmienne gry)."), C_TEXT) + 22;
wrap_text(fx0, y, fx1 - fx0, TR("Pour signaler le bug, joindre ce dossier (ou un zip du dossier) au message. "
"Rien n'a été envoyé.",
"To report the bug, attach this folder (or a zip of it) to your message. Nothing has been sent.",
"Para informar del fallo, adjunta esta carpeta (o un zip de ella) al mensaje. No se ha enviado nada.",
"Um den Fehler zu melden, hänge diesen Ordner (oder ein Zip davon) an deine Nachricht an. "
"Es wurde nichts gesendet.",
"Aby zgłosić błąd, dołącz ten folder (lub jego zip) do wiadomości. Nic nie zostało wysłane."), C_MUTED);
r_buttons(TR("Ouvrir le dossier", "Open folder", "Abrir carpeta", "Ordner öffnen", "Otwórz folder"),
TR("Reprendre", "Resume", "Continuar", "Weiter", "Wznów"));
} else {
wrap_text(fx0, y, fx1 - fx0, "Le dossier des rapports n'a pas pu être créé ou écrit :", C_TEXT);
wrap_text(fx0, y, fx1 - fx0, TR("Le dossier des rapports n'a pas pu être créé ou écrit :",
"The reports folder could not be created or written:",
"No se ha podido crear o escribir la carpeta de informes:",
"Der Berichtsordner konnte nicht angelegt oder beschrieben werden:",
"Nie udało się utworzyć ani zapisać folderu raportów:"), C_TEXT);
wrap_text(fx0, y + 30, fx1 - fx0, report_root(), C_MUTED);
r_buttons("Retour", "Reprendre");
r_buttons(TR("Retour", "Back", "Volver", "Zurück", "Wstecz"), TR("Reprendre", "Resume", "Continuar", "Weiter", "Wznów"));
}
r_hint("Flèches : choisir · Entrée : valider · Échap : retour");
r_hint(HINT_BACK);
return;
}
text(&font_title, PANEL_X0 + 44, PANEL_Y0 + 26, "Signaler un bug", C_ACCENT, 255);
text(&font_title, PANEL_X0 + 44, PANEL_Y0 + 26, TR("Signaler un bug", "Report a bug", "Reportar fallo", "Fehler melden", "Zgłoś błąd"), C_ACCENT, 255);
round_rect(PANEL_X0 + 44, 114, PANEL_X1 - 44, 116, 1, C_BORDER, 255);
text(&font_small, fx0, 120, "TYPE", C_MUTED, 255);
text(&font_small, fx0, 120, TR("TYPE", "TYPE", "TIPO", "ART", "TYP"), C_MUTED, 255);
for (i = 0; i < BUG_COUNT; i++) {
int y = R_TYPE_Y + i * R_ROW_H, cy = y + R_ROW_H / 2, on = i == rtype;
if (rsel == i) r_row_mark(y, y + R_ROW_H);
@@ -1123,7 +1192,7 @@ static void report_draw(void) {
if (on) disc(fx0 + 9, cy, 4, C_DARK, 255);
text(&font_normal, fx0 + 30, y + (R_ROW_H - font_normal.height) / 2, bug_types[i], on || rsel == i ? C_TEXT : C_MUTED, 255);
}
text(&font_small, fx0, R_FIELD_Y0 - 20, "COMMENTAIRE (FACULTATIF)", C_MUTED, 255);
text(&font_small, fx0, R_FIELD_Y0 - 20, TR("COMMENTAIRE (FACULTATIF)", "COMMENT (OPTIONAL)", "COMENTARIO (OPCIONAL)", "KOMMENTAR (OPTIONAL)", "KOMENTARZ (OPCJONALNIE)"), C_MUTED, 255);
{
int active = rsel == R_COMMENT, ty = (R_FIELD_Y0 + R_FIELD_Y1 - font_normal.height) / 2, w = fx1 - fx0 - 32;
const char *shown = comment;
@@ -1138,18 +1207,33 @@ static void report_draw(void) {
if (active) round_rect(fx0 + 18 + tw, ty + 4, fx0 + 20 + tw, ty + font_normal.height - 4, 1, C_ACCENT, 255);
} else {
if (active) round_rect(fx0 + 16, ty + 4, fx0 + 18, ty + font_normal.height - 4, 1, C_ACCENT, 255);
text(&font_normal, fx0 + 26, ty, "Ce qui se passe, ce qui était attendu...", C_TRACK, 255);
text(&font_normal, fx0 + 26, ty, TR("Ce qui se passe, ce qui était attendu...", "What happens, what you expected...",
"Qué pasa y qué esperabas...", "Was passiert, was du erwartet hast...", "Co się dzieje, czego oczekiwano..."), C_TRACK, 255);
}
}
wrap_text(fx0, 444, fx1 - fx0, "Ajoutés automatiquement : le lieu, les positions, une capture d'écran et une "
"sauvegarde de la partie à cet instant. Rien n'est envoyé : le rapport reste dans un dossier de ce PC.", C_MUTED);
wrap_text(fx0, 444, fx1 - fx0, TR("Ajoutés automatiquement : le lieu, les positions, une capture d'écran et une "
"sauvegarde de la partie à cet instant. Rien n'est envoyé : le rapport reste dans un dossier de ce PC.",
"Added automatically: the location, the positions, a screenshot and a save of the game at that "
"moment. Nothing is sent: the report stays in a folder on this PC.",
"Se añaden automáticamente: el lugar, las posiciones, una captura de pantalla y una partida guardada "
"en ese momento. No se envía nada: el informe se queda en una carpeta de este PC.",
"Automatisch hinzugefügt: der Ort, die Positionen, ein Bildschirmfoto und ein Spielstand von diesem "
"Moment. Es wird nichts gesendet: der Bericht bleibt in einem Ordner auf diesem PC.",
"Dodawane automatycznie: miejsce, pozycje, zrzut ekranu i zapis gry z tej chwili. Nic nie jest "
"wysyłane: raport zostaje w folderze na tym komputerze."), C_MUTED);
if (rsel == R_CRASH) r_row_mark(R_CRASH_Y, R_CRASH_Y + ROW_H);
text(&font_normal, fx0, R_CRASH_Y + (ROW_H - font_normal.height) / 2, "Rapport automatique si le jeu plante",
text(&font_normal, fx0, R_CRASH_Y + (ROW_H - font_normal.height) / 2, TR("Rapport automatique si le jeu plante", "Automatic report if the game crashes",
"Informe automático si el juego falla", "Automatischer Bericht bei Absturz", "Automatyczny raport po awarii"),
rsel == R_CRASH ? C_TEXT : C_MUTED, 255);
draw_switch(R_CRASH_Y, settings.crash_report, rsel == R_CRASH);
r_buttons("Écrire le rapport", "Annuler");
r_hint(menu_text_wanted() ? "Tapez le commentaire · Entrée : suite · Échap : retour"
: "Flèches : choisir · Entrée : valider · Échap : retour");
r_buttons(TR("Écrire le rapport", "Write report", "Guardar informe", "Bericht schreiben", "Zapisz raport"),
TR("Annuler", "Cancel", "Cancelar", "Abbrechen", "Anuluj"));
r_hint(menu_text_wanted() ? TR("Tapez le commentaire · Entrée : suite · Échap : retour",
"Type the comment · Enter: next · Esc: back",
"Escribe el comentario · Intro: seguir · Esc: volver",
"Kommentar eingeben · Enter: weiter · Esc: zurück",
"Wpisz komentarz · Enter: dalej · Esc: wstecz")
: HINT_BACK);
}
/* ================================================================== page « Parties sauvegardées » */
@@ -1217,13 +1301,17 @@ static int s_press(void) {
case 0:
if (!s_can_load()) return MENU_STAY;
if (saves_load(slist[ssel].file)) { saves_close(); return MENU_CLOSE; }
snprintf(smsg, sizeof smsg, "Cette partie n'a pas pu être lue.");
snprintf(smsg, sizeof smsg, TR("Cette partie n'a pas pu être lue.", "This saved game could not be read.",
"No se ha podido leer esta partida.", "Dieser Spielstand konnte nicht gelesen werden.",
"Nie udało się odczytać tego zapisu."));
return MENU_STAY;
case 1:
if (!s_can_delete()) return MENU_STAY;
if (!sconfirm) { sconfirm = 1; return MENU_STAY; }
sconfirm = 0;
if (!saves_delete(slist[ssel].file)) snprintf(smsg, sizeof smsg, "Cette partie n'a pas pu être supprimée.");
if (!saves_delete(slist[ssel].file)) snprintf(smsg, sizeof smsg, TR("Cette partie n'a pas pu être supprimée.",
"This saved game could not be deleted.", "No se ha podido borrar esta partida.",
"Dieser Spielstand konnte nicht gelöscht werden.", "Nie udało się usunąć tego zapisu."));
saves_reload();
if (!sn) { sfocus = 1; sbutton = 2; }
s_scroll_to_sel();
@@ -1320,8 +1408,13 @@ static const uint32_t *s_thumb(const char *file) {
/* date de la sauvegarde : « 5 déc. 2026, 14:32 » */
static void s_date(int64_t t64, char *out, size_t n) {
static const char *const mois[12] = {"janv.", "févr.", "mars", "avr.", "mai", "juin", "juil.", "août", "sept.",
"oct.", "nov.", "déc."};
static const char *const mois[12] = {
TR("janv.", "Jan.", "ene.", "Jan.", "sty"), TR("févr.", "Feb.", "feb.", "Feb.", "lut"),
TR("mars", "Mar.", "mar.", "März", "mar"), TR("avr.", "Apr.", "abr.", "Apr.", "kwi"),
TR("mai", "May", "may.", "Mai", "maj"), TR("juin", "Jun.", "jun.", "Juni", "cze"),
TR("juil.", "Jul.", "jul.", "Juli", "lip"), TR("août", "Aug.", "ago.", "Aug.", "sie"),
TR("sept.", "Sep.", "sep.", "Sep.", "wrz"), TR("oct.", "Oct.", "oct.", "Okt.", "paź"),
TR("nov.", "Nov.", "nov.", "Nov.", "lis"), TR("déc.", "Dec.", "dic.", "Dez.", "gru")};
time_t t = (time_t)t64;
struct tm tm;
#ifdef _WIN32
@@ -1329,18 +1422,27 @@ static void s_date(int64_t t64, char *out, size_t n) {
#else
if (!localtime_r(&t, &tm)) { snprintf(out, n, "?"); return; }
#endif
snprintf(out, n, "%d %s %d, %02d:%02d", tm.tm_mday, mois[tm.tm_mon % 12], tm.tm_year + 1900, tm.tm_hour, tm.tm_min);
snprintf(out, n, TR("%d %s %d, %02d:%02d", "%d %s %d, %02d:%02d", "%d %s %d, %02d:%02d",
"%d. %s %d, %02d:%02d", "%d %s %d, %02d:%02d"), tm.tm_mday, mois[tm.tm_mon % 12], tm.tm_year + 1900, tm.tm_hour, tm.tm_min);
}
static void saves_draw(void) {
int r, c, fx0 = PANEL_X0 + 44, fx1 = PANEL_X1 - 44;
char buf[128];
text(&font_title, fx0, PANEL_Y0 + 26, "Parties sauvegardées", C_ACCENT, 255);
text(&font_title, fx0, PANEL_Y0 + 26, TR("Parties sauvegardées", "Saved games", "Partidas guardadas", "Gespeicherte Spiele", "Zapisane gry"), C_ACCENT, 255);
round_rect(fx0, 114, fx1, 116, 1, C_BORDER, 255);
if (!sn) {
wrap_text(fx0, 150, fx1 - fx0, "Aucune partie sauvegardée pour l'instant. \"Sauvegarder la partie\", dans l'onglet "
wrap_text(fx0, 150, fx1 - fx0, TR("Aucune partie sauvegardée pour l'instant. \"Sauvegarder la partie\", dans l'onglet "
"Jeu, en crée une à chaque fois ; la sauvegarde automatique apparaît ici après le premier changement "
"de lieu.", C_MUTED);
"de lieu.",
"No saved games yet. \"Save the game\", in the Game tab, creates a new one each time; the autosave "
"appears here after the first change of location.",
"Todavía no hay partidas guardadas. \"Guardar la partida\", en la pestaña Juego, crea una nueva cada "
"vez; el guardado automático aparece aquí tras el primer cambio de lugar.",
"Noch keine gespeicherten Spiele. \"Spiel speichern\" im Reiter Spiel legt jedes Mal einen neuen an; "
"der automatische Spielstand erscheint hier nach dem ersten Ortswechsel.",
"Brak zapisanych gier. \"Zapisz grę\" w karcie Gra tworzy za każdym razem nowy zapis; autozapis "
"pojawia się tutaj po pierwszej zmianie miejsca."), C_MUTED);
}
for (r = 0; r < S_ROWS; r++)
for (c = 0; c < S_COLS; c++) {
@@ -1353,43 +1455,54 @@ static void saves_draw(void) {
for (y = 0; y < S_TH; y++) for (x = 0; x < S_TW; x++) fb[(y0 + y) * MENU_W + x0 + x] = px[y * S_TW + x];
} else {
round_rect(x0, y0, x0 + S_TW, y0 + S_TH, 6, C_DARK, 255);
text(&font_small, x0 + 12, y0 + S_TH / 2 - font_small.height / 2, "image illisible", C_MUTED, 255);
text(&font_small, x0 + 12, y0 + S_TH / 2 - font_small.height / 2, TR("image illisible", "unreadable image", "imagen ilegible", "Bild unlesbar", "nieczytelny obraz"), C_MUTED, 255);
}
if (on) outline_rect(x0 - 5, y0 - 5, x0 + S_TW + 5, y0 + S_TH + 5, 8, sfocus == 0 ? 3.f : 2.f,
sfocus == 0 ? C_ACCENT : C_MUTED, 255);
else outline_rect(x0 - 1, y0 - 1, x0 + S_TW + 1, y0 + S_TH + 1, 3, 1.f, C_BORDER, 255);
s_date(slist[i].time, buf, sizeof buf);
text(&font_small, x0, y0 + S_TH + 8, buf, on ? C_TEXT : C_MUTED, 255);
if (slist[i].is_auto) snprintf(buf, sizeof buf, "Automatique · lieu %d", slist[i].lieu);
else snprintf(buf, sizeof buf, "Lieu %d", slist[i].lieu);
if (slist[i].is_auto) snprintf(buf, sizeof buf, TR("Automatique · lieu %d", "Autosave · location %d", "Automático · lugar %d", "Automatisch · Ort %d", "Autozapis · miejsce %d"), slist[i].lieu);
else snprintf(buf, sizeof buf, TR("Lieu %d", "Location %d", "Lugar %d", "Ort %d", "Miejsce %d"), slist[i].lieu);
text(&font_small, x0, y0 + S_TH + 8 + font_small.height + 2, buf, slist[i].is_auto ? C_ACCENT : C_MUTED, 255);
}
if (sn > S_COLS * S_ROWS) { /* position dans la liste */
int first = stop * S_COLS + 1, last = (stop + S_ROWS) * S_COLS;
if (last > sn) last = sn;
snprintf(buf, sizeof buf, "%d–%d sur %d", first, last, sn);
snprintf(buf, sizeof buf, TR("%d–%d sur %d", "%d–%d of %d", "%d–%d de %d", "%d–%d von %d", "%d–%d z %d"), first, last, sn);
text(&font_small, fx1 - text_width(&font_small, buf), PANEL_Y0 + 40, buf, C_MUTED, 255);
}
if (sconfirm && sn) {
s_date(slist[ssel].time, buf, sizeof buf);
{
char line[200];
snprintf(line, sizeof line, "Supprimer définitivement la partie du %s ? Appuyer encore sur \"Supprimer\" "
"pour confirmer, Échap pour annuler.", buf);
snprintf(line, sizeof line, TR("Supprimer définitivement la partie du %s ? Appuyer encore sur \"Supprimer\" "
"pour confirmer, Échap pour annuler.",
"Permanently delete the game from %s? Press \"Delete\" again to confirm, Esc to cancel.",
"¿Borrar definitivamente la partida del %s? Pulsa \"Borrar\" otra vez para confirmar, Esc para cancelar.",
"Spielstand vom %s endgültig löschen? Zum Bestätigen noch einmal \"Löschen\" drücken, Esc bricht ab.",
"Usunąć na zawsze zapis z %s? Naciśnij \"Usuń\" jeszcze raz, aby potwierdzić, Esc, aby anulować."), buf);
wrap_text(fx0, S_INFO_Y, fx1 - fx0, line, C_ACCENT);
}
} else if (smsg[0]) wrap_text(fx0, S_INFO_Y, fx1 - fx0, smsg, C_ACCENT);
else if (sn && !game_in_location())
wrap_text(fx0, S_INFO_Y, fx1 - fx0, "Le chargement est possible une fois la partie commencée.", C_MUTED);
wrap_text(fx0, S_INFO_Y, fx1 - fx0, TR("Le chargement est possible une fois la partie commencée.",
"Loading is possible once the game has started.", "Se puede cargar una vez empezada la partida.",
"Laden ist möglich, sobald das Spiel begonnen hat.", "Wczytywanie jest możliwe po rozpoczęciu gry."), C_MUTED);
else if (sn)
wrap_text(fx0, S_INFO_Y, fx1 - fx0, "Charger remplace la partie en cours : sauvegardez-la d'abord si besoin.", C_MUTED);
wrap_text(fx0, S_INFO_Y, fx1 - fx0, TR("Charger remplace la partie en cours : sauvegardez-la d'abord si besoin.",
"Loading replaces the current game: save it first if needed.",
"Cargar sustituye la partida en curso: guárdala antes si hace falta.",
"Laden ersetzt das laufende Spiel: vorher speichern, falls nötig.",
"Wczytanie zastąpi bieżącą grę: w razie potrzeby najpierw ją zapisz."), C_MUTED);
{
static const char *lab[N_BTN] = {"Charger", "Supprimer", "Retour"};
static const char *lab[N_BTN] = {TR("Charger", "Load", "Cargar", "Laden", "Wczytaj"),
TR("Supprimer", "Delete", "Borrar", "Löschen", "Usuń"), TR("Retour", "Back", "Volver", "Zurück", "Wstecz")};
int b;
for (b = 0; b < N_BTN; b++) {
int x0 = button_x(b), on = sfocus == 1 && sbutton == b, y = 624;
int ok = b == 0 ? s_can_load() : b == 1 ? s_can_delete() : 1;
const char *l = b == 1 && sconfirm ? "Confirmer" : lab[b];
const char *l = b == 1 && sconfirm ? TR("Confirmer", "Confirm", "Confirmar", "Bestätigen", "Potwierdź") : lab[b];
int tw = text_width(&font_normal, l);
if (on && ok) round_rect(x0, y, x0 + BTN_W, y + BTN_H, BTN_H / 2, C_ACCENT, 255);
else outline_rect(x0, y, x0 + BTN_W, y + BTN_H, BTN_H / 2, 2, on ? C_MUTED : C_BORDER, 255);
@@ -1397,5 +1510,9 @@ static void saves_draw(void) {
on && ok ? C_DARK : ok ? C_TEXT : C_TRACK, 255);
}
}
r_hint("Flèches : choisir · Entrée : charger · Retour arrière : supprimer · Échap : retour");
r_hint(TR("Flèches : choisir · Entrée : charger · Retour arrière : supprimer · Échap : retour",
"Arrows: choose · Enter: load · Backspace: delete · Esc: back",
"Flechas: elegir · Intro: cargar · Retroceso: borrar · Esc: volver",
"Pfeile: wählen · Enter: laden · Rücktaste: löschen · Esc: zurück",
"Strzałki: wybór · Enter: wczytaj · Backspace: usuń · Esc: wstecz"));
}
+1091 -11
View File
File diff suppressed because it is too large. Load diff
+13 -2
View File
@@ -10,6 +10,7 @@
#include "mods.h"
#include "zones.h"
#include "report.h"
#include "texts.h"
#ifdef _WIN32
#include <direct.h>
#define MKDIR(d) _mkdir(d)
@@ -24,8 +25,18 @@
#endif
const char *const bug_types[BUG_COUNT] = {
"Graphismes (image d'origine)", "Graphismes HD (décors, sprites, barre)", "Son ou musique",
"Texte ou traduction", "Zone ou clic", "Blocage (impossible d'avancer)", "Plantage ou gel", "Autre",
TR("Graphismes (image d'origine)", "Graphics (original image)", "Gráficos (imagen original)",
"Grafik (Originalbild)", "Grafika (oryginalny obraz)"),
TR("Graphismes HD (décors, sprites, barre)", "HD graphics (backgrounds, sprites, bar)",
"Gráficos HD (fondos, sprites, barra)", "HD-Grafik (Hintergründe, Sprites, Leiste)",
"Grafika HD (tła, sprite'y, pasek)"),
TR("Son ou musique", "Sound or music", "Sonido o música", "Ton oder Musik", "Dźwięk lub muzyka"),
TR("Texte ou traduction", "Text or translation", "Texto o traducción", "Text oder Übersetzung", "Tekst lub tłumaczenie"),
TR("Zone ou clic", "Area or click", "Zona o clic", "Zone oder Klick", "Strefa lub kliknięcie"),
TR("Blocage (impossible d'avancer)", "Stuck (can't progress)", "Bloqueo (no se puede avanzar)",
"Feststecken (kein Weiterkommen)", "Blokada (nie da się iść dalej)"),
TR("Plantage ou gel", "Crash or freeze", "Cierre o cuelgue", "Absturz oder Einfrieren", "Awaria lub zawieszenie"),
TR("Autre", "Other", "Otro", "Sonstiges", "Inne"),
};
static char root[600];
+3 -2
View File
@@ -9,6 +9,7 @@
#include "menu.h"
#include "report.h"
#include "saves.h"
#include "texts.h"
#ifdef _WIN32
#include <direct.h>
#include <io.h>
@@ -126,8 +127,8 @@ static int write_file(const char *file, const uint8_t *state, int lieu, int64_t
}
int saves_can_save(char *why, size_t n) {
if (!game_in_location()) { snprintf(why, n, "pas de partie en cours"); return 0; }
if (RD32(ADR_BUD_SCRIPT) || (int32_t)RD32(ADR_PAROLE_DUREE) > 0) { snprintf(why, n, "pas pendant une scène"); return 0; }
if (!game_in_location()) { snprintf(why, n, TR("pas de partie en cours", "no game in progress", "ninguna partida en curso", "kein laufendes Spiel", "brak trwającej gry")); return 0; }
if (RD32(ADR_BUD_SCRIPT) || (int32_t)RD32(ADR_PAROLE_DUREE) > 0) { snprintf(why, n, TR("pas pendant une scène", "not during a scene", "no durante una escena", "nicht während einer Szene", "nie podczas sceny")); return 0; }
return 1;
}
+25 -16
View File
@@ -1,23 +1,32 @@
/* Bulles affichées en jeu (en bas à droite), dans la langue de la version du jeu compilée (DTR_VERSION).
* La police du menu couvre Latin-1 : pas de lettres polonaises accentuées (ł, ą…), d'où « TAK / NIE ». */
/* Textes affichés par le runtime (menu F12, bulles), dans la langue de la version du jeu compilée (DTR_VERSION).
* TR(fr, en, es, de, pl) garde, à la compilation, le texte de cette langue : une compilation par version, comme
* pour les adresses (addr.h). La police du menu (tools/gen_font.py) couvre les lettres de ces cinq langues. */
#pragma once
#include "addr.h"
#if defined(DTR_VER_PL)
#define TR(fr, en, es, de, pl) pl
#elif defined(DTR_ADDR_EN)
#define TR(fr, en, es, de, pl) en
#elif defined(DTR_ADDR_ES)
#define TR(fr, en, es, de, pl) es
#elif defined(DTR_ADDR_DE)
#define TR(fr, en, es, de, pl) de
#else
#define TR(fr, en, es, de, pl) fr
#endif
/* bulles en bas à droite (host_toast) */
enum { TXT_F12, TXT_NO_HD, TXT_HD_ON, TXT_HD_OFF, TXT_SUBS_ON, TXT_SUBS_OFF, TXT_COUNT };
static const char *const TXT[TXT_COUNT] = {
#if defined(DTR_VER_PL)
"F12: ustawienia", "Brak pakietu HD", "HD: TAK (F10)", "HD: NIE (F10)", "Napisy: TAK (F2)", "Napisy: NIE (F2)",
#elif defined(DTR_ADDR_EN)
"F12: settings", "No HD pack installed", "HD: on (F10)", "HD: off (F10)", "Subtitles: on (F2)", "Subtitles: off (F2)",
#elif defined(DTR_ADDR_ES)
"F12: ajustes", "No hay ningún pack HD", "HD: activado (F10)", "HD: desactivado (F10)",
"Subtítulos: activados (F2)", "Subtítulos: desactivados (F2)",
#elif defined(DTR_ADDR_DE)
"F12: Einstellungen", "Kein HD-Paket installiert", "HD: an (F10)", "HD: aus (F10)",
"Untertitel: an (F2)", "Untertitel: aus (F2)",
#else
"F12 : réglages", "Aucun pack HD installé", "HD : activé (F10)", "HD : désactivé (F10)",
"Sous-titres : activés (F2)", "Sous-titres : désactivés (F2)",
#endif
TR("F12 : réglages", "F12: settings", "F12: ajustes", "F12: Einstellungen", "F12: ustawienia"),
TR("Aucun pack HD installé", "No HD pack installed", "No hay ningún pack HD", "Kein HD-Paket installiert",
"Brak pakietu HD"),
TR("HD : activé (F10)", "HD: on (F10)", "HD: activado (F10)", "HD: an (F10)", "HD: włączone (F10)"),
TR("HD : désactivé (F10)", "HD: off (F10)", "HD: desactivado (F10)", "HD: aus (F10)", "HD: wyłączone (F10)"),
TR("Sous-titres : activés (F2)", "Subtitles: on (F2)", "Subtítulos: activados (F2)", "Untertitel: an (F2)",
"Napisy: włączone (F2)"),
TR("Sous-titres : désactivés (F2)", "Subtitles: off (F2)", "Subtítulos: desactivados (F2)", "Untertitel: aus (F2)",
"Napisy: wyłączone (F2)"),
};
+3 -1
View File
@@ -12,7 +12,9 @@ import sys
OUT = sys.argv[1] if len(sys.argv) > 1 else "runtime/menu_font.h"
FAMILY = sys.argv[2] if len(sys.argv) > 2 else "Roboto"
CHARS = "".join(chr(c) for c in range(32, 127)) + "éèêëàâäçôöîïùûüœÉÈÊÀÂÇÔÎ×←→↑↓·…–°"
CHARS = ("".join(chr(c) for c in range(32, 127)) + "éèêëàâäçôöîïùûüœÉÈÊÀÂÇÔÎ×←→↑↓·…–°"
+ "áíóúñÁÍÓÚÑ¿¡ÄÖÜß«»" # espagnol, allemand ; guillemets
+ "ąćęłńśźżĄĆĘŁŃÓŚŹŻ") # polonais (menu traduit selon la version du jeu)
SIZES = [("small", 22, 400), ("normal", 30, 400), ("title", 46, 700)] # hauteur de cellule en pixels
gdi = ctypes.WinDLL("gdi32")