Skip to content

Commit 5aa900e

Browse files
authored
Merge pull request #12 from rbergen/add-missing-translations
Added some missing English translations
2 parents 444bb29 + 624b6c7 commit 5aa900e

File tree

7 files changed

+15
-14
lines changed

7 files changed

+15
-14
lines changed

CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.15.0)
22

33
project(
44
R136
5-
VERSION 3.4.1)
5+
VERSION 3.4.2)
66

77
set(CURSES_NEED_NCURSES 1)
88
set(CURSES_NEED_WIDE 1)

include/base.h

+1-4
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,4 @@ AnimateStatus operator++(AnimateStatus& status, int);
77
AnimateStatus& operator++(AnimateStatus& status);
88

99
#include "templates/base.h"
10-
#include "inlines/base.h"
11-
12-
#define select(...) select_language_param(core.language, __VA_ARGS__)
13-
#define get_y_or_n() (tolower(console.main().get_char_input(select("jJnN", "yYnN"))) == select((int)'j', (int)'y'))
10+
#include "inlines/base.h"

include/inlines/base.h

+3-3
Original file line numberDiff line numberDiff line change
@@ -75,9 +75,9 @@ inline AnimateStatus& Item::target_status(CoreData& core)
7575
return core.animates[usable_on].status;
7676
}
7777

78-
inline void Item::report_pointless_use()
78+
inline void Item::report_pointless_use(CoreData &core)
7979
{
80-
console.main().print("Dat heeft geen zin.\n");
80+
console.main().print(select("Dat heeft geen zin.\n", "That serves no use.\n"));
8181
}
8282

8383
inline bool Item::use_to_status(CoreData& core, AnimateStatus to_status)
@@ -99,7 +99,7 @@ inline bool Item::use(CoreData& core)
9999
if (is_target_present(core))
100100
return use_with_target_present(core);
101101

102-
report_pointless_use();
102+
report_pointless_use(core);
103103
return true;
104104
}
105105

include/inlines/items.h

+3-3
Original file line numberDiff line numberDiff line change
@@ -31,20 +31,20 @@ inline bool Nightcap::use_with_target_present(CoreData& core)
3131
if (target_status(core) == AnimateStatus::sleeping_lightly)
3232
return use_to_status(core);
3333

34-
report_pointless_use();
34+
report_pointless_use(core);
3535
return false;
3636
}
3737

3838
inline bool Gasmask::use(CoreData& core)
3939
{
40-
console.main().print("Je hebt het gasmasker al op.");
40+
console.main().print(select("Je hebt het gasmasker al op.", "You're already wearing the gas mask."));
4141
console.main().empty_line();
4242
return false;
4343
}
4444

4545
inline bool ThermalSuit::use(CoreData& core)
4646
{
47-
console.main().print("Je hebt het hittepak al aan.");
47+
console.main().print(select("Je hebt het hittepak al aan.", "You're already wearing the thermal suit."));
4848
console.main().empty_line();
4949
return false;
5050
}

include/types/base.h

+5-1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@ constexpr auto to_value(E e) noexcept
1717
return static_cast<std::underlying_type_t<E>>(e);
1818
}
1919

20+
// included here because they are used in some headers that directly include this types/base.h
21+
#define select(...) select_language_param(core.language, __VA_ARGS__)
22+
#define get_y_or_n() (tolower(console.main().get_char_input(select("jJnN", "yYnN"))) == select((int)'j', (int)'y'))
23+
2024
enum class RoomType : char
2125
{
2226
forest,
@@ -291,7 +295,7 @@ struct Item : Entity<ItemID>
291295
AnimateStatus sets_target_to_status;
292296
bool is_target_present(CoreData& core);
293297
AnimateStatus& target_status(CoreData& core);
294-
void report_pointless_use();
298+
void report_pointless_use(CoreData& core);
295299

296300
virtual bool use_with_target_present(CoreData& core);
297301
virtual bool use_to_status(CoreData& core, AnimateStatus to_status = AnimateStatus::undefined);

src/intro.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,7 @@ namespace startup
324324
console.main().empty_line();
325325

326326
console.main().set_attribute(A_BOLD);
327-
console.main().print_centered(select("Versie 3.4.1, (C) 1998, 2022 R.I.P.", "Version 3.4.1, (C) 1998, 2022 R.I.P."));
327+
console.main().print_centered(select("Versie 3.4.2, (C) 1998, 2023 R.I.P.", "Version 3.4.2, (C) 1998, 2023 R.I.P."));
328328
console.main().unset_attribute(A_BOLD);
329329
console.main().empty_line();
330330
}

src/items/sword.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ bool Sword::use(CoreData& core)
1616
monsterID = AnimateID::plant;
1717
else
1818
{
19-
report_pointless_use();
19+
report_pointless_use(core);
2020
return false;
2121
}
2222

0 commit comments

Comments
 (0)