Skip to content

Commit 9b8808e

Browse files
FussmatteInfoTeddy
authored andcommitted
Initial implementation of localisation credits
This commit adds translation credits to the game's end credits screen. Note that this is not implemented into the menu credits screen yet. The translator name list is subject to tweaks, and additionally some localised strings ("Localisation Project Led by" and "Pan-European Font Design by") run off the screen in some languages (Catalan, Spanish, Irish, Italian, Dutch, European Portuguese and Ukrainian) and will need to be addressed later.
1 parent c660000 commit 9b8808e

File tree

2 files changed

+92
-4
lines changed

2 files changed

+92
-4
lines changed

desktop_version/src/Credits.h

Lines changed: 55 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,59 @@
55

66
namespace Credits {
77

8+
/* Translators list; lines prefaced with a space aren't translatable */
9+
static const char* translators[] = {
10+
"Catalan",
11+
" Eduard Ereza Martínez",
12+
"Welsh",
13+
" Morgan Roberts",
14+
"German",
15+
" Thomas Faust",
16+
"Esperanto",
17+
" Reese Rivers",
18+
"Spanish",
19+
" Felipe Mercader",
20+
" Sara Marín",
21+
"French",
22+
" Words of Magic",
23+
"Irish",
24+
" Úna-Minh Kavanagh",
25+
" Seaghán Ó Modhráin",
26+
" Davis Sandefur",
27+
"Italian",
28+
" A. Dellepiane",
29+
" M. Scarabelli",
30+
" L. Bertolucci",
31+
" F. Bortolotti",
32+
"Japanese",
33+
" Nicalis, Inc.",
34+
" KabanFriends",
35+
"Korean",
36+
" Bada Im",
37+
" Hyungseok Cho",
38+
"Dutch",
39+
" Dav999",
40+
"Polish",
41+
" Kuba Kallus",
42+
"Brazilian Portuguese",
43+
" Lucas Araujo",
44+
" Thiago Araujo",
45+
"European Portuguese",
46+
" Locsmiths",
47+
"Russian",
48+
" TheMysticSword",
49+
"Silesian",
50+
" Kuba Kallus",
51+
"Turkish",
52+
" Engin İlkiz",
53+
"Ukrainian",
54+
" Olya Sushytska",
55+
"Chinese (Simplified)",
56+
" Sound of Mystery",
57+
"Chinese (Traditional)",
58+
" Sound of Mystery / craft",
59+
};
60+
861
/* Terry's Patrons... */
962
static const char* superpatrons[] = {
1063
"Anders Ekermo",
@@ -121,9 +174,9 @@ static const char* githubfriends[] = {
121174
};
122175

123176
/* Calculate credits length, finally. */
124-
static const int creditmaxposition = 1068 + (10 * (
177+
static const int creditmaxposition = 1228 + (10 * (
125178
SDL_arraysize(superpatrons) + SDL_arraysize(patrons) + SDL_arraysize(githubfriends)
126-
));
179+
)) + (12 * SDL_arraysize(translators));
127180

128181
} /* namespace Credits */
129182

desktop_version/src/Render.cpp

Lines changed: 37 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1945,9 +1945,44 @@ void gamecompleterender(void)
19451945
font::print(PR_2X | PR_FONT_8X8, 60, 830 + position, "Pauli Kohberger", tr, tg, tb);
19461946
}
19471947

1948-
if (graphics.onscreen(910 + position)) font::print(PR_3X | PR_CEN, -1, 890 + position, loc::gettext("Patrons"), tr, tg, tb);
1948+
int creditOffset = 890;
19491949

1950-
int creditOffset = 950;
1950+
if (graphics.onscreen(creditOffset + position)) font::print(PR_2X | PR_CEN, -1, creditOffset + position, loc::gettext("Localisation"), tr, tg, tb);
1951+
creditOffset += 30;
1952+
1953+
if (graphics.onscreen(creditOffset + position))
1954+
{
1955+
font::print(PR_CJK_HIGH, 40, creditOffset + position, loc::gettext("Localisation Project Led by"), tr, tg, tb);
1956+
font::print(PR_2X | PR_FONT_8X8, 60, creditOffset + position + 10, "Dav999", tr, tg, tb);
1957+
}
1958+
creditOffset += 40;
1959+
if (graphics.onscreen(creditOffset + position))
1960+
{
1961+
font::print(PR_CJK_HIGH, 40, creditOffset + position, loc::gettext("Pan-European Font Design by"), tr, tg, tb);
1962+
font::print(PR_2X | PR_FONT_8X8, 60, creditOffset + position + 10, "Reese Rivers", tr, tg, tb);
1963+
}
1964+
creditOffset += 40;
1965+
if (graphics.onscreen(creditOffset + position)) font::print(PR_CJK_HIGH | PR_CEN, -1, creditOffset + position, loc::gettext("Translators"), tr, tg, tb);
1966+
creditOffset += 20;
1967+
for (size_t i = 0; i < SDL_arraysize(Credits::translators); i += 1)
1968+
{
1969+
if (graphics.onscreen(creditOffset + position))
1970+
{
1971+
if (Credits::translators[i][0] != ' ') // Not prefixed with a space, so this line is the name of a language, display its localised string
1972+
{
1973+
font::print(0, 60, creditOffset + position, loc::gettext(Credits::translators[i]), tr, tg, tb);
1974+
} else { // Otherwise, this line is the name of a translator, indent it and display with the original 8x8 font always
1975+
font::print(PR_FONT_8X8, 72, creditOffset + position, Credits::translators[i], tr, tg, tb);
1976+
}
1977+
}
1978+
creditOffset += 12;
1979+
}
1980+
1981+
creditOffset += 40;
1982+
1983+
if (graphics.onscreen(creditOffset + position)) font::print(PR_3X | PR_CEN, -1, creditOffset + position, loc::gettext("Patrons"), tr, tg, tb);\
1984+
1985+
creditOffset += 50;
19511986

19521987
for (size_t i = 0; i < SDL_arraysize(Credits::superpatrons); i += 1)
19531988
{

0 commit comments

Comments
 (0)