summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/process_desc.h
diff options
context:
space:
mode:
authorAdam Borowski <kilobyte@angband.pl>2012-04-02 16:12:49 +0200
committerAdam Borowski <kilobyte@angband.pl>2012-04-02 16:16:19 +0200
commit8eebffc28e2049213d5f35bba2880cf4a633891d (patch)
treea5ac9193478a0cd3b88f050699e1fc9606ae5d6f /crawl-ref/source/process_desc.h
parent829a39cf7120790dcbace3e081c838210183dbbf (diff)
downloadcrawl-ref-8eebffc28e2049213d5f35bba2880cf4a633891d.tar.gz
crawl-ref-8eebffc28e2049213d5f35bba2880cf4a633891d.zip
Rename translate.cc to lang-fake.cc, to avoid confusion.
I intend to name actual per-language C++ files lang-en.cc, lang-pl.cc
Diffstat (limited to 'crawl-ref/source/process_desc.h')
-rw-r--r--crawl-ref/source/process_desc.h24
1 files changed, 12 insertions, 12 deletions
diff --git a/crawl-ref/source/process_desc.h b/crawl-ref/source/process_desc.h
index 9e4771370f..3e4d3d1af6 100644
--- a/crawl-ref/source/process_desc.h
+++ b/crawl-ref/source/process_desc.h
@@ -7,7 +7,7 @@
#define DESCRIBE_TEMPLATES_H
#include "describe.h"
-#include "translate.h"
+#include "lang-fake.h"
template<class T> void process_description(T &proc, const describe_info &inf);
template<class T> void process_quote(T &proc, const describe_info &inf);
@@ -27,24 +27,24 @@ inline void process_description(T &proc, const describe_info &inf)
// How many lines is the title; we also seem to be adding 1 to
// start with.
- int num_lines = count_desc_lines(translated(inf.title), line_width) + 1;
+ int num_lines = count_desc_lines(filtered_lang(inf.title), line_width) + 1;
- int body_lines = count_desc_lines(translated(inf.body.str()), line_width);
- const int suffix_lines = count_desc_lines(translated(inf.suffix), line_width);
- const int prefix_lines = count_desc_lines(translated(inf.prefix), line_width);
- const int footer_lines = count_desc_lines(translated(inf.footer), line_width)
+ int body_lines = count_desc_lines(filtered_lang(inf.body.str()), line_width);
+ const int suffix_lines = count_desc_lines(filtered_lang(inf.suffix), line_width);
+ const int prefix_lines = count_desc_lines(filtered_lang(inf.prefix), line_width);
+ const int footer_lines = count_desc_lines(filtered_lang(inf.footer), line_width)
+ (inf.footer.empty() ? 0 : 1);
if (inf.title.empty())
{
- desc = translated(inf.body.str());
+ desc = filtered_lang(inf.body.str());
// There is a default 1 line addition for some reason.
num_lines = body_lines + 1;
}
else
{
- desc = translated(inf.title) + "\n\n";
- desc += translated(inf.body.str());
+ desc = filtered_lang(inf.title) + "\n\n";
+ desc += filtered_lang(inf.body.str());
// Got 2 lines from the two \ns that weren't counted yet.
num_lines += body_lines + 2;
}
@@ -52,14 +52,14 @@ inline void process_description(T &proc, const describe_info &inf)
// Prefer the footer over the suffix.
if (num_lines + suffix_lines + footer_lines <= height)
{
- desc = desc + translated(inf.suffix);
+ desc = desc + filtered_lang(inf.suffix);
num_lines += suffix_lines;
}
// Prefer the footer over the prefix.
if (num_lines + prefix_lines + footer_lines <= height)
{
- desc = translated(inf.prefix) + desc;
+ desc = filtered_lang(inf.prefix) + desc;
num_lines += prefix_lines;
}
@@ -72,7 +72,7 @@ inline void process_description(T &proc, const describe_info &inf)
if (newlines >= 0)
{
desc.append(newlines, '\n');
- desc = desc + translated(inf.footer);
+ desc = desc + filtered_lang(inf.footer);
}
}